diff --git a/cmd/fdsn-quake-consumer/assets/sc3ml_0.12__quakeml_1.2.xsl b/cmd/fdsn-quake-consumer/assets/sc3ml_0.12__quakeml_1.2.xsl
new file mode 100644
index 00000000..61b77fdf
--- /dev/null
+++ b/cmd/fdsn-quake-consumer/assets/sc3ml_0.12__quakeml_1.2.xsl
@@ -0,0 +1,729 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ induced or triggered event
+ meteorite
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ P waves
+ body waves
+ surface waves
+ mantle waves
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ other
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmd/fdsn-quake-consumer/assets/sc3ml_0.13__quakeml_1.2.xsl b/cmd/fdsn-quake-consumer/assets/sc3ml_0.13__quakeml_1.2.xsl
new file mode 100644
index 00000000..b54e5aa8
--- /dev/null
+++ b/cmd/fdsn-quake-consumer/assets/sc3ml_0.13__quakeml_1.2.xsl
@@ -0,0 +1,743 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ induced or triggered event
+ meteorite
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+ other event
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ P waves
+ body waves
+ surface waves
+ mantle waves
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ other
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmd/fdsn-quake-consumer/assets/sc3ml_0.6__quakeml_1.2.xsl b/cmd/fdsn-quake-consumer/assets/sc3ml_0.6__quakeml_1.2.xsl
new file mode 100644
index 00000000..8ca123a1
--- /dev/null
+++ b/cmd/fdsn-quake-consumer/assets/sc3ml_0.6__quakeml_1.2.xsl
@@ -0,0 +1,685 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ induced or triggered event
+ meteorite
+ other event
+ other event
+ other event
+ other event
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ P waves
+ body waves
+ surface waves
+ mantle waves
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ other
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmd/fdsn-quake-consumer/etc/2024p344188_0.12.xml b/cmd/fdsn-quake-consumer/etc/2024p344188_0.12.xml
new file mode 100644
index 00000000..b5235fa7
--- /dev/null
+++ b/cmd/fdsn-quake-consumer/etc/2024p344188_0.12.xml
@@ -0,0 +1,965 @@
+
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:22.474553Z
+
+
+ 19.834430014354417
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:23.980015Z
+
+
+ 23.79178689946981
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:25.987677Z
+
+
+ 36.56153409317519
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:25.485678Z
+
+
+ 25.544627602654597
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:31.508588Z
+
+
+ 11.799742907757528
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:35.020229Z
+
+
+ 12.055562115057384
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:37.52965Z
+
+
+ 12.600444520823523
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:40.039004Z
+
+
+ 5.792956408250047
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:37.028297Z
+
+
+ 9.90858313975316
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:27.99465Z
+
+
+ 11.86513007017867
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:23.477661Z
+
+
+ 15.84969658181076
+ SNR
+
+
+
+ ML
+
+ 4.460892001606508
+ 0.4963567271016389
+ 0.4963567271016398
+
+
+ 2024-05-07T08:24:18.195Z
+ -11.094999
+ 73.545
+
+ 5.014800999467099
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:34.501716Z
+
+
+
+ ML
+
+ 0.9008225866586296
+ 0.10861849553423208
+ 0.10861849553423208
+
+
+ 2024-05-07T08:24:17.09Z
+ -9.319999
+ 74.37
+
+ 13.275722354675903
+ 20240507.082412.77-AIC-NZ.WPRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:36.503833Z
+
+
+
+ ML
+
+ 0.802527864284964
+ 0.2751006462949439
+ 0.2751006462949439
+
+
+ 2024-05-07T08:24:15.78Z
+ -7.779999
+ 81.3
+
+ 27.31108078455628
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:41.510864Z
+
+
+
+ ML
+
+ 0.11274208610024788
+ 0.029809022675782837
+ 0.029809022675782837
+
+
+ 2024-05-07T08:24:18.115Z
+ -8.744999
+ 80.625
+
+ 6.173286111832603
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:44.014337Z
+
+
+
+ ML
+
+ 0.026643368093575554
+ 0.0004559793588821762
+ 0.0004559793588821762
+
+
+ 2024-05-07T08:24:30.235Z
+ -13.834999
+ 93.025
+
+ 2.37338895531859
+ 20240507.082421.40-AIC-NZ.MTHZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:08.550515Z
+
+
+
+ ML
+
+ 0.07779895907869505
+ 7.845718970347915e-05
+ 7.845718970346527e-05
+
+
+ 2024-05-07T08:25:33.975Z
+ -76.914999
+ 28.385
+
+ 1.5298644248637525
+ 20240507.082422.06-AIC-NZ.BKZ.10.HHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:10.052733Z
+
+
+
+ ML
+
+ 0.05808462282633366
+ 0.009047279542568433
+ 0.00904727954256844
+
+
+ 2024-05-07T08:24:31.475Z
+ -10.574999
+ 103.645
+
+ 1.8524602853746708
+ 20240507.082425.90-AIC-NZ.RAHZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:21.069449Z
+
+
+
+ ML
+
+ 0.12319921724262875
+ 0.011984695886955873
+ 0.011984695886955887
+
+
+ 2024-05-07T08:24:22.56Z
+ -10.409999
+ 36.08
+
+ 6.777741613878842
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:30.279581Z
+
+
+
+ MLv
+
+ 3.414161201904214
+
+
+ 2024-05-07T08:24:16.48Z
+ -9.38
+ 95.62
+
+ 4.4759538678683715
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.812846Z
+
+
+
+ MLv
+
+ 0.6619202005084016
+
+
+ 2024-05-07T08:24:17.88Z
+ -10.11
+ 94.89
+
+ 14.47891598680462
+ 20240507.082412.77-AIC-NZ.WPRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.02895Z
+
+
+
+ MLv
+
+ 1.121016542289534
+
+
+ 2024-05-07T08:24:15.72Z
+ -7.72
+ 97.28
+
+ 29.545752023840887
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.314861Z
+
+
+
+ MLv
+
+ 0.10334066870150928
+
+
+ 2024-05-07T08:24:18.31Z
+ -8.94
+ 96.06
+
+ 4.223420621920674
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.817393Z
+
+
+
+ MLv
+
+ 0.09175128554263902
+
+
+ 2024-05-07T08:24:22.19Z
+ -10.04
+ 94.96
+
+ 3.978545859797882
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:02.338874Z
+
+
+
+
+
+ -38.620634773178807
+ 20.788432822828636
+
+
+ 176.2128674424493
+ 59.63200891163431
+
+
+ 5.1162109375
+ 47.90405410369406
+
+ NonLinLoc
+ nz3drx
+
+ 11
+ 10
+ 10
+ 0.13178423630674604
+ 76.05025526639076
+ 103.53540022050215
+ -
+ 1.7691420017250776
+ 0.0752301603770797
+ 0.42073261208804774
+
+
+ 91.06907028087628
+ 29.650226274511756
+ 91.06907028087628
+ 82.85112176801192
+
+ 133220.60282790705
+ 35769.50157107233
+ 56138.84701364717
+ 125.81309535077644
+ -31.7774263697107
+ 80.73330402111526
+
+
+ automatic
+
+ WEL(GNS_Test)
+ screloc@eceqx06.geonet.org.nz
+ 2024-05-07T08:24:41.604178Z
+
+
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ
+ P
+ 0
+ 262.8044649665457
+ 0.0752301603770797
+ -0.014181110475329106
+ true
+ false
+ false
+ 1.7548053911487271
+
+
+ 20240507.082412.77-AIC-NZ.WPRZ.10.EHZ
+ P
+ 0
+ 338.85472023293647
+ 0.1057131470766627
+ 0.009727905180188401
+ true
+ false
+ false
+ 1.6937572656915252
+
+
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ
+ P
+ 0
+ 61.86039873946805
+ 0.11540765454092432
+ 0.041491201307508163
+ true
+ false
+ false
+ 1.6621946746192726
+
+
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ
+ P
+ 0
+ 50.21204179848849
+ 0.1863896318543343
+ -0.15311379632738031
+ true
+ false
+ false
+ 1.4272634495915164
+
+
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ
+ P
+ 0
+ 6.339865187047877
+ 0.3086254945142992
+ 0.13891251363966006
+ true
+ false
+ false
+ 1.1688740230511896
+
+
+ 20240507.082421.40-AIC-NZ.MTHZ.10.EHZ
+ P
+ 0
+ 116.0325275695501
+ 0.5328397296617963
+ -0.18937842569139463
+ true
+ false
+ false
+ 0.8577324921878121
+
+
+ 20240507.082422.06-AIC-NZ.BKZ.10.HHZ
+ P
+ 0
+ 160.42515432667005
+ 0.5823739904540164
+ -0.4820361252763554
+ true
+ false
+ false
+ 0.7730429749169101
+
+
+ 20240507.082425.90-AIC-NZ.RAHZ.10.EHZ
+ P
+ 0
+ 114.1904988866953
+ 0.7306600831429819
+ 0.5387204436323358
+ true
+ false
+ false
+ 0.6622297195804018
+
+
+ 20240507.082416.72-AIC-NZ.MTVZ.10.EHZ
+ P
+ 0
+ 218.13608832994862
+ 0.9758486804009027
+ -12.64448390207079
+ true
+ false
+ false
+ 5.00940582524839e-05
+
+
+ 20240507.082414.91-AIC-NZ.PREZ.10.EHZ
+ P
+ 0
+ 245.8684563383727
+ 1.7691420017250776
+ -26.322016073701647
+ true
+ false
+ false
+ 4.991515439388221e-05
+
+
+ 20240507.082412.71-AIC-NZ.THSZ.10.EHZ
+ P
+ 220.45381995493617
+ 0.09903294586549342
+ false
+ false
+ false
+ 0
+
+
+
+ 2.1585523011196575
+
+ ML
+ Amplitude/20240507082534.501668.37919
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:34.505959Z
+
+
+
+
+ 1.5485088123250257
+
+ ML
+ Amplitude/20240507082536.503799.37920
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:36.507701Z
+
+
+
+
+ 1.525279204039785
+
+ ML
+ Amplitude/20240507082541.51083.37922
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:41.514825Z
+
+
+
+
+ 0.8702263158318704
+
+ ML
+ Amplitude/20240507082544.014298.37923
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:44.01779Z
+
+
+
+
+ 1.4146751805623459
+
+ MLv
+ Amplitude/20240507082554.028914.37926
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.032321Z
+
+
+
+
+ 2.0424146148066615
+
+ MLv
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.816803Z
+
+
+
+
+ 1.670431105028863
+
+ MLv
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.31875Z
+
+
+
+
+ 0.8324115168650491
+
+ MLv
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.822733Z
+
+
+
+
+ 1.120553069705972
+
+ MLv
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:02.34256Z
+
+
+
+
+ 1.2068180304905038
+
+ ML
+ Amplitude/20240507082608.550476.37935
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:08.55491Z
+
+
+
+
+ 1.7147593978485318
+
+ ML
+ Amplitude/20240507082610.052693.37936
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:10.057299Z
+
+
+
+
+ 1.6702902046223596
+
+ ML
+ Amplitude/20240507082621.069399.37938
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:21.073042Z
+
+
+
+
+ 1.2485488602743389
+
+ ML
+ Amplitude/20240507082630.279544.37944
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:30.283027Z
+
+
+
+
+ 1.4857007516000909
+ 0.21263538166102364
+
+ ML
+ trimmed mean(25)
+ 6
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:34.505966Z
+ 2024-05-07T08:26:30.283081Z
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.ARAZ
+ 0.6728515495195666
+ 0
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.WPRZ
+ 0.06280806072493483
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.ALRZ
+ 0.039578452439694267
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.PRRZ
+ -0.6154744357682205
+ 0
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.MTHZ
+ -0.278882721109587
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.BKZ
+ 0.22905864624844097
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.RAHZ
+ 0.1845894530222687
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.HSRZ
+ -0.237151891325752
+ 1
+
+
+
+
+ 1.4089917745797527
+ 0.393910785524203
+
+ MLv
+ trimmed mean(25)
+ 5
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.032328Z
+ 2024-05-07T08:26:02.342595Z
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.ARAZ
+ 0.6334228402269089
+ 0.375
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.WPRZ
+ 0.005683405982593204
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.ALRZ
+ 0.26143933044911027
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.PRRZ
+ -0.5765802577147036
+ 0.375
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.HSRZ
+ -0.28843870487378065
+ 1
+
+
+
+
+ 1.4089917745797527
+
+ M
+ weighted average
+ 5
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.032349Z
+ 2024-05-07T08:26:02.342622Z
+
+
+
+
+ NLL.20240507082440.072929.9683
+ NLL.20240507082440.072929.9683/netMag/M
+ other
+
+ WEL(GNS_Test)
+ scevent@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:40.074348Z
+ 2024-05-07T22:58:22.37962Z
+
+
+ Taupo
+ region name
+
+ NLL.20240507082440.072929.9683
+
+
+
diff --git a/cmd/fdsn-quake-consumer/etc/2024p344188_0.13.xml b/cmd/fdsn-quake-consumer/etc/2024p344188_0.13.xml
new file mode 100644
index 00000000..6a05c50e
--- /dev/null
+++ b/cmd/fdsn-quake-consumer/etc/2024p344188_0.13.xml
@@ -0,0 +1,965 @@
+
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:22.474553Z
+
+
+ 19.834430014354417
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:23.980015Z
+
+
+ 23.79178689946981
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:25.987677Z
+
+
+ 36.56153409317519
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:25.485678Z
+
+
+ 25.544627602654597
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:31.508588Z
+
+
+ 11.799742907757528
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:35.020229Z
+
+
+ 12.055562115057384
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:37.52965Z
+
+
+ 12.600444520823523
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:40.039004Z
+
+
+ 5.792956408250047
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:37.028297Z
+
+
+ 9.90858313975316
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:27.99465Z
+
+
+ 11.86513007017867
+ SNR
+
+
+
+
+
+ BW(4,2.5,15)
+ AIC
+ P
+ automatic
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:23.477661Z
+
+
+ 15.84969658181076
+ SNR
+
+
+
+ ML
+
+ 4.460892001606508
+ 0.4963567271016389
+ 0.4963567271016398
+
+
+ 2024-05-07T08:24:18.195Z
+ -11.094999
+ 73.545
+
+ 5.014800999467099
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:34.501716Z
+
+
+
+ ML
+
+ 0.9008225866586296
+ 0.10861849553423208
+ 0.10861849553423208
+
+
+ 2024-05-07T08:24:17.09Z
+ -9.319999
+ 74.37
+
+ 13.275722354675903
+ 20240507.082412.77-AIC-NZ.WPRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:36.503833Z
+
+
+
+ ML
+
+ 0.802527864284964
+ 0.2751006462949439
+ 0.2751006462949439
+
+
+ 2024-05-07T08:24:15.78Z
+ -7.779999
+ 81.3
+
+ 27.31108078455628
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:41.510864Z
+
+
+
+ ML
+
+ 0.11274208610024788
+ 0.029809022675782837
+ 0.029809022675782837
+
+
+ 2024-05-07T08:24:18.115Z
+ -8.744999
+ 80.625
+
+ 6.173286111832603
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:44.014337Z
+
+
+
+ ML
+
+ 0.026643368093575554
+ 0.0004559793588821762
+ 0.0004559793588821762
+
+
+ 2024-05-07T08:24:30.235Z
+ -13.834999
+ 93.025
+
+ 2.37338895531859
+ 20240507.082421.40-AIC-NZ.MTHZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:08.550515Z
+
+
+
+ ML
+
+ 0.07779895907869505
+ 7.845718970347915e-05
+ 7.845718970346527e-05
+
+
+ 2024-05-07T08:25:33.975Z
+ -76.914999
+ 28.385
+
+ 1.5298644248637525
+ 20240507.082422.06-AIC-NZ.BKZ.10.HHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:10.052733Z
+
+
+
+ ML
+
+ 0.05808462282633366
+ 0.009047279542568433
+ 0.00904727954256844
+
+
+ 2024-05-07T08:24:31.475Z
+ -10.574999
+ 103.645
+
+ 1.8524602853746708
+ 20240507.082425.90-AIC-NZ.RAHZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:21.069449Z
+
+
+
+ ML
+
+ 0.12319921724262875
+ 0.011984695886955873
+ 0.011984695886955887
+
+
+ 2024-05-07T08:24:22.56Z
+ -10.409999
+ 36.08
+
+ 6.777741613878842
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:30.279581Z
+
+
+
+ MLv
+
+ 3.414161201904214
+
+
+ 2024-05-07T08:24:16.48Z
+ -9.38
+ 95.62
+
+ 4.4759538678683715
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.812846Z
+
+
+
+ MLv
+
+ 0.6619202005084016
+
+
+ 2024-05-07T08:24:17.88Z
+ -10.11
+ 94.89
+
+ 14.47891598680462
+ 20240507.082412.77-AIC-NZ.WPRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scamp@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.02895Z
+
+
+
+ MLv
+
+ 1.121016542289534
+
+
+ 2024-05-07T08:24:15.72Z
+ -7.72
+ 97.28
+
+ 29.545752023840887
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.314861Z
+
+
+
+ MLv
+
+ 0.10334066870150928
+
+
+ 2024-05-07T08:24:18.31Z
+ -8.94
+ 96.06
+
+ 4.223420621920674
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.817393Z
+
+
+
+ MLv
+
+ 0.09175128554263902
+
+
+ 2024-05-07T08:24:22.19Z
+ -10.04
+ 94.96
+
+ 3.978545859797882
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ
+
+
+ WEL(GNS_Test)
+ scautopick@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:02.338874Z
+
+
+
+
+
+ -38.620634773178807
+ 20.788432822828636
+
+
+ 176.2128674424493
+ 59.63200891163431
+
+
+ 5.1162109375
+ 47.90405410369406
+
+ NonLinLoc
+ nz3drx
+
+ 11
+ 10
+ 10
+ 0.13178423630674604
+ 76.05025526639076
+ 103.53540022050215
+ -
+ 1.7691420017250776
+ 0.0752301603770797
+ 0.42073261208804774
+
+
+ 91.06907028087628
+ 29.650226274511756
+ 91.06907028087628
+ 82.85112176801192
+
+ 133220.60282790705
+ 35769.50157107233
+ 56138.84701364717
+ 125.81309535077644
+ -31.7774263697107
+ 80.73330402111526
+
+
+ automatic
+
+ WEL(GNS_Test)
+ screloc@eceqx06.geonet.org.nz
+ 2024-05-07T08:24:41.604178Z
+
+
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ
+ P
+ 0
+ 262.8044649665457
+ 0.0752301603770797
+ -0.014181110475329106
+ true
+ false
+ false
+ 1.7548053911487271
+
+
+ 20240507.082412.77-AIC-NZ.WPRZ.10.EHZ
+ P
+ 0
+ 338.85472023293647
+ 0.1057131470766627
+ 0.009727905180188401
+ true
+ false
+ false
+ 1.6937572656915252
+
+
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ
+ P
+ 0
+ 61.86039873946805
+ 0.11540765454092432
+ 0.041491201307508163
+ true
+ false
+ false
+ 1.6621946746192726
+
+
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ
+ P
+ 0
+ 50.21204179848849
+ 0.1863896318543343
+ -0.15311379632738031
+ true
+ false
+ false
+ 1.4272634495915164
+
+
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ
+ P
+ 0
+ 6.339865187047877
+ 0.3086254945142992
+ 0.13891251363966006
+ true
+ false
+ false
+ 1.1688740230511896
+
+
+ 20240507.082421.40-AIC-NZ.MTHZ.10.EHZ
+ P
+ 0
+ 116.0325275695501
+ 0.5328397296617963
+ -0.18937842569139463
+ true
+ false
+ false
+ 0.8577324921878121
+
+
+ 20240507.082422.06-AIC-NZ.BKZ.10.HHZ
+ P
+ 0
+ 160.42515432667005
+ 0.5823739904540164
+ -0.4820361252763554
+ true
+ false
+ false
+ 0.7730429749169101
+
+
+ 20240507.082425.90-AIC-NZ.RAHZ.10.EHZ
+ P
+ 0
+ 114.1904988866953
+ 0.7306600831429819
+ 0.5387204436323358
+ true
+ false
+ false
+ 0.6622297195804018
+
+
+ 20240507.082416.72-AIC-NZ.MTVZ.10.EHZ
+ P
+ 0
+ 218.13608832994862
+ 0.9758486804009027
+ -12.64448390207079
+ true
+ false
+ false
+ 5.00940582524839e-05
+
+
+ 20240507.082414.91-AIC-NZ.PREZ.10.EHZ
+ P
+ 0
+ 245.8684563383727
+ 1.7691420017250776
+ -26.322016073701647
+ true
+ false
+ false
+ 4.991515439388221e-05
+
+
+ 20240507.082412.71-AIC-NZ.THSZ.10.EHZ
+ P
+ 220.45381995493617
+ 0.09903294586549342
+ false
+ false
+ false
+ 0
+
+
+
+ 2.1585523011196575
+
+ ML
+ Amplitude/20240507082534.501668.37919
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:34.505959Z
+
+
+
+
+ 1.5485088123250257
+
+ ML
+ Amplitude/20240507082536.503799.37920
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:36.507701Z
+
+
+
+
+ 1.525279204039785
+
+ ML
+ Amplitude/20240507082541.51083.37922
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:41.514825Z
+
+
+
+
+ 0.8702263158318704
+
+ ML
+ Amplitude/20240507082544.014298.37923
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:44.01779Z
+
+
+
+
+ 1.4146751805623459
+
+ MLv
+ Amplitude/20240507082554.028914.37926
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.032321Z
+
+
+
+
+ 2.0424146148066615
+
+ MLv
+ 20240507.082412.10-AIC-NZ.ARAZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.816803Z
+
+
+
+
+ 1.670431105028863
+
+ MLv
+ 20240507.082413.00-AIC-NZ.ALRZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.31875Z
+
+
+
+
+ 0.8324115168650491
+
+ MLv
+ 20240507.082414.37-AIC-NZ.PRRZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:55.822733Z
+
+
+
+
+ 1.120553069705972
+
+ MLv
+ 20240507.082417.15-AIC-NZ.HSRZ.10.EHZ.MLv
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:02.34256Z
+
+
+
+
+ 1.2068180304905038
+
+ ML
+ Amplitude/20240507082608.550476.37935
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:08.55491Z
+
+
+
+
+ 1.7147593978485318
+
+ ML
+ Amplitude/20240507082610.052693.37936
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:10.057299Z
+
+
+
+
+ 1.6702902046223596
+
+ ML
+ Amplitude/20240507082621.069399.37938
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:21.073042Z
+
+
+
+
+ 1.2485488602743389
+
+ ML
+ Amplitude/20240507082630.279544.37944
+
+ true
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:26:30.283027Z
+
+
+
+
+ 1.4857007516000909
+ 0.21263538166102364
+
+ ML
+ trimmed mean(25)
+ 6
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:34.505966Z
+ 2024-05-07T08:26:30.283081Z
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.ARAZ
+ 0.6728515495195666
+ 0
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.WPRZ
+ 0.06280806072493483
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.ALRZ
+ 0.039578452439694267
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.PRRZ
+ -0.6154744357682205
+ 0
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.MTHZ
+ -0.278882721109587
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.BKZ
+ 0.22905864624844097
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.RAHZ
+ 0.1845894530222687
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/ML/NZ.HSRZ
+ -0.237151891325752
+ 1
+
+
+
+
+ 1.4089917745797527
+ 0.393910785524203
+
+ MLv
+ trimmed mean(25)
+ 5
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.032328Z
+ 2024-05-07T08:26:02.342595Z
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.ARAZ
+ 0.6334228402269089
+ 0.375
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.WPRZ
+ 0.005683405982593204
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.ALRZ
+ 0.26143933044911027
+ 1
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.PRRZ
+ -0.5765802577147036
+ 0.375
+
+
+ NLL.20240507082440.072929.9683/staMag/MLv/NZ.HSRZ
+ -0.28843870487378065
+ 1
+
+
+
+
+ 1.4089917745797527
+
+ M
+ weighted average
+ 5
+
+ WEL(GNS_Test)
+ scmag@eceqp06.geonet.org.nz
+ 2024-05-07T08:25:54.032349Z
+ 2024-05-07T08:26:02.342622Z
+
+
+
+
+ NLL.20240507082440.072929.9683
+ NLL.20240507082440.072929.9683/netMag/M
+ other
+
+ WEL(GNS_Test)
+ scevent@eceqp06.geonet.org.nz
+ 2024-05-07T08:24:40.074348Z
+ 2024-05-07T22:58:22.37962Z
+
+
+ Taupo
+ region name
+
+ NLL.20240507082440.072929.9683
+
+
+
diff --git a/cmd/fdsn-quake-consumer/etc/2801727_0.6.xml b/cmd/fdsn-quake-consumer/etc/2801727_0.6.xml
new file mode 100644
index 00000000..dca0a99c
--- /dev/null
+++ b/cmd/fdsn-quake-consumer/etc/2801727_0.6.xml
@@ -0,0 +1,4092 @@
+
+
+
+
+
+
+
+ Sn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ emergent
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Sn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Sn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Sn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+
+
+ Pn
+ manual
+ confirmed
+
+
+ A
+
+ 15791.842000
+
+
+ 2007-10-01T13:37:01.548Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.003077
+
+
+ 2007-10-01T13:37:01.498Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000030
+
+
+ 2007-10-01T13:37:01.528Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000883
+
+
+ 2007-10-01T13:37:02.338Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 22119.730000
+
+
+ 2007-10-01T13:37:02.168Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.002846
+
+
+ 2007-10-01T13:37:07.058Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000030
+
+
+ 2007-10-01T13:37:02.148Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.001177
+
+
+ 2007-10-01T13:37:02.188Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 17865.887000
+
+
+ 2007-10-01T13:37:00.778Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.003729
+
+
+ 2007-10-01T13:37:06.598Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000030
+
+
+ 2007-10-01T13:37:05.588Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.001079
+
+
+ 2007-10-01T13:37:06.228Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 7950.392000
+
+
+ 2007-10-01T13:37:01.928Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000945
+
+
+ 2007-10-01T13:37:09.658Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:01.908Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000490
+
+
+ 2007-10-01T13:37:02.438Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 19598.932000
+
+
+ 2007-10-01T13:37:02.018Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.002128
+
+
+ 2007-10-01T13:36:59.978Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000030
+
+
+ 2007-10-01T13:37:01.998Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000785
+
+
+ 2007-10-01T13:37:00.538Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 22252.059000
+
+
+ 2007-10-01T13:37:04.178Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.002360
+
+
+ 2007-10-01T13:37:09.468Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000030
+
+
+ 2007-10-01T13:37:04.168Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.001079
+
+
+ 2007-10-01T13:37:04.018Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2803.844000
+
+
+ 2007-10-01T13:36:34.358Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000749
+
+
+ 2007-10-01T13:37:33.218Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:39.888Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000392
+
+
+ 2007-10-01T13:38:19.468Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2619.984000
+
+
+ 2007-10-01T13:36:39.268Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000658
+
+
+ 2007-10-01T13:37:43.208Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:38.448Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:38:54.708Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 3113.887000
+
+
+ 2007-10-01T13:37:24.818Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000735
+
+
+ 2007-10-01T13:37:30.618Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:38.288Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000392
+
+
+ 2007-10-01T13:37:36.968Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 7193.177000
+
+
+ 2007-10-01T13:36:34.225Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001097
+
+
+ 2007-10-01T13:37:25.805Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:19.175Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000588
+
+
+ 2007-10-01T13:36:32.735Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 9361.325000
+
+
+ 2007-10-01T13:37:17.875Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001875
+
+
+ 2007-10-01T13:37:18.315Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000020
+
+
+ 2007-10-01T13:37:18.355Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000588
+
+
+ 2007-10-01T13:38:08.875Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 11355.102000
+
+
+ 2007-10-01T13:37:18.835Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.002472
+
+
+ 2007-10-01T13:37:27.105Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000020
+
+
+ 2007-10-01T13:37:27.115Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000588
+
+
+ 2007-10-01T13:37:18.775Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 6070.126000
+
+
+ 2007-10-01T13:37:23.798Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001251
+
+
+ 2007-10-01T13:37:34.198Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:20.408Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000490
+
+
+ 2007-10-01T13:37:20.398Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 10761.311000
+
+
+ 2007-10-01T13:37:21.278Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001601
+
+
+ 2007-10-01T13:37:45.448Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000020
+
+
+ 2007-10-01T13:37:19.778Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000981
+
+
+ 2007-10-01T13:37:21.288Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 10973.473000
+
+
+ 2007-10-01T13:37:20.818Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001577
+
+
+ 2007-10-01T13:37:30.318Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000020
+
+
+ 2007-10-01T13:37:20.428Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000686
+
+
+ 2007-10-01T13:37:21.528Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2506.183000
+
+
+ 2007-10-01T13:37:47.198Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000851
+
+
+ 2007-10-01T13:38:03.128Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:58.958Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000490
+
+
+ 2007-10-01T13:37:37.478Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 4548.091000
+
+
+ 2007-10-01T13:37:47.498Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001140
+
+
+ 2007-10-01T13:38:04.888Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:04.838Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000686
+
+
+ 2007-10-01T13:37:37.458Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 3011.631000
+
+
+ 2007-10-01T13:37:47.608Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001024
+
+
+ 2007-10-01T13:38:07.738Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:08.188Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:36:50.038Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 3597.236000
+
+
+ 2007-10-01T13:36:39.089Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000813
+
+
+ 2007-10-01T13:37:33.389Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:33.209Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:36:39.099Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 6671.221000
+
+
+ 2007-10-01T13:37:34.689Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001677
+
+
+ 2007-10-01T13:37:53.469Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:44.289Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:37:34.189Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 7963.777000
+
+
+ 2007-10-01T13:37:32.369Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001402
+
+
+ 2007-10-01T13:37:43.039Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:32.049Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:37:32.419Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 4280.168000
+
+
+ 2007-10-01T13:37:36.605Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000964
+
+
+ 2007-10-01T13:37:36.735Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:36.765Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:37:36.615Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 4295.908000
+
+
+ 2007-10-01T13:37:37.235Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000963
+
+
+ 2007-10-01T13:37:45.485Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:35.215Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:37:37.255Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 4503.840000
+
+
+ 2007-10-01T13:37:38.225Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000919
+
+
+ 2007-10-01T13:37:52.915Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:52.935Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:37:37.625Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2006.952000
+
+
+ 2007-10-01T13:36:53.168Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000589
+
+
+ 2007-10-01T13:37:56.128Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:54.818Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:36:49.748Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 3908.407000
+
+
+ 2007-10-01T13:37:53.248Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001085
+
+
+ 2007-10-01T13:38:01.838Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:58.428Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:37:50.788Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 4820.082000
+
+
+ 2007-10-01T13:37:49.558Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000799
+
+
+ 2007-10-01T13:37:50.868Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:50.878Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:37:50.848Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2002.592000
+
+
+ 2007-10-01T13:37:52.558Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001176
+
+
+ 2007-10-01T13:38:05.388Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:05.818Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:37:52.418Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2780.773000
+
+
+ 2007-10-01T13:37:56.918Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001433
+
+
+ 2007-10-01T13:38:05.258Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:05.268Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:37:53.268Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2939.486000
+
+
+ 2007-10-01T13:37:52.398Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001194
+
+
+ 2007-10-01T13:37:58.958Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:15.738Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:39:53.978Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 217.302000
+
+
+ 2007-10-01T13:38:10.918Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000644
+
+
+ 2007-10-01T13:38:00.348Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:40:28.818Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:37:52.388Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 579.681000
+
+
+ 2007-10-01T13:38:11.828Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001293
+
+
+ 2007-10-01T13:38:06.378Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:37:48.428Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:38:11.898Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 428.727000
+
+
+ 2007-10-01T13:37:56.898Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000980
+
+
+ 2007-10-01T13:38:09.638Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000020
+
+
+ 2007-10-01T13:39:19.188Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:37:50.878Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 635.255000
+
+
+ 2007-10-01T13:38:09.198Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000661
+
+
+ 2007-10-01T13:38:45.928Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:46.508Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 571.836000
+
+
+ 2007-10-01T13:38:11.268Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000667
+
+
+ 2007-10-01T13:38:37.848Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:38.508Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 848.029000
+
+
+ 2007-10-01T13:38:08.358Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000463
+
+
+ 2007-10-01T13:38:35.388Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:39:29.518Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 575.486000
+
+
+ 2007-10-01T13:38:15.163Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000343
+
+
+ 2007-10-01T13:38:51.983Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 1022.309000
+
+
+ 2007-10-01T13:38:19.323Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000625
+
+
+ 2007-10-01T13:38:35.723Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 755.271000
+
+
+ 2007-10-01T13:38:14.233Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000449
+
+
+ 2007-10-01T13:38:38.703Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:40:43.883Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 502.001000
+
+
+ 2007-10-01T13:37:15.238Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000209
+
+
+ 2007-10-01T13:38:25.758Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:37:27.168Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 842.595000
+
+
+ 2007-10-01T13:38:27.768Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000261
+
+
+ 2007-10-01T13:39:09.208Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:38:50.928Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 736.294000
+
+
+ 2007-10-01T13:38:31.268Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000397
+
+
+ 2007-10-01T13:38:50.088Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:37:39.258Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 2186.478000
+
+
+ 2007-10-01T13:37:31.879Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000276
+
+
+ 2007-10-01T13:39:01.019Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 3040.505000
+
+
+ 2007-10-01T13:38:41.809Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000380
+
+
+ 2007-10-01T13:39:16.129Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 2347.059000
+
+
+ 2007-10-01T13:38:32.619Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000427
+
+
+ 2007-10-01T13:39:18.799Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 2460.564000
+
+
+ 2007-10-01T13:37:03.138Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000588
+
+
+ 2007-10-01T13:37:03.058Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000588
+
+
+ 2007-10-01T13:37:42.568Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 3847.675000
+
+
+ 2007-10-01T13:38:14.728Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.001132
+
+
+ 2007-10-01T13:38:12.488Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:21.858Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000392
+
+
+ 2007-10-01T13:37:41.818Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 5656.970000
+
+
+ 2007-10-01T13:38:09.888Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000917
+
+
+ 2007-10-01T13:38:44.208Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000010
+
+
+ 2007-10-01T13:38:09.878Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/s
+
+
+
+ A
+
+ 0.000392
+
+
+ 2007-10-01T13:37:43.498Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 84.788000
+
+
+ 2007-10-01T13:38:50.619Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000184
+
+
+ 2007-10-01T13:39:45.379Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:41:01.879Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 126.100000
+
+
+ 2007-10-01T13:39:00.579Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000210
+
+
+ 2007-10-01T13:39:40.629Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 114.736000
+
+
+ 2007-10-01T13:38:56.519Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000198
+
+
+ 2007-10-01T13:40:08.239Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 320.041000
+
+
+ 2007-10-01T13:39:01.249Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000264
+
+
+ 2007-10-01T13:39:49.179Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 333.546000
+
+
+ 2007-10-01T13:39:42.239Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000393
+
+
+ 2007-10-01T13:40:05.879Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000686
+
+
+ 2007-10-01T13:39:44.859Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 433.410000
+
+
+ 2007-10-01T13:39:44.689Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000366
+
+
+ 2007-10-01T13:39:44.319Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 285.890000
+
+
+ 2007-10-01T13:37:36.061Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000200
+
+
+ 2007-10-01T13:39:30.201Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:37:32.271Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 348.347000
+
+
+ 2007-10-01T13:38:52.941Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000259
+
+
+ 2007-10-01T13:39:27.251Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:39:35.961Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 350.942000
+
+
+ 2007-10-01T13:38:50.001Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000300
+
+
+ 2007-10-01T13:39:01.571Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:39:35.931Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 218.220000
+
+
+ 2007-10-01T13:37:35.229Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000143
+
+
+ 2007-10-01T13:40:10.679Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:39:03.549Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 146.840000
+
+
+ 2007-10-01T13:39:12.489Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000158
+
+
+ 2007-10-01T13:40:10.609Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:39:36.259Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 180.583000
+
+
+ 2007-10-01T13:39:16.749Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000317
+
+
+ 2007-10-01T13:39:58.399Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:39:36.259Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 356.869000
+
+
+ 2007-10-01T13:37:44.281Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000220
+
+
+ 2007-10-01T13:37:48.851Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:38:06.831Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 469.824000
+
+
+ 2007-10-01T13:37:49.251Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000342
+
+
+ 2007-10-01T13:37:51.231Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000294
+
+
+ 2007-10-01T13:38:06.821Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 335.907000
+
+
+ 2007-10-01T13:37:44.931Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000314
+
+
+ 2007-10-01T13:38:19.431Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:38:02.621Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 282.206000
+
+
+ 2007-10-01T13:37:50.591Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000103
+
+
+ 2007-10-01T13:37:59.321Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 110.747000
+
+
+ 2007-10-01T13:38:14.881Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000090
+
+
+ 2007-10-01T13:39:02.171Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 160.240000
+
+
+ 2007-10-01T13:37:50.871Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000100
+
+
+ 2007-10-01T13:37:58.341Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 101.654000
+
+
+ 2007-10-01T13:39:50.377Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000171
+
+
+ 2007-10-01T13:39:54.317Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:39:51.077Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 120.571000
+
+
+ 2007-10-01T13:39:48.577Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000185
+
+
+ 2007-10-01T13:40:39.377Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000098
+
+
+ 2007-10-01T13:40:14.337Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+ A
+
+ 124.098000
+
+
+ 2007-10-01T13:39:58.887Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=dimensionless
+
+
+
+ A
+
+ 0.000202
+
+
+ 2007-10-01T13:40:26.967Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m
+
+
+
+ A
+
+ 0.000196
+
+
+ 2007-10-01T13:39:52.137Z
+ 0
+ 0
+
+
+ automatic
+
+ unit=m/(s*s)
+
+
+
+
+
+ -49.10301
+
+
+ 164.175
+
+
+ 10
+
+ operator assigned
+ true
+ true
+ smi:ogc.def.crs/EPSG/4272
+ GROPE
+ nz1dr
+
+ 14
+ 10
+ 0.29521
+ 334
+ 5.413
+ 3.390
+
+ reviewed
+
+ NEIC
+ BGF
+ 2011-10-18T11:30:00.000Z
+ 2012-03-19T08:52:00.000Z
+
+
+ 5157486
+ Pn
+ 40
+ 5.409
+ 137
+ 1.435
+ 0.04
+
+
+ 8332301
+ Pn
+ 31
+ 3.390
+ 137
+ -0.432
+ 0.23
+
+
+ 8332300
+ Sn
+ 50
+ 3.424
+ 134
+ -2.848
+ 0.16
+
+
+ 8332302
+ Sn
+ 31
+ 3.390
+ 134
+ -0.922
+ 0.3
+
+
+ 8332303
+ Pn
+ 30
+ 4.165
+ 137
+ 0.172
+ 0.69
+
+
+ 8332309
+ Pn
+ 52
+ 4.855
+ 137
+ 0.454
+ 0.51
+
+
+ 5157482
+ Pn
+ 44
+ 5.219
+ 137
+ 0.219
+ 0.31
+
+
+ 8332306
+ Pn
+ 54
+ 4.215
+ 137
+ 0.33
+ 0.65
+
+
+ 8332308
+ Pn
+ 37
+ 4.601
+ 137
+ 1.019
+ 0.28
+
+
+ 8332311
+ Pn
+ 56
+ 5.413
+ 137
+ 0.865
+ 0.13
+
+
+ 8332307
+ Sn
+ 54
+ 4.215
+ 134
+ -2.846
+ 0.28
+
+
+ 8332299
+ Pn
+ 50
+ 3.424
+ 137
+ 0.091
+ 0.82
+
+
+ 8332304
+ Pn
+ 40
+ 4.104
+ 137
+ 0.11
+ 0.32
+
+
+ 8332305
+ Sn
+ 40
+ 4.104
+ 134
+ -1.045
+ 0.25
+
+
+
+ 4.9
+
+ Mw
+ 372332/GROPE
+
+ NEIC
+ BGF
+ 2011-10-18T11:30:00.000Z
+ 2012-05-21T16:04:00.000Z
+
+
+
+
+ 5
+
+ MS
+ 372332/GROPE
+
+
+
+ 5
+
+ Mb
+ 372332/GROPE
+
+
+
+ 372332/GROPE
+ 372332/GROPE
+ 372332/GROPE/MW
+ outside of network interest
+
+ WEL(CUSP_Catalogue)
+
+
+
+
diff --git a/cmd/fdsn-quake-consumer/sc3ml.go b/cmd/fdsn-quake-consumer/sc3ml.go
index 739a54e7..9d10cb9f 100644
--- a/cmd/fdsn-quake-consumer/sc3ml.go
+++ b/cmd/fdsn-quake-consumer/sc3ml.go
@@ -14,11 +14,14 @@ import (
const deleted = `not existing`
+var sc3ml06 = []byte(``)
var sc3ml07 = []byte(``)
var sc3ml08 = []byte(``)
var sc3ml09 = []byte(``)
var sc3ml10 = []byte(``)
var sc3ml11 = []byte(``)
+var sc3ml12 = []byte(``)
+var sc3ml13 = []byte(``)
// event is for saving information to the db.
// field names must match the column names in fdsn.event and the field names must be exported.
@@ -55,39 +58,43 @@ type event struct {
toQuakeMLEvent converts seisComPML to a QuakeML event fragment using an XSLT.
Supported versions of SC3ML are
- * 0.7
- * 0.8
- * 0.9
- * 0.10
- * 0.11
+ - 0.6
+ - 0.7
+ - 0.8
+ - 0.9
+ - 0.10
+ - 0.11
+ - 0.12
+ - 0.13
The xslt source is from http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.7/sc3ml_0.7__quakeml_1.2.xsl
It has been edited to output only an Event fragment without the parent elements and namespaces. e.g.,
- 129d128
- < xmlns="http://quakeml.org/xmlns/bed/1.2"
- 132c131
- <
- ---
- >
- 138c137
- <
- ---
- >
- 145d143
- <
- 147d144
- <
- 156d152
- <
- 158d153
- <
-
+ 129d128
+ < xmlns="http://quakeml.org/xmlns/bed/1.2"
+ 132c131
+ <
+ ---
+ >
+ 138c137
+ <
+ ---
+ >
+ 145d143
+ <
+ 147d144
+ <
+ 156d152
+ <
+ 158d153
+ <
*/
func toQuakeMLEvent(seisComPML []byte) (string, error) {
cmd := exec.Command("/usr/bin/xsltproc")
switch {
+ case bytes.Contains(seisComPML, sc3ml06):
+ cmd.Args = append(cmd.Args, "assets/sc3ml_0.6__quakeml_1.2.xsl")
case bytes.Contains(seisComPML, sc3ml07):
cmd.Args = append(cmd.Args, "assets/sc3ml_0.7__quakeml_1.2.xsl")
case bytes.Contains(seisComPML, sc3ml08):
@@ -98,6 +105,10 @@ func toQuakeMLEvent(seisComPML []byte) (string, error) {
cmd.Args = append(cmd.Args, "assets/sc3ml_0.10__quakeml_1.2.xsl")
case bytes.Contains(seisComPML, sc3ml11):
cmd.Args = append(cmd.Args, "assets/sc3ml_0.11__quakeml_1.2.xsl")
+ case bytes.Contains(seisComPML, sc3ml12):
+ cmd.Args = append(cmd.Args, "assets/sc3ml_0.12__quakeml_1.2.xsl")
+ case bytes.Contains(seisComPML, sc3ml13):
+ cmd.Args = append(cmd.Args, "assets/sc3ml_0.13__quakeml_1.2.xsl")
default:
return "", fmt.Errorf("found no %s", "XSLT")
diff --git a/cmd/fdsn-quake-consumer/sc3ml_test.go b/cmd/fdsn-quake-consumer/sc3ml_test.go
index d4b6f7d4..ef27abd5 100644
--- a/cmd/fdsn-quake-consumer/sc3ml_test.go
+++ b/cmd/fdsn-quake-consumer/sc3ml_test.go
@@ -72,6 +72,118 @@ func TestEventUnmarshal(t *testing.T) {
}
}
+func TestEventUnmarshalSC06(t *testing.T) {
+ for _, input := range []string{"2801727_0.6.xml"} {
+ b, err := os.ReadFile("etc/" + input)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ var e event
+ if err = unmarshal(b, &e); err != nil {
+ t.Error(err)
+ }
+ if !strings.HasPrefix(e.Quakeml12Event, ``) {
+ t.Errorf("%s: quakeml fragment should start with `) {
+ t.Errorf("%s: quakeml fragment should end with ", input)
+ }
+
+ c := event{
+ PublicID: "2801727",
+ EventType: "outside of network interest",
+ Longitude: 164.175,
+ Latitude: -49.10301,
+ Depth: 10,
+ DepthType: "operator assigned",
+ EvaluationMethod: "GROPE",
+ EarthModel: "nz1dr",
+ EvaluationMode: "",
+ EvaluationStatus: "reviewed",
+ UsedPhaseCount: 14,
+ UsedStationCount: 10,
+ OriginError: 0.29521,
+ AzimuthalGap: 334,
+ MinimumDistance: 3.39,
+ Magnitude: 4.9,
+ MagnitudeUncertainty: 0,
+ MagnitudeType: "Mw",
+ MagnitudeStationCount: 0,
+ Deleted: false,
+ Sc3ml: string(b),
+ }
+
+ c.ModificationTime, _ = time.Parse(time.RFC3339Nano, "2012-05-21T16:04:00Z")
+ c.OriginTime, _ = time.Parse(time.RFC3339Nano, "2007-10-01T13:35:26.69Z")
+
+ if c.Quakeml12Event, err = toQuakeMLEvent(b); err != nil {
+ t.Error(err)
+ }
+
+ if !reflect.DeepEqual(e, c) {
+ t.Errorf("c not equal to e, expected: %+v", e)
+ }
+ }
+}
+
+func TestEventUnmarshalSC12_13(t *testing.T) {
+ for _, input := range []string{"2024p344188_0.12.xml", "2024p344188_0.13.xml"} {
+ b, err := os.ReadFile("etc/" + input)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ var e event
+
+ if err = unmarshal(b, &e); err != nil {
+ t.Error(err)
+ }
+ if !strings.HasPrefix(e.Quakeml12Event, ``) {
+ t.Errorf("%s: quakeml fragment should start with `) {
+ t.Errorf("%s: quakeml fragment should end with ", input)
+ }
+
+ c := event{
+ PublicID: "2024p344188",
+ EventType: "other",
+ Longitude: 176.2128674424493,
+ Latitude: -38.62063477317881,
+ Depth: 5.1162109375,
+ EvaluationMethod: "NonLinLoc",
+ EarthModel: "nz3drx",
+ EvaluationMode: "automatic",
+ EvaluationStatus: "",
+ UsedPhaseCount: 10,
+ UsedStationCount: 10,
+ OriginError: 0.13178423630674604,
+ AzimuthalGap: 76.05025526639076,
+ MinimumDistance: 0.0752301603770797,
+ Magnitude: 1.4089917745797527,
+ MagnitudeUncertainty: 0,
+ MagnitudeType: "M",
+ MagnitudeStationCount: 5,
+ Deleted: false,
+ Sc3ml: string(b),
+ }
+
+ c.ModificationTime, _ = time.Parse(time.RFC3339Nano, "2024-05-07T22:58:22.37962Z")
+ c.OriginTime, _ = time.Parse(time.RFC3339Nano, "2024-05-07T08:24:09.853066Z")
+
+ if c.Quakeml12Event, err = toQuakeMLEvent(b); err != nil {
+ t.Error(err)
+ }
+
+ if !reflect.DeepEqual(e, c) {
+ t.Errorf("c not equal to e, expected: %+v", e)
+ }
+ }
+}
+
// TestEventType tests that the remapping of SC3ML event type to QuakeML is correct.
// The bug in the sc3ml_*_quakeml_1.2.xsl conversion (inserting "other" instead of "other event"
// has been fixed locally and reported upstream. GMC 12 Sept 2017
diff --git a/cmd/fdsn-ws/routes.go b/cmd/fdsn-ws/routes.go
index b9458129..a6e65f61 100644
--- a/cmd/fdsn-ws/routes.go
+++ b/cmd/fdsn-ws/routes.go
@@ -78,7 +78,7 @@ type fdsnError struct {
timestamp time.Time
}
-func fdsnErrorHandler(err error, h http.Header, b *bytes.Buffer) error {
+func fdsnErrorHandler(err error, h http.Header, b *bytes.Buffer, nounce string) error {
switch e := err.(type) {
case fdsnError:
var ver string
@@ -109,5 +109,5 @@ func fdsnErrorHandler(err error, h http.Header, b *bytes.Buffer) error {
return nil
}
- return weft.TextError(err, h, b)
+ return weft.TextError(err, h, b, nounce)
}
diff --git a/go.mod b/go.mod
index ccbd6ad3..abc4b27f 100644
--- a/go.mod
+++ b/go.mod
@@ -3,33 +3,34 @@ module github.com/GeoNet/fdsn
go 1.21
require (
- github.com/GeoNet/kit v0.0.0-20220629232654-4b4c51b3443f
+ github.com/GeoNet/kit v0.0.0-20240512234353-4d4493144f60
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/gorilla/schema v1.2.0
github.com/lib/pq v1.10.3
)
require (
- github.com/aws/aws-sdk-go-v2 v1.16.2 // indirect
- github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 // indirect
- github.com/aws/aws-sdk-go-v2/config v1.15.3 // indirect
- github.com/aws/aws-sdk-go-v2/credentials v1.11.2 // indirect
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3 // indirect
- github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.5 // indirect
- github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9 // indirect
- github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3 // indirect
- github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10 // indirect
- github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.0 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.3 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.3 // indirect
- github.com/aws/aws-sdk-go-v2/service/s3 v1.26.5 // indirect
- github.com/aws/aws-sdk-go-v2/service/sqs v1.18.3 // indirect
- github.com/aws/aws-sdk-go-v2/service/sso v1.11.3 // indirect
- github.com/aws/aws-sdk-go-v2/service/sts v1.16.3 // indirect
- github.com/aws/smithy-go v1.11.2 // indirect
- github.com/golang/protobuf v1.5.2 // indirect
+ github.com/aws/aws-sdk-go-v2 v1.25.3 // indirect
+ github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect
+ github.com/aws/aws-sdk-go-v2/config v1.27.7 // indirect
+ github.com/aws/aws-sdk-go-v2/credentials v1.17.7 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.11 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 // indirect
+ github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sqs v1.31.2 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 // indirect
+ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 // indirect
+ github.com/aws/smithy-go v1.20.1 // indirect
+ github.com/golang/protobuf v1.5.4 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
- google.golang.org/protobuf v1.27.1 // indirect
+ google.golang.org/protobuf v1.33.0 // indirect
)
diff --git a/go.sum b/go.sum
index f7d2445d..deeb7ae9 100644
--- a/go.sum
+++ b/go.sum
@@ -1,82 +1,72 @@
-github.com/GeoNet/kit v0.0.0-20220629232654-4b4c51b3443f h1:ZkDeDciYiXdUy6ZAF6btyC1qR6hNXjUKnAPw1num56Y=
-github.com/GeoNet/kit v0.0.0-20220629232654-4b4c51b3443f/go.mod h1:OnSDRHdXNzh4C2YSgoqug9225ciUWGx+Liht4xYPD3A=
-github.com/aws/aws-sdk-go-v2 v1.16.2 h1:fqlCk6Iy3bnCumtrLz9r3mJ/2gUT0pJ0wLFVIdWh+JA=
-github.com/aws/aws-sdk-go-v2 v1.16.2/go.mod h1:ytwTPBG6fXTZLxxeeCCWj2/EMYp/xDUgX+OET6TLNNU=
-github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 h1:SdK4Ppk5IzLs64ZMvr6MrSficMtjY2oS0WOORXTlxwU=
-github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1/go.mod h1:n8Bs1ElDD2wJ9kCRTczA83gYbBmjSwZp3umc6zF4EeM=
-github.com/aws/aws-sdk-go-v2/config v1.15.3 h1:5AlQD0jhVXlGzwo+VORKiUuogkG7pQcLJNzIzK7eodw=
-github.com/aws/aws-sdk-go-v2/config v1.15.3/go.mod h1:9YL3v07Xc/ohTsxFXzan9ZpFpdTOFl4X65BAKYaz8jg=
-github.com/aws/aws-sdk-go-v2/credentials v1.11.2 h1:RQQ5fzclAKJyY5TvF+fkjJEwzK4hnxQCLOu5JXzDmQo=
-github.com/aws/aws-sdk-go-v2/credentials v1.11.2/go.mod h1:j8YsY9TXTm31k4eFhspiQicfXPLZ0gYXA50i4gxPE8g=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3 h1:LWPg5zjHV9oz/myQr4wMs0gi4CjnDN/ILmyZUFYXZsU=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3/go.mod h1:uk1vhHHERfSVCUnqSqz8O48LBYDSC+k6brng09jcMOk=
-github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.5 h1:lPo/NX1o4vkk2C7mHmB2FCf9Qp7KZNHrlzHxdP/yugw=
-github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.5/go.mod h1:JNo9mEKrjnmDBc19z65TZmj1xG9PQHu2GOlApYk31DU=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9 h1:onz/VaaxZ7Z4V+WIN9Txly9XLTmoOh1oJ8XcAC3pako=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9/go.mod h1:AnVH5pvai0pAF4lXRq0bmhbes1u9R8wTE+g+183bZNM=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3 h1:9stUQR/u2KXU6HkFJYlqnZEjBnbgrVbG6I5HN09xZh0=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3/go.mod h1:ssOhaLpRlh88H3UmEcsBoVKq309quMvm3Ds8e9d4eJM=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10 h1:by9P+oy3P/CwggN4ClnW2D4oL91QV7pBzBICi1chZvQ=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10/go.mod h1:8DcYQcz0+ZJaSxANlHIsbbi6S+zMwjwdDqwW3r9AzaE=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.0 h1:cq+47u1zpHyH+PSkbBx1N9whx4TiM9m9ibimOPaNlBg=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.0/go.mod h1:Nf3QiqrNy2sj3Rku+9z4nN/bThI97gQmR7YxG3s+ez8=
-github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 h1:T4pFel53bkHjL2mMo+4DKE6r6AuoZnM0fg7k1/ratr4=
-github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1/go.mod h1:GeUru+8VzrTXV/83XyMJ80KpH8xO89VPoUileyNQ+tc=
-github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.3 h1:I0dcwWitE752hVSMrsLCxqNQ+UdEp3nACx2bYNMQq+k=
-github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.3/go.mod h1:Seb8KNmD6kVTjwRjVEgOT5hPin6sq+v4C2ycJQDwuH8=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3 h1:Gh1Gpyh01Yvn7ilO/b/hr01WgNpaszfbKMUgqM186xQ=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3/go.mod h1:wlY6SVjuwvh3TVRpTqdy4I1JpBFLX4UGeKZdWntaocw=
-github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.3 h1:BKjwCJPnANbkwQ8vzSbaZDKawwagDubrH/z/c0X+kbQ=
-github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.3/go.mod h1:Bm/v2IaN6rZ+Op7zX+bOUMdL4fsrYZiD0dsjLhNKwZc=
-github.com/aws/aws-sdk-go-v2/service/s3 v1.26.5 h1:A3PuAUlh1u47WHcM68CDaG9ZWjK7ewePjDp+0dY9yv4=
-github.com/aws/aws-sdk-go-v2/service/s3 v1.26.5/go.mod h1:qFKU5d+PAv+23bi9ZhtWeA+TmLUz7B/R59ZGXQ1Mmu4=
-github.com/aws/aws-sdk-go-v2/service/sns v1.17.4/go.mod h1:kElt+uCcXxcqFyc+bQqZPFD9DME/eC6oHBXvFzQ9Bcw=
-github.com/aws/aws-sdk-go-v2/service/sqs v1.18.3 h1:uHjK81fESbGy2Y9lspub1+C6VN5W2UXTDo2A/Pm4G0U=
-github.com/aws/aws-sdk-go-v2/service/sqs v1.18.3/go.mod h1:skmQo0UPvsjsuYYSYMVmrPc1HWCbHUJyrCEp+ZaLzqM=
-github.com/aws/aws-sdk-go-v2/service/sso v1.11.3 h1:frW4ikGcxfAEDfmQqWgMLp+F1n4nRo9sF39OcIb5BkQ=
-github.com/aws/aws-sdk-go-v2/service/sso v1.11.3/go.mod h1:7UQ/e69kU7LDPtY40OyoHYgRmgfGM4mgsLYtcObdveU=
-github.com/aws/aws-sdk-go-v2/service/sts v1.16.3 h1:cJGRyzCSVwZC7zZZ1xbx9m32UnrKydRYhOvcD1NYP9Q=
-github.com/aws/aws-sdk-go-v2/service/sts v1.16.3/go.mod h1:bfBj0iVmsUyUg4weDB4NxktD9rDGeKSVWnjTnwbx9b8=
-github.com/aws/smithy-go v1.11.2 h1:eG/N+CcUMAvsdffgMvjMKwfyDzIkjM6pfxMJ8Mzc6mE=
-github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM=
-github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
-github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
+github.com/GeoNet/kit v0.0.0-20240512234353-4d4493144f60 h1:BgAWCVg+WxU28mXiy/3le7H9nZUo37QS/+GfXSFWYgo=
+github.com/GeoNet/kit v0.0.0-20240512234353-4d4493144f60/go.mod h1:O5T12WrCE1SOD52A9Ye//Wjl3HX7BFZv3dXzDz3adMo=
+github.com/aws/aws-sdk-go-v2 v1.25.3 h1:xYiLpZTQs1mzvz5PaI6uR0Wh57ippuEthxS4iK5v0n0=
+github.com/aws/aws-sdk-go-v2 v1.25.3/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I=
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU=
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo=
+github.com/aws/aws-sdk-go-v2/config v1.27.7 h1:JSfb5nOQF01iOgxFI5OIKWwDiEXWTyTgg1Mm1mHi0A4=
+github.com/aws/aws-sdk-go-v2/config v1.27.7/go.mod h1:PH0/cNpoMO+B04qET699o5W92Ca79fVtbUnvMIZro4I=
+github.com/aws/aws-sdk-go-v2/credentials v1.17.7 h1:WJd+ubWKoBeRh7A5iNMnxEOs982SyVKOJD+K8HIezu4=
+github.com/aws/aws-sdk-go-v2/credentials v1.17.7/go.mod h1:UQi7LMR0Vhvs+44w5ec8Q+VS+cd10cjwgHwiVkE0YGU=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 h1:p+y7FvkK2dxS+FEwRIDHDe//ZX+jDhP8HHE50ppj4iI=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3/go.mod h1:/fYB+FZbDlwlAiynK9KDXlzZl3ANI9JkD0Uhz5FjNT4=
+github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.11 h1:QLDOiTR87HT9qViYMD27DHA55TsMRyfscY/AOoYShh4=
+github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.11/go.mod h1:vMy68zrZJ6mOjPOYypUtCEEeLtgVlzbqSE4zLBSPpYw=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 h1:ifbIbHZyGl1alsAhPIYsHOg5MuApgqOvVeI8wIugXfs=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3/go.mod h1:oQZXg3c6SNeY6OZrDY+xHcF4VGIEoNotX2B4PrDeoJI=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 h1:Qvodo9gHG9F3E8SfYOspPeBt0bjSbsevK8WhRAUHcoY=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3/go.mod h1:vCKrdLXtybdf/uQd/YfVR2r5pcbNuEYKzMQpcxmeSJw=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY=
+github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3 h1:mDnFOE2sVkyphMWtTH+stv0eW3k0OTx94K63xpxHty4=
+github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3/go.mod h1:V8MuRVcCRt5h1S+Fwu8KbC7l/gBGo3yBAyUbJM2IJOk=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8=
+github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5 h1:mbWNpfRUTT6bnacmvOTKXZjR/HycibdWzNpfbrbLDIs=
+github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5/go.mod h1:FCOPWGjsshkkICJIn9hq9xr6dLKtyaWpuUojiN3W1/8=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 h1:K/NXvIftOlX+oGgWGIa3jDyYLDNsdVhsjHmsBH2GLAQ=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY=
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 h1:4t+QEX7BsXz98W8W1lNvMAG+NX8qHz2CjLBxQKku40g=
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3/go.mod h1:oFcjjUq5Hm09N9rpxTdeMeLeQcxS7mIkBkL8qUKng+A=
+github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1 h1:Y/TTvxMdYwNvhzolvneV1wEEN/ncQUSd1AnzFGTMPqM=
+github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk=
+github.com/aws/aws-sdk-go-v2/service/sqs v1.31.2 h1:A9ihuyTKpS8Z1ou/D4ETfOEFMyokA6JjRsgXWTiHvCk=
+github.com/aws/aws-sdk-go-v2/service/sqs v1.31.2/go.mod h1:J3XhTE+VsY1jDsdDY+ACFAppZj/gpvygzC5JE0bTLbQ=
+github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc=
+github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2/go.mod h1:JYzLoEVeLXk+L4tn1+rrkfhkxl6mLDEVaDSvGq9og90=
+github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 h1:Ppup1nVNAOWbBOrcoOxaxPeEnSFB2RnnQdguhXpmeQk=
+github.com/aws/aws-sdk-go-v2/service/sts v1.28.4/go.mod h1:+K1rNPVyGxkRuv9NNiaZ4YhBFuyw2MMA9SlIJ1Zlpz8=
+github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw=
+github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/gocql/gocql v1.0.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
+github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
-github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/gorilla/schema v1.2.0 h1:YufUaxZYCKGFuAq3c96BOhjgd5nmXiOY9NGzF247Tsc=
github.com/gorilla/schema v1.2.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU=
-github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg=
github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
-google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
+google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/GeoNet/kit/aws/s3/s3.go b/vendor/github.com/GeoNet/kit/aws/s3/s3.go
index 7616656d..4432d3b8 100644
--- a/vendor/github.com/GeoNet/kit/aws/s3/s3.go
+++ b/vendor/github.com/GeoNet/kit/aws/s3/s3.go
@@ -8,6 +8,7 @@ import (
"fmt"
"io"
"os"
+ "sync"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
@@ -52,6 +53,17 @@ func NewWithMaxRetries(maxRetries int) (S3, error) {
return S3{client: client}, nil
}
+// NewWithOptions returns the same as New(), but with the additional option functions
+// applied.
+func NewWithOptions(optFns ...func(*s3.Options)) (S3, error) {
+ cfg, err := getConfig()
+ if err != nil {
+ return S3{}, err
+ }
+ client := s3.NewFromConfig(cfg, optFns...)
+ return S3{client: client}, nil
+}
+
// AddUploader creates an s3manager uploader and sets it to the S3 struct's
// uploader field. This can be used for streaming uploading.
func (s3 *S3) AddUploader() error {
@@ -78,7 +90,26 @@ func getConfig() (aws.Config, error) {
if os.Getenv("AWS_REGION") == "" {
return aws.Config{}, errors.New("AWS_REGION is not set")
}
- cfg, err := config.LoadDefaultConfig(context.TODO())
+
+ var cfg aws.Config
+ var err error
+
+ if awsEndpoint := os.Getenv("CUSTOM_AWS_ENDPOINT_URL"); awsEndpoint != "" {
+ customResolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return aws.Endpoint{
+ PartitionID: "aws",
+ URL: awsEndpoint,
+ HostnameImmutable: true,
+ }, nil
+ })
+
+ cfg, err = config.LoadDefaultConfig(
+ context.TODO(),
+ config.WithEndpointResolverWithOptions(customResolver))
+ } else {
+ cfg, err = config.LoadDefaultConfig(context.TODO())
+ }
+
if err != nil {
return aws.Config{}, err
}
@@ -91,7 +122,7 @@ func (s *S3) Ready() bool {
}
// Get gets the object referred to by key and version from bucket and writes it into b.
-// Version can be zero.
+// Version can be empty.
func (s *S3) Get(bucket, key, version string, b *bytes.Buffer) error {
input := s3.GetObjectInput{
Key: aws.String(key),
@@ -111,6 +142,29 @@ func (s *S3) Get(bucket, key, version string, b *bytes.Buffer) error {
return err
}
+// GetByteRange gets the specified byte range of an object referred to by key and version
+// from bucket and writes it into b. Version can be empty.
+// See https://www.rfc-editor.org/rfc/rfc9110.html#name-byte-ranges for examples
+func (s *S3) GetByteRange(bucket, key, version, byteRange string, b *bytes.Buffer) error {
+ input := s3.GetObjectInput{
+ Key: aws.String(key),
+ Bucket: aws.String(bucket),
+ Range: aws.String(byteRange),
+ }
+ if version != "" {
+ input.VersionId = aws.String(version)
+ }
+ result, err := s.client.GetObject(context.TODO(), &input)
+ if err != nil {
+ return err
+ }
+ defer result.Body.Close()
+
+ _, err = b.ReadFrom(result.Body)
+
+ return err
+}
+
// GetWithLastModified behaves the same as Get(), but also returns the time that
// the object was last modified.
func (s *S3) GetWithLastModified(bucket, key, version string, b *bytes.Buffer) (time.Time, error) {
@@ -150,7 +204,7 @@ func (s *S3) LastModified(bucket, key, version string) (time.Time, error) {
return aws.ToTime(result.LastModified), nil
}
-// GetMeta returns the metadata for an object. Version can be zero.
+// GetMeta returns the metadata for an object. Version can be empty.
func (s *S3) GetMeta(bucket, key, version string) (Meta, error) {
input := s3.HeadObjectInput{
Bucket: aws.String(bucket),
@@ -162,16 +216,36 @@ func (s *S3) GetMeta(bucket, key, version string) (Meta, error) {
res, err := s.client.HeadObject(context.TODO(), &input)
if err != nil {
- var nf *types.NotFound
- if errors.As(err, &nf) {
- return Meta{}, nil
+ if err != nil {
+ var ae smithy.APIError
+ if errors.As(err, &ae) {
+ if ae.ErrorCode() == "NotFound" {
+ return Meta{}, nil
+ }
+ }
+ return Meta{}, err
}
- return Meta{}, err
}
return res.Metadata, nil
}
+// GetContentSize returns the content length and last modified time of the specified key
+func (s *S3) GetContentSizeTime(bucket, key string) (int64, time.Time, error) {
+ var size int64
+ var mt time.Time
+ input := s3.HeadObjectInput{
+ Bucket: aws.String(bucket),
+ Key: aws.String(key),
+ }
+
+ o, err := s.client.HeadObject(context.TODO(), &input)
+ if err != nil {
+ return size, mt, err
+ }
+ return aws.ToInt64(o.ContentLength), aws.ToTime(o.LastModified), nil
+}
+
// Put puts the object in bucket using specified key.
func (s *S3) Put(bucket, key string, object []byte) error {
input := s3.PutObjectInput{
@@ -223,19 +297,15 @@ func (s *S3) Exists(bucket, key string) (bool, error) {
// It will not return more than the specified max number of keys.
// Keys are in alphabetical order.
func (s *S3) List(bucket, prefix string, max int32) ([]string, error) {
- input := s3.ListObjectsV2Input{
- Bucket: aws.String(bucket),
- Prefix: aws.String(prefix),
- MaxKeys: max,
- }
- out, err := s.client.ListObjectsV2(context.TODO(), &input)
+ objects, err := s.ListObjects(bucket, prefix, max)
if err != nil {
return nil, err
}
result := make([]string, 0)
- for _, o := range out.Contents {
+
+ for _, o := range objects {
result = append(result, aws.ToString(o.Key))
}
return result, nil
@@ -245,38 +315,26 @@ func (s *S3) List(bucket, prefix string, max int32) ([]string, error) {
// Keys are in alphabetical order.
func (s *S3) ListAll(bucket, prefix string) ([]string, error) {
- result := make([]string, 0)
-
- var continuationToken *string
+ objects, err := s.ListAllObjects(bucket, prefix)
+ if err != nil {
+ return nil, err
+ }
- for {
- input := s3.ListObjectsV2Input{
- Bucket: aws.String(bucket),
- Prefix: aws.String(prefix),
- ContinuationToken: continuationToken,
- }
+ result := make([]string, 0)
- out, err := s.client.ListObjectsV2(context.TODO(), &input)
- if err != nil {
- return nil, err
- }
- for _, o := range out.Contents {
- result = append(result, aws.ToString(o.Key))
- }
- // When result is not truncated, it means all matching keys have been found.
- if !out.IsTruncated {
- return result, nil
- }
- continuationToken = out.NextContinuationToken
+ for _, o := range objects {
+ result = append(result, aws.ToString(o.Key))
}
+ return result, nil
}
// Returns whether there is an object in bucket with specified prefix.
func (s *S3) PrefixExists(bucket, prefix string) (bool, error) {
+ maxKeys := int32(1)
input := s3.ListObjectsV2Input{
Bucket: aws.String(bucket),
Prefix: aws.String(prefix),
- MaxKeys: 1,
+ MaxKeys: &maxKeys,
}
out, err := s.client.ListObjectsV2(context.TODO(), &input)
if err != nil {
@@ -311,18 +369,20 @@ func (s *S3) ListCommonPrefixes(bucket, prefix, delimiter string) ([]string, err
result = append(result, aws.ToString(o.Prefix))
}
// When result is not truncated, it means all common prefixes have been found.
- if !out.IsTruncated {
+ if !(*out.IsTruncated) {
return result, nil
}
continuationToken = out.NextContinuationToken
}
}
-// ListObjects returns a list of objects (up to 1000) that match the provided prefix.
-func (s *S3) ListObjects(bucket, prefix string) ([]types.Object, error) {
+// ListObjects returns a list of objects that match the provided prefix.
+// It will not return more than the specified max number of keys.
+func (s *S3) ListObjects(bucket, prefix string, max int32) ([]types.Object, error) {
input := s3.ListObjectsV2Input{
- Bucket: aws.String(bucket),
- Prefix: aws.String(prefix),
+ Bucket: aws.String(bucket),
+ Prefix: aws.String(prefix),
+ MaxKeys: &max,
}
out, err := s.client.ListObjectsV2(context.TODO(), &input)
@@ -333,6 +393,106 @@ func (s *S3) ListObjects(bucket, prefix string) ([]types.Object, error) {
return out.Contents, nil
}
+// ListAllObjects returns a list of ALL objects that match the provided prefix.
+// Keys are in alphabetical order.
+func (s *S3) ListAllObjects(bucket, prefix string) ([]types.Object, error) {
+
+ result := make([]types.Object, 0)
+
+ var continuationToken *string
+
+ for {
+ input := s3.ListObjectsV2Input{
+ Bucket: aws.String(bucket),
+ Prefix: aws.String(prefix),
+ ContinuationToken: continuationToken,
+ }
+
+ out, err := s.client.ListObjectsV2(context.TODO(), &input)
+ if err != nil {
+ return nil, err
+ }
+ result = append(result, out.Contents...)
+
+ // When result is not truncated, it means all matching keys have been found.
+ if !(*out.IsTruncated) {
+ return result, nil
+ }
+ continuationToken = out.NextContinuationToken
+ }
+}
+
+// ListAllObjectsConcurrently returns a list of ALL objects that match the provided prefixes.
+// Keys are NOT in alphabetical order.
+func (s *S3) ListAllObjectsConcurrently(bucket string, prefixes []string) ([]types.Object, error) {
+
+ type work struct {
+ index int // Used to retain order.
+ bucket string
+ prefix string
+ result []types.Object
+ err error
+ }
+
+ input := make(chan work, len(prefixes))
+ output := make(chan work)
+
+ workerCount := 20
+ var wg sync.WaitGroup
+ wg.Add(workerCount)
+
+ // Workers take work from the input channel. work contains a prefix to List from S3.
+ // The result of the list is set, then sent to the output channel.
+ worker := func(s *S3, input <-chan work, output chan<- work, wg *sync.WaitGroup) {
+ defer wg.Done()
+
+ for w := range input {
+ w.result, w.err = s.ListAllObjects(w.bucket, w.prefix)
+ output <- w
+ }
+ }
+ // Create workers
+ for i := 0; i < workerCount; i++ {
+ go worker(s, input, output, &wg)
+ }
+ // Send prefixes to list to the workers.
+ for i, prefix := range prefixes {
+ input <- work{index: i, bucket: bucket, prefix: prefix}
+ }
+ close(input)
+
+ go func() {
+ wg.Wait()
+ close(output)
+ }()
+
+ // Read results and errors from output channel.
+ results := make([][]types.Object, len(prefixes))
+ errorList := make([]error, 0)
+ for w := range output {
+ if w.err != nil {
+ errorList = append(errorList, w.err)
+ }
+ results[w.index] = w.result
+ }
+
+ // If errors found, concatenate and return as error.
+ if len(errorList) > 0 {
+ var errorMessage string
+ for _, e := range errorList {
+ errorMessage += e.Error() + "\n"
+ }
+ return nil, errors.New(errorMessage)
+ }
+
+ // Append results into single slice before returning.
+ finalResult := make([]types.Object, 0)
+ for _, r := range results {
+ finalResult = append(finalResult, r...)
+ }
+ return finalResult, nil
+}
+
// PutStream puts the data stream to key in bucket.
func (s *S3) PutStream(bucket, key string, reader io.ReadCloser) error {
defer reader.Close()
@@ -380,3 +540,16 @@ func (s *S3) Delete(bucket, key string) error {
_, err := s.client.DeleteObject(context.TODO(), &input)
return err
}
+
+// Copy copies from the source to the bucket with key as the new name.
+// source should include the bucket name eg: "mybucket/objectkey.pdf"
+func (s *S3) Copy(bucket, key, source string) error {
+ input := s3.CopyObjectInput{
+ Bucket: aws.String(bucket),
+ Key: aws.String(key),
+ CopySource: aws.String(source),
+ }
+ _, err := s.client.CopyObject(context.TODO(), &input)
+
+ return err
+}
diff --git a/vendor/github.com/GeoNet/kit/aws/s3/s3_concurrent.go b/vendor/github.com/GeoNet/kit/aws/s3/s3_concurrent.go
new file mode 100644
index 00000000..b3b4c0ad
--- /dev/null
+++ b/vendor/github.com/GeoNet/kit/aws/s3/s3_concurrent.go
@@ -0,0 +1,369 @@
+package s3
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "sync"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ "github.com/aws/aws-sdk-go-v2/service/s3"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+)
+
+// This file contains code to allow S3 objects to be downloaded from S3 concurrently,
+// while still retaining the order that the objects were given in.
+// The pattern has been adapted from https://www.wwt.com/article/fan-out-fan-in-while-maintaining-order
+
+// General flow:
+
+// 0. To ensure memory usage at any one time doesn't get too big, enough memory to contain the size of all
+// the S3 Objects requested is secured from the memory pool before starting the work.
+// 1. When the Process function is called, it creates a worker group and takes the specified max number of
+// workers per request from the worker pool.
+// 2. The Process function returns the output channel which will have the desired HydratedFiles in order.
+// This needs to be read from to ensure this whole process is not blocked.
+// 3. Each worker adds themselves to the the WorkerGroup's roster, indicating they are ready to receive work.
+// 4. When a job comes in, the WorkerGroup's AddWork function gets the first available worker from
+// the roster channel and adds that worker's output channel to its reception channel in the order that workers
+// are added to the roster. Since work is given to workers in the order that they are in the roster, this
+// means it doesn't matter how long each piece of work takes, because all the workers' output is read from
+// reception in order, which will block if needed to ensure the WorkerGroup's final output is in the same order
+// as it came in.
+// 5. The Process function receives work from the jobs channel. Each job is an S3 Object to download.
+// 6. FileProcessor defines a function that turns a job into a HydratedFile. This is supplied to the Process function.
+// 7. After a worker finishes a piece of work, it adds itself back to the roster, and releases the memory for that
+// object back to the pool.
+// 8. The WorkerGroup's startOuput function acts a bridge, where it ranges over the reception channel, gets each
+// worker output channel, takes the HydratedFile from it, and sends it to its output channel.
+// 9. When the jobs channel is closed, and the last piece of work has been added to the WorkerGroup,
+// the WorkerGroup calls its stopWork function. This utilises Go's context package to cancel the process. This will
+// unblock the WorkerGroup's cleanup function which waits for the cancel to happen before waiting for all workers
+// to be finished via the WorkerGroup's sync.WaitGroup, after which it closes up the remaining channels.
+// 10. Each worker is returned to the worker pool.
+
+type S3Concurrent struct {
+ S3
+ manager *ConcurrencyManager
+}
+
+type ConcurrencyManager struct {
+ memoryPool memoryPool
+ workerPool workerPool
+ memoryTotalSize int64
+ memoryChunkSize int64
+ maxWorkersPerRequest int
+}
+
+type memoryPool struct {
+ channel chan int64
+ mutex sync.Mutex
+}
+
+type workerPool struct {
+ channel chan *worker
+ mutex sync.Mutex
+}
+
+type FileProcessor func(types.Object) HydratedFile
+
+type HydratedFile struct {
+ Key string
+ Data []byte
+ Error error
+}
+
+type worker struct {
+ manager *ConcurrencyManager
+ input chan types.Object
+ output chan HydratedFile
+}
+
+// NewConcurrent returns an S3Concurrent client, which embeds an S3 client, and has a ConcurrencyManager
+// to allow the use of the GetAllConcurrently function. The GetAllConcurrently function can download multiple files
+// at once while retaining order. The S3 client is configured to make use of the specified maxConnections.
+// Also, ensure that the S3 Client has access to maxBytes in memory to avoid out of memory errors.
+func NewConcurrent(maxConnections, maxConnectionsPerRequest, maxBytes int) (S3Concurrent, error) {
+
+ // Create S3 client with custom HTTP client to facilitate higher concurrency.
+ var err error
+ htmlClientOption := func(options *s3.Options) {
+ httpClient := awshttp.NewBuildableClient().WithTransportOptions(func(t *http.Transport) {
+ t.MaxIdleConns = maxConnections
+ t.MaxIdleConnsPerHost = maxConnections
+ })
+ options.HTTPClient = httpClient
+ }
+ s3Client, err := NewWithOptions(htmlClientOption)
+ if err != nil {
+ return S3Concurrent{}, fmt.Errorf("error creating base S3 Client for S3Concurrent: %w", err)
+ }
+ if maxConnections <= 0 || maxConnectionsPerRequest <= 0 || maxBytes <= 0 {
+ return S3Concurrent{}, errors.New("all parameters must be greater than 0")
+ }
+ if maxConnections > maxBytes {
+ return S3Concurrent{}, errors.New("max bytes must be greater than or equal to max connections")
+ }
+ if maxConnectionsPerRequest > maxConnections {
+ return S3Concurrent{}, errors.New("max connections must be greater than or equal to max connections per request")
+ }
+ return S3Concurrent{
+ S3: s3Client,
+ manager: newConcurrencyManager(maxConnections, maxConnectionsPerRequest, maxBytes),
+ }, nil
+}
+
+// newConcurrencyManager returns a new ConcurrencyManager set with the given specifications.
+func newConcurrencyManager(maxWorkers, maxWorkersPerRequest, maxBytes int) *ConcurrencyManager {
+ cm := ConcurrencyManager{}
+
+ // Create worker pool
+ wp := make(chan *worker, maxWorkers)
+ for i := 0; i < maxWorkers; i++ {
+ wp <- &worker{
+ manager: &cm,
+ input: make(chan types.Object, 1),
+ output: make(chan HydratedFile, 1),
+ }
+ }
+ cm.workerPool = workerPool{channel: wp}
+
+ // Create memory pool. This consists of a channel of "memory chunks",
+ // each of which is represented as an int64. The number of chunks and
+ // each chunk's size is calculated so that if all workers are downloading a file,
+ // the total size of all those files would be less than or equal to
+ // the specified max number of bytes.
+ mp := make(chan int64, maxWorkers)
+ memoryChunkSize := int64(maxBytes / maxWorkers)
+ for i := 0; i < maxWorkers; i++ {
+ mp <- memoryChunkSize
+ }
+ cm.memoryPool = memoryPool{channel: mp}
+ cm.memoryTotalSize = memoryChunkSize * int64(maxWorkers)
+ cm.memoryChunkSize = memoryChunkSize
+ cm.maxWorkersPerRequest = maxWorkersPerRequest
+
+ return &cm
+}
+
+// GetAllConcurrently gets the objects specified from bucket and writes the resulting HydratedFiles
+// to the returned output channel. The closure of this channel is handled, however it's the caller's
+// responsibility to purge the channel, and handle any errors present in the HydratedFiles.
+// If the ConcurrencyManager is not initialised before calling GetAllConcurrently, an output channel
+// containing a single HydratedFile with an error is returned.
+// Version can be empty, but must be the same for all objects.
+func (s *S3Concurrent) GetAllConcurrently(bucket, version string, objects []types.Object) chan HydratedFile {
+
+ if s.manager == nil {
+ output := make(chan HydratedFile, 1)
+ output <- HydratedFile{Error: errors.New("error getting files from S3, Concurrency Manager not initialised")}
+ close(output)
+ return output
+ }
+
+ if s.manager.memoryTotalSize < s.manager.calculateRequiredMemoryFor(objects) {
+ output := make(chan HydratedFile, 1)
+ output <- HydratedFile{Error: fmt.Errorf("error: bytes requested greater than max allowed by server (%v)", s.manager.memoryTotalSize)}
+ close(output)
+ return output
+ }
+ // Secure memory for all objects upfront.
+ s.manager.secureMemory(objects) // 0.
+
+ processFunc := func(input types.Object) HydratedFile {
+ buf := bytes.NewBuffer(make([]byte, 0, int(*input.Size)))
+ key := aws.ToString(input.Key)
+ err := s.Get(bucket, key, version, buf)
+
+ return HydratedFile{
+ Key: key,
+ Data: buf.Bytes(),
+ Error: err,
+ }
+ }
+ return s.manager.Process(processFunc, objects)
+}
+
+// getWorker retrieves a number of workers from the manager's worker pool.
+func (cm *ConcurrencyManager) getWorkers(number int) []*worker {
+ cm.workerPool.mutex.Lock()
+ defer cm.workerPool.mutex.Unlock()
+
+ workers := make([]*worker, number)
+ for i := 0; i < number; i++ {
+ workers[i] = <-cm.workerPool.channel
+ }
+ return workers
+}
+
+// returnWorker returns a worker to the manager's worker pool.
+func (cm *ConcurrencyManager) returnWorker(w *worker) {
+ cm.workerPool.channel <- w
+}
+
+// secureMemory secures the memory needed for the given objects
+// from the manager's memory pool.
+func (cm *ConcurrencyManager) secureMemory(objects []types.Object) {
+ cm.memoryPool.mutex.Lock()
+ defer cm.memoryPool.mutex.Unlock()
+
+ for _, o := range objects {
+ var securedMemory int64 = 0
+ for securedMemory < aws.ToInt64(o.Size) {
+ securedMemory += <-cm.memoryPool.channel
+ }
+ }
+}
+
+// calculateRequiredMemoryFor calculates the amount of memory required to contain
+// the given objects based on size. Useful as a precheck before securing to
+// ensure there's enough in the pool to fulfill the request.
+func (cm *ConcurrencyManager) calculateRequiredMemoryFor(objects []types.Object) int64 {
+ var totalMemory int64 = 0
+ for _, o := range objects {
+ numberOfChunks := aws.ToInt64(o.Size) / cm.memoryChunkSize
+ if aws.ToInt64(o.Size)%cm.memoryChunkSize != 0 {
+ numberOfChunks++
+ }
+ totalMemory += numberOfChunks * cm.memoryChunkSize
+ }
+ return totalMemory
+}
+
+// releaseMemory returns the specified amount of memory back to
+// the manager's memory pool.
+func (cm *ConcurrencyManager) releaseMemory(size int64) {
+ memoryToRelease := size
+ for memoryToRelease > 0 {
+ cm.memoryPool.channel <- cm.memoryChunkSize
+ memoryToRelease -= cm.memoryChunkSize
+ }
+}
+
+// Functions for providing a fan-out/fan-in operation. Workers are taken from the
+// worker pool and added to a WorkerGroup. All workers are returned to the pool once
+// the jobs have finished.
+func (cm *ConcurrencyManager) Process(asyncProcessor FileProcessor, objects []types.Object) chan HydratedFile {
+ workerGroup := cm.newWorkerGroup(context.Background(), asyncProcessor, cm.maxWorkersPerRequest) // 1.
+
+ go func() {
+ for _, obj := range objects {
+ workerGroup.addWork(obj)
+ }
+ workerGroup.stopWork() // 9.
+ }()
+ return workerGroup.returnOutput() // 2.
+}
+
+// start begins a worker's process of making itself available for work, doing the work,
+// and repeat, until all work is done.
+func (w *worker) start(ctx context.Context, processor FileProcessor, roster chan *worker, wg *sync.WaitGroup) {
+ go func() {
+ defer func() {
+ wg.Done()
+
+ // Make sure workers contents have been consumed
+ // before returning to pool.
+ if len(w.input) > 0 {
+ input := <-w.input
+ w.output <- processor(input)
+ w.manager.releaseMemory(int64(*input.Size))
+ }
+ for len(w.output) > 0 {
+ time.Sleep(1 * time.Millisecond)
+ }
+
+ w.manager.returnWorker(w) // 10.
+ }()
+ for {
+ roster <- w // 3., 7.
+
+ select {
+ case input := <-w.input: // 5.
+ w.output <- processor(input) // 6.
+ w.manager.releaseMemory(int64(*input.Size))
+ case <-ctx.Done(): // 9.
+ return
+ }
+ }
+ }()
+}
+
+type workerGroup struct {
+ roster chan *worker
+ reception chan chan HydratedFile
+ output chan HydratedFile
+ group *sync.WaitGroup
+ stop func()
+}
+
+// newWorkerGroup creates and returns a new workerGroup, which is a group of workers assembled
+// to service a request.
+func (cm *ConcurrencyManager) newWorkerGroup(ctx context.Context, processor FileProcessor, size int) workerGroup {
+ ctx, cancel := context.WithCancel(ctx)
+ workerGroup := workerGroup{
+ roster: make(chan *worker, size),
+ reception: make(chan chan HydratedFile, size),
+ output: make(chan HydratedFile),
+ stop: cancel,
+ group: &sync.WaitGroup{},
+ }
+ workerGroup.group.Add(size)
+
+ go func() {
+ workers := cm.getWorkers(size)
+ for _, w := range workers {
+ w.start(ctx, processor, workerGroup.roster, workerGroup.group)
+ }
+ }()
+ go workerGroup.startOutput()
+ go workerGroup.cleanUp(ctx)
+
+ return workerGroup
+}
+
+// startOutput begins the process of directing each worker's output
+// to the output channel.
+func (wg *workerGroup) startOutput() {
+ defer close(wg.output)
+ for woc := range wg.reception {
+ wg.output <- <-woc // 8.
+ }
+}
+
+// cleanUp blocks on the workerGroup's cancel Context. Once Done(),
+// it then waits for the workerGroup's WaitGroup to finish. After that,
+// the workerGroup's channels are closed.
+func (wg *workerGroup) cleanUp(ctx context.Context) {
+ <-ctx.Done()
+ wg.group.Wait() // 9.
+ close(wg.reception)
+ close(wg.roster)
+}
+
+// addWork gets the first available worker from the workerGroup's
+// roster, and gives it an S3 Object to download. The worker's output
+// channel is registered to the workerGroup's reception so that
+// order is retained.
+func (wg *workerGroup) addWork(newWork types.Object) { // 4.
+ for w := range wg.roster {
+ w.input <- newWork
+ wg.reception <- w.output
+ break
+ }
+}
+
+// returnOutput returns the workerGroup's output channel.
+func (wg *workerGroup) returnOutput() chan HydratedFile {
+ return wg.output
+}
+
+// stopWork calls the workerGroup's stop function, which initiates
+// the cleanup process.
+func (wg *workerGroup) stopWork() {
+ wg.stop()
+}
diff --git a/vendor/github.com/GeoNet/kit/aws/sqs/sqs.go b/vendor/github.com/GeoNet/kit/aws/sqs/sqs.go
index 29f7fbdf..8b9778a3 100644
--- a/vendor/github.com/GeoNet/kit/aws/sqs/sqs.go
+++ b/vendor/github.com/GeoNet/kit/aws/sqs/sqs.go
@@ -5,17 +5,22 @@ import (
"context"
"errors"
"fmt"
+ "math"
"os"
+ "strings"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/sqs"
+ "github.com/aws/aws-sdk-go-v2/service/sqs/types"
+ smithy "github.com/aws/smithy-go"
)
type Raw struct {
Body string
ReceiptHandle string
+ Attributes map[string]string
}
type SQS struct {
@@ -53,7 +58,26 @@ func getConfig() (aws.Config, error) {
if os.Getenv("AWS_REGION") == "" {
return aws.Config{}, errors.New("AWS_REGION is not set")
}
- cfg, err := config.LoadDefaultConfig(context.TODO())
+
+ var cfg aws.Config
+ var err error
+
+ if awsEndpoint := os.Getenv("CUSTOM_AWS_ENDPOINT_URL"); awsEndpoint != "" {
+ customResolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return aws.Endpoint{
+ PartitionID: "aws",
+ SigningRegion: region,
+ URL: awsEndpoint,
+ }, nil
+ })
+
+ cfg, err = config.LoadDefaultConfig(
+ context.TODO(),
+ config.WithEndpointResolverWithOptions(customResolver))
+ } else {
+ cfg, err = config.LoadDefaultConfig(context.TODO())
+ }
+
if err != nil {
return aws.Config{}, err
}
@@ -73,15 +97,37 @@ func (s *SQS) Ready() bool {
// Applications should be able to handle duplicate or out of order messages,
// and should back off on Receive error.
func (s *SQS) Receive(queueURL string, visibilityTimeout int32) (Raw, error) {
+ return s.ReceiveWithContext(context.TODO(), queueURL, visibilityTimeout)
+}
+
+// ReceiveWithAttributes is the same as Receive except that Queue Attributes can be requested
+// to be received with the message.
+func (s *SQS) ReceiveWithAttributes(queueURL string, visibilityTimeout int32, attrs []types.QueueAttributeName) (Raw, error) {
+ return s.ReceiveWithContextAttributes(context.TODO(), queueURL, visibilityTimeout, attrs)
+}
+
+// ReceiveWithContextAttributes by context and Queue Attributes,
+// so that system stop signal can be received by the context.
+// to receive system stop signal, register the context with signal.NotifyContext before passing in this function,
+// when system stop signal is received, an error with message '... context canceled' will be returned
+// which can be used to safely stop the system
+func (s *SQS) ReceiveWithContextAttributes(ctx context.Context, queueURL string, visibilityTimeout int32, attrs []types.QueueAttributeName) (Raw, error) {
input := sqs.ReceiveMessageInput{
QueueUrl: aws.String(queueURL),
MaxNumberOfMessages: 1,
VisibilityTimeout: visibilityTimeout,
WaitTimeSeconds: 20,
+ AttributeNames: attrs,
}
+ return s.receiveMessage(ctx, &input)
+}
+
+// receiveMessage is the common code used internally to receive an SQS message based
+// on the provided input.
+func (s *SQS) receiveMessage(ctx context.Context, input *sqs.ReceiveMessageInput) (Raw, error) {
for {
- r, err := s.client.ReceiveMessage(context.TODO(), &input)
+ r, err := s.client.ReceiveMessage(ctx, input)
if err != nil {
return Raw{}, err
}
@@ -96,6 +142,7 @@ func (s *SQS) Receive(queueURL string, visibilityTimeout int32) (Raw, error) {
m := Raw{
Body: aws.ToString(raw.Body),
ReceiptHandle: aws.ToString(raw.ReceiptHandle),
+ Attributes: raw.Attributes,
}
return m, nil
case len(r.Messages) > 1:
@@ -104,6 +151,20 @@ func (s *SQS) Receive(queueURL string, visibilityTimeout int32) (Raw, error) {
}
}
+// receive with context so that system stop signal can be received,
+// to receive system stop signal, register the context with signal.NotifyContext before passing in this function,
+// when system stop signal is received, an error with message '... context canceled' will be returned
+// which can be used to safely stop the system
+func (s *SQS) ReceiveWithContext(ctx context.Context, queueURL string, visibilityTimeout int32) (Raw, error) {
+ input := sqs.ReceiveMessageInput{
+ QueueUrl: aws.String(queueURL),
+ MaxNumberOfMessages: 1,
+ VisibilityTimeout: visibilityTimeout,
+ WaitTimeSeconds: 20,
+ }
+ return s.receiveMessage(ctx, &input)
+}
+
// Delete deletes the message referred to by receiptHandle from the queue.
func (s *SQS) Delete(queueURL, receiptHandle string) error {
params := sqs.DeleteMessageInput{
@@ -128,6 +189,19 @@ func (s *SQS) Send(queueURL string, body string) error {
return err
}
+// SendWithDelay is the same as Send but adds a delay (in seconds) before sending.
+func (s *SQS) SendWithDelay(queueURL string, body string, delay int32) error {
+ params := sqs.SendMessageInput{
+ QueueUrl: aws.String(queueURL),
+ MessageBody: aws.String(body),
+ DelaySeconds: delay,
+ }
+
+ _, err := s.client.SendMessage(context.TODO(), ¶ms)
+
+ return err
+}
+
// SendFifoMessage puts a message onto the given AWS SQS queue.
func (s *SQS) SendFifoMessage(queue, group, dedupe string, msg []byte) (string, error) {
var id *string
@@ -150,6 +224,46 @@ func (s *SQS) SendFifoMessage(queue, group, dedupe string, msg []byte) (string,
return "", nil
}
+// Leverage the sendbatch api for uploading large numbers of messages
+func (s *SQS) SendBatch(ctx context.Context, queueURL string, bodies []string) error {
+ if len(bodies) > 11 {
+ return errors.New("too many messages to batch")
+ }
+ var err error
+ entries := make([]types.SendMessageBatchRequestEntry, len(bodies))
+ for j, body := range bodies {
+ entries[j] = types.SendMessageBatchRequestEntry{
+ Id: aws.String(fmt.Sprintf("gamitjob%d", j)),
+ MessageBody: aws.String(body),
+ }
+ }
+ _, err = s.client.SendMessageBatch(ctx, &sqs.SendMessageBatchInput{
+ Entries: entries,
+ QueueUrl: &queueURL,
+ })
+ return err
+}
+
+func (s *SQS) SendNBatch(ctx context.Context, queueURL string, bodies []string) error {
+ var (
+ bodiesLen = len(bodies)
+ maxlen = 10
+ times = int(math.Ceil(float64(bodiesLen) / float64(maxlen)))
+ )
+ for i := 0; i < times; i++ {
+ batch_end := maxlen * (i + 1)
+ if maxlen*(i+1) > bodiesLen {
+ batch_end = bodiesLen
+ }
+ var bodies_batch = bodies[maxlen*i : batch_end]
+ err := s.SendBatch(ctx, queueURL, bodies_batch)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// GetQueueUrl returns an AWS SQS queue URL given its name.
func (s *SQS) GetQueueUrl(name string) (string, error) {
params := sqs.GetQueueUrlInput{
@@ -164,3 +278,11 @@ func (s *SQS) GetQueueUrl(name string) (string, error) {
}
return "", nil
}
+
+func Cancelled(err error) bool {
+ var opErr *smithy.OperationError
+ if errors.As(err, &opErr) {
+ return opErr.Service() == "SQS" && strings.Contains(opErr.Unwrap().Error(), "context canceled")
+ }
+ return false
+}
diff --git a/vendor/github.com/GeoNet/kit/metrics/types.go b/vendor/github.com/GeoNet/kit/metrics/types.go
index 278a7352..9e826efd 100644
--- a/vendor/github.com/GeoNet/kit/metrics/types.go
+++ b/vendor/github.com/GeoNet/kit/metrics/types.go
@@ -1,10 +1,17 @@
package metrics
+import "context"
+
// Message defines an interface for processing bytes.
type Processor interface {
Process([]byte) error
}
+// processor with passed in context to catch possible system stop signal
+type ProcessorWithContext interface {
+ Process(context.Context, []byte) error
+}
+
// DoProcess executes m.Process with messaging metrics.
func DoProcess(m Processor, b []byte) error {
MsgRx()
@@ -25,6 +32,27 @@ func DoProcess(m Processor, b []byte) error {
return err
}
+// DoProcess executes m.Process with messaging metrics.
+// pass a context to processor to catch system stop signal
+func DoProcessWithContext(ctx context.Context, m ProcessorWithContext, b []byte) error {
+ MsgRx()
+ t := Start()
+ defer func() {
+ _ = t.Track("process") // we keep this package simple thus not reporting this error
+ }()
+
+ err := m.Process(ctx, b)
+
+ switch err {
+ case nil:
+ MsgProc()
+ default:
+ MsgErr()
+ }
+
+ return err
+}
+
// Logger defines an interface for logging.
type Logger interface {
Printf(string, ...interface{})
diff --git a/vendor/github.com/GeoNet/kit/sc3ml/quake.go b/vendor/github.com/GeoNet/kit/sc3ml/quake.go
index 3bfb8349..b718b51c 100644
--- a/vendor/github.com/GeoNet/kit/sc3ml/quake.go
+++ b/vendor/github.com/GeoNet/kit/sc3ml/quake.go
@@ -3,7 +3,6 @@ package sc3ml
import (
"fmt"
"io"
- "io/ioutil"
"time"
)
@@ -106,7 +105,7 @@ func (q *Quake) Manual() bool {
func FromSC3ML(r io.Reader) (Quake, error) {
var s Seiscomp
- b, err := ioutil.ReadAll(r)
+ b, err := io.ReadAll(r)
if err != nil {
return Quake{}, err
}
diff --git a/vendor/github.com/GeoNet/kit/sc3ml/sc3ml.go b/vendor/github.com/GeoNet/kit/sc3ml/sc3ml.go
index 302fd9c6..249c8c0a 100644
--- a/vendor/github.com/GeoNet/kit/sc3ml/sc3ml.go
+++ b/vendor/github.com/GeoNet/kit/sc3ml/sc3ml.go
@@ -11,11 +11,14 @@ import (
)
const (
+ sc3ml06 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.6`
sc3ml07 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.7`
sc3ml08 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.8`
sc3ml09 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.9`
sc3ml10 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.10`
sc3ml11 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.11`
+ sc3ml12 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.12`
+ sc3ml13 = `http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.13`
)
type Seiscomp struct {
@@ -143,7 +146,7 @@ type Amplitude struct {
// the objects referenced by ID in the SeisComPML e.g., PreferredOrigin,
// PreferredMagnitude etc.
//
-// Supported SC3ML versions are 0.7, 0.8, 0.9, 0.10, 0.11
+// Supported SC3ML versions are 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13
// Any other versions will result in a error.
func Unmarshal(b []byte, s *Seiscomp) error {
if err := xml.Unmarshal(b, s); err != nil {
@@ -151,11 +154,14 @@ func Unmarshal(b []byte, s *Seiscomp) error {
}
switch s.XMLns {
+ case sc3ml06:
case sc3ml07:
case sc3ml08:
case sc3ml09:
case sc3ml10:
case sc3ml11:
+ case sc3ml12:
+ case sc3ml13:
default:
return errors.New("unsupported SC3ML version")
}
diff --git a/vendor/github.com/GeoNet/kit/seis/sl/state.go b/vendor/github.com/GeoNet/kit/seis/sl/state.go
index ee7d6df4..d0a5918d 100644
--- a/vendor/github.com/GeoNet/kit/seis/sl/state.go
+++ b/vendor/github.com/GeoNet/kit/seis/sl/state.go
@@ -2,7 +2,7 @@ package sl
import (
"encoding/json"
- "io/ioutil"
+ "os"
"path"
"sort"
"sync"
@@ -119,7 +119,7 @@ func (s *State) ReadFile(path string) error {
return nil
}
- data, err := ioutil.ReadFile(path)
+ data, err := os.ReadFile(path)
if err != nil {
return err
}
@@ -142,7 +142,7 @@ func (s *State) WriteFile(path string) error {
return err
}
- if err := ioutil.WriteFile(path, data, 0644); err != nil { // nolint: gosec
+ if err := os.WriteFile(path, data, 0644); err != nil { // nolint: gosec
return err
}
diff --git a/vendor/github.com/GeoNet/kit/weft/assets.go b/vendor/github.com/GeoNet/kit/weft/assets.go
index ca082eb3..dc023fc7 100644
--- a/vendor/github.com/GeoNet/kit/weft/assets.go
+++ b/vendor/github.com/GeoNet/kit/weft/assets.go
@@ -6,13 +6,15 @@ import (
"crypto/sha256"
"crypto/sha512"
"encoding/base64"
+ "errors"
"fmt"
"html/template"
"io"
- "io/ioutil"
"net/http"
"os"
+ "path"
"path/filepath"
+ "sort"
"strings"
)
@@ -20,24 +22,26 @@ type asset struct {
path string
hashedPath string
mime string
+ fileType string
b []byte
sri string
}
// assets is populated during init and then is only used for reading.
var assets = make(map[string]*asset)
+
+// assetHashes maps asset filename to the corresponding hash-prefixed asset pathname.
+var assetHashes = make(map[string]string)
var assetError error
func init() {
assetError = initAssets("assets/assets", "assets")
}
-/*
- As part of Subresource Integrity we need to calculate the hash of the asset, we do this when the asset is loaded into memory
- This should only be used for files that are stored alongside the server, as remote files could be tampered with and we'd still
- just calculate the hash.
- Externally hosted files should have a precalculated SRI
-*/
+// As part of Subresource Integrity we need to calculate the hash of the asset, we do this when the asset is loaded into memory
+// This should only be used for files that are stored alongside the server, as remote files could be tampered with and we'd still
+// just calculate the hash.
+// Externally hosted files should have a precalculated SRI
func calcSRIhash(b []byte) (string, error) {
var buf bytes.Buffer
@@ -52,9 +56,7 @@ func calcSRIhash(b []byte) (string, error) {
return "sha384-" + buf.String(), nil
}
-/**
- * create a random nonce string of specified length
- */
+// getCspNonce creates a random nonce string of specified length.
func getCspNonce(len int) (string, error) {
b := make([]byte, len)
if _, err := io.ReadFull(rand.Reader, b); err != nil {
@@ -70,52 +72,155 @@ func getCspNonce(len int) (string, error) {
return buf.String(), nil
}
-/**
- * Wrapped by the following function to allow testing
- * @param nonce: nonce to be added as script attribute
- */
-func createSubResourceTag(a *asset, nonce string) (string, error) {
- switch a.mime {
- case "text/javascript":
+// createSubResourceTag returns a script tag as a string, based on the given
+// asset, nonce, and script loading attribute (ie: "defer" or "async")
+func createSubResourceTag(a *asset, nonce, attr string) (string, error) {
+ switch a.fileType {
+ case "js":
if nonce != "" {
- return fmt.Sprintf(``, a.hashedPath, a.sri, nonce), nil
+ return fmt.Sprintf(``, a.hashedPath, a.sri, nonce, attr), nil
} else {
- return fmt.Sprintf(``, a.hashedPath, a.sri), nil
+ return fmt.Sprintf(``, a.hashedPath, a.sri, attr), nil
}
- case "text/css":
- return fmt.Sprintf(``, a.hashedPath, a.sri), nil
+ case "mjs":
+ if nonce != "" {
+ return fmt.Sprintf(``, a.hashedPath, a.sri, nonce, attr), nil
+ } else {
+ return fmt.Sprintf(``, a.hashedPath, a.sri, attr), nil
+ }
+ case "css":
+ return fmt.Sprintf(``, a.hashedPath, a.sri, attr), nil
+ case "map":
+ return fmt.Sprintf(``, a.path, a.sri, attr), nil
default:
return "", fmt.Errorf("cannot create an embedded resource tag for mime: '%v'", a.mime)
}
}
-/*
- * Generates a tag for a resource with the hashed path and SRI hash.
- * Returns a template.HTML so it won't throw warnings with golangci-lint
- * @param args: 1~2 strings: 1. the asset path, 2. nonce for script attribute
- */
+// createSubResourcePreloadTag returns a module preload tag for a .mjs file.
+func createSubResourcePreloadTag(a *asset, nonce string) (string, error) {
+ if a.fileType != "mjs" {
+ return "", errors.New("can only create module preload tag for module scripts")
+ }
+ if nonce != "" {
+ return fmt.Sprintf(``, a.hashedPath, a.sri, nonce), nil
+ } else {
+ return fmt.Sprintf(``, a.hashedPath, a.sri), nil
+ }
+}
+
+// CreateSubResourceTag generates a tag for a resource with the hashed path and SRI hash.
+// Returns a template.HTML so it won't throw warnings with golangci-lint.
+// args can be 1~3 strings: 1. the asset path, 2. nonce for script attribute,
+// 3. script loading attribute ("defer" or "async").
func CreateSubResourceTag(args ...string) (template.HTML, error) {
var nonce string
if len(args) > 1 {
nonce = args[1]
}
- a, ok := assets[args[0]]
+ var attr string
+ if len(args) > 2 {
+ if args[2] == "defer" || args[2] == "async" {
+ attr = args[2]
+ }
+ }
+ hashedPath, ok := assetHashes[args[0]]
+ if !ok {
+ return template.HTML(""), fmt.Errorf("hashed pathname for asset not found for '%s", args[0])
+ }
+ a, ok := assets[hashedPath]
if !ok {
- return template.HTML(""), fmt.Errorf("asset does not exist at path '%v'", args[0])
+ return template.HTML(""), fmt.Errorf("asset does not exist at path '%v'", hashedPath)
}
- s, err := createSubResourceTag(a, nonce)
+ s, err := createSubResourceTag(a, nonce, attr)
return template.HTML(s), err //nolint:gosec //We're writing these ourselves, any changes will be reviewd, acceptable risk. (Could add URLencoding if there's any concern)
}
+// CreateSubResourcePreload generates a tag that preloads a JavaScript module file. This is helpful to
+// allow the file to be fetched in parallel with the module file that imports it, and also allows us
+// to set the SRI attribute of imported modules.
+func CreateSubResourcePreload(args ...string) (template.HTML, error) {
+ var nonce string
+ if len(args) > 1 {
+ nonce = args[1]
+ }
+ hashedPath, ok := assetHashes[args[0]]
+ if !ok {
+ return template.HTML(""), fmt.Errorf("hashed pathname for asset not found for '%s", args[0])
+ }
+ a, ok := assets[hashedPath]
+ if !ok {
+ return template.HTML(""), fmt.Errorf("asset does not exist at path '%v'", hashedPath)
+ }
+
+ s, err := createSubResourcePreloadTag(a, nonce)
+
+ return template.HTML(s), err //nolint:gosec
+}
+
+// CreateImportMap generates an import map script tag which maps JS module asset filenames to their
+// respectful hash-prefixed path name. eg:
+//
+//
+func CreateImportMap(nonce string) template.HTML {
+
+ importMapping := make(map[string]string, 0)
+ for k, v := range assetHashes {
+ if !strings.HasSuffix(k, ".mjs") {
+ continue
+ }
+ filename := path.Base(k)
+ importMapping[filename] = v
+ }
+ if len(importMapping) == 0 {
+ return template.HTML("")
+ }
+ importMap := createImportMapTag(importMapping, nonce)
+
+ return template.HTML(importMap) //nolint:gosec
+}
+
+// createImportMapTag returns the "
+
+ return importMap
+}
+
// AssetHandler serves assets from the local directory `assets/assets`. Assets are loaded from this
// directory on start up and served from memory. Any errors during start up will be served by AssetHandlers.
// Assets are served at the path `/assets/...` and can be also be served with a hashed path which finger prints the asset
// for uniqueness for caching e.g.,
//
-// /assets/bootstrap/hello.css
-// /assets/bootstrap/1fdd2266-hello.css
+// /assets/bootstrap/hello.css
+// /assets/bootstrap/1fdd2266-hello.css
//
// The finger printed path can be looked up with AssetPath.
func AssetHandler(r *http.Request, h http.Header, b *bytes.Buffer) error {
@@ -142,16 +247,6 @@ func AssetHandler(r *http.Request, h http.Header, b *bytes.Buffer) error {
return nil
}
-// AssetPath returns the finger printed path for path e.g., `/assets/bootstrap/hello.css`
-// returns `/assets/bootstrap/1fdd2266-hello.css`.
-func AssetPath(path string) string {
- return assets[path].path
-}
-
-func SRIforPath(path string) string {
- return assets[path].path
-}
-
// loadAsset loads file and finger prints it with a sha256 hash. prefix is stripped
// from path members in the returned asset.
func loadAsset(file, prefix string) (*asset, error) {
@@ -177,13 +272,14 @@ func loadAsset(file, prefix string) (*asset, error) {
l := strings.LastIndex(a.path, ".")
if l > -1 && l < len(a.path) {
suffix = strings.ToLower(a.path[l+1:])
+ a.fileType = suffix
}
// these types should appear in weft.compressibleMimes as appropriate
switch suffix {
- case "js":
+ case "js", "mjs", "map":
a.mime = "text/javascript"
- case "css", "map":
+ case "css":
a.mime = "text/css"
case "jpeg", "jpg":
a.mime = "image/jpeg"
@@ -211,7 +307,7 @@ func loadAsset(file, prefix string) (*asset, error) {
return nil, err
}
- a.b, err = ioutil.ReadAll(f)
+ a.b, err = io.ReadAll(f)
if err != nil {
return nil, err
}
@@ -248,9 +344,9 @@ func initAssets(dir, prefix string) error {
if err != nil {
return err
}
-
- assets[a.path] = a
assets[a.hashedPath] = a
+ assets[a.path] = a
+ assetHashes[a.path] = a.hashedPath
}
}
diff --git a/vendor/github.com/GeoNet/kit/weft/handlers.go b/vendor/github.com/GeoNet/kit/weft/handlers.go
index 69a4cc81..36dd0dfb 100644
--- a/vendor/github.com/GeoNet/kit/weft/handlers.go
+++ b/vendor/github.com/GeoNet/kit/weft/handlers.go
@@ -5,13 +5,14 @@ import (
"compress/gzip"
"errors"
"fmt"
- "github.com/GeoNet/kit/metrics"
- "io/ioutil"
+ "io"
"net/http"
"reflect"
"runtime"
"strings"
"sync"
+
+ "github.com/GeoNet/kit/metrics"
)
var bufferPool = sync.Pool{
@@ -58,32 +59,18 @@ var compressibleMimes = map[string]bool{
var defaultCsp = map[string]string{
"default-src": "'none'",
- "img-src": "'self' *.geonet.org.nz data: https://www.google-analytics.com https://stats.g.doubleclick.net",
+ "img-src": "'self' *.geonet.org.nz data: https://*.google-analytics.com https://*.googletagmanager.com",
"font-src": "'self' https://fonts.gstatic.com",
"style-src": "'self'",
"script-src": "'self'",
- "connect-src": "'self' https://*.geonet.org.nz https://www.google-analytics.com https://stats.g.doubleclick.net",
+ "connect-src": "'self' https://*.geonet.org.nz https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com",
"frame-src": "'self' https://www.youtube.com https://www.google.com",
- "form-action": "'self'",
+ "form-action": "'self' https://*.geonet.org.nz",
"base-uri": "'none'",
"frame-ancestors": "'self'",
"object-src": "'none'",
}
-var strictCsp = map[string]string{
- "default-src": "'none'",
- "img-src": "'self'",
- "font-src": "'none'",
- "style-src": "'none'",
- "script-src": "'none'",
- "connect-src": "'none'",
- "frame-src": "'none'",
- "form-action": "'none'",
- "base-uri": "'none'",
- "frame-ancestors": "'none'",
- "object-src": "'none'",
-}
-
/**
* RequestHandler should write the response for r into b and adjust h as required
*/
@@ -102,7 +89,7 @@ type DirectRequestHandler func(r *http.Request, w http.ResponseWriter) (int64, e
// ErrorHandler should write the error for err into b and adjust h as required.
// err can be nil
-type ErrorHandler func(err error, h http.Header, b *bytes.Buffer) error
+type ErrorHandler func(err error, h http.Header, b *bytes.Buffer, nonce string) error
// MakeDirectHandler executes rh. The caller should write directly to w for success (200) only.
// In the case of an rh returning an error ErrorHandler is executed and the response written to the client.
@@ -112,25 +99,41 @@ func MakeDirectHandler(rh DirectRequestHandler, eh ErrorHandler) http.HandlerFun
return func(w http.ResponseWriter, r *http.Request) {
b := bufferPool.Get().(*bytes.Buffer)
defer bufferPool.Put(b)
+
+ name := name(rh)
+
b.Reset()
+
+ // run the RequestHandler with timing. If this returns an error then use the
+ // ErrorHandler to set the error content and header.
+ t := metrics.Start()
+ // note: the ending `writeResponseAndLogMetrics` calls t.Track which will stop the metric timer, too
+ //set csp headers
+ SetBestPracticeHeaders(w, r, nil, "")
+ //run request handler
n, err := rh(r, w)
if err == nil { //all good, return
metrics.StatusOK()
+ metrics.Request()
metrics.Written(n)
+
+ if er := t.Track(name + "." + r.Method); er != nil {
+ logger.Printf("error tracking metric : %s", er.Error())
+ }
+
return
}
- //set csp headers
- setBestPracticeHeaders(w, r, nil, "")
+ //everything below are for error responses
logRequest(r)
+ t.Stop()
+
//run error handler
- e := eh(err, w.Header(), b)
+ e := eh(err, w.Header(), b, "")
if e != nil {
logger.Printf("setting error: %s", e.Error())
}
-
//write error response and log metrics
- name := name(rh)
writeResponseAndLogMetrics(err, w, r, b, name, nil)
}
}
@@ -157,14 +160,13 @@ func MakeHandlerWithCsp(rh RequestHandler, eh ErrorHandler, customCsp map[string
err := rh(r, w.Header(), b)
if err != nil {
//run error handler
- e := eh(err, w.Header(), b)
+ e := eh(err, w.Header(), b, "")
if e != nil {
logger.Printf("2 error from error handler: %s", e.Error())
}
- //set strict csp for error page
- setBestPracticeHeaders(w, r, strictCsp, "")
+ SetBestPracticeHeaders(w, r, defaultCsp, "")
} else {
- setBestPracticeHeaders(w, r, customCsp, "")
+ SetBestPracticeHeaders(w, r, customCsp, "")
}
logRequest(r)
@@ -207,14 +209,13 @@ func MakeHandlerWithCspNonce(rh RequestHandlerWithNonce, eh ErrorHandler, custom
}
if err != nil {
//run error handler
- e := eh(err, w.Header(), b)
+ e := eh(err, w.Header(), b, nonce)
if e != nil {
logger.Printf("2 error from error handler: %s", e.Error())
}
- //set strict csp for error page
- setBestPracticeHeaders(w, r, strictCsp, nonce)
+ SetBestPracticeHeaders(w, r, defaultCsp, nonce)
} else {
- setBestPracticeHeaders(w, r, customCsp, nonce)
+ SetBestPracticeHeaders(w, r, customCsp, nonce)
}
logRequest(r)
@@ -311,7 +312,7 @@ func writeResponseAndLogMetrics(err error, w http.ResponseWriter, r *http.Reques
* NOTE: customCsp should include the whole set of an item as it override that in defaultCsp
* @param nonce: string to be added to script CSP, refer: https://csp.withgoogle.com/docs/strict-csp.html
*/
-func setBestPracticeHeaders(w http.ResponseWriter, r *http.Request, customCsp map[string]string, nonce string) {
+func SetBestPracticeHeaders(w http.ResponseWriter, r *http.Request, customCsp map[string]string, nonce string) {
var csp strings.Builder
for k, v := range defaultCsp {
s := v
@@ -344,13 +345,13 @@ func logRequest(r *http.Request) {
if logPostBody {
switch r.Method {
case http.MethodPost, http.MethodPut:
- body, err := ioutil.ReadAll(r.Body)
+ body, err := io.ReadAll(r.Body)
if err != nil {
logger.Printf("Error reading request body") // This error doesn't affect we processing requests
} else {
logger.Printf("Body:%s", string(body))
// put read bytes back so the real handler can use it
- r.Body = ioutil.NopCloser(bytes.NewBuffer(body))
+ r.Body = io.NopCloser(bytes.NewBuffer(body))
}
}
}
@@ -360,7 +361,7 @@ func logRequest(r *http.Request) {
// Headers are set for intermediate caches.
//
// Implements ErrorHandler
-func TextError(e error, h http.Header, b *bytes.Buffer) error {
+func TextError(e error, h http.Header, b *bytes.Buffer, nonce string) error {
if b == nil {
return errors.New("nil *bytes.Buffer")
}
@@ -411,7 +412,7 @@ func TextError(e error, h http.Header, b *bytes.Buffer) error {
// The content of b is not changed.
//
// Implements ErrorHandler
-func UseError(e error, h http.Header, b *bytes.Buffer) error {
+func UseError(e error, h http.Header, b *bytes.Buffer, nonce string) error {
switch Status(e) {
case http.StatusOK:
case http.StatusNoContent:
@@ -442,7 +443,7 @@ func UseError(e error, h http.Header, b *bytes.Buffer) error {
// Headers are set for intermediate caches.
//
// Implements ErrorHandler
-func HTMLError(e error, h http.Header, b *bytes.Buffer) error {
+func HTMLError(e error, h http.Header, b *bytes.Buffer, nonce string) error {
if b == nil {
return errors.New("nil *bytes.Buffer")
}
@@ -546,3 +547,13 @@ func Soh(r *http.Request, h http.Header, b *bytes.Buffer) error {
return nil
}
+
+// ReturnDefaultCSP returns the default Content Security Policy used
+// by handlers. This is a copy of the map, so can be changed safely if needed.
+func ReturnDefaultCSP() map[string]string {
+ copy := make(map[string]string)
+ for k, v := range defaultCsp {
+ copy[k] = v
+ }
+ return copy
+}
diff --git a/vendor/github.com/GeoNet/kit/weft/weft.go b/vendor/github.com/GeoNet/kit/weft/weft.go
index d191bb87..4f27089c 100644
--- a/vendor/github.com/GeoNet/kit/weft/weft.go
+++ b/vendor/github.com/GeoNet/kit/weft/weft.go
@@ -3,10 +3,11 @@ package weft
import (
"errors"
- "github.com/GeoNet/kit/metrics"
"net/http"
"net/url"
"strings"
+
+ "github.com/GeoNet/kit/metrics"
)
// QueryValidator returns an error for any invalid query parameter values.
@@ -111,7 +112,7 @@ func CheckQuery(r *http.Request, method, required, optional []string) error {
return StatusError{Code: http.StatusMethodNotAllowed, Err: errors.New("method not allowed")}
}
- if strings.Contains(r.URL.Path, ";") {
+ if strings.Contains(r.URL.RawQuery, ";") {
return StatusError{Code: http.StatusBadRequest, Err: errors.New("found a cache buster")}
}
diff --git a/vendor/github.com/GeoNet/kit/weft/wefttest/wefttest.go b/vendor/github.com/GeoNet/kit/weft/wefttest/wefttest.go
index 9e4e68d0..4752e3bd 100644
--- a/vendor/github.com/GeoNet/kit/weft/wefttest/wefttest.go
+++ b/vendor/github.com/GeoNet/kit/weft/wefttest/wefttest.go
@@ -3,7 +3,7 @@ package wefttest
import (
"bytes"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
"regexp"
"runtime"
@@ -129,7 +129,7 @@ func (r Request) Do(server string) ([]byte, error) {
}
}
- return ioutil.ReadAll(res.Body)
+ return io.ReadAll(res.Body)
}
/**
@@ -162,7 +162,8 @@ func checkCSP(respCsp, expectedCsp map[string]string) error {
for k, v := range expectedCsp {
v1 := respCsp[k]
if k == "script-src" && strings.Contains(v1, "nonce-") { //check nonce
- pattern := fmt.Sprintf(noncePattern, v)
+ escapedV := strings.Replace(v, "*", "\\*", -1) // escape wildcards to avoid regex clash
+ pattern := fmt.Sprintf(noncePattern, escapedV)
if !patternMatch(pattern, v1) {
return fmt.Errorf("## Response CSP %s=%s doesn't match expected %s=%s", k, v1, k, v)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.gitignore b/vendor/github.com/aws/aws-sdk-go-v2/.gitignore
deleted file mode 100644
index 18719daa..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-dist
-/doc
-/doc-staging
-.yardoc
-Gemfile.lock
-/internal/awstesting/integration/smoke/**/importmarker__.go
-/internal/awstesting/integration/smoke/_test/
-/vendor
-/private/model/cli/gen-api/gen-api
-.gradle/
-build/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml b/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
deleted file mode 100644
index 75e33885..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
+++ /dev/null
@@ -1,27 +0,0 @@
-[run]
-concurrency = 4
-timeout = "1m"
-issues-exit-code = 0
-modules-download-mode = "readonly"
-allow-parallel-runners = true
-skip-dirs = ["internal/repotools"]
-skip-dirs-use-default = true
-
-[output]
-format = "github-actions"
-
-[linters-settings.cyclop]
-skip-tests = false
-
-[linters-settings.errcheck]
-check-blank = true
-
-[linters]
-disable-all = true
-enable = ["errcheck"]
-fast = false
-
-[issues]
-exclude-use-default = false
-
-# Refer config definitions at https://golangci-lint.run/usage/configuration/#config-file
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml b/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml
deleted file mode 100644
index 4b498a7a..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-language: go
-sudo: true
-dist: bionic
-
-branches:
- only:
- - main
-
-os:
- - linux
- - osx
- # Travis doesn't work with windows and Go tip
- #- windows
-
-go:
- - tip
-
-matrix:
- allow_failures:
- - go: tip
-
-before_install:
- - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
- - (cd /tmp/; go get golang.org/x/lint/golint)
-
-env:
- - EACHMODULE_CONCURRENCY=4
-
-script:
- - make ci-test-no-generate;
-
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
deleted file mode 100644
index b6b30537..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
+++ /dev/null
@@ -1,4035 +0,0 @@
-# Release (2022-03-30)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.34.0](service/ec2/CHANGELOG.md#v1340-2022-03-30)
- * **Feature**: This release simplifies the auto-recovery configuration process enabling customers to set the recovery behavior to disabled or default
-* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.17.0](service/fms/CHANGELOG.md#v1170-2022-03-30)
- * **Feature**: AWS Firewall Manager now supports the configuration of third-party policies that can use either the centralized or distributed deployment models.
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.21.0](service/fsx/CHANGELOG.md#v1210-2022-03-30)
- * **Feature**: This release adds support for modifying throughput capacity for FSx for ONTAP file systems.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.23.3](service/iot/CHANGELOG.md#v1233-2022-03-30)
- * **Documentation**: Doc only update for IoT that fixes customer-reported issues.
-* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.12.0](service/iotdataplane/CHANGELOG.md#v1120-2022-03-30)
- * **Feature**: Update the default AWS IoT Core Data Plane endpoint from VeriSign signed to ATS signed. If you have firewalls with strict egress rules, configure the rules to grant you access to data-ats.iot.[region].amazonaws.com or data-ats.iot.[region].amazonaws.com.cn.
-
-# Release (2022-03-29)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/organizations`: [v1.15.0](service/organizations/CHANGELOG.md#v1150-2022-03-29)
- * **Feature**: This release provides the new CloseAccount API that enables principals in the management account to close any member account within an organization.
-
-# Release (2022-03-28)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.17.3](service/acmpca/CHANGELOG.md#v1173-2022-03-28)
- * **Documentation**: Updating service name entities
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.20.0](service/medialive/CHANGELOG.md#v1200-2022-03-28)
- * **Feature**: This release adds support for selecting a maintenance window.
-
-# Release (2022-03-25)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.17.0](service/batch/CHANGELOG.md#v1170-2022-03-25)
- * **Feature**: Bug Fix: Fixed a bug where shapes were marked as unboxed and were not serialized and sent over the wire, causing an API error from the service.
- * This is a breaking change, and has been accepted due to the API operation not being usable due to the members modeled as unboxed (aka value) types. The update changes the members to boxed (aka pointer) types so that the zero value of the members can be handled correctly by the SDK and service. Your application will fail to compile with the updated module. To workaround this you'll need to update your application to use pointer types for the members impacted.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.33.0](service/ec2/CHANGELOG.md#v1330-2022-03-25)
- * **Feature**: This is release adds support for Amazon VPC Reachability Analyzer to analyze path through a Transit Gateway.
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.24.0](service/ssm/CHANGELOG.md#v1240-2022-03-25)
- * **Feature**: This Patch Manager release supports creating, updating, and deleting Patch Baselines for Rocky Linux OS.
-
-# Release (2022-03-24)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.20.0](service/configservice/CHANGELOG.md#v1200-2022-03-24)
- * **Feature**: Added new APIs GetCustomRulePolicy and GetOrganizationCustomRulePolicy, and updated existing APIs PutConfigRule, DescribeConfigRule, DescribeConfigRuleEvaluationStatus, PutOrganizationConfigRule, DescribeConfigRule to support a new feature for building AWS Config rules with AWS CloudFormation Guard
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.21.0](service/lambda/CHANGELOG.md#v1210-2022-03-24)
- * **Feature**: Adds support for increased ephemeral storage (/tmp) up to 10GB for Lambda functions. Customers can now provision up to 10 GB of ephemeral storage per function instance, a 20x increase over the previous limit of 512 MB.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.19.0](service/transcribe/CHANGELOG.md#v1190-2022-03-24)
- * **Feature**: This release adds an additional parameter for subtitling with Amazon Transcribe batch jobs: outputStartIndex.
-
-# Release (2022-03-23)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.16.0
- * **Feature**: Update CredentialsCache to make use of two new optional CredentialsProvider interfaces to give the cache, per provider, behavior how the cache handles credentials that fail to refresh, and adjusting expires time. See [aws.CredentialsCache](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#CredentialsCache) for more details.
- * **Feature**: Update `ec2rolecreds` package's `Provider` to implememnt support for CredentialsCache new optional caching strategy interfaces, HandleFailRefreshCredentialsCacheStrategy and AdjustExpiresByCredentialsCacheStrategy.
-* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.11.0](credentials/CHANGELOG.md#v1110-2022-03-23)
- * **Feature**: Update `ec2rolecreds` package's `Provider` to implememnt support for CredentialsCache new optional caching strategy interfaces, HandleFailRefreshCredentialsCacheStrategy and AdjustExpiresByCredentialsCacheStrategy.
-* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.18.0](service/auditmanager/CHANGELOG.md#v1180-2022-03-23)
- * **Feature**: This release updates 1 API parameter, the SnsArn attribute. The character length and regex pattern for the SnsArn attribute have been updated, which enables you to deselect an SNS topic when using the UpdateSettings operation.
-* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.15.0](service/ebs/CHANGELOG.md#v1150-2022-03-23)
- * **Feature**: Increased the maximum supported value for the Timeout parameter of the StartSnapshot API from 60 minutes to 4320 minutes. Changed the HTTP error code for ConflictException from 503 to 409.
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.20.2](service/elasticache/CHANGELOG.md#v1202-2022-03-23)
- * **Documentation**: Doc only update for ElastiCache
-* `github.com/aws/aws-sdk-go-v2/service/gamesparks`: [v1.0.0](service/gamesparks/CHANGELOG.md#v100-2022-03-23)
- * **Release**: New AWS service client module
- * **Feature**: Released the preview of Amazon GameSparks, a fully managed AWS service that provides a multi-service backend for game developers.
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.22.0](service/redshift/CHANGELOG.md#v1220-2022-03-23)
- * **Feature**: This release adds a new [--encrypted | --no-encrypted] field in restore-from-cluster-snapshot API. Customers can now restore an unencrypted snapshot to a cluster encrypted with AWS Managed Key or their own KMS key.
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.23.0](service/ssm/CHANGELOG.md#v1230-2022-03-23)
- * **Feature**: Update AddTagsToResource, ListTagsForResource, and RemoveTagsFromResource APIs to reflect the support for tagging Automation resources. Includes other minor documentation updates.
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.18.1](service/transfer/CHANGELOG.md#v1181-2022-03-23)
- * **Documentation**: Documentation updates for AWS Transfer Family to describe how to remove an associated workflow from a server.
-
-# Release (2022-03-22)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.18.0](service/costexplorer/CHANGELOG.md#v1180-2022-03-22)
- * **Feature**: Added three new APIs to support tagging and resource-level authorization on Cost Explorer resources: TagResource, UntagResource, ListTagsForResource. Added optional parameters to CreateCostCategoryDefinition, CreateAnomalySubscription and CreateAnomalyMonitor APIs to support Tag On Create.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.2](service/ecs/CHANGELOG.md#v1182-2022-03-22)
- * **Documentation**: Documentation only update to address tickets
-* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.16.0](service/lakeformation/CHANGELOG.md#v1160-2022-03-22)
- * **Feature**: The release fixes the incorrect permissions called out in the documentation - DESCRIBE_TAG, ASSOCIATE_TAG, DELETE_TAG, ALTER_TAG. This trebuchet release fixes the corresponding SDK and documentation.
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.16.0](service/location/CHANGELOG.md#v1160-2022-03-22)
- * **Feature**: Amazon Location Service now includes a MaxResults parameter for GetDevicePositionHistory requests.
-* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.14.0](service/polly/CHANGELOG.md#v1140-2022-03-22)
- * **Feature**: Amazon Polly adds new Catalan voice - Arlet. Arlet is available as Neural voice only.
-
-# Release (2022-03-21)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.8.0](service/chimesdkmeetings/CHANGELOG.md#v180-2022-03-21)
- * **Feature**: Add support for media replication to link multiple WebRTC media sessions together to reach larger and global audiences. Participants connected to a replica session can be granted access to join the primary session and can switch sessions with their existing WebRTC connection
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.17.0](service/ecr/CHANGELOG.md#v1170-2022-03-21)
- * **Feature**: This release includes a fix in the DescribeImageScanFindings paginated output.
-* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.16.0](service/mediaconnect/CHANGELOG.md#v1160-2022-03-21)
- * **Feature**: This release adds support for selecting a maintenance window.
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.21.0](service/quicksight/CHANGELOG.md#v1210-2022-03-21)
- * **Feature**: AWS QuickSight Service Features - Expand public API support for group management.
-* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.16.1](service/ram/CHANGELOG.md#v1161-2022-03-21)
- * **Documentation**: Document improvements to the RAM API operations and parameter descriptions.
-
-# Release (2022-03-18)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.22.0](service/glue/CHANGELOG.md#v1220-2022-03-18)
- * **Feature**: Added 9 new APIs for AWS Glue Interactive Sessions: ListSessions, StopSession, CreateSession, GetSession, DeleteSession, RunStatement, GetStatement, ListStatements, CancelStatement
-
-# Release (2022-03-16)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.17.0](service/acmpca/CHANGELOG.md#v1170-2022-03-16)
- * **Feature**: AWS Certificate Manager (ACM) Private Certificate Authority (CA) now supports customizable certificate subject names and extensions.
-* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.13.0](service/amplifybackend/CHANGELOG.md#v1130-2022-03-16)
- * **Feature**: Adding the ability to customize Cognito verification messages for email and SMS in CreateBackendAuth and UpdateBackendAuth. Adding deprecation documentation for ForgotPassword in CreateBackendAuth and UpdateBackendAuth
-* `github.com/aws/aws-sdk-go-v2/service/billingconductor`: [v1.0.0](service/billingconductor/CHANGELOG.md#v100-2022-03-16)
- * **Release**: New AWS service client module
- * **Feature**: This is the initial SDK release for AWS Billing Conductor. The AWS Billing Conductor is a customizable billing service, allowing you to customize your billing data to match your desired business structure.
-* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.13.0](service/s3outposts/CHANGELOG.md#v1130-2022-03-16)
- * **Feature**: S3 on Outposts is releasing a new API, ListSharedEndpoints, that lists all endpoints associated with S3 on Outpost, that has been shared by Resource Access Manager (RAM).
-* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.13.0](service/ssmincidents/CHANGELOG.md#v1130-2022-03-16)
- * **Feature**: Removed incorrect validation pattern for IncidentRecordSource.invokedBy
-
-# Release (2022-03-15)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.15.0](service/cognitoidentityprovider/CHANGELOG.md#v1150-2022-03-15)
- * **Feature**: Updated EmailConfigurationType and SmsConfigurationType to reflect that you can now choose Amazon SES and Amazon SNS resources in the same Region.
-* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.15.0](service/dataexchange/CHANGELOG.md#v1150-2022-03-15)
- * **Feature**: This feature enables data providers to use the RevokeRevision operation to revoke subscriber access to a given revision. Subscribers are unable to interact with assets within a revoked revision.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.32.0](service/ec2/CHANGELOG.md#v1320-2022-03-15)
- * **Feature**: Adds the Cascade parameter to the DeleteIpam API. Customers can use this parameter to automatically delete their IPAM, including non-default scopes, pools, cidrs, and allocations. There mustn't be any pools provisioned in the default public scope to use this parameter.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.1](service/ecs/CHANGELOG.md#v1181-2022-03-15)
- * **Documentation**: Documentation only update to address tickets
-* `github.com/aws/aws-sdk-go-v2/service/keyspaces`: [v1.0.2](service/keyspaces/CHANGELOG.md#v102-2022-03-15)
- * **Documentation**: Fixing formatting issues in CLI and SDK documentation
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.15.1](service/location/CHANGELOG.md#v1151-2022-03-15)
- * **Documentation**: New HERE style "VectorHereExplore" and "VectorHereExploreTruck".
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.18.1](service/rds/CHANGELOG.md#v1181-2022-03-15)
- * **Documentation**: Various documentation improvements
-* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.17.0](service/robomaker/CHANGELOG.md#v1170-2022-03-15)
- * **Feature**: This release deprecates ROS, Ubuntu and Gazbeo from RoboMaker Simulation Service Software Suites in favor of user-supplied containers and Relaxed Software Suites.
-
-# Release (2022-03-14)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.19.0](service/configservice/CHANGELOG.md#v1190-2022-03-14)
- * **Feature**: Add resourceType enums for AWS::ECR::PublicRepository and AWS::EC2::LaunchTemplate
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.20.1](service/elasticache/CHANGELOG.md#v1201-2022-03-14)
- * **Documentation**: Doc only update for ElastiCache
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.23.0](service/kendra/CHANGELOG.md#v1230-2022-03-14)
- * **Feature**: Amazon Kendra now provides a data source connector for Slack. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/data-source-slack.html
-* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.14.0](service/timestreamquery/CHANGELOG.md#v1140-2022-03-14)
- * **Feature**: Amazon Timestream Scheduled Queries now support Timestamp datatype in a multi-measure record.
-
-# Release (2022-03-11)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.20.0](service/chime/CHANGELOG.md#v1200-2022-03-11)
- * **Feature**: Chime VoiceConnector Logging APIs will now support MediaMetricLogs. Also CreateMeetingDialOut now returns AccessDeniedException.
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.20.0](service/connect/CHANGELOG.md#v1200-2022-03-11)
- * **Feature**: This release adds support for enabling Rich Messaging when starting a new chat session via the StartChatContact API. Rich Messaging enables the following formatting options: bold, italics, hyperlinks, bulleted lists, and numbered lists.
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.20.0](service/lambda/CHANGELOG.md#v1200-2022-03-11)
- * **Feature**: Adds PrincipalOrgID support to AddPermission API. Customers can use it to manage permissions to lambda functions at AWS Organizations level.
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.18.0](service/outposts/CHANGELOG.md#v1180-2022-03-11)
- * **Feature**: This release adds address filters for listSites
-* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.15.1](service/secretsmanager/CHANGELOG.md#v1151-2022-03-11)
- * **Documentation**: Documentation updates for Secrets Manager.
-* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.6.0](service/transcribestreaming/CHANGELOG.md#v160-2022-03-11)
- * **Feature**: Amazon Transcribe StartTranscription API now supports additional parameters for Language Identification feature: customVocabularies and customFilterVocabularies
-
-# Release (2022-03-10)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.20.0](service/lexmodelsv2/CHANGELOG.md#v1200-2022-03-10)
- * **Feature**: This release makes slotTypeId an optional parameter in CreateSlot and UpdateSlot APIs in Amazon Lex V2 for model building. Customers can create and update slots without specifying a slot type id.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.18.0](service/transcribe/CHANGELOG.md#v1180-2022-03-10)
- * **Feature**: Documentation fix for API `StartMedicalTranscriptionJobRequest`, now showing min sample rate as 16khz
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.18.0](service/transfer/CHANGELOG.md#v1180-2022-03-10)
- * **Feature**: Adding more descriptive error types for managed workflows
-
-# Release (2022-03-09)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.17.0](service/comprehend/CHANGELOG.md#v1170-2022-03-09)
- * **Feature**: Amazon Comprehend now supports extracting the sentiment associated with entities such as brands, products and services from text documents.
-
-# Release (2022-03-08.3)
-
-* No change notes available for this release.
-
-# Release (2022-03-08.2)
-
-* No change notes available for this release.
-
-# Release (2022-03-08)
-
-## General Highlights
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.11.0](service/amplify/CHANGELOG.md#v1110-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.5.0](service/amplifyuibuilder/CHANGELOG.md#v150-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.14.0](service/appflow/CHANGELOG.md#v1140-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.11.0](service/apprunner/CHANGELOG.md#v1110-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.14.0](service/athena/CHANGELOG.md#v1140-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.15.0](service/braket/CHANGELOG.md#v1150-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.7.0](service/chimesdkmeetings/CHANGELOG.md#v170-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.15.0](service/cloudtrail/CHANGELOG.md#v1150-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.19.0](service/connect/CHANGELOG.md#v1190-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.16.0](service/devopsguru/CHANGELOG.md#v1160-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.31.0](service/ec2/CHANGELOG.md#v1310-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.16.0](service/ecr/CHANGELOG.md#v1160-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.0](service/ecs/CHANGELOG.md#v1180-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.20.0](service/elasticache/CHANGELOG.md#v1200-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.10.0](service/finspacedata/CHANGELOG.md#v1100-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.12.0](service/fis/CHANGELOG.md#v1120-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.20.0](service/fsx/CHANGELOG.md#v1200-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.14.0](service/gamelift/CHANGELOG.md#v1140-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.15.0](service/greengrassv2/CHANGELOG.md#v1150-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/internal/checksum`: [v1.1.0](service/internal/checksum/CHANGELOG.md#v110-2022-03-08)
- * **Feature**: Updates the SDK's checksum validation logic to require opt-in to output response payload validation. The SDK was always preforming output response payload checksum validation, not respecting the output validation model option. Fixes [#1606](https://github.com/aws/aws-sdk-go-v2/issues/1606)
-* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.8.0](service/kafkaconnect/CHANGELOG.md#v180-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.22.0](service/kendra/CHANGELOG.md#v1220-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/keyspaces`: [v1.0.0](service/keyspaces/CHANGELOG.md#v100-2022-03-08)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.14.0](service/macie/CHANGELOG.md#v1140-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.15.0](service/mediapackage/CHANGELOG.md#v1150-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.13.0](service/mgn/CHANGELOG.md#v1130-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.5.0](service/migrationhubrefactorspaces/CHANGELOG.md#v150-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.12.0](service/mq/CHANGELOG.md#v1120-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.6.0](service/panorama/CHANGELOG.md#v160-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.18.0](service/rds/CHANGELOG.md#v1180-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.8.0](service/route53recoverycluster/CHANGELOG.md#v180-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.12.0](service/servicecatalogappregistry/CHANGELOG.md#v1120-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.18.0](service/sqs/CHANGELOG.md#v1180-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.16.0](service/sts/CHANGELOG.md#v1160-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.14.0](service/synthetics/CHANGELOG.md#v1140-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.13.0](service/timestreamquery/CHANGELOG.md#v1130-2022-03-08)
- * **Documentation**: Updated service client model to latest release.
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.17.0](service/transfer/CHANGELOG.md#v1170-2022-03-08)
- * **Feature**: Updated service client model to latest release.
-
-# Release (2022-02-24.2)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.21.0](service/autoscaling/CHANGELOG.md#v1210-2022-02-242)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.18.0](service/databrew/CHANGELOG.md#v1180-2022-02-242)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.15.0](service/fms/CHANGELOG.md#v1150-2022-02-242)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.17.0](service/lightsail/CHANGELOG.md#v1170-2022-02-242)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.19.0](service/route53/CHANGELOG.md#v1190-2022-02-242)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.20.0](service/s3control/CHANGELOG.md#v1200-2022-02-242)
- * **Feature**: API client updated
-
-# Release (2022-02-24)
-
-## General Highlights
-* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Bug Fix**: Fixes the AWS Sigv4 signer to trim header value's whitespace when computing the canonical headers block of the string to sign.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.14.0
- * **Feature**: Add new AdaptiveMode retryer to aws/retry package. This new retryer uses dynamic token bucketing with client ratelimiting when throttle responses are received.
- * **Feature**: Adds new interface aws.RetryerV2, replacing aws.Retryer and deprecating the GetInitialToken method in favor of GetAttemptToken so Context can be provided. The SDK will use aws.RetryerV2 internally. Wrapping aws.Retryers as aws.RetryerV2 automatically.
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.14.0](config/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: Adds support for loading RetryMaxAttempts and RetryMod from the environment and shared configuration files. These parameters drive how the SDK's API client will initialize its default retryer, if custome retryer has not been specified. See [config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) module and [aws.Config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config) for more information about and how to use these new options.
- * **Feature**: Adds support for the `ca_bundle` parameter in shared config and credentials files. The usage of the file is the same as environment variable, `AWS_CA_BUNDLE`, but sourced from shared config. Fixes [#1589](https://github.com/aws/aws-sdk-go-v2/issues/1589)
-* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.9.0](credentials/CHANGELOG.md#v190-2022-02-24)
- * **Feature**: Adds support for `SourceIdentity` to `stscreds.AssumeRoleProvider` [#1588](https://github.com/aws/aws-sdk-go-v2/pull/1588). Fixes [#1575](https://github.com/aws/aws-sdk-go-v2/issues/1575)
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.7.0](feature/dynamodb/attributevalue/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: Fixes [#645](https://github.com/aws/aws-sdk-go-v2/issues/645), [#411](https://github.com/aws/aws-sdk-go-v2/issues/411) by adding support for (un)marshaling AttributeValue maps to Go maps key types of string, number, bool, and types implementing encoding.Text(un)Marshaler interface
- * **Bug Fix**: Fixes [#1569](https://github.com/aws/aws-sdk-go-v2/issues/1569) inconsistent serialization of Go struct field names
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.4.0](feature/dynamodb/expression/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: Add support for expression names with dots via new NameBuilder function NameNoDotSplit, related to [aws/aws-sdk-go#2570](https://github.com/aws/aws-sdk-go/issues/2570)
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.7.0](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: Fixes [#645](https://github.com/aws/aws-sdk-go-v2/issues/645), [#411](https://github.com/aws/aws-sdk-go-v2/issues/411) by adding support for (un)marshaling AttributeValue maps to Go maps key types of string, number, bool, and types implementing encoding.Text(un)Marshaler interface
- * **Bug Fix**: Fixes [#1569](https://github.com/aws/aws-sdk-go-v2/issues/1569) inconsistent serialization of Go struct field names
-* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.14.0](service/accessanalyzer/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/account`: [v1.5.0](service/account/CHANGELOG.md#v150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.13.0](service/acm/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.15.0](service/acmpca/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/alexaforbusiness`: [v1.13.0](service/alexaforbusiness/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.13.0](service/amp/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.10.0](service/amplify/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.11.0](service/amplifybackend/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.4.0](service/amplifyuibuilder/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.14.0](service/apigateway/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apigatewaymanagementapi`: [v1.9.0](service/apigatewaymanagementapi/CHANGELOG.md#v190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apigatewayv2`: [v1.11.0](service/apigatewayv2/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appconfig`: [v1.11.0](service/appconfig/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appconfigdata`: [v1.3.0](service/appconfigdata/CHANGELOG.md#v130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.13.0](service/appflow/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.12.0](service/appintegrations/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.14.0](service/applicationautoscaling/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationcostprofiler`: [v1.8.0](service/applicationcostprofiler/CHANGELOG.md#v180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationdiscoveryservice`: [v1.11.0](service/applicationdiscoveryservice/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.14.0](service/applicationinsights/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.12.0](service/appmesh/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.10.0](service/apprunner/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.14.0](service/appstream/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.13.0](service/appsync/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.13.0](service/athena/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.16.0](service/auditmanager/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.20.0](service/autoscaling/CHANGELOG.md#v1200-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.11.0](service/autoscalingplans/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.14.0](service/backup/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/backupgateway`: [v1.4.0](service/backupgateway/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.15.0](service/batch/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.14.0](service/braket/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/budgets`: [v1.11.0](service/budgets/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.18.0](service/chime/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.8.0](service/chimesdkidentity/CHANGELOG.md#v180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.6.0](service/chimesdkmeetings/CHANGELOG.md#v160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.8.0](service/chimesdkmessaging/CHANGELOG.md#v180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.15.0](service/cloud9/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.7.0](service/cloudcontrol/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/clouddirectory`: [v1.11.0](service/clouddirectory/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.19.0](service/cloudformation/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.15.0](service/cloudfront/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudhsm`: [v1.11.0](service/cloudhsm/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudhsmv2`: [v1.12.0](service/cloudhsmv2/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.12.0](service/cloudsearch/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudsearchdomain`: [v1.10.0](service/cloudsearchdomain/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.14.0](service/cloudtrail/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.16.0](service/cloudwatch/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.13.0](service/cloudwatchevents/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.14.0](service/cloudwatchlogs/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.11.0](service/codeartifact/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.18.0](service/codebuild/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.12.0](service/codecommit/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codedeploy`: [v1.13.0](service/codedeploy/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.11.0](service/codeguruprofiler/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.14.0](service/codegurureviewer/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codepipeline`: [v1.12.0](service/codepipeline/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codestar`: [v1.10.0](service/codestar/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codestarconnections`: [v1.12.0](service/codestarconnections/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.10.0](service/codestarnotifications/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.12.0](service/cognitoidentity/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.13.0](service/cognitoidentityprovider/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cognitosync`: [v1.10.0](service/cognitosync/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.15.0](service/comprehend/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/comprehendmedical`: [v1.12.0](service/comprehendmedical/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.16.0](service/computeoptimizer/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.17.0](service/configservice/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.18.0](service/connect/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.11.0](service/connectcontactlens/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connectparticipant`: [v1.10.0](service/connectparticipant/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/costandusagereportservice`: [v1.12.0](service/costandusagereportservice/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.16.0](service/costexplorer/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.16.0](service/customerprofiles/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.17.0](service/databasemigrationservice/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.17.0](service/databrew/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.13.0](service/dataexchange/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/datapipeline`: [v1.12.0](service/datapipeline/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.13.0](service/datasync/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.10.0](service/dax/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.14.0](service/detective/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/devicefarm`: [v1.12.0](service/devicefarm/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.15.0](service/devopsguru/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.16.0](service/directconnect/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.12.0](service/directoryservice/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dlm`: [v1.10.0](service/dlm/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.16.0](service/docdb/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.4.0](service/drs/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.14.0](service/dynamodb/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.12.0](service/dynamodbstreams/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.13.0](service/ebs/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.30.0](service/ec2/CHANGELOG.md#v1300-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect`: [v1.12.0](service/ec2instanceconnect/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.15.0](service/ecr/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecrpublic`: [v1.12.0](service/ecrpublic/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.17.0](service/ecs/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.15.0](service/efs/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.19.0](service/eks/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.19.0](service/elasticache/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.13.0](service/elasticbeanstalk/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticinference`: [v1.10.0](service/elasticinference/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.13.0](service/elasticloadbalancing/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.17.0](service/elasticloadbalancingv2/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.14.0](service/elasticsearchservice/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elastictranscoder`: [v1.12.0](service/elastictranscoder/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.16.0](service/emr/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.12.0](service/emrcontainers/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.14.0](service/eventbridge/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.5.0](service/evidently/CHANGELOG.md#v150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.7.0](service/finspace/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.9.0](service/finspacedata/CHANGELOG.md#v190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.13.0](service/firehose/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.11.0](service/fis/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.14.0](service/fms/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.18.0](service/forecast/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/forecastquery`: [v1.10.0](service/forecastquery/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
- * **Bug Fix**: Fixed an issue that resulted in the wrong service endpoints being constructed.
-* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.18.0](service/frauddetector/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.19.0](service/fsx/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.13.0](service/gamelift/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glacier`: [v1.12.0](service/glacier/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/globalaccelerator`: [v1.12.0](service/globalaccelerator/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.20.0](service/glue/CHANGELOG.md#v1200-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.6.0](service/grafana/CHANGELOG.md#v160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.12.0](service/greengrass/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.14.0](service/greengrassv2/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.12.0](service/groundstation/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.12.0](service/guardduty/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.14.0](service/health/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.13.0](service/healthlake/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.11.0](service/honeycode/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.17.0](service/iam/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.13.0](service/identitystore/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.18.0](service/imagebuilder/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/inspector`: [v1.11.0](service/inspector/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.5.0](service/inspector2/CHANGELOG.md#v150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/internal/checksum`: [v1.0.0](service/internal/checksum/CHANGELOG.md#v100-2022-02-24)
- * **Release**: New module for computing checksums
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.22.0](service/iot/CHANGELOG.md#v1220-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice`: [v1.9.0](service/iot1clickdevicesservice/CHANGELOG.md#v190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot1clickprojects`: [v1.10.0](service/iot1clickprojects/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.11.0](service/iotanalytics/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.10.0](service/iotdataplane/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.13.0](service/iotdeviceadvisor/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.13.0](service/iotevents/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.10.0](service/ioteventsdata/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotfleethub`: [v1.11.0](service/iotfleethub/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotjobsdataplane`: [v1.10.0](service/iotjobsdataplane/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotsecuretunneling`: [v1.11.0](service/iotsecuretunneling/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.19.0](service/iotsitewise/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotthingsgraph`: [v1.11.0](service/iotthingsgraph/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.4.0](service/iottwinmaker/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.17.0](service/iotwireless/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.15.0](service/ivs/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.16.0](service/kafka/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.7.0](service/kafkaconnect/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.21.0](service/kendra/CHANGELOG.md#v1210-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.14.0](service/kinesis/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.12.0](service/kinesisanalytics/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.13.0](service/kinesisanalyticsv2/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisvideo`: [v1.10.0](service/kinesisvideo/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia`: [v1.11.0](service/kinesisvideoarchivedmedia/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia`: [v1.9.0](service/kinesisvideomedia/CHANGELOG.md#v190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisvideosignaling`: [v1.9.0](service/kinesisvideosignaling/CHANGELOG.md#v190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.15.0](service/kms/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.14.0](service/lakeformation/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.18.0](service/lambda/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.15.0](service/lexmodelbuildingservice/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.18.0](service/lexmodelsv2/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimeservice`: [v1.11.0](service/lexruntimeservice/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.13.0](service/lexruntimev2/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.14.0](service/licensemanager/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.16.0](service/lightsail/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.14.0](service/location/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.11.0](service/lookoutequipment/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.10.0](service/lookoutmetrics/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lookoutvision`: [v1.11.0](service/lookoutvision/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/machinelearning`: [v1.13.0](service/machinelearning/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.13.0](service/macie/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.19.0](service/macie2/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/managedblockchain`: [v1.11.0](service/managedblockchain/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/marketplacecatalog`: [v1.11.0](service/marketplacecatalog/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/marketplacecommerceanalytics`: [v1.10.0](service/marketplacecommerceanalytics/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/marketplaceentitlementservice`: [v1.10.0](service/marketplaceentitlementservice/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/marketplacemetering`: [v1.12.0](service/marketplacemetering/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.14.0](service/mediaconnect/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.20.0](service/mediaconvert/CHANGELOG.md#v1200-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.18.0](service/medialive/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.14.0](service/mediapackage/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.15.0](service/mediapackagevod/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediastore`: [v1.11.0](service/mediastore/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediastoredata`: [v1.11.0](service/mediastoredata/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.15.0](service/mediatailor/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.8.0](service/memorydb/CHANGELOG.md#v180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.12.0](service/mgn/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/migrationhub`: [v1.11.0](service/migrationhub/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/migrationhubconfig`: [v1.11.0](service/migrationhubconfig/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.4.0](service/migrationhubrefactorspaces/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/migrationhubstrategy`: [v1.4.0](service/migrationhubstrategy/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mobile`: [v1.10.0](service/mobile/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.11.0](service/mq/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mturk`: [v1.12.0](service/mturk/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.11.0](service/mwaa/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.15.0](service/neptune/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.14.0](service/networkfirewall/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.11.0](service/networkmanager/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.11.0](service/nimble/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.8.0](service/opensearch/CHANGELOG.md#v180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/opsworks`: [v1.12.0](service/opsworks/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/opsworkscm`: [v1.13.0](service/opsworkscm/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/organizations`: [v1.13.0](service/organizations/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.16.0](service/outposts/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.5.0](service/panorama/CHANGELOG.md#v150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.16.0](service/personalize/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/personalizeevents`: [v1.10.0](service/personalizeevents/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/personalizeruntime`: [v1.10.0](service/personalizeruntime/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.13.0](service/pi/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.15.0](service/pinpoint/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pinpointemail`: [v1.10.0](service/pinpointemail/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoice`: [v1.9.0](service/pinpointsmsvoice/CHANGELOG.md#v190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.12.0](service/polly/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.13.0](service/pricing/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.11.0](service/proton/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.13.0](service/qldb/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.12.0](service/qldbsession/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.19.0](service/quicksight/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.15.0](service/ram/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rbin`: [v1.5.0](service/rbin/CHANGELOG.md#v150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.17.0](service/rds/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rdsdata`: [v1.10.0](service/rdsdata/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.20.0](service/redshift/CHANGELOG.md#v1200-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.14.0](service/redshiftdata/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.16.0](service/rekognition/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/resiliencehub`: [v1.4.0](service/resiliencehub/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.11.0](service/resourcegroups/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.12.0](service/resourcegroupstaggingapi/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.15.0](service/robomaker/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.18.0](service/route53/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53domains`: [v1.11.0](service/route53domains/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.7.0](service/route53recoverycluster/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.8.0](service/route53recoverycontrolconfig/CHANGELOG.md#v180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.7.0](service/route53recoveryreadiness/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.14.0](service/route53resolver/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rum`: [v1.5.0](service/rum/CHANGELOG.md#v150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.25.0](service/s3/CHANGELOG.md#v1250-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.19.0](service/s3control/CHANGELOG.md#v1190-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.11.0](service/s3outposts/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.25.0](service/sagemaker/CHANGELOG.md#v1250-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.11.0](service/sagemakera2iruntime/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakeredge`: [v1.10.0](service/sagemakeredge/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakerfeaturestoreruntime`: [v1.10.0](service/sagemakerfeaturestoreruntime/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.14.0](service/sagemakerruntime/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/savingsplans`: [v1.10.0](service/savingsplans/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/schemas`: [v1.13.0](service/schemas/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.14.0](service/secretsmanager/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.18.0](service/securityhub/CHANGELOG.md#v1180-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository`: [v1.10.0](service/serverlessapplicationrepository/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.12.0](service/servicecatalog/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.11.0](service/servicecatalogappregistry/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.16.0](service/servicediscovery/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/servicequotas`: [v1.12.0](service/servicequotas/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.13.0](service/ses/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sesv2`: [v1.12.0](service/sesv2/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.12.0](service/sfn/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.15.0](service/shield/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/signer`: [v1.12.0](service/signer/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sms`: [v1.11.0](service/sms/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.14.0](service/snowball/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.7.0](service/snowdevicemanagement/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.16.0](service/sns/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.17.0](service/sqs/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.21.0](service/ssm/CHANGELOG.md#v1210-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.12.0](service/ssmcontacts/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.11.0](service/ssmincidents/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.10.0](service/sso/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.13.0](service/ssoadmin/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.11.0](service/ssooidc/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.15.0](service/storagegateway/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.15.0](service/sts/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.12.0](service/support/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.12.0](service/swf/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.13.0](service/synthetics/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.13.0](service/textract/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.12.0](service/timestreamquery/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.12.0](service/timestreamwrite/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.16.0](service/transcribe/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.4.0](service/transcribestreaming/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.16.0](service/transfer/CHANGELOG.md#v1160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.12.0](service/translate/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.7.0](service/voiceid/CHANGELOG.md#v170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.10.0](service/waf/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wafregional`: [v1.11.0](service/wafregional/CHANGELOG.md#v1110-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.17.0](service/wafv2/CHANGELOG.md#v1170-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.13.0](service/wellarchitected/CHANGELOG.md#v1130-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.6.0](service/wisdom/CHANGELOG.md#v160-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workdocs`: [v1.10.0](service/workdocs/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/worklink`: [v1.10.0](service/worklink/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.14.0](service/workmail/CHANGELOG.md#v1140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workmailmessageflow`: [v1.10.0](service/workmailmessageflow/CHANGELOG.md#v1100-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.15.0](service/workspaces/CHANGELOG.md#v1150-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workspacesweb`: [v1.4.0](service/workspacesweb/CHANGELOG.md#v140-2022-02-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/xray`: [v1.12.0](service/xray/CHANGELOG.md#v1120-2022-02-24)
- * **Feature**: API client updated
-
-# Release (2022-01-28)
-
-## General Highlights
-* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug.
-* **Bug Fix**: Updates SDK API client deserialization to pre-allocate byte slice and string response payloads, [#1565](https://github.com/aws/aws-sdk-go-v2/pull/1565). Thanks to [Tyson Mote](https://github.com/tysonmote) for submitting this PR.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.13.1](config/CHANGELOG.md#v1131-2022-01-28)
- * **Bug Fix**: Fixes LoadDefaultConfig handling of errors returned by passed in functional options. Previously errors returned from the LoadOptions passed into LoadDefaultConfig were incorrectly ignored. [#1562](https://github.com/aws/aws-sdk-go-v2/pull/1562). Thanks to [Pinglei Guo](https://github.com/pingleig) for submitting this PR.
- * **Bug Fix**: Updates `config` module to use os.UserHomeDir instead of hard coded environment variable for OS. [#1563](https://github.com/aws/aws-sdk-go-v2/pull/1563)
-* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.13.0](service/applicationinsights/CHANGELOG.md#v1130-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.13.1](service/cloudtrail/CHANGELOG.md#v1131-2022-01-28)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.13.1](service/codegurureviewer/CHANGELOG.md#v1131-2022-01-28)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.16.0](service/configservice/CHANGELOG.md#v1160-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.17.0](service/connect/CHANGELOG.md#v1170-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.12.1](service/ebs/CHANGELOG.md#v1121-2022-01-28)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.29.0](service/ec2/CHANGELOG.md#v1290-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect`: [v1.11.0](service/ec2instanceconnect/CHANGELOG.md#v1110-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.14.0](service/efs/CHANGELOG.md#v1140-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.10.0](service/fis/CHANGELOG.md#v1100-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.17.0](service/frauddetector/CHANGELOG.md#v1170-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.18.0](service/fsx/CHANGELOG.md#v1180-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.11.0](service/greengrass/CHANGELOG.md#v1110-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.13.0](service/greengrassv2/CHANGELOG.md#v1130-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.11.0](service/guardduty/CHANGELOG.md#v1110-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.10.0](service/honeycode/CHANGELOG.md#v1100-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.14.0](service/ivs/CHANGELOG.md#v1140-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.15.0](service/kafka/CHANGELOG.md#v1150-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.13.0](service/location/CHANGELOG.md#v1130-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.9.0](service/lookoutmetrics/CHANGELOG.md#v190-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.18.0](service/macie2/CHANGELOG.md#v1180-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.19.0](service/mediaconvert/CHANGELOG.md#v1190-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.14.0](service/mediatailor/CHANGELOG.md#v1140-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.14.0](service/ram/CHANGELOG.md#v1140-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.6.1](service/route53recoveryreadiness/CHANGELOG.md#v161-2022-01-28)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.24.0](service/sagemaker/CHANGELOG.md#v1240-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.17.0](service/securityhub/CHANGELOG.md#v1170-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.14.0](service/storagegateway/CHANGELOG.md#v1140-2022-01-28)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.15.0](service/transcribe/CHANGELOG.md#v1150-2022-01-28)
- * **Feature**: Updated to latest API model.
-
-# Release (2022-01-14)
-
-## General Highlights
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.13.0
- * **Bug Fix**: Updates the Retry middleware to release the retry token, on subsequent attempts. This fixes #1413, and is based on PR #1424
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.6.0](feature/dynamodb/attributevalue/CHANGELOG.md#v160-2022-01-14)
- * **Feature**: Adds new MarshalWithOptions and UnmarshalWithOptions helpers allowing Encoding and Decoding options to be specified when serializing AttributeValues. Addresses issue: https://github.com/aws/aws-sdk-go-v2/issues/1494
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.6.0](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v160-2022-01-14)
- * **Feature**: Adds new MarshalWithOptions and UnmarshalWithOptions helpers allowing Encoding and Decoding options to be specified when serializing AttributeValues. Addresses issue: https://github.com/aws/aws-sdk-go-v2/issues/1494
-* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.12.0](service/appsync/CHANGELOG.md#v1120-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.10.0](service/autoscalingplans/CHANGELOG.md#v1100-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.15.0](service/computeoptimizer/CHANGELOG.md#v1150-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.15.0](service/costexplorer/CHANGELOG.md#v1150-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.16.0](service/databasemigrationservice/CHANGELOG.md#v1160-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.16.0](service/databrew/CHANGELOG.md#v1160-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.28.0](service/ec2/CHANGELOG.md#v1280-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.18.0](service/elasticache/CHANGELOG.md#v1180-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.13.0](service/elasticsearchservice/CHANGELOG.md#v1130-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.8.0](service/finspacedata/CHANGELOG.md#v180-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.13.0](service/fms/CHANGELOG.md#v1130-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.19.0](service/glue/CHANGELOG.md#v1190-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.9.0](service/honeycode/CHANGELOG.md#v190-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.12.0](service/identitystore/CHANGELOG.md#v1120-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.9.0](service/ioteventsdata/CHANGELOG.md#v190-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.16.0](service/iotwireless/CHANGELOG.md#v1160-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.20.0](service/kendra/CHANGELOG.md#v1200-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.17.0](service/lexmodelsv2/CHANGELOG.md#v1170-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.12.0](service/lexruntimev2/CHANGELOG.md#v1120-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.8.0](service/lookoutmetrics/CHANGELOG.md#v180-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.17.0](service/medialive/CHANGELOG.md#v1170-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.13.0](service/mediatailor/CHANGELOG.md#v1130-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.10.0](service/mwaa/CHANGELOG.md#v1100-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.10.0](service/nimble/CHANGELOG.md#v1100-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.7.0](service/opensearch/CHANGELOG.md#v170-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.12.0](service/pi/CHANGELOG.md#v1120-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.14.0](service/pinpoint/CHANGELOG.md#v1140-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.16.0](service/rds/CHANGELOG.md#v1160-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.20.0](service/ssm/CHANGELOG.md#v1200-2022-01-14)
- * **Feature**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.9.0](service/sso/CHANGELOG.md#v190-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.14.0](service/transcribe/CHANGELOG.md#v1140-2022-01-14)
- * **Documentation**: Updated API models
-* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.14.0](service/workspaces/CHANGELOG.md#v1140-2022-01-14)
- * **Feature**: Updated API models
-
-# Release (2022-01-07)
-
-## General Highlights
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.12.0](config/CHANGELOG.md#v1120-2022-01-07)
- * **Feature**: Add load option for CredentialCache. Adds a new member to the LoadOptions struct, CredentialsCacheOptions. This member allows specifying a function that will be used to configure the CredentialsCache. The CredentialsCacheOptions will only be used if the configuration loader will wrap the underlying credential provider in the CredentialsCache.
-* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.12.0](service/appstream/CHANGELOG.md#v1120-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.12.0](service/cloudtrail/CHANGELOG.md#v1120-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.12.0](service/detective/CHANGELOG.md#v1120-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.27.0](service/ec2/CHANGELOG.md#v1270-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.15.0](service/ecs/CHANGELOG.md#v1150-2022-01-07)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.17.0](service/eks/CHANGELOG.md#v1170-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.18.0](service/glue/CHANGELOG.md#v1180-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.11.0](service/greengrassv2/CHANGELOG.md#v1110-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.20.0](service/iot/CHANGELOG.md#v1200-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.12.0](service/lakeformation/CHANGELOG.md#v1120-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.16.0](service/lambda/CHANGELOG.md#v1160-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.17.0](service/mediaconvert/CHANGELOG.md#v1170-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.17.0](service/quicksight/CHANGELOG.md#v1170-2022-01-07)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.15.0](service/rds/CHANGELOG.md#v1150-2022-01-07)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.14.0](service/rekognition/CHANGELOG.md#v1140-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.23.0](service/s3/CHANGELOG.md#v1230-2022-01-07)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.17.0](service/s3control/CHANGELOG.md#v1170-2022-01-07)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.9.0](service/s3outposts/CHANGELOG.md#v190-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.22.0](service/sagemaker/CHANGELOG.md#v1220-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.12.0](service/secretsmanager/CHANGELOG.md#v1120-2022-01-07)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.9.0](service/ssooidc/CHANGELOG.md#v190-2022-01-07)
- * **Feature**: API client updated
-
-# Release (2021-12-21)
-
-## General Highlights
-* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.11.0](service/accessanalyzer/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.10.0](service/acm/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.11.0](service/apigateway/CHANGELOG.md#v1110-2021-12-21)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.11.0](service/applicationautoscaling/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.10.0](service/appsync/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.17.0](service/autoscaling/CHANGELOG.md#v1170-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.3.0](service/chimesdkmeetings/CHANGELOG.md#v130-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.5.0](service/chimesdkmessaging/CHANGELOG.md#v150-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.4.0](service/cloudcontrol/CHANGELOG.md#v140-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.16.0](service/cloudformation/CHANGELOG.md#v1160-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.13.0](service/cloudwatch/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.10.0](service/cloudwatchevents/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.11.0](service/cloudwatchlogs/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: API client updated
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/codedeploy`: [v1.10.0](service/codedeploy/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/comprehendmedical`: [v1.9.0](service/comprehendmedical/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.13.0](service/configservice/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.13.0](service/customerprofiles/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.14.0](service/databasemigrationservice/CHANGELOG.md#v1140-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.10.0](service/datasync/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.12.0](service/devopsguru/CHANGELOG.md#v1120-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.13.0](service/directconnect/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.13.0](service/docdb/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.11.0](service/dynamodb/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.9.0](service/dynamodbstreams/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.26.0](service/ec2/CHANGELOG.md#v1260-2021-12-21)
- * **Feature**: API client updated
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.12.0](service/ecr/CHANGELOG.md#v1120-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.14.0](service/ecs/CHANGELOG.md#v1140-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.16.0](service/elasticache/CHANGELOG.md#v1160-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.10.0](service/elasticloadbalancing/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.14.0](service/elasticloadbalancingv2/CHANGELOG.md#v1140-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.11.0](service/elasticsearchservice/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.13.0](service/emr/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.11.0](service/eventbridge/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.6.0](service/finspacedata/CHANGELOG.md#v160-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.15.0](service/forecast/CHANGELOG.md#v1150-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glacier`: [v1.9.0](service/glacier/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.9.0](service/groundstation/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.11.0](service/health/CHANGELOG.md#v1110-2021-12-21)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.15.0](service/imagebuilder/CHANGELOG.md#v1150-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.19.0](service/iot/CHANGELOG.md#v1190-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.11.0](service/kinesis/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.9.0](service/kinesisanalytics/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.10.0](service/kinesisanalyticsv2/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.12.0](service/kms/CHANGELOG.md#v1120-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.15.0](service/lambda/CHANGELOG.md#v1150-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.15.0](service/lexmodelsv2/CHANGELOG.md#v1150-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.10.0](service/location/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.6.0](service/lookoutmetrics/CHANGELOG.md#v160-2021-12-21)
- * **Feature**: API client updated
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/lookoutvision`: [v1.8.0](service/lookoutvision/CHANGELOG.md#v180-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/marketplacemetering`: [v1.9.0](service/marketplacemetering/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.11.0](service/mediaconnect/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.12.0](service/neptune/CHANGELOG.md#v1120-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.11.0](service/networkfirewall/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.8.0](service/nimble/CHANGELOG.md#v180-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.5.0](service/opensearch/CHANGELOG.md#v150-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.13.0](service/outposts/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.10.0](service/pi/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.10.0](service/qldb/CHANGELOG.md#v1100-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.14.0](service/rds/CHANGELOG.md#v1140-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.17.0](service/redshift/CHANGELOG.md#v1170-2021-12-21)
- * **Feature**: API client updated
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.8.0](service/resourcegroups/CHANGELOG.md#v180-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.9.0](service/resourcegroupstaggingapi/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.15.0](service/route53/CHANGELOG.md#v1150-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53domains`: [v1.8.0](service/route53domains/CHANGELOG.md#v180-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.5.0](service/route53recoverycontrolconfig/CHANGELOG.md#v150-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.22.0](service/s3/CHANGELOG.md#v1220-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.16.0](service/s3control/CHANGELOG.md#v1160-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.21.0](service/sagemaker/CHANGELOG.md#v1210-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/savingsplans`: [v1.7.3](service/savingsplans/CHANGELOG.md#v173-2021-12-21)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.11.0](service/secretsmanager/CHANGELOG.md#v1110-2021-12-21)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.14.0](service/securityhub/CHANGELOG.md#v1140-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.9.0](service/sfn/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/sms`: [v1.8.0](service/sms/CHANGELOG.md#v180-2021-12-21)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.13.0](service/sns/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.14.0](service/sqs/CHANGELOG.md#v1140-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.18.0](service/ssm/CHANGELOG.md#v1180-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.12.0](service/sts/CHANGELOG.md#v1120-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.9.0](service/support/CHANGELOG.md#v190-2021-12-21)
- * **Documentation**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.9.0](service/swf/CHANGELOG.md#v190-2021-12-21)
- * **Feature**: Updated to latest service endpoints
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.13.0](service/transfer/CHANGELOG.md#v1130-2021-12-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.11.0](service/workmail/CHANGELOG.md#v1110-2021-12-21)
- * **Feature**: API client updated
-
-# Release (2021-12-03)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.10.1](service/accessanalyzer/CHANGELOG.md#v1101-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.9.3](service/amp/CHANGELOG.md#v193-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.0.0](service/amplifyuibuilder/CHANGELOG.md#v100-2021-12-03)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.8.3](service/appmesh/CHANGELOG.md#v183-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.10.2](service/braket/CHANGELOG.md#v1102-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.7.3](service/codeguruprofiler/CHANGELOG.md#v173-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.1.1](service/evidently/CHANGELOG.md#v111-2021-12-03)
- * **Bug Fix**: Fixed a bug that prevented the resolution of the correct endpoint for some API operations.
-* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.2.3](service/grafana/CHANGELOG.md#v123-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.9.2](service/location/CHANGELOG.md#v192-2021-12-03)
- * **Bug Fix**: Fixed a bug that prevented the resolution of the correct endpoint for some API operations.
- * **Bug Fix**: Fixed an issue that caused some operations to not be signed using sigv4, resulting in authentication failures.
-* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.7.0](service/networkmanager/CHANGELOG.md#v170-2021-12-03)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.7.3](service/nimble/CHANGELOG.md#v173-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.7.2](service/proton/CHANGELOG.md#v172-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.10.0](service/ram/CHANGELOG.md#v1100-2021-12-03)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.12.0](service/rekognition/CHANGELOG.md#v1120-2021-12-03)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.3.3](service/snowdevicemanagement/CHANGELOG.md#v133-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.2.3](service/wisdom/CHANGELOG.md#v123-2021-12-03)
- * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
-
-# Release (2021-12-02)
-
-## General Highlights
-* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.11.0](config/CHANGELOG.md#v1110-2021-12-02)
- * **Feature**: Add support for specifying `EndpointResolverWithOptions` on `LoadOptions`, and associated `WithEndpointResolverWithOptions`.
-* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.10.0](service/accessanalyzer/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.9.0](service/applicationinsights/CHANGELOG.md#v190-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/backupgateway`: [v1.0.0](service/backupgateway/CHANGELOG.md#v100-2021-12-02)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/cloudhsm`: [v1.8.0](service/cloudhsm/CHANGELOG.md#v180-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.11.0](service/devopsguru/CHANGELOG.md#v1110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.12.0](service/directconnect/CHANGELOG.md#v1120-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.10.0](service/dynamodb/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.25.0](service/ec2/CHANGELOG.md#v1250-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.1.0](service/evidently/CHANGELOG.md#v110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.14.0](service/fsx/CHANGELOG.md#v1140-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.16.0](service/glue/CHANGELOG.md#v1160-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.1.0](service/inspector2/CHANGELOG.md#v110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.18.0](service/iot/CHANGELOG.md#v1180-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.0.0](service/iottwinmaker/CHANGELOG.md#v100-2021-12-02)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.11.0](service/kafka/CHANGELOG.md#v1110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.17.0](service/kendra/CHANGELOG.md#v1170-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.10.0](service/kinesis/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.10.0](service/lakeformation/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.14.0](service/lexmodelsv2/CHANGELOG.md#v1140-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.10.0](service/lexruntimev2/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: Support has been added for the `StartConversation` API.
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.12.0](service/outposts/CHANGELOG.md#v1120-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rbin`: [v1.1.0](service/rbin/CHANGELOG.md#v110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.10.0](service/redshiftdata/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rum`: [v1.1.0](service/rum/CHANGELOG.md#v110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.21.0](service/s3/CHANGELOG.md#v1210-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.20.0](service/sagemaker/CHANGELOG.md#v1200-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.11.0](service/sagemakerruntime/CHANGELOG.md#v1110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.11.0](service/shield/CHANGELOG.md#v1110-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.10.0](service/snowball/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.10.0](service/storagegateway/CHANGELOG.md#v1100-2021-12-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workspacesweb`: [v1.0.0](service/workspacesweb/CHANGELOG.md#v100-2021-12-02)
- * **Release**: New AWS service client module
-
-# Release (2021-11-30)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.16.0](service/autoscaling/CHANGELOG.md#v1160-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.10.0](service/backup/CHANGELOG.md#v1100-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.10.0](service/braket/CHANGELOG.md#v1100-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.2.0](service/chimesdkmeetings/CHANGELOG.md#v120-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.15.0](service/cloudformation/CHANGELOG.md#v1150-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.13.0](service/computeoptimizer/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.13.0](service/connect/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.12.0](service/customerprofiles/CHANGELOG.md#v1120-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.13.0](service/databasemigrationservice/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.9.0](service/dataexchange/CHANGELOG.md#v190-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.9.0](service/dynamodb/CHANGELOG.md#v190-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.24.0](service/ec2/CHANGELOG.md#v1240-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.11.0](service/ecr/CHANGELOG.md#v1110-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.13.0](service/ecs/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.15.0](service/eks/CHANGELOG.md#v1150-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.15.0](service/elasticache/CHANGELOG.md#v1150-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.13.0](service/elasticloadbalancingv2/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.10.0](service/elasticsearchservice/CHANGELOG.md#v1100-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.0.0](service/evidently/CHANGELOG.md#v100-2021-11-30)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.5.0](service/finspacedata/CHANGELOG.md#v150-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.14.0](service/imagebuilder/CHANGELOG.md#v1140-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.0.0](service/inspector2/CHANGELOG.md#v100-2021-11-30)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery`: [v1.3.2](service/internal/endpoint-discovery/CHANGELOG.md#v132-2021-11-30)
- * **Bug Fix**: Fixed a race condition that caused concurrent calls relying on endpoint discovery to share the same `url.URL` reference in their operation's http.Request.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.17.0](service/iot/CHANGELOG.md#v1170-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.9.0](service/iotdeviceadvisor/CHANGELOG.md#v190-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.15.0](service/iotsitewise/CHANGELOG.md#v1150-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.13.0](service/iotwireless/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.14.0](service/lambda/CHANGELOG.md#v1140-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.14.0](service/macie2/CHANGELOG.md#v1140-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.8.0](service/mgn/CHANGELOG.md#v180-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.0.0](service/migrationhubrefactorspaces/CHANGELOG.md#v100-2021-11-30)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.4.0](service/opensearch/CHANGELOG.md#v140-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.11.0](service/outposts/CHANGELOG.md#v1110-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.12.0](service/personalize/CHANGELOG.md#v1120-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/personalizeruntime`: [v1.7.0](service/personalizeruntime/CHANGELOG.md#v170-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.12.0](service/pinpoint/CHANGELOG.md#v1120-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.7.0](service/proton/CHANGELOG.md#v170-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.15.0](service/quicksight/CHANGELOG.md#v1150-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rbin`: [v1.0.0](service/rbin/CHANGELOG.md#v100-2021-11-30)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.13.0](service/rds/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.16.0](service/redshift/CHANGELOG.md#v1160-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rum`: [v1.0.0](service/rum/CHANGELOG.md#v100-2021-11-30)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.20.0](service/s3/CHANGELOG.md#v1200-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.15.0](service/s3control/CHANGELOG.md#v1150-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.13.0](service/sqs/CHANGELOG.md#v1130-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.17.0](service/ssm/CHANGELOG.md#v1170-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.11.0](service/sts/CHANGELOG.md#v1110-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.10.0](service/textract/CHANGELOG.md#v1100-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.8.0](service/timestreamquery/CHANGELOG.md#v180-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.8.0](service/timestreamwrite/CHANGELOG.md#v180-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.1.0](service/transcribestreaming/CHANGELOG.md#v110-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.8.0](service/translate/CHANGELOG.md#v180-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.9.0](service/wellarchitected/CHANGELOG.md#v190-2021-11-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.11.0](service/workspaces/CHANGELOG.md#v1110-2021-11-30)
- * **Feature**: API client updated
-
-# Release (2021-11-19)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.11.1
- * **Bug Fix**: Fixed a bug that prevented aws.EndpointResolverWithOptionsFunc from satisfying the aws.EndpointResolverWithOptions interface.
-* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.8.0](service/amplifybackend/CHANGELOG.md#v180-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.10.0](service/apigateway/CHANGELOG.md#v1100-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appconfig`: [v1.7.0](service/appconfig/CHANGELOG.md#v170-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appconfigdata`: [v1.0.0](service/appconfigdata/CHANGELOG.md#v100-2021-11-19)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.8.0](service/applicationinsights/CHANGELOG.md#v180-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.10.0](service/appstream/CHANGELOG.md#v1100-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.12.0](service/auditmanager/CHANGELOG.md#v1120-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.11.0](service/batch/CHANGELOG.md#v1110-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.14.0](service/chime/CHANGELOG.md#v1140-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.1.0](service/chimesdkmeetings/CHANGELOG.md#v110-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.14.0](service/cloudformation/CHANGELOG.md#v1140-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.10.0](service/cloudtrail/CHANGELOG.md#v1100-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.12.0](service/cloudwatch/CHANGELOG.md#v1120-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.12.0](service/connect/CHANGELOG.md#v1120-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.12.0](service/databasemigrationservice/CHANGELOG.md#v1120-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.13.0](service/databrew/CHANGELOG.md#v1130-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.10.0](service/devopsguru/CHANGELOG.md#v1100-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.0.0](service/drs/CHANGELOG.md#v100-2021-11-19)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.8.0](service/dynamodbstreams/CHANGELOG.md#v180-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.23.0](service/ec2/CHANGELOG.md#v1230-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.14.0](service/eks/CHANGELOG.md#v1140-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.14.0](service/forecast/CHANGELOG.md#v1140-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.10.0](service/ivs/CHANGELOG.md#v1100-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.10.0](service/kafka/CHANGELOG.md#v1100-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.16.0](service/kendra/CHANGELOG.md#v1160-2021-11-19)
- * **Announcement**: Fix API modeling bug incorrectly generating `DocumentAttributeValue` type as a union instead of a structure. This update corrects this bug by correcting the `DocumentAttributeValue` type to be a `struct` instead of an `interface`. This change also removes the `DocumentAttributeValueMember` types. To migrate to this change your application using service/kendra will need to be updated to use struct members in `DocumentAttributeValue` instead of `DocumentAttributeValueMember` types.
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.11.0](service/kms/CHANGELOG.md#v1110-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.13.0](service/lambda/CHANGELOG.md#v1130-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.13.0](service/lexmodelsv2/CHANGELOG.md#v1130-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.9.0](service/lexruntimev2/CHANGELOG.md#v190-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.9.0](service/location/CHANGELOG.md#v190-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.15.0](service/mediaconvert/CHANGELOG.md#v1150-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.14.0](service/medialive/CHANGELOG.md#v1140-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.7.0](service/mgn/CHANGELOG.md#v170-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/migrationhubstrategy`: [v1.0.0](service/migrationhubstrategy/CHANGELOG.md#v100-2021-11-19)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.9.0](service/qldb/CHANGELOG.md#v190-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.9.0](service/qldbsession/CHANGELOG.md#v190-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.15.0](service/redshift/CHANGELOG.md#v1150-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.12.0](service/sns/CHANGELOG.md#v1120-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.16.0](service/ssm/CHANGELOG.md#v1160-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.12.0](service/transfer/CHANGELOG.md#v1120-2021-11-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.14.0](service/wafv2/CHANGELOG.md#v1140-2021-11-19)
- * **Feature**: API client updated
-
-# Release (2021-11-12)
-
-## General Highlights
-* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
-* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.9.0](service/backup/CHANGELOG.md#v190-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.10.0](service/batch/CHANGELOG.md#v1100-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.0.0](service/chimesdkmeetings/CHANGELOG.md#v100-2021-11-12)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.12.0](service/computeoptimizer/CHANGELOG.md#v1120-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.11.0](service/connect/CHANGELOG.md#v1110-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.12.0](service/docdb/CHANGELOG.md#v1120-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.8.0](service/dynamodb/CHANGELOG.md#v180-2021-11-12)
- * **Documentation**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.22.0](service/ec2/CHANGELOG.md#v1220-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.12.0](service/ecs/CHANGELOG.md#v1120-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.9.0](service/gamelift/CHANGELOG.md#v190-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.9.0](service/greengrassv2/CHANGELOG.md#v190-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.10.0](service/health/CHANGELOG.md#v1100-2021-11-12)
- * **Documentation**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.9.0](service/identitystore/CHANGELOG.md#v190-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.12.0](service/iotwireless/CHANGELOG.md#v1120-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.11.0](service/neptune/CHANGELOG.md#v1110-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.12.0](service/rds/CHANGELOG.md#v1120-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/resiliencehub`: [v1.0.0](service/resiliencehub/CHANGELOG.md#v100-2021-11-12)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.8.0](service/resourcegroupstaggingapi/CHANGELOG.md#v180-2021-11-12)
- * **Documentation**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.14.0](service/s3control/CHANGELOG.md#v1140-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.19.0](service/sagemaker/CHANGELOG.md#v1190-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.10.0](service/sagemakerruntime/CHANGELOG.md#v1100-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.7.0](service/ssmincidents/CHANGELOG.md#v170-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.11.0](service/transcribe/CHANGELOG.md#v1110-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.7.0](service/translate/CHANGELOG.md#v170-2021-11-12)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.13.0](service/wafv2/CHANGELOG.md#v1130-2021-11-12)
- * **Feature**: Updated service to latest API model.
-
-# Release (2021-11-06)
-
-## General Highlights
-* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream`: [v1.0.0](aws/protocol/eventstream/CHANGELOG.md#v100-2021-11-06)
- * **Announcement**: Support has been added for AWS EventStream APIs for Kinesis, S3, and Transcribe Streaming. Support for the Lex Runtime V2 EventStream API will be added in a future release.
- * **Release**: Protocol support has been added for AWS event stream.
-* `github.com/aws/aws-sdk-go-v2/internal/endpoints/v2`: [v2.0.0](internal/endpoints/v2/CHANGELOG.md#v200-2021-11-06)
- * **Release**: Endpoint Variant Model Support
-* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.6.0](service/applicationinsights/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.8.0](service/appstream/CHANGELOG.md#v180-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.11.0](service/auditmanager/CHANGELOG.md#v1110-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.14.0](service/autoscaling/CHANGELOG.md#v1140-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.13.0](service/chime/CHANGELOG.md#v1130-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.4.0](service/chimesdkidentity/CHANGELOG.md#v140-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.4.0](service/chimesdkmessaging/CHANGELOG.md#v140-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.10.0](service/cloudfront/CHANGELOG.md#v1100-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.7.0](service/codecommit/CHANGELOG.md#v170-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.10.0](service/connect/CHANGELOG.md#v1100-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.7.0](service/connectcontactlens/CHANGELOG.md#v170-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/connectparticipant`: [v1.6.0](service/connectparticipant/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.10.0](service/databasemigrationservice/CHANGELOG.md#v1100-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.8.0](service/datasync/CHANGELOG.md#v180-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.11.0](service/docdb/CHANGELOG.md#v1110-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.9.0](service/ebs/CHANGELOG.md#v190-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.21.0](service/ec2/CHANGELOG.md#v1210-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.9.0](service/ecr/CHANGELOG.md#v190-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.11.0](service/ecs/CHANGELOG.md#v1110-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.12.0](service/eks/CHANGELOG.md#v1120-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.13.0](service/elasticache/CHANGELOG.md#v1130-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.9.0](service/elasticsearchservice/CHANGELOG.md#v190-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.8.0](service/emrcontainers/CHANGELOG.md#v180-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.4.0](service/finspace/CHANGELOG.md#v140-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.12.0](service/fsx/CHANGELOG.md#v1120-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.8.0](service/gamelift/CHANGELOG.md#v180-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.9.0](service/health/CHANGELOG.md#v190-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.12.0](service/iam/CHANGELOG.md#v1120-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/internal/eventstreamtesting`: [v1.0.0](service/internal/eventstreamtesting/CHANGELOG.md#v100-2021-11-06)
- * **Release**: Protocol support has been added for AWS event stream.
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.13.0](service/iotsitewise/CHANGELOG.md#v1130-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.14.0](service/kendra/CHANGELOG.md#v1140-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.8.0](service/kinesis/CHANGELOG.md#v180-2021-11-06)
- * **Feature**: Support has been added for the SubscribeToShard API.
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.9.0](service/kms/CHANGELOG.md#v190-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.12.0](service/lightsail/CHANGELOG.md#v1120-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.13.0](service/macie2/CHANGELOG.md#v1130-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.6.0](service/mgn/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.10.0](service/neptune/CHANGELOG.md#v1100-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.6.0](service/networkmanager/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.6.0](service/nimble/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.3.0](service/opensearch/CHANGELOG.md#v130-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.14.0](service/quicksight/CHANGELOG.md#v1140-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.11.0](service/rds/CHANGELOG.md#v1110-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.10.0](service/rekognition/CHANGELOG.md#v1100-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.9.0](service/route53resolver/CHANGELOG.md#v190-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.18.0](service/s3/CHANGELOG.md#v1180-2021-11-06)
- * **Feature**: Support has been added for the SelectObjectContent API.
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.13.0](service/s3control/CHANGELOG.md#v1130-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.18.0](service/sagemaker/CHANGELOG.md#v1180-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.11.0](service/servicediscovery/CHANGELOG.md#v1110-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.6.0](service/ssmincidents/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.6.0](service/sso/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.8.0](service/storagegateway/CHANGELOG.md#v180-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.7.0](service/support/CHANGELOG.md#v170-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.8.0](service/textract/CHANGELOG.md#v180-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.10.0](service/transcribe/CHANGELOG.md#v1100-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.0.0](service/transcribestreaming/CHANGELOG.md#v100-2021-11-06)
- * **Release**: New AWS service client module
- * **Feature**: Support has been added for the StartStreamTranscription and StartMedicalStreamTranscription APIs.
-* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.6.0](service/waf/CHANGELOG.md#v160-2021-11-06)
- * **Feature**: Updated service to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.2.0](service/wisdom/CHANGELOG.md#v120-2021-11-06)
- * **Feature**: Updated service to latest API model.
-
-# Release (2021-10-21)
-
-## General Highlights
-* **Feature**: Updated to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.10.0
- * **Feature**: Adds dynamic signing middleware that switches to unsigned payload when TLS is enabled.
-* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.8.0](service/appflow/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.8.0](service/applicationautoscaling/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.13.0](service/autoscaling/CHANGELOG.md#v1130-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.3.0](service/chimesdkmessaging/CHANGELOG.md#v130-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.11.0](service/cloudformation/CHANGELOG.md#v1110-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.7.0](service/cloudsearch/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.7.0](service/cloudtrail/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.9.0](service/cloudwatch/CHANGELOG.md#v190-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.7.0](service/cloudwatchevents/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.8.0](service/cloudwatchlogs/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codedeploy`: [v1.7.0](service/codedeploy/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.10.0](service/configservice/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.7.0](service/dataexchange/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.9.0](service/directconnect/CHANGELOG.md#v190-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.10.0](service/docdb/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.6.0](service/dynamodb/CHANGELOG.md#v160-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.20.0](service/ec2/CHANGELOG.md#v1200-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.8.0](service/ecr/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.10.0](service/ecs/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.9.0](service/efs/CHANGELOG.md#v190-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.12.0](service/elasticache/CHANGELOG.md#v1120-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.7.0](service/elasticloadbalancing/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.10.0](service/elasticloadbalancingv2/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.10.0](service/emr/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.8.0](service/eventbridge/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glacier`: [v1.6.0](service/glacier/CHANGELOG.md#v160-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.13.0](service/glue/CHANGELOG.md#v1130-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.8.0](service/ivs/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.13.0](service/kendra/CHANGELOG.md#v1130-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.7.0](service/kinesis/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.7.0](service/kinesisanalyticsv2/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.8.0](service/kms/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.10.0](service/lambda/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.13.0](service/mediaconvert/CHANGELOG.md#v1130-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.9.0](service/mediapackage/CHANGELOG.md#v190-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.10.0](service/mediapackagevod/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.9.0](service/mediatailor/CHANGELOG.md#v190-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.9.0](service/neptune/CHANGELOG.md#v190-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.0.0](service/panorama/CHANGELOG.md#v100-2021-10-21)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.13.0](service/quicksight/CHANGELOG.md#v1130-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.10.0](service/rds/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.12.0](service/redshift/CHANGELOG.md#v1120-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.10.0](service/robomaker/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.17.0](service/s3/CHANGELOG.md#v1170-2021-10-21)
- * **Feature**: Updates S3 streaming operations - PutObject, UploadPart, WriteGetObjectResponse to use unsigned payload signing auth when TLS is enabled.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.17.0](service/sagemaker/CHANGELOG.md#v1170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.12.0](service/securityhub/CHANGELOG.md#v1120-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.6.0](service/sfn/CHANGELOG.md#v160-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.9.0](service/sns/CHANGELOG.md#v190-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.10.0](service/sqs/CHANGELOG.md#v1100-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.7.0](service/storagegateway/CHANGELOG.md#v170-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.8.0](service/sts/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.6.0](service/swf/CHANGELOG.md#v160-2021-10-21)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.8.0](service/workmail/CHANGELOG.md#v180-2021-10-21)
- * **Feature**: API client updated
-
-# Release (2021-10-11)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`: [v1.6.0](feature/ec2/imds/CHANGELOG.md#v160-2021-10-11)
- * **Feature**: Respect passed in Context Deadline/Timeout. Updates the IMDS Client operations to not override the passed in Context's Deadline or Timeout options. If an Client operation is called with a Context with a Deadline or Timeout, the client will no longer override it with the client's default timeout.
- * **Bug Fix**: Fix IMDS client's response handling and operation timeout race. Fixes #1253
-* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.5.0](service/amplifybackend/CHANGELOG.md#v150-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.7.0](service/applicationautoscaling/CHANGELOG.md#v170-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.3.0](service/apprunner/CHANGELOG.md#v130-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.6.0](service/backup/CHANGELOG.md#v160-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.11.0](service/chime/CHANGELOG.md#v1110-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.11.0](service/codebuild/CHANGELOG.md#v1110-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.10.0](service/databrew/CHANGELOG.md#v1100-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.19.0](service/ec2/CHANGELOG.md#v1190-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.8.0](service/efs/CHANGELOG.md#v180-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.9.0](service/elasticloadbalancingv2/CHANGELOG.md#v190-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.7.0](service/firehose/CHANGELOG.md#v170-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.10.0](service/frauddetector/CHANGELOG.md#v1100-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.10.0](service/fsx/CHANGELOG.md#v1100-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.12.0](service/glue/CHANGELOG.md#v1120-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.0.0](service/grafana/CHANGELOG.md#v100-2021-10-11)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.8.0](service/iotevents/CHANGELOG.md#v180-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.12.0](service/kendra/CHANGELOG.md#v1120-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.7.0](service/kms/CHANGELOG.md#v170-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.9.0](service/lexmodelsv2/CHANGELOG.md#v190-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.6.0](service/lexruntimev2/CHANGELOG.md#v160-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.6.0](service/location/CHANGELOG.md#v160-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.12.0](service/mediaconvert/CHANGELOG.md#v1120-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.10.0](service/medialive/CHANGELOG.md#v1100-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.16.0](service/sagemaker/CHANGELOG.md#v1160-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.7.0](service/secretsmanager/CHANGELOG.md#v170-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.11.0](service/securityhub/CHANGELOG.md#v1110-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.12.0](service/ssm/CHANGELOG.md#v1120-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.6.0](service/ssooidc/CHANGELOG.md#v160-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.7.0](service/synthetics/CHANGELOG.md#v170-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.6.0](service/textract/CHANGELOG.md#v160-2021-10-11)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.7.0](service/workmail/CHANGELOG.md#v170-2021-10-11)
- * **Feature**: API client updated
-
-# Release (2021-09-30)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/account`: [v1.0.0](service/account/CHANGELOG.md#v100-2021-09-30)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.6.0](service/amp/CHANGELOG.md#v160-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.7.0](service/appintegrations/CHANGELOG.md#v170-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.0.0](service/cloudcontrol/CHANGELOG.md#v100-2021-09-30)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudhsmv2`: [v1.5.0](service/cloudhsmv2/CHANGELOG.md#v150-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.8.0](service/connect/CHANGELOG.md#v180-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.6.0](service/dataexchange/CHANGELOG.md#v160-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.8.0](service/elasticloadbalancingv2/CHANGELOG.md#v180-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.11.0](service/imagebuilder/CHANGELOG.md#v1110-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.9.0](service/lambda/CHANGELOG.md#v190-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.11.0](service/macie2/CHANGELOG.md#v1110-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.7.0](service/networkfirewall/CHANGELOG.md#v170-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.8.0](service/pinpoint/CHANGELOG.md#v180-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sesv2`: [v1.6.0](service/sesv2/CHANGELOG.md#v160-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.8.0](service/transfer/CHANGELOG.md#v180-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.0.0](service/voiceid/CHANGELOG.md#v100-2021-09-30)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.0.0](service/wisdom/CHANGELOG.md#v100-2021-09-30)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.6.0](service/workmail/CHANGELOG.md#v160-2021-09-30)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.7.0](service/workspaces/CHANGELOG.md#v170-2021-09-30)
- * **Feature**: API client updated
-
-# Release (2021-09-24)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.2.4](feature/dynamodb/expression/CHANGELOG.md#v124-2021-09-24)
- * **Documentation**: Fixes typo in NameBuilder.NamesList example documentation to use the correct variable name.
-* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.6.0](service/appmesh/CHANGELOG.md#v160-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.7.0](service/appsync/CHANGELOG.md#v170-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.9.0](service/auditmanager/CHANGELOG.md#v190-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.5.0](service/codecommit/CHANGELOG.md#v150-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.8.0](service/comprehend/CHANGELOG.md#v180-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.8.0](service/databasemigrationservice/CHANGELOG.md#v180-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.18.0](service/ec2/CHANGELOG.md#v1180-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.7.0](service/ecr/CHANGELOG.md#v170-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.7.0](service/elasticsearchservice/CHANGELOG.md#v170-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.10.0](service/iam/CHANGELOG.md#v1100-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.6.0](service/identitystore/CHANGELOG.md#v160-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.10.0](service/imagebuilder/CHANGELOG.md#v1100-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.13.0](service/iot/CHANGELOG.md#v1130-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.7.0](service/iotevents/CHANGELOG.md#v170-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.1.0](service/kafkaconnect/CHANGELOG.md#v110-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.6.0](service/lakeformation/CHANGELOG.md#v160-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.8.0](service/lexmodelsv2/CHANGELOG.md#v180-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.5.0](service/lexruntimev2/CHANGELOG.md#v150-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.8.0](service/licensemanager/CHANGELOG.md#v180-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.11.0](service/mediaconvert/CHANGELOG.md#v1110-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.9.0](service/mediapackagevod/CHANGELOG.md#v190-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.8.0](service/mediatailor/CHANGELOG.md#v180-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.1.0](service/opensearch/CHANGELOG.md#v110-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.12.0](service/quicksight/CHANGELOG.md#v1120-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.11.0](service/ssm/CHANGELOG.md#v1110-2021-09-24)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.10.0](service/wafv2/CHANGELOG.md#v1100-2021-09-24)
- * **Feature**: API client updated
-
-# Release (2021-09-17)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.10.0](service/chime/CHANGELOG.md#v1100-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.10.1](service/cloudformation/CHANGELOG.md#v1101-2021-09-17)
- * **Documentation**: Updated API client documentation.
-* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.7.0](service/comprehend/CHANGELOG.md#v170-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.17.0](service/ec2/CHANGELOG.md#v1170-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.6.0](service/ecr/CHANGELOG.md#v160-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.12.0](service/iot/CHANGELOG.md#v1120-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.0.0](service/kafkaconnect/CHANGELOG.md#v100-2021-09-17)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.7.0](service/lexmodelsv2/CHANGELOG.md#v170-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.4.0](service/lexruntimev2/CHANGELOG.md#v140-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.10.0](service/macie2/CHANGELOG.md#v1100-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.8.0](service/mediapackagevod/CHANGELOG.md#v180-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.6.0](service/networkfirewall/CHANGELOG.md#v160-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.7.0](service/pinpoint/CHANGELOG.md#v170-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.11.0](service/quicksight/CHANGELOG.md#v1110-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.9.0](service/rds/CHANGELOG.md#v190-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.9.0](service/robomaker/CHANGELOG.md#v190-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.16.0](service/s3/CHANGELOG.md#v1160-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.15.0](service/sagemaker/CHANGELOG.md#v1150-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.5.0](service/ssooidc/CHANGELOG.md#v150-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.8.0](service/transcribe/CHANGELOG.md#v180-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.9.0](service/wafv2/CHANGELOG.md#v190-2021-09-17)
- * **Feature**: Updated API client and endpoints to latest revision.
-
-# Release (2021-09-10)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.4.1](credentials/CHANGELOG.md#v141-2021-09-10)
- * **Documentation**: Fixes the AssumeRoleProvider's documentation for using custom TokenProviders.
-* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.5.0](service/amp/CHANGELOG.md#v150-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.7.0](service/braket/CHANGELOG.md#v170-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.2.0](service/chimesdkidentity/CHANGELOG.md#v120-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.2.0](service/chimesdkmessaging/CHANGELOG.md#v120-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.7.0](service/codegurureviewer/CHANGELOG.md#v170-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.10.0](service/eks/CHANGELOG.md#v1100-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.11.0](service/elasticache/CHANGELOG.md#v1110-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.9.0](service/emr/CHANGELOG.md#v190-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.10.0](service/forecast/CHANGELOG.md#v1100-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.9.0](service/frauddetector/CHANGELOG.md#v190-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.7.0](service/kafka/CHANGELOG.md#v170-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.4.0](service/lookoutequipment/CHANGELOG.md#v140-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.8.0](service/mediapackage/CHANGELOG.md#v180-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.0.0](service/opensearch/CHANGELOG.md#v100-2021-09-10)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.8.0](service/outposts/CHANGELOG.md#v180-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.7.0](service/ram/CHANGELOG.md#v170-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.14.0](service/sagemaker/CHANGELOG.md#v1140-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.9.0](service/servicediscovery/CHANGELOG.md#v190-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.5.0](service/ssmcontacts/CHANGELOG.md#v150-2021-09-10)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/xray`: [v1.6.0](service/xray/CHANGELOG.md#v160-2021-09-10)
- * **Feature**: API client updated
-
-# Release (2021-09-02)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.8.0](config/CHANGELOG.md#v180-2021-09-02)
- * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
-* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.7.0](service/accessanalyzer/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.8.0](service/acmpca/CHANGELOG.md#v180-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.8.0](service/cloud9/CHANGELOG.md#v180-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.10.0](service/cloudformation/CHANGELOG.md#v1100-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.6.0](service/cloudtrail/CHANGELOG.md#v160-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.10.0](service/codebuild/CHANGELOG.md#v1100-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.9.0](service/computeoptimizer/CHANGELOG.md#v190-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.9.0](service/configservice/CHANGELOG.md#v190-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.7.0](service/ebs/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.16.0](service/ec2/CHANGELOG.md#v1160-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.7.0](service/efs/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.8.0](service/emr/CHANGELOG.md#v180-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.6.0](service/firehose/CHANGELOG.md#v160-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.8.0](service/frauddetector/CHANGELOG.md#v180-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.9.0](service/fsx/CHANGELOG.md#v190-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/internal/s3shared`: [v1.7.0](service/internal/s3shared/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.11.0](service/iot/CHANGELOG.md#v1110-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotjobsdataplane`: [v1.5.0](service/iotjobsdataplane/CHANGELOG.md#v150-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.7.0](service/ivs/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.6.0](service/kms/CHANGELOG.md#v160-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.9.0](service/lexmodelbuildingservice/CHANGELOG.md#v190-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.7.0](service/mediatailor/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.2.0](service/memorydb/CHANGELOG.md#v120-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.5.0](service/mwaa/CHANGELOG.md#v150-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.6.0](service/polly/CHANGELOG.md#v160-2021-09-02)
- * **Feature**: API client updated
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.10.0](service/quicksight/CHANGELOG.md#v1100-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.15.0](service/s3/CHANGELOG.md#v1150-2021-09-02)
- * **Feature**: API client updated
- * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.11.0](service/s3control/CHANGELOG.md#v1110-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.7.0](service/sagemakerruntime/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/schemas`: [v1.6.0](service/schemas/CHANGELOG.md#v160-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.10.0](service/securityhub/CHANGELOG.md#v1100-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.5.0](service/servicecatalogappregistry/CHANGELOG.md#v150-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.9.0](service/sqs/CHANGELOG.md#v190-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.4.0](service/ssmincidents/CHANGELOG.md#v140-2021-09-02)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.7.0](service/transfer/CHANGELOG.md#v170-2021-09-02)
- * **Feature**: API client updated
-
-# Release (2021-08-27)
-
-## General Highlights
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.4.0](credentials/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Adds support for Tags and TransitiveTagKeys to stscreds.AssumeRoleProvider. Closes https://github.com/aws/aws-sdk-go-v2/issues/723
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.2.0](feature/dynamodb/attributevalue/CHANGELOG.md#v120-2021-08-27)
- * **Bug Fix**: Fix unmarshaler's decoding of AttributeValueMemberN into a type that is a string alias.
-* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.7.0](service/acmpca/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.5.0](service/amplify/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.4.0](service/amplifybackend/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.7.0](service/apigateway/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/apigatewaymanagementapi`: [v1.4.0](service/apigatewaymanagementapi/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.7.0](service/appflow/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.4.0](service/applicationinsights/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.2.0](service/apprunner/CHANGELOG.md#v120-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.6.0](service/appstream/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.6.0](service/appsync/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.6.0](service/athena/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.8.0](service/auditmanager/CHANGELOG.md#v180-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.5.0](service/autoscalingplans/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.5.0](service/backup/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.7.0](service/batch/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.6.0](service/braket/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.1.0](service/chimesdkidentity/CHANGELOG.md#v110-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.1.0](service/chimesdkmessaging/CHANGELOG.md#v110-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.5.0](service/cloudtrail/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.6.0](service/cloudwatchevents/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.5.0](service/codeartifact/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.9.0](service/codebuild/CHANGELOG.md#v190-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.4.0](service/codecommit/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.5.0](service/codeguruprofiler/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.4.0](service/codestarnotifications/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.5.0](service/cognitoidentity/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.6.0](service/cognitoidentityprovider/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.6.0](service/comprehend/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.8.0](service/computeoptimizer/CHANGELOG.md#v180-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.5.0](service/connectcontactlens/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.9.0](service/customerprofiles/CHANGELOG.md#v190-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.7.0](service/databasemigrationservice/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.6.0](service/datasync/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.4.0](service/dax/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.5.0](service/directoryservice/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/dlm`: [v1.5.0](service/dlm/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.4.0](service/dynamodbstreams/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.15.0](service/ec2/CHANGELOG.md#v1150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ecrpublic`: [v1.5.0](service/ecrpublic/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.6.0](service/efs/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.9.0](service/eks/CHANGELOG.md#v190-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.6.0](service/emrcontainers/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.7.0](service/eventbridge/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.2.0](service/finspace/CHANGELOG.md#v120-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.2.0](service/finspacedata/CHANGELOG.md#v120-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.5.0](service/firehose/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.7.0](service/fms/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.9.0](service/forecast/CHANGELOG.md#v190-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/forecastquery`: [v1.4.0](service/forecastquery/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.7.0](service/frauddetector/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.8.0](service/fsx/CHANGELOG.md#v180-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.6.0](service/gamelift/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.11.0](service/glue/CHANGELOG.md#v1110-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.6.0](service/groundstation/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.5.0](service/guardduty/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.7.0](service/health/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.6.0](service/healthlake/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.10.0](service/iot/CHANGELOG.md#v1100-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice`: [v1.4.0](service/iot1clickdevicesservice/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.5.0](service/iotanalytics/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.4.0](service/iotdataplane/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/iotfleethub`: [v1.5.0](service/iotfleethub/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.11.0](service/iotsitewise/CHANGELOG.md#v1110-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.6.0](service/ivs/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.5.0](service/lakeformation/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.6.0](service/lexmodelsv2/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.3.0](service/lexruntimev2/CHANGELOG.md#v130-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.7.0](service/licensemanager/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.10.0](service/lightsail/CHANGELOG.md#v1100-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.3.0](service/lookoutequipment/CHANGELOG.md#v130-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.3.0](service/lookoutmetrics/CHANGELOG.md#v130-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.9.0](service/macie2/CHANGELOG.md#v190-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.10.0](service/mediaconvert/CHANGELOG.md#v1100-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.7.0](service/mediapackage/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.7.0](service/mediapackagevod/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.5.0](service/mq/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.5.0](service/networkfirewall/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.7.0](service/outposts/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.6.0](service/pi/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoice`: [v1.4.0](service/pinpointsmsvoice/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.5.0](service/polly/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.6.0](service/qldb/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.5.0](service/qldbsession/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.6.0](service/ram/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.8.0](service/rekognition/CHANGELOG.md#v180-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.5.0](service/resourcegroupstaggingapi/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.8.0](service/robomaker/CHANGELOG.md#v180-2021-08-27)
- * **Bug Fix**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.1.0](service/route53recoverycontrolconfig/CHANGELOG.md#v110-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.7.0](service/route53resolver/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.14.0](service/s3/CHANGELOG.md#v1140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.10.0](service/s3control/CHANGELOG.md#v1100-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.5.0](service/s3outposts/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.5.0](service/servicecatalog/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.4.0](service/servicecatalogappregistry/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/signer`: [v1.5.0](service/signer/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.4.0](service/ssooidc/CHANGELOG.md#v140-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.6.0](service/storagegateway/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.6.0](service/synthetics/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.5.0](service/textract/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.7.0](service/transcribe/CHANGELOG.md#v170-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.6.0](service/transfer/CHANGELOG.md#v160-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/wafregional`: [v1.5.0](service/wafregional/CHANGELOG.md#v150-2021-08-27)
- * **Feature**: Updated API model to latest revision.
-
-# Release (2021-08-19)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.6.0](service/apigateway/CHANGELOG.md#v160-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apigatewayv2`: [v1.5.0](service/apigatewayv2/CHANGELOG.md#v150-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.6.0](service/appflow/CHANGELOG.md#v160-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.5.0](service/applicationautoscaling/CHANGELOG.md#v150-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.6.0](service/cloud9/CHANGELOG.md#v160-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/clouddirectory`: [v1.4.0](service/clouddirectory/CHANGELOG.md#v140-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.6.0](service/cloudwatchlogs/CHANGELOG.md#v160-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.8.0](service/codebuild/CHANGELOG.md#v180-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.7.0](service/configservice/CHANGELOG.md#v170-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.8.0](service/costexplorer/CHANGELOG.md#v180-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.8.0](service/customerprofiles/CHANGELOG.md#v180-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.8.0](service/databrew/CHANGELOG.md#v180-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.4.0](service/directoryservice/CHANGELOG.md#v140-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.14.0](service/ec2/CHANGELOG.md#v1140-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.9.0](service/elasticache/CHANGELOG.md#v190-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.6.0](service/emr/CHANGELOG.md#v160-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.10.0](service/iotsitewise/CHANGELOG.md#v1100-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.7.0](service/lambda/CHANGELOG.md#v170-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.6.0](service/licensemanager/CHANGELOG.md#v160-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.0.0](service/memorydb/CHANGELOG.md#v100-2021-08-19)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.8.0](service/quicksight/CHANGELOG.md#v180-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.10.0](service/route53/CHANGELOG.md#v1100-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.6.0](service/route53resolver/CHANGELOG.md#v160-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.13.0](service/s3/CHANGELOG.md#v1130-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.12.0](service/sagemaker/CHANGELOG.md#v1120-2021-08-19)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.5.0](service/sagemakerruntime/CHANGELOG.md#v150-2021-08-19)
- * **Feature**: API client updated
-
-# Release (2021-08-12)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`: [v1.3.1](feature/cloudfront/sign/CHANGELOG.md#v131-2021-08-12)
- * **Bug Fix**: Update to not escape HTML when encoding the policy.
-* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.5.0](service/athena/CHANGELOG.md#v150-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.11.0](service/autoscaling/CHANGELOG.md#v1110-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.8.0](service/chime/CHANGELOG.md#v180-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.0.0](service/chimesdkidentity/CHANGELOG.md#v100-2021-08-12)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.0.0](service/chimesdkmessaging/CHANGELOG.md#v100-2021-08-12)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.7.0](service/codebuild/CHANGELOG.md#v170-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.6.0](service/connect/CHANGELOG.md#v160-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.5.0](service/ebs/CHANGELOG.md#v150-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.8.0](service/ecs/CHANGELOG.md#v180-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.5.0](service/lexmodelsv2/CHANGELOG.md#v150-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.9.0](service/lightsail/CHANGELOG.md#v190-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.3.0](service/nimble/CHANGELOG.md#v130-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.7.0](service/rekognition/CHANGELOG.md#v170-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.9.0](service/route53/CHANGELOG.md#v190-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.0.0](service/snowdevicemanagement/CHANGELOG.md#v100-2021-08-12)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.9.0](service/ssm/CHANGELOG.md#v190-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.5.0](service/synthetics/CHANGELOG.md#v150-2021-08-12)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.7.0](service/wafv2/CHANGELOG.md#v170-2021-08-12)
- * **Feature**: API client updated
-
-# Release (2021-08-04)
-
-## General Highlights
-* **Feature**: adds error handling for defered close calls
-* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.8.0
- * **Bug Fix**: Corrected an issue where the retryer was not using the last attempt's ResultMetadata as the bases for the return result from the stack. ([#1345](https://github.com/aws/aws-sdk-go-v2/pull/1345))
-* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.2.0](feature/dynamodb/expression/CHANGELOG.md#v120-2021-08-04)
- * **Feature**: Add IsSet helper for ConditionBuilder and KeyConditionBuilder ([#1329](https://github.com/aws/aws-sdk-go-v2/pull/1329))
-* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.5.2](service/accessanalyzer/CHANGELOG.md#v152-2021-08-04)
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.3.1](service/amp/CHANGELOG.md#v131-2021-08-04)
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.5.0](service/appintegrations/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.4.2](service/appmesh/CHANGELOG.md#v142-2021-08-04)
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.5.0](service/appsync/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.7.0](service/auditmanager/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.6.0](service/batch/CHANGELOG.md#v160-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.5.2](service/braket/CHANGELOG.md#v152-2021-08-04)
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.7.0](service/chime/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.8.0](service/cloudformation/CHANGELOG.md#v180-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.7.0](service/cloudwatch/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.6.0](service/codebuild/CHANGELOG.md#v160-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.4.2](service/codeguruprofiler/CHANGELOG.md#v142-2021-08-04)
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.5.0](service/cognitoidentityprovider/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.7.0](service/computeoptimizer/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.7.0](service/databrew/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.7.0](service/directconnect/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.13.0](service/ec2/CHANGELOG.md#v1130-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.7.0](service/ecs/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.6.0](service/elasticloadbalancingv2/CHANGELOG.md#v160-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.5.0](service/emr/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.5.0](service/emrcontainers/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.6.0](service/eventbridge/CHANGELOG.md#v160-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.10.0](service/glue/CHANGELOG.md#v1100-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.5.0](service/greengrassv2/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.5.2](service/groundstation/CHANGELOG.md#v152-2021-08-04)
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.8.0](service/iam/CHANGELOG.md#v180-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.4.0](service/identitystore/CHANGELOG.md#v140-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.8.0](service/imagebuilder/CHANGELOG.md#v180-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.9.0](service/iot/CHANGELOG.md#v190-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.4.0](service/iotanalytics/CHANGELOG.md#v140-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.9.0](service/iotsitewise/CHANGELOG.md#v190-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.8.0](service/iotwireless/CHANGELOG.md#v180-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.10.0](service/kendra/CHANGELOG.md#v1100-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.6.0](service/lambda/CHANGELOG.md#v160-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.7.0](service/lexmodelbuildingservice/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.4.0](service/lexmodelsv2/CHANGELOG.md#v140-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.4.0](service/location/CHANGELOG.md#v140-2021-08-04)
- * **Feature**: Updated to latest API model.
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.9.0](service/mediaconvert/CHANGELOG.md#v190-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.8.0](service/medialive/CHANGELOG.md#v180-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.3.1](service/mgn/CHANGELOG.md#v131-2021-08-04)
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.7.0](service/personalize/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.2.0](service/proton/CHANGELOG.md#v120-2021-08-04)
- * **Feature**: Updated to latest API model.
- * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
-* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.5.0](service/qldb/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.7.0](service/quicksight/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.7.0](service/rds/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.10.0](service/redshift/CHANGELOG.md#v1100-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.5.0](service/redshiftdata/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.7.0](service/robomaker/CHANGELOG.md#v170-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.8.0](service/route53/CHANGELOG.md#v180-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.0.0](service/route53recoverycluster/CHANGELOG.md#v100-2021-08-04)
- * **Release**: New AWS service client module
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.0.0](service/route53recoverycontrolconfig/CHANGELOG.md#v100-2021-08-04)
- * **Release**: New AWS service client module
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.0.0](service/route53recoveryreadiness/CHANGELOG.md#v100-2021-08-04)
- * **Release**: New AWS service client module
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.12.0](service/s3/CHANGELOG.md#v1120-2021-08-04)
- * **Feature**: Add `HeadObject` presign support. ([#1346](https://github.com/aws/aws-sdk-go-v2/pull/1346))
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.9.0](service/s3control/CHANGELOG.md#v190-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.4.0](service/s3outposts/CHANGELOG.md#v140-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.11.0](service/sagemaker/CHANGELOG.md#v1110-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.5.0](service/secretsmanager/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.8.0](service/securityhub/CHANGELOG.md#v180-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.6.0](service/shield/CHANGELOG.md#v160-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.3.0](service/ssmcontacts/CHANGELOG.md#v130-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.2.0](service/ssmincidents/CHANGELOG.md#v120-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.5.0](service/ssoadmin/CHANGELOG.md#v150-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.4.0](service/synthetics/CHANGELOG.md#v140-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.4.0](service/textract/CHANGELOG.md#v140-2021-08-04)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.6.0](service/transcribe/CHANGELOG.md#v160-2021-08-04)
- * **Feature**: Updated to latest API model.
-
-# Release (2021-07-15)
-
-## General Highlights
-* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.5.0](config/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
-* `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`: [v1.3.0](feature/ec2/imds/CHANGELOG.md#v130-2021-07-15)
- * **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
-* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.5.0](service/acm/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.3.0](service/amp/CHANGELOG.md#v130-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.4.0](service/amplify/CHANGELOG.md#v140-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.3.0](service/amplifybackend/CHANGELOG.md#v130-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.10.0](service/autoscaling/CHANGELOG.md#v1100-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.6.0](service/chime/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.7.0](service/cloudformation/CHANGELOG.md#v170-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.7.0](service/cloudfront/CHANGELOG.md#v170-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.5.0](service/cloudsearch/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.6.0](service/cloudwatch/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.6.0](service/databasemigrationservice/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.6.0](service/devopsguru/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.6.0](service/directconnect/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.8.0](service/docdb/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.12.0](service/ec2/CHANGELOG.md#v1120-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.8.0](service/eks/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.8.0](service/elasticache/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.5.0](service/elasticbeanstalk/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.5.0](service/elasticloadbalancing/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.5.0](service/elasticloadbalancingv2/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.6.0](service/fms/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.6.0](service/frauddetector/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.9.0](service/glue/CHANGELOG.md#v190-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.6.0](service/health/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.5.0](service/healthlake/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.7.0](service/iam/CHANGELOG.md#v170-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.7.0](service/imagebuilder/CHANGELOG.md#v170-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.8.0](service/iot/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.8.0](service/iotsitewise/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.9.0](service/kendra/CHANGELOG.md#v190-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.5.0](service/lambda/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.6.0](service/lexmodelbuildingservice/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.8.0](service/lightsail/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.5.1](service/macie/CHANGELOG.md#v151-2021-07-15)
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.8.1](service/macie2/CHANGELOG.md#v181-2021-07-15)
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.8.0](service/mediaconvert/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.5.0](service/mediatailor/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.3.0](service/mgn/CHANGELOG.md#v130-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.4.0](service/mq/CHANGELOG.md#v140-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.7.0](service/neptune/CHANGELOG.md#v170-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.6.0](service/outposts/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.5.1](service/pricing/CHANGELOG.md#v151-2021-07-15)
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.6.0](service/rds/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.9.0](service/redshift/CHANGELOG.md#v190-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.10.0](service/sagemaker/CHANGELOG.md#v1100-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.5.0](service/ses/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.7.0](service/sns/CHANGELOG.md#v170-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.7.0](service/sqs/CHANGELOG.md#v170-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.8.0](service/ssm/CHANGELOG.md#v180-2021-07-15)
- * **Feature**: Updated service model to latest version.
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.5.0](service/storagegateway/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: Updated service model to latest version.
-* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.6.0](service/sts/CHANGELOG.md#v160-2021-07-15)
- * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
- * **Documentation**: Updated service model to latest revision.
-* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.5.0](service/wellarchitected/CHANGELOG.md#v150-2021-07-15)
- * **Feature**: Updated service model to latest version.
-
-# Release (2021-07-01)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/internal/ini`: [v1.1.0](internal/ini/CHANGELOG.md#v110-2021-07-01)
- * **Feature**: Support for `:`, `=`, `[`, `]` being present in expression values.
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.9.0](service/autoscaling/CHANGELOG.md#v190-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.6.0](service/databrew/CHANGELOG.md#v160-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.11.0](service/ec2/CHANGELOG.md#v1110-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.8.0](service/glue/CHANGELOG.md#v180-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.8.0](service/kendra/CHANGELOG.md#v180-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.7.0](service/mediaconvert/CHANGELOG.md#v170-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.6.0](service/mediapackagevod/CHANGELOG.md#v160-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.8.0](service/redshift/CHANGELOG.md#v180-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.9.0](service/sagemaker/CHANGELOG.md#v190-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.7.0](service/servicediscovery/CHANGELOG.md#v170-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.6.0](service/sqs/CHANGELOG.md#v160-2021-07-01)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.2.0](service/ssmcontacts/CHANGELOG.md#v120-2021-07-01)
- * **Feature**: API client updated
-
-# Release (2021-06-25)
-
-## General Highlights
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.7.0
- * **Feature**: Adds configuration values for enabling endpoint discovery.
- * **Bug Fix**: Keep Object-Lock headers a header when presigning Sigv4 signing requests
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.4.0](config/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: Adds configuration setting for enabling endpoint discovery.
-* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.3.0](credentials/CHANGELOG.md#v130-2021-06-25)
- * **Bug Fix**: Fixed example usages of aws.CredentialsCache ([#1275](https://github.com/aws/aws-sdk-go-v2/pull/1275))
-* `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`: [v1.2.0](feature/cloudfront/sign/CHANGELOG.md#v120-2021-06-25)
- * **Feature**: Add UnmarshalJSON for AWSEpochTime to correctly unmarshal AWSEpochTime, ([#1298](https://github.com/aws/aws-sdk-go-v2/pull/1298))
-* `github.com/aws/aws-sdk-go-v2/internal/configsources`: [v1.0.0](internal/configsources/CHANGELOG.md#v100-2021-06-25)
- * **Release**: Release new modules
-* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.2.0](service/amp/CHANGELOG.md#v120-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.3.0](service/amplify/CHANGELOG.md#v130-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.2.0](service/amplifybackend/CHANGELOG.md#v120-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.5.0](service/appflow/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.4.0](service/appmesh/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.5.0](service/chime/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.5.0](service/cloud9/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.6.0](service/cloudformation/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.6.0](service/cloudfront/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.4.0](service/cloudsearch/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.5.0](service/cloudwatch/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.5.0](service/cloudwatchevents/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.5.0](service/codebuild/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.5.0](service/codegurureviewer/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.4.0](service/cognitoidentity/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.4.0](service/cognitoidentityprovider/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.5.0](service/connect/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.3.0](service/dax/CHANGELOG.md#v130-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.7.0](service/docdb/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.4.0](service/dynamodb/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: Adds support for endpoint discovery.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.10.0](service/ec2/CHANGELOG.md#v1100-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.7.0](service/elasticache/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.4.0](service/elasticbeanstalk/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.4.0](service/elasticloadbalancing/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.4.0](service/elasticloadbalancingv2/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.5.0](service/eventbridge/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.5.0](service/greengrass/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.4.0](service/greengrassv2/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.6.0](service/iam/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery`: [v1.0.0](service/internal/endpoint-discovery/CHANGELOG.md#v100-2021-06-25)
- * **Release**: Release new modules
- * **Feature**: Module supporting endpoint-discovery across all service clients.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.7.0](service/iot/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.3.0](service/iotanalytics/CHANGELOG.md#v130-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.7.0](service/kendra/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.4.0](service/kms/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.3.0](service/lexmodelsv2/CHANGELOG.md#v130-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.2.0](service/lexruntimev2/CHANGELOG.md#v120-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.5.0](service/licensemanager/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.2.0](service/lookoutmetrics/CHANGELOG.md#v120-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/managedblockchain`: [v1.4.0](service/managedblockchain/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.6.0](service/mediaconnect/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.7.0](service/medialive/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.4.0](service/mediatailor/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.6.0](service/neptune/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.1.0](service/proton/CHANGELOG.md#v110-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.6.0](service/quicksight/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.5.0](service/ram/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.5.0](service/rds/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.7.0](service/redshift/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.4.0](service/redshiftdata/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.7.0](service/route53/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.8.0](service/sagemaker/CHANGELOG.md#v180-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakerfeaturestoreruntime`: [v1.4.0](service/sagemakerfeaturestoreruntime/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.7.0](service/securityhub/CHANGELOG.md#v170-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.4.0](service/ses/CHANGELOG.md#v140-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.5.0](service/snowball/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.6.0](service/sns/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.5.0](service/sqs/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.5.0](service/sts/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.3.0](service/timestreamquery/CHANGELOG.md#v130-2021-06-25)
- * **Feature**: Adds support for endpoint discovery.
-* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.3.0](service/timestreamwrite/CHANGELOG.md#v130-2021-06-25)
- * **Feature**: Adds support for endpoint discovery.
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.5.0](service/transfer/CHANGELOG.md#v150-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.3.0](service/waf/CHANGELOG.md#v130-2021-06-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.6.0](service/wafv2/CHANGELOG.md#v160-2021-06-25)
- * **Feature**: API client updated
-
-# Release (2021-06-11)
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.7.0](service/autoscaling/CHANGELOG.md#v170-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.3.2](service/cloudtrail/CHANGELOG.md#v132-2021-06-11)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.3.3](service/cognitoidentityprovider/CHANGELOG.md#v133-2021-06-11)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.6.0](service/eks/CHANGELOG.md#v160-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.6.0](service/fsx/CHANGELOG.md#v160-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.6.0](service/glue/CHANGELOG.md#v160-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.6.0](service/kendra/CHANGELOG.md#v160-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.7.0](service/macie2/CHANGELOG.md#v170-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.6.0](service/medialive/CHANGELOG.md#v160-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.4.0](service/pi/CHANGELOG.md#v140-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.0.0](service/proton/CHANGELOG.md#v100-2021-06-11)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.3.1](service/qldb/CHANGELOG.md#v131-2021-06-11)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.4.2](service/rds/CHANGELOG.md#v142-2021-06-11)
- * **Documentation**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.7.0](service/sagemaker/CHANGELOG.md#v170-2021-06-11)
- * **Feature**: Updated to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.4.1](service/transfer/CHANGELOG.md#v141-2021-06-11)
- * **Documentation**: Updated to latest API model.
-
-# Release (2021-06-04)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.5.0](service/acmpca/CHANGELOG.md#v150-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.6.0](service/autoscaling/CHANGELOG.md#v160-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.4.0](service/braket/CHANGELOG.md#v140-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.5.2](service/cloudfront/CHANGELOG.md#v152-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.4.0](service/datasync/CHANGELOG.md#v140-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/devicefarm`: [v1.3.0](service/devicefarm/CHANGELOG.md#v130-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.6.0](service/docdb/CHANGELOG.md#v160-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.9.0](service/ec2/CHANGELOG.md#v190-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.5.0](service/ecs/CHANGELOG.md#v150-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.7.0](service/forecast/CHANGELOG.md#v170-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.5.0](service/fsx/CHANGELOG.md#v150-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.5.1](service/iam/CHANGELOG.md#v151-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/internal/s3shared`: [v1.4.0](service/internal/s3shared/CHANGELOG.md#v140-2021-06-04)
- * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
-* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.4.0](service/iotevents/CHANGELOG.md#v140-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.3.0](service/ioteventsdata/CHANGELOG.md#v130-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.6.0](service/iotsitewise/CHANGELOG.md#v160-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.6.0](service/iotwireless/CHANGELOG.md#v160-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.5.0](service/kendra/CHANGELOG.md#v150-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.6.1](service/lightsail/CHANGELOG.md#v161-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.2.0](service/location/CHANGELOG.md#v120-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.2.0](service/mwaa/CHANGELOG.md#v120-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.4.0](service/outposts/CHANGELOG.md#v140-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.3.0](service/polly/CHANGELOG.md#v130-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.3.0](service/qldb/CHANGELOG.md#v130-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.3.2](service/resourcegroups/CHANGELOG.md#v132-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.6.2](service/route53/CHANGELOG.md#v162-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.4.2](service/route53resolver/CHANGELOG.md#v142-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.10.0](service/s3/CHANGELOG.md#v1100-2021-06-04)
- * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.7.0](service/s3control/CHANGELOG.md#v170-2021-06-04)
- * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.5.0](service/servicediscovery/CHANGELOG.md#v150-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.5.0](service/sns/CHANGELOG.md#v150-2021-06-04)
- * **Feature**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.4.2](service/sqs/CHANGELOG.md#v142-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.6.2](service/ssm/CHANGELOG.md#v162-2021-06-04)
- * **Documentation**: Updated service client to latest API model.
-
-# Release (2021-05-25)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.4.0](service/cloudwatchlogs/CHANGELOG.md#v140-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/commander`: [v1.1.0](service/commander/CHANGELOG.md#v110-2021-05-25)
- * **Feature**: Deprecated module. The API client was incorrectly named. Use AWS Systems Manager Incident Manager (ssmincidents) instead.
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.5.0](service/computeoptimizer/CHANGELOG.md#v150-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.6.0](service/costexplorer/CHANGELOG.md#v160-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.8.0](service/ec2/CHANGELOG.md#v180-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.4.0](service/efs/CHANGELOG.md#v140-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.6.0](service/forecast/CHANGELOG.md#v160-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.6.0](service/iot/CHANGELOG.md#v160-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/opsworkscm`: [v1.4.0](service/opsworkscm/CHANGELOG.md#v140-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.5.0](service/quicksight/CHANGELOG.md#v150-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.9.0](service/s3/CHANGELOG.md#v190-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.0.0](service/ssmincidents/CHANGELOG.md#v100-2021-05-25)
- * **Release**: New AWS service client module
-* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.4.0](service/transfer/CHANGELOG.md#v140-2021-05-25)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.4.0](service/workspaces/CHANGELOG.md#v140-2021-05-25)
- * **Feature**: API client updated
-
-# Release (2021-05-20)
-
-## General Highlights
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.6.0
- * **Feature**: `internal/ini`: This package has been migrated to a separate module at `github.com/aws/aws-sdk-go-v2/internal/ini`.
-* `github.com/aws/aws-sdk-go-v2/config`: [v1.3.0](config/CHANGELOG.md#v130-2021-05-20)
- * **Feature**: SSO credentials can now be defined alongside other credential providers within the same configuration profile.
- * **Bug Fix**: Profile names were incorrectly normalized to lower-case, which could result in unexpected profile configurations.
-* `github.com/aws/aws-sdk-go-v2/internal/ini`: [v1.0.0](internal/ini/CHANGELOG.md#v100-2021-05-20)
- * **Release**: The `github.com/aws/aws-sdk-go-v2/internal/ini` package is now a Go Module.
-* `github.com/aws/aws-sdk-go-v2/service/applicationcostprofiler`: [v1.0.0](service/applicationcostprofiler/CHANGELOG.md#v100-2021-05-20)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.0.0](service/apprunner/CHANGELOG.md#v100-2021-05-20)
- * **Release**: New AWS service client module
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.5.0](service/autoscaling/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.4.0](service/computeoptimizer/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.6.0](service/detective/CHANGELOG.md#v160-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.5.0](service/eks/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.6.0](service/elasticache/CHANGELOG.md#v160-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.4.0](service/elasticsearchservice/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.5.0](service/iam/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.5.0](service/imagebuilder/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.5.0](service/iot/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.4.0](service/iotdeviceadvisor/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.5.0](service/iotsitewise/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.4.0](service/kinesis/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.3.0](service/kinesisanalytics/CHANGELOG.md#v130-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.4.0](service/kinesisanalyticsv2/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.2.0](service/lexmodelsv2/CHANGELOG.md#v120-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.4.0](service/licensemanager/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.6.0](service/lightsail/CHANGELOG.md#v160-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.4.0](service/macie/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.6.0](service/macie2/CHANGELOG.md#v160-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.5.0](service/mediaconnect/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.5.0](service/neptune/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.5.0](service/personalize/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.4.0](service/quicksight/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.5.0](service/rekognition/CHANGELOG.md#v150-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.8.0](service/s3/CHANGELOG.md#v180-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.6.0](service/sagemaker/CHANGELOG.md#v160-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.3.0](service/sagemakera2iruntime/CHANGELOG.md#v130-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.6.0](service/securityhub/CHANGELOG.md#v160-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.3.0](service/support/CHANGELOG.md#v130-2021-05-20)
- * **Feature**: API client updated
-* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.4.0](service/transcribe/CHANGELOG.md#v140-2021-05-20)
- * **Feature**: API client updated
-
-# Release (2021-05-14)
-
-## General Highlights
-* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-## Module Highlights
-* `github.com/aws/aws-sdk-go-v2`: v1.5.0
- * **Feature**: `AddSDKAgentKey` and `AddSDKAgentKeyValue` in `aws/middleware` package have been updated to direct metadata to `User-Agent` HTTP header.
-* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.3.0](service/codeartifact/CHANGELOG.md#v130-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/commander`: [v1.0.0](service/commander/CHANGELOG.md#v100-2021-05-14)
- * **Release**: New AWS service client module
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.5.0](service/configservice/CHANGELOG.md#v150-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.4.0](service/connect/CHANGELOG.md#v140-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.7.0](service/ec2/CHANGELOG.md#v170-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.4.0](service/ecs/CHANGELOG.md#v140-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.4.0](service/eks/CHANGELOG.md#v140-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.0.0](service/finspace/CHANGELOG.md#v100-2021-05-14)
- * **Release**: New AWS service client module
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.0.0](service/finspacedata/CHANGELOG.md#v100-2021-05-14)
- * **Release**: New AWS service client module
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.4.0](service/iot/CHANGELOG.md#v140-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.5.0](service/iotwireless/CHANGELOG.md#v150-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.3.0](service/kinesis/CHANGELOG.md#v130-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.2.0](service/kinesisanalytics/CHANGELOG.md#v120-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.3.0](service/kinesisanalyticsv2/CHANGELOG.md#v130-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.3.0](service/lakeformation/CHANGELOG.md#v130-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.1.0](service/lookoutmetrics/CHANGELOG.md#v110-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.5.0](service/mediaconvert/CHANGELOG.md#v150-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.6.0](service/route53/CHANGELOG.md#v160-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.7.0](service/s3/CHANGELOG.md#v170-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.6.0](service/s3control/CHANGELOG.md#v160-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.6.0](service/ssm/CHANGELOG.md#v160-2021-05-14)
- * **Feature**: Updated to latest service API model.
-* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.0.0](service/ssmcontacts/CHANGELOG.md#v100-2021-05-14)
- * **Release**: New AWS service client module
- * **Feature**: Updated to latest service API model.
-
-# Release 2021-05-06
-
-## Breaking change
-* `service/ec2` - v1.6.0
- * This release contains a breaking change to the Amazon EC2 API client. API number(int/int64/etc) and boolean members were changed from value, to pointer type. Your applications using the EC2 API client will fail to compile after upgrading for all members that were updated. To migrate to this module you'll need to update your application to use pointers for all number and boolean members in the API client module. The SDK provides helper utilities to convert between value and pointer types. For example the [aws.Bool](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Bool) function to get the address from a bool literal. Similar utilities are available for all other primitive types in the [aws](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws) package.
-
-## Service Client Highlights
-* `service/acmpca` - v1.3.0
- * Feature: API client updated
-* `service/apigateway` - v1.3.0
- * Feature: API client updated
-* `service/auditmanager` - v1.4.0
- * Feature: API client updated
-* `service/chime` - v1.3.0
- * Feature: API client updated
-* `service/cloudformation` - v1.4.0
- * Feature: API client updated
-* `service/cloudfront` - v1.4.0
- * Feature: API client updated
-* `service/codegurureviewer` - v1.3.0
- * Feature: API client updated
-* `service/connect` - v1.3.0
- * Feature: API client updated
-* `service/customerprofiles` - v1.5.0
- * Feature: API client updated
-* `service/devopsguru` - v1.3.0
- * Feature: API client updated
-* `service/docdb` - v1.4.0
- * Feature: API client updated
-* `service/ec2` - v1.6.0
- * Bug Fix: Fix incorrectly modeled Amazon EC2 number and boolean members in structures. The Amazon EC2 API client has been updated with a breaking change to fix all structure number and boolean members to be pointer types instead of value types. Fixes [#1107](https://github.com/aws/aws-sdk-go-v2/issues/1107), [#1178](https://github.com/aws/aws-sdk-go-v2/issues/1178), and [#1190](https://github.com/aws/aws-sdk-go-v2/issues/1190). This breaking change is made within the major version of the client' module, because the client operations failed and were unusable with value type number and boolean members with the EC2 API.
- * Feature: API client updated
-* `service/ecs` - v1.3.0
- * Feature: API client updated
-* `service/eks` - v1.3.0
- * Feature: API client updated
-* `service/forecast` - v1.4.0
- * Feature: API client updated
-* `service/glue` - v1.4.0
- * Feature: API client updated
-* `service/health` - v1.3.0
- * Feature: API client updated
-* `service/iotsitewise` - v1.3.0
- * Feature: API client updated
-* `service/iotwireless` - v1.4.0
- * Feature: API client updated
-* `service/kafka` - v1.3.0
- * Feature: API client updated
-* `service/kinesisanalyticsv2` - v1.2.0
- * Feature: API client updated
-* `service/macie2` - v1.4.0
- * Feature: API client updated
-* `service/marketplacecatalog` - v1.2.0
- * Feature: API client updated
-* `service/mediaconvert` - v1.4.0
- * Feature: API client updated
-* `service/mediapackage` - v1.4.0
- * Feature: API client updated
-* `service/mediapackagevod` - v1.3.0
- * Feature: API client updated
-* `service/mturk` - v1.2.0
- * Feature: API client updated
-* `service/nimble` - v1.0.0
- * Feature: API client updated
-* `service/organizations` - v1.3.0
- * Feature: API client updated
-* `service/personalize` - v1.3.0
- * Feature: API client updated
-* `service/robomaker` - v1.4.0
- * Feature: API client updated
-* `service/route53` - v1.5.0
- * Feature: API client updated
-* `service/s3` - v1.6.0
- * Bug Fix: Fix PutObject and UploadPart unseekable stream documentation link to point to the correct location.
- * Feature: API client updated
-* `service/sagemaker` - v1.4.0
- * Feature: API client updated
-* `service/securityhub` - v1.4.0
- * Feature: API client updated
-* `service/servicediscovery` - v1.3.0
- * Feature: API client updated
-* `service/snowball` - v1.3.0
- * Feature: API client updated
-* `service/sns` - v1.3.0
- * Feature: API client updated
-* `service/ssm` - v1.5.0
- * Feature: API client updated
-## Core SDK Highlights
-* Dependency Update: Update smithy-go dependency to v1.4.0
-* Dependency Update: Updated SDK dependencies to their latest versions.
-* `aws` - v1.4.0
- * Feature: Add support for FIPS global partition endpoints ([#1242](https://github.com/aws/aws-sdk-go-v2/pull/1242))
-
-# Release 2021-04-23
-## Service Client Highlights
-* `service/cloudformation` - v1.3.2
- * Documentation: Service Documentation Updates
-* `service/cognitoidentityprovider` - v1.2.3
- * Documentation: Service Documentation Updates
-* `service/costexplorer` - v1.4.0
- * Feature: Service API Updates
-* `service/databasemigrationservice` - v1.3.0
- * Feature: Service API Updates
-* `service/detective` - v1.4.0
- * Feature: Service API Updates
-* `service/elasticache` - v1.4.0
- * Feature: Service API Updates
-* `service/forecast` - v1.3.0
- * Feature: Service API Updates
-* `service/groundstation` - v1.3.0
- * Feature: Service API Updates
-* `service/kendra` - v1.3.0
- * Feature: Service API Updates
-* `service/redshift` - v1.5.0
- * Feature: Service API Updates
-* `service/savingsplans` - v1.2.0
- * Feature: Service API Updates
-* `service/securityhub` - v1.3.0
- * Feature: Service API Updates
-## Core SDK Highlights
-* Dependency Update: Updated SDK dependencies to their latest versions.
-* `feature/rds/auth` - v1.0.0
- * Feature: Add Support for Amazon RDS IAM Authentication
-
-# Release 2021-04-14
-## Service Client Highlights
-* `service/codebuild` - v1.3.0
- * Feature: API client updated
-* `service/codestarconnections` - v1.2.0
- * Feature: API client updated
-* `service/comprehendmedical` - v1.2.0
- * Feature: API client updated
-* `service/configservice` - v1.4.0
- * Feature: API client updated
-* `service/ec2` - v1.5.0
- * Feature: API client updated
-* `service/fsx` - v1.3.0
- * Feature: API client updated
-* `service/lightsail` - v1.4.0
- * Feature: API client updated
-* `service/mediaconnect` - v1.3.0
- * Feature: API client updated
-* `service/rds` - v1.3.0
- * Feature: API client updated
-* `service/redshift` - v1.4.0
- * Feature: API client updated
-* `service/shield` - v1.3.0
- * Feature: API client updated
-* `service/sts` - v1.3.0
- * Feature: API client updated
-## Core SDK Highlights
-* Dependency Update: Updated SDK dependencies to their latest versions.
-
-# Release 2021-04-08
-## Service Client Highlights
-* Feature: API model sync
-* `service/lookoutequipment` - v1.0.0
- * v1 Release: new service client
-* `service/mgn` - v1.0.0
- * v1 Release: new service client
-## Core SDK Highlights
-* Dependency Update: smithy-go version bump
-* Dependency Update: Updated SDK dependencies to their latest versions.
-
-# Release 2021-04-01
-## Service Client Highlights
-* Bug Fix: Fix URL Path and RawQuery of resolved endpoint being ignored by the API client's request serialization.
- * Fixes [issue#1191](https://github.com/aws/aws-sdk-go-v2/issues/1191)
-* Refactored internal endpoints model for accessors
-* Feature: updated to latest models
-* New services
- * `service/location` - v1.0.0
- * `service/lookoutmetrics` - v1.0.0
-## Core SDK Highlights
-* Dependency Update: update smithy-go module
-* Dependency Update: Updated SDK dependencies to their latest versions.
-
-# Release 2021-03-18
-## Service Client Highlights
-* Bug Fix: Updated presign URLs to no longer include the X-Amz-User-Agent header
-* Feature: Update API model
-* Add New supported API
-* `service/internal/s3shared` - v1.2.0
- * Feature: Support for S3 Object Lambda
-* `service/s3` - v1.3.0
- * Bug Fix: Adds documentation to the PutObject and UploadPart operations Body member how to upload unseekable objects to an Amazon S3 Bucket.
- * Feature: S3 Object Lambda is a new S3 feature that enables users to apply their own custom code to process the output of a standard S3 GET request by automatically invoking a Lambda function with a GET request
-* `service/s3control` - v1.3.0
- * Feature: S3 Object Lambda is a new S3 feature that enables users to apply their own custom code to process the output of a standard S3 GET request by automatically invoking a Lambda function with a GET request
-## Core SDK Highlights
-* Dependency Update: Updated SDK dependencies to their latest versions.
-* `aws` - v1.3.0
- * Feature: Add helper to V4 signer package to swap compute payload hash middleware with unsigned payload middleware
-* `feature/s3/manager` - v1.1.0
- * Bug Fix: Add support for Amazon S3 Object Lambda feature.
- * Feature: Updates for S3 Object Lambda feature
-
-# Release 2021-03-12
-## Service Client Highlights
-* Bug Fix: Fixed a bug that could union shape types to be deserialized incorrectly
-* Bug Fix: Fixed a bug where unboxed shapes that were marked as required were not serialized and sent over the wire, causing an API error from the service.
-* Bug Fix: Fixed a bug with generated API Paginators' handling of nil input parameters causing a panic.
-* Dependency Update: update smithy-go dependency
-* `service/detective` - v1.1.2
- * Bug Fix: Fix deserialization of API response timestamp member.
-* `service/docdb` - v1.2.0
- * Feature: Client now support presigned URL generation for CopyDBClusterSnapshot and CreateDBCluster operations by specifying the target SourceRegion
-* `service/neptune` - v1.2.0
- * Feature: Client now support presigned URL generation for CopyDBClusterSnapshot and CreateDBCluster operations by specifying the target SourceRegion
-* `service/s3` - v1.2.1
- * Bug Fix: Fixed an issue where ListObjectsV2 and ListParts paginators could loop infinitely
- * Bug Fix: Fixed key encoding when addressing S3 Access Points
-## Core SDK Highlights
-* Dependency Update: Updated SDK dependencies to their latest versions.
-* `config` - v1.1.2
- * Bug Fix: Fixed a panic when using WithEC2IMDSRegion without a specified IMDS client
-
-# Release 2021-02-09
-## Service Client Highlights
-* `service/s3` - v1.2.0
- * Feature: adds support for s3 vpc endpoint interface [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
-* `service/s3control` - v1.2.0
- * Feature: adds support for s3 vpc endpoint interface [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
-## Core SDK Highlights
-* Dependency Update: Updated SDK dependencies to their latest versions.
-* `aws` - v1.2.0
- * Feature: support to add endpoint source on context. Adds getter/setter for the endpoint source [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
-* `config` - v1.1.1
- * Bug Fix: Only Validate SSO profile configuration when attempting to use SSO credentials [#1103](https://github.com/aws/aws-sdk-go-v2/pull/1103)
- * Bug Fix: Environment credentials were not taking precedence over AWS_PROFILE [#1103](https://github.com/aws/aws-sdk-go-v2/pull/1103)
-
-# Release 2021-01-29
-## Service Client Highlights
-* Bug Fix: A serialization bug has been fixed that caused some service operations with empty inputs to not be serialized correctly ([#1071](https://github.com/aws/aws-sdk-go-v2/pull/1071))
-* Bug Fix: Fixes a bug that could cause a waiter to fail when comparing types ([#1083](https://github.com/aws/aws-sdk-go-v2/pull/1083))
-## Core SDK Highlights
-* Feature: EndpointResolverFromURL helpers have been added for constructing a service EndpointResolver type ([#1066](https://github.com/aws/aws-sdk-go-v2/pull/1066))
-* Dependency Update: Updated SDK dependencies to their latest versions.
-* `aws` - v1.1.0
- * Feature: Add support for specifying the EndpointSource on aws.Endpoint types ([#1070](https://github.com/aws/aws-sdk-go-v2/pull/1070/))
-* `config` - v1.1.0
- * Feature: Add Support for AWS Single Sign-On (SSO) credential provider ([#1072](https://github.com/aws/aws-sdk-go-v2/pull/1072))
-* `credentials` - v1.1.0
- * Feature: Add AWS Single Sign-On (SSO) credential provider ([#1072](https://github.com/aws/aws-sdk-go-v2/pull/1072))
-
-# Release 2021-01-19
-
-We are excited to announce the [General Availability](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-general-availability/)
-(GA) release of the [AWS SDK for Go version 2 (v2)](https://github.com/aws/aws-sdk-go-v2).
-This release follows the [Release candidate](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-v2-release-candidate)
-of the AWS SDK for Go v2. Version 2 incorporates customer feedback from version 1 and takes advantage of modern Go language features.
-
-## Breaking Changes
-* `aws`: Updated Config.Retryer member to be a func that returns aws.Retryer ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
- * Updates the SDK's references to Config.Retryer to be a function that returns aws.Retryer value. This ensures that custom retry options specified in the `aws.Config` are scoped to individual client instances.
- * All API clients created with the config will call the `Config.Retryer` function to get an aws.Retryer.
- * Removes duplicate `Retryer` interface from `retry` package. Single definition is `aws.Retryer` now.
-* `aws/middleware`: Updates `AddAttemptClockSkewMiddleware` to use appropriate `AddRecordResponseTiming` naming ([#1031](https://github.com/aws/aws-sdk-go-v2/pull/1031))
- * Removes `ResponseMetadata` struct type, and adds its members to middleware metadata directly, to improve discoverability.
-* `config`: Updated the `WithRetryer` helper to take a function that returns an aws.Retryer ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
- * All API clients created with the config will call the `Config.Retryer` function to get an aws.Retryer.
-* `API Clients`: Fix SDK's API client enum constant name generation to have expected casing ([#1020](https://github.com/aws/aws-sdk-go-v2/pull/1020))
- * This updates of the generated enum const value names in API client's `types` package to have the expected casing. Prior to this, enum names were being generated with lowercase names instead of camel case.
-* `API Clients`: Updates SDK's API client request middleware stack values to be scoped to individual operation call ([#1019](https://github.com/aws/aws-sdk-go-v2/pull/1019))
- * The API client request middleware stack values were mistakenly allowed to escape to nested API operation calls. This broke the SDK's presigners.
- * Stack values that should not escape are not scoped to the individual operation call.
-* `Multiple API Clients`: Unexported the API client's `WithEndpointResolver` this type wasn't intended to be exported ([#1051](https://github.com/aws/aws-sdk-go-v2/pull/1051))
- * Using the `aws.Config.EndpointResolver` member for setting custom endpoint resolver instead.
-
-## New Features
-* `service/sts`: Add support for presigning GetCallerIdentity operation ([#1030](https://github.com/aws/aws-sdk-go-v2/pull/1030))
- * Adds a PresignClient to the `sts` API client module. Use PresignGetCallerIdentity to obtain presigned URLs for the create presigned URLs for the GetCallerIdentity operation.
- * Fixes [#1021](https://github.com/aws/aws-sdk-go-v2/issues/1021)
-* `aws/retry`: Add package documentation for retry package ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
- * Adds documentation for the retry package
-
-## Bug Fixes
-* `Multiple API Clients`: Fix SDK's generated serde for unmodeled operation input/output ([#1050](https://github.com/aws/aws-sdk-go-v2/pull/1050))
- * Fixes [#1047](https://github.com/aws/aws-sdk-go-v2/issues/1047) by fixing the how the SDKs generated serialization and deserialization of API operations that did not have modeled input or output types. This caused the SDK to incorrectly attempt to deserialize response documents that were either empty, or contained unexpected data.
-* `service/s3`: Fix Tagging parameter not serialized correctly for presigned PutObject requests ([#1017](https://github.com/aws/aws-sdk-go-v2/pull/1017))
- * Fixes the Tagging parameter incorrectly being serialized to the URL's query string instead of being signed as a HTTP request header.
- * When using PresignPutObject make sure to add all signed headers returned by the method to your down stream's HTTP client's request. These headers must be included in the request, or the request will fail with signature errors.
- * Fixes [#1016](https://github.com/aws/aws-sdk-go-v2/issues/1016)
-* `service/s3`: Fix Unmarshaling `GetObjectAcl` operation's Grantee type response ([#1034](https://github.com/aws/aws-sdk-go-v2/pull/1034))
- * Updates the SDK's codegen for correctly deserializing XML attributes in tags with XML namespaces.
- * Fixes [#1013](https://github.com/aws/aws-sdk-go-v2/issues/1013)
-* `service/s3`: Fix Unmarshaling `GetBucketLocation` operation's response ([#1027](https://github.com/aws/aws-sdk-go-v2/pull/1027))
- * Fixes [#908](https://github.com/aws/aws-sdk-go-v2/issues/908)
-
-## Migrating from v2 preview SDK's v0.31.0 to v1.0.0
-
-### aws.Config Retryer member
-
-If your application sets the `Config.Retryer` member the application will need
-to be updated to set a function that returns an `aws.Retryer`. In addition, if
-your application used the `config.WithRetryer` helper a function that returns
-an `aws.Retryer` needs to be used.
-
-If your application used the `retry.Retryer` type, update to using the
-`aws.Retryer` type instead.
-
-### API Client enum value names
-
-If your application used the enum values in the API Client's `types` package between v0.31.0 and the latest version of the client module you may need to update the naming of the enum value. The enum value name casing were updated to camel case instead lowercased.
-
-# Release 2020-12-23
-
-We’re happy to announce the Release Candidate (RC) of the AWS SDK for Go v2.
-This RC follows the developer preview release of the AWS SDK for Go v2. The SDK
-has undergone a major rewrite from the v1 code base to incorporate your
-feedback and to take advantage of modern Go language features.
-
-## Documentation
-* Developer Guide: https://aws.github.io/aws-sdk-go-v2/docs/
-* API Reference docs: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2
-* Migration Guide: https://aws.github.io/aws-sdk-go-v2/docs/migrating/
-
-## Breaking Changes
-* Dependency `github.com/awslabs/smithy-go` has been relocated to `github.com/aws/smithy-go`
- * The `smithy-go` repository was moved from the `awslabs` GitHub organization to `aws`.
- * `xml`, `httpbinding`, and `json` package relocated under `encoding` package.
-* The module `ec2imds` moved to `feature/ec2/imds` path ([#984](https://github.com/aws/aws-sdk-go-v2/pull/984))
- * Moves the `ec2imds` feature module to be in common location as other SDK features.
-* `aws/signer/v4`: Refactor AWS Sigv4 Signer and options types to allow function options ([#955](https://github.com/aws/aws-sdk-go-v2/pull/955))
- * Fixes [#917](https://github.com/aws/aws-sdk-go-v2/issues/917), [#960](https://github.com/aws/aws-sdk-go-v2/issues/960), [#958](https://github.com/aws/aws-sdk-go-v2/issues/958)
-* `aws`: CredentialCache type updated to require constructor function ([#946](https://github.com/aws/aws-sdk-go-v2/pull/946))
- * Fixes [#940](https://github.com/aws/aws-sdk-go-v2/issues/940)
-* `credentials`: ExpiryWindow and Jitter moved from credential provider to `CredentialCache` ([#946](https://github.com/aws/aws-sdk-go-v2/pull/946))
- * Moves ExpiryWindow and Jitter options to common option of the `CredentialCache` instead of duplicated across providers.
- * Fixes [#940](https://github.com/aws/aws-sdk-go-v2/issues/940)
-* `config`: Ensure shared credentials file has precedence over shared config file ([#990](https://github.com/aws/aws-sdk-go-v2/pull/990))
- * The shared config file was incorrectly overriding the shared credentials file when merging values.
-* `config`: Add `context.Context` to `LoadDefaultConfig` ([#951](https://github.com/aws/aws-sdk-go-v2/pull/951))
- * Updates `config#LoadDefaultConfig` function to take `context.Context` as well as functional options for the `config#LoadOptions` type.
- * Fixes [#926](https://github.com/aws/aws-sdk-go-v2/issues/926), [#819](https://github.com/aws/aws-sdk-go-v2/issues/819)
-* `aws`: Rename `NoOpRetryer` to `NopRetryer` to have consistent naming with rest of SDK ([#987](https://github.com/aws/aws-sdk-go-v2/pull/987))
- * Fixes [#878](https://github.com/aws/aws-sdk-go-v2/issues/878)
-* `service/s3control`: Change `S3InitiateRestoreObjectOperation.ExpirationInDays` from value to pointer type ([#988](https://github.com/aws/aws-sdk-go-v2/pull/988))
-* `aws`: `ReaderSeekerCloser` and `WriteAtBuffer` have been relocated to `feature/s3/manager`.
-
-## New Features
-* *Waiters*: Add Waiter utilities for API clients ([aws/smithy-go#237](https://github.com/aws/smithy-go/pull/237))
- * Your application can now use Waiter utilities to wait for AWS resources.
-* `feature/dynamodb/attributevalue`: Add Amazon DynamoDB Attribute value marshaler utility ([#948](https://github.com/aws/aws-sdk-go-v2/pull/948))
- * Adds a utility for marshaling Go types too and from Amazon DynamoDB AttributeValues.
- * Also includes utility for converting from Amazon DynamoDB Streams AttributeValues to Amazon DynamoDB AttributeValues.
-* `feature/dynamodbstreams/attributevalue`: Add Amazon DynamoDB Streams Attribute value marshaler utility ([#948](https://github.com/aws/aws-sdk-go-v2/pull/948))
- * Adds a utility for marshaling Go types too and from Amazon DynamoDB Streams AttributeValues.
- * Also includes utility for converting from Amazon DynamoDB AttributeValues to Amazon DynamoDB Streams AttributeValues.
-* `feature/dynamodb/expression`: Add Amazon DynamoDB expression utility ([#981](https://github.com/aws/aws-sdk-go-v2/pull/981))
- * Adds the expression utility to the SDK for easily building Amazon DynamoDB operation expressions in code.
-
-## Bug Fixes
-* `service/s3`: Fix Presigner to configure client correctly for Amazon S3 ([#969](https://github.com/aws/aws-sdk-go-v2/pull/969))
-* service/s3: Fix deserialization of CompleteMultipartUpload ([#965](https://github.com/aws/aws-sdk-go-v2/pull/965)
- * Fixes [#927](https://github.com/aws/aws-sdk-go-v2/issues/927)
-* `codegen`: Fix API client union serialization ([#979](https://github.com/aws/aws-sdk-go-v2/pull/979))
- * Fixes [#978](https://github.com/aws/aws-sdk-go-v2/issues/978)
-
-## Service Client Highlights
-* API Clients have been bumped to version `v0.31.0`
-* Regenerate API Clients from updated API models adding waiter utilities, and union parameters.
-* `codegen`:
- * Add documentation to union API parameters describing valid member types, and usage example ([aws/smithy-go#239](https://github.com/aws/smithy-go/pull/239))
- * Normalize Metadata header map keys to be lower case ([aws/smithy-go#241](https://github.com/aws/smithy-go/pull/241)), ([#982](https://github.com/aws/aws-sdk-go-v2/pull/982))
- * Fixes [#376](https://github.com/aws/aws-sdk-go-v2/issues/376) Amazon S3 Metadata parameters keys are always returned as lower case.
- * Fix API client deserialization of XML based responses ([aws/smithy-go#245](https://github.com/aws/smithy-go/pull/245)), ([#992](https://github.com/aws/aws-sdk-go-v2/pull/992))
- * Fixes [#910](https://github.com/aws/aws-sdk-go-v2/issues/910)
-* `service/s3`, `service/s3control`:
- * Add support for reading `s3_use_arn_region` from shared config file ([#991](https://github.com/aws/aws-sdk-go-v2/pull/991))
- * Add Utility for getting RequestID and HostID of response ([#983](https://github.com/aws/aws-sdk-go-v2/pull/983))
-
-
-## Other changes
-* Updates branch `HEAD` points from `master` to `main`.
- * This should not impact your application, but if you have pull requests or forks of the SDK you may need to update the upstream branch your fork is based off of.
-
-## Migrating from v2 preview SDK's v0.30.0 to v0.31.0 release candidate
-
-### smithy-go module relocation
-
-If your application uses `smithy-go` utilities for request pipeline your application will need to be updated to refer to the new import path of `github.com/aws/smithy-go`. If you application did *not* use `smithy-go` utilities directly, your application will update automatically.
-
-### EC2 IMDS module relocation
-
-If your application used the `ec2imds` module, it has been relocated to `feature/ec2/imds`. Your application will need to update to the new import path, `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`.
-
-### CredentialsCache Constructor and ExpiryWindow Options
-
-The `aws#CredentialsCache` type was updated, and a new constructor function, `NewCredentialsCache` was added. This function needs to be used to initialize the `CredentialCache`. The constructor also has function options to specify additional configuration, e.g. ExpiryWindow and Jitter.
-
-If your application was specifying the `ExpiryWindow` with the `credentials/stscreds#AssumeRoleOptions`, `credentials/stscreds#WebIdentityRoleOptions`, `credentials/processcreds#Options`, or `credentials/ec2rolecrds#Options` types the `ExpiryWindow` option will need to specified on the `CredentialsCache` constructor instead.
-
-### AWS Sigv4 Signer Refactor
-
-The `aws/signer/v4` package's `Signer.SignHTTP` and `Signer.PresignHTTP` methods were updated to take functional options. If your application provided a custom implementation for API client's `HTTPSignerV4` or `HTTPPresignerV4` interfaces, that implementation will need to be updated for the new function signature.
-
-### Configuration Loading
-
-The `config#LoadDefaultConfig` function has been updated to require a `context.Context` as the first parameter, with additional optional function options as variadic additional arguments. Your application will need to update its usage of `LoadDefaultConfig` to pass in `context.Context` as the first parameter. If your application used the `With...` helpers those should continue to work without issue.
-
-The v2 SDK corrects its behavior to be inline with the AWS CLI and other AWS SDKs. Refer to https://docs.aws.amazon.com/credref/latest/refdocs/overview.html for more information how to use the shared config and credentials files.
-
-
-# Release 2020-11-30
-
-## Breaking Change
-* `codegen`: Add support for slice and maps generated with value members instead of pointer ([#887](https://github.com/aws/aws-sdk-go-v2/pull/887))
- * This update allow the SDK's code generation to be aware of API shapes and members that are not nullable, and can be rendered as value types by the code generation instead of pointer types.
- * Several API client parameter types will change from pointer members to value members for slice, map, number and bool member types.
- * See Migration notes for migrating to v0.30.0 with this change.
-* `aws/transport/http`: Move aws.BuildableHTTPClient to HTTP transport package ([#898](https://github.com/aws/aws-sdk-go-v2/pull/898))
- * Moves the `BuildableHTTPClient` from the SDK's `aws` package to the `aws/transport/http` package as `BuildableClient` to with other HTTP specific utilities.
-* `feature/cloudfront/sign`: Add CloudFront sign feature as module ([#884](https://github.com/aws/aws-sdk-go-v2/pull/884))
- * Moves `service/cloudfront/sign` package out of the `cloudfront` module, and into its own module as `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`.
-
-## New Features
-* `config`: Add a WithRetryer provider helper to the config loader ([#897](https://github.com/aws/aws-sdk-go-v2/pull/897))
- * Adds a `WithRetryer` configuration provider to the config loader as a convenience helper to set the `Retryer` on the `aws.Config` when its being loaded.
-* `config`: Default to TLS 1.2 for HTTPS requests ([#892](https://github.com/aws/aws-sdk-go-v2/pull/892))
- * Updates the SDK's default HTTP client to use TLS 1.2 as the minimum TLS version for all HTTPS requests by default.
-
-## Bug Fixes
-* `config`: Fix AWS_CA_BUNDLE usage while loading default config ([#912](https://github.com/aws/aws-sdk-go-v2/pull/))
- * Fixes the `LoadDefaultConfig`'s configuration provider order to correctly load a custom HTTP client prior to configuring the client for `AWS_CA_BUNDLE` environment variable.
-* `service/s3`: Fix signature mismatch error for s3 ([#913](https://github.com/aws/aws-sdk-go-v2/pull/913))
- * Fixes ([#883](https://github.com/aws/aws-sdk-go-v2/issues/883))
-* `service/s3control`:
- * Fix HostPrefix addition behavior for s3control ([#882](https://github.com/aws/aws-sdk-go-v2/pull/882))
- * Fixes ([#863](https://github.com/aws/aws-sdk-go-v2/issues/863))
- * Fix s3control error deserializer ([#875](https://github.com/aws/aws-sdk-go-v2/pull/875))
- * Fixes ([#864](https://github.com/aws/aws-sdk-go-v2/issues/864))
-
-## Service Client Highlights
-* Pagination support has been added to supported APIs. See [Using Operation Paginators](https://aws.github.io/aws-sdk-go-v2/docs/making-requests/#using-operation-paginators) in the Developer Guide. ([#885](https://github.com/aws/aws-sdk-go-v2/pull/885))
-* Logging support has been added to service clients. See [Logging](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/logging/) in the Developer Guide. ([#872](https://github.com/aws/aws-sdk-go-v2/pull/872))
-* `service`: Add support for pre-signed URL clients for S3, RDS, EC2 service ([#888](https://github.com/aws/aws-sdk-go-v2/pull/888))
- * `service/s3`: operations `PutObject` and `GetObject` are now supported with s3 pre-signed url client.
- * `service/ec2`: operation `CopySnapshot` is now supported with ec2 pre-signed url client.
- * `service/rds`: operations `CopyDBSnapshot`, `CreateDBInstanceReadReplica`, `CopyDBClusterSnapshot`, `CreateDBCluster` are now supported with rds pre-signed url client.
-* `service/s3`: Add support for S3 access point and S3 on outposts access point ARNs ([#870](https://github.com/aws/aws-sdk-go-v2/pull/870))
-* `service/s3control`: Adds support for S3 on outposts access point and S3 on outposts bucket ARNs ([#870](https://github.com/aws/aws-sdk-go-v2/pull/870))
-
-## Migrating from v2 preview SDK's v0.29.0 to v0.30.0
-
-### aws.BuildableHTTPClient move
-The `aws`'s `BuildableHTTPClient` HTTP client implementation was moved to `aws/transport/http` as `BuildableClient`. If your application used the `aws.BuildableHTTPClient` type, update it to use the `BuildableClient` in the `aws/transport/http` package.
-
-### Slice and Map API member types
-This release includes several code generation updates for API client's slice map members. Using API modeling metadata the Slice and map members are now generated as value types instead of pointer types. For your application this means that for these types, the SDK no longer will have pointer member types, and have value member types.
-
-To migrate to this change you'll need to remove the pointer handling for slice and map members, and instead use value type handling of the member values.
-
-### Boolean and Number API member types
-Similar to the slice and map API member types being generated as value, the SDK's code generation now has metadata where the SDK can generate boolean and number members as value type instead of pointer types.
-
-To migrate to this change you'll need to remove the pointer handling for numbers and boolean member types, and instead use value handling.
-
-# Release 2020-10-30
-
-## New Features
-* Adds HostnameImmutable flag on aws.Endpoint to direct SDK if the associated endpoint is modifiable.([#848](https://github.com/aws/aws-sdk-go-v2/pull/848))
-
-## Bug Fixes
-* Fix SDK handling of xml based services - xml namespaces ([#858](https://github.com/aws/aws-sdk-go-v2/pull/858))
- * Fixes ([#850](https://github.com/aws/aws-sdk-go-v2/issues/850))
-
-## Service Client Highlights
-* API Clients have been bumped to version `v0.29.0`
- * Regenerate API Clients from update API models.
-* Improve client doc generation.
-
-## Core SDK Highlights
-* Dependency Update: Updated SDK dependencies to their latest versions.
-
-## Migrating from v2 preview SDK's v0.28.0 to v0.29.0
-* API Clients ResolverOptions type renamed to EndpointResolverOptions
-
-# Release 2020-10-26
-
-## New Features
-* `service/s3`: Add support for Accelerate, and Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
-* `service/s3control`: Add support for Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
-
-## Service Client Highlights
-* API Clients have been bumped to version `v0.28.0`
- * Regenerate API Clients from update API models.
-* `service/s3`: Add support for Accelerate, and Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
-* `service/s3control`: Add support for Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
-* `service/route53`: Fix sanitizeURL customization to handle leading slash(`/`) [#846](https://github.com/aws/aws-sdk-go-v2/pull/846)
- * Fixes [#843](https://github.com/aws/aws-sdk-go-v2/issues/843)
-* `service/route53`: Fix codegen to correctly look for operations that need sanitize url ([#851](https://github.com/aws/aws-sdk-go-v2/pull/851))
-
-## Core SDK Highlights
-* `aws/protocol/restjson`: Fix unexpected JSON error response deserialization ([#837](https://github.com/aws/aws-sdk-go-v2/pull/837))
- * Fixes [#832](https://github.com/aws/aws-sdk-go-v2/issues/832)
-* `example/service/s3/listobjects`: Add example for Amazon S3 ListObjectsV2 ([#838](https://github.com/aws/aws-sdk-go-v2/pull/838))
-
-# Release 2020-10-16
-
-## New Features
-* `feature/s3/manager`:
- * Initial `v0.1.0` release
- * Add the Amazon S3 Upload and Download transfer manager ([#802](https://github.com/aws/aws-sdk-go-v2/pull/802))
-
-## Service Client Highlights
-* Clients have been bumped to version `v0.27.0`
-* `service/machinelearning`: Add customization for setting client endpoint with PredictEndpoint value if set ([#782](https://github.com/aws/aws-sdk-go-v2/pull/782))
-* `service/s3`: Fix empty response body deserialization in case of error response ([#801](https://github.com/aws/aws-sdk-go-v2/pull/801))
- * Fixes xml deserialization util to correctly handle empty response body in case of an error response.
-* `service/s3`: Add customization to auto fill Content-Md5 request header for Amazon S3 operations ([#812](https://github.com/aws/aws-sdk-go-v2/pull/812))
-* `service/s3`: Add fallback to using HTTP status code for error code ([#818](https://github.com/aws/aws-sdk-go-v2/pull/818))
- * Adds falling back to using the HTTP status code to create a API Error code when not error code is received from the service, such as HeadObject.
-* `service/route53`: Add support for deserialzing `InvalidChangeBatch` API error ([#792](https://github.com/aws/aws-sdk-go-v2/pull/792))
-* `codegen`: Remove API client `Options` getter methods ([#788](https://github.com/aws/aws-sdk-go-v2/pull/788))
-* `codegen`: Regenerate API Client modeled endpoints ([#791](https://github.com/aws/aws-sdk-go-v2/pull/791))
-* `codegen`: Sort API Client struct member paramaters by required and alphabetical ([#787](https://github.com/aws/aws-sdk-go-v2/pull/787))
-* `codegen`: Add package docs to API client modules ([#821](https://github.com/aws/aws-sdk-go-v2/pull/821))
-* `codegen`: Rename `smithy-go`'s `smithy.OperationError` to `smithy.OperationInvokeError`.
-
-## Core SDK Highlights
-* `config`:
- * Bumped to `v0.2.0`
- * Refactor Config Module, Add Config Package Documentation and Examples, Improve Overall SDK Readme ([#822](https://github.com/aws/aws-sdk-go-v2/pull/822))
-* `credentials`:
- * Bumped to `v0.1.2`
- * Strip Monotonic Clock Readings when Comparing Credential Expiry Time ([#789](https://github.com/aws/aws-sdk-go-v2/pull/789))
-* `ec2imds`:
- * Bumped to `v0.1.2`
- * Fix refreshing API token if expired ([#789](https://github.com/aws/aws-sdk-go-v2/pull/789))
-
-## Migrating from v0.26.0 to v0.27.0
-
-#### Configuration
-
-The `config` module's exported types were trimmed down to add clarity and reduce confusion. Additional changes to the `config` module' helpers.
-
-* Refactored `WithCredentialsProvider`, `WithHTTPClient`, and `WithEndpointResolver` to functions instead of structs.
-* Removed `MFATokenFuncProvider`, use `AssumeRoleCredentialOptionsProvider` for setting options for `stscreds.AssumeRoleOptions`.
-* Renamed `WithWebIdentityCredentialProviderOptions` to `WithWebIdentityRoleCredentialOptions`
-* Renamed `AssumeRoleCredentialProviderOptions` to `AssumeRoleCredentialOptionsProvider`
-* Renamed `EndpointResolverFuncProvider` to `EndpointResolverProvider`
-
-#### API Client
-* API Client `Options` type getter methods have been removed. Use the struct members instead.
-* The error returned by API Client operations was renamed from `smithy.OperationError` to `smithy.OperationInvokeError`.
-
-# Release 2020-09-30
-
-## Service Client Highlights
-* Service clients have been bumped to `v0.26.0` simplify the documentation experience when using [pkg.go.dev](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2).
-* `service/s3`: Disable automatic decompression of getting Amazon S3 objects with the `Content-Encoding: gzip` metadata header. ([#748](https://github.com/aws/aws-sdk-go-v2/pull/748))
- * This changes the SDK's default behavior with regard to making S3 API calls. The client will no longer automatically set the `Accept-Encoding` HTTP request header, nor will it automatically decompress the gzipped response when the `Content-Encoding: gzip` response header was received.
- * If you'd like the client to sent the `Accept-Encoding: gzip` request header, you can add this header to the API operation method call with the [SetHeaderValue](https://pkg.go.dev/github.com/awslabs/smithy-go/transport/http#SetHeaderValue). middleware helper.
-* `service/cloudfront/sign`: Fix cloudfront example usage of SignWithPolicy ([#673](https://github.com/aws/aws-sdk-go-v2/pull/673))
- * Fixes [#671](https://github.com/aws/aws-sdk-go-v2/issues/671) documentation typo by correcting the usage of `SignWithPolicy`.
-
-## Core SDK Highlights
-* SDK core module released at `v0.26.0`
-* `config` module released at `v0.1.1`
-* `credentials` module released at `v0.1.1`
-* `ec2imds` module released at `v0.1.1`
-
-
-# Release 2020-09-28
-## Announcements
-We’re happy to share the updated clients for the v0.25.0 preview version of the AWS SDK for Go V2.
-
-The updated clients leverage new developments and advancements within AWS and the Go software ecosystem at large since
-our original preview announcement. Using the new clients will be a bit different than before. The key differences are:
-simplified API operation invocation, performance improvements, support for error wrapping, and a new middleware architecture.
-So below we have a guided walkthrough to help try it out and share your feedback in order to better influence the features
-you’d like to see in the GA version.
-
-See [Announcement Blog Post](https://aws.amazon.com/blogs/developer/client-updates-in-the-preview-version-of-the-aws-sdk-for-go-v2/) for more details.
-
-## Service Client Highlights
-* Initial service clients released at version `v0.1.0`
-## Core SDK Highlights
-* SDK core module released at `v0.25.0`
-* `config` module released at `v0.1.0`
-* `credentials` module released at `v0.1.0`
-* `ec2imds` module released at `v0.1.0`
-
-## Migrating from v2 preview SDK's v0.24.0 to v0.25.0
-
-#### Design changes
-
-The v2 preview SDK `v0.25.0` release represents a significant stepping stone bringing the v2 SDK closer to its target design and usability. This release includes significant breaking changes to the v2 preview SDK. The updates in the `v0.25.0` release focus on refactoring and modularization of the SDK’s API clients to use the new [client design](https://github.com/aws/aws-sdk-go-v2/issues/438), updated request pipeline (aka [middleware](https://pkg.go.dev/github.com/awslabs/smithy-go/middleware)), refactored [credential providers](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials), and [configuration loading](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) packages.
-
-We've also bumped the minimum supported Go version with this release. Starting with v0.25.0 the SDK requires a minimum version of Go `v1.15`.
-
-As a part of the refactoring done to v2 preview SDK some components have not been included in this update. The following is a non exhaustive list of features that are not available.
-
-* API Paginators - [#439](https://github.com/aws/aws-sdk-go-v2/issues/439)
-* API Waiters - [#442](https://github.com/aws/aws-sdk-go-v2/issues/442)
-* Presign URL - [#794](https://github.com/aws/aws-sdk-go-v2/issues/794)
-* Amazon S3 Upload and Download manager - [#802](https://github.com/aws/aws-sdk-go-v2/pull/802)
-* Amazon DynamoDB's AttributeValue marshaler, and Expression package - [#790](https://github.com/aws/aws-sdk-go-v2/issues/790)
-* Debug Logging - [#594](https://github.com/aws/aws-sdk-go-v2/issues/594)
-
-We expect additional breaking changes to the v2 preview SDK in the coming releases. We expect these changes to focus on organizational, naming, and hardening the SDK's design for future feature capabilities after it is released for general availability.
-
-
-#### Relocated Packages
-
-In this release packages within the SDK were relocated, and in some cases those packages were converted to Go modules. The following is a list of packages have were relocated.
-
-* `github.com/aws/aws-sdk-go-v2/aws/external` => `github.com/aws/aws-sdk-go-v2/config` module
-* `github.com/aws/aws-sdk-go-v2/aws/ec2metadata` => `github.com/aws/aws-sdk-go-v2/ec2imds` module
-
-The `github.com/aws/aws-sdk-go-v2/credentials` module contains refactored credentials providers.
-
-* `github.com/aws/aws-sdk-go-v2/ec2rolecreds` => `github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds`
-* `github.com/aws/aws-sdk-go-v2/endpointcreds` => `github.com/aws/aws-sdk-go-v2/credentials/endpointcreds`
-* `github.com/aws/aws-sdk-go-v2/processcreds` => `github.com/aws/aws-sdk-go-v2/credentials/processcreds`
-* `github.com/aws/aws-sdk-go-v2/stscreds` => `github.com/aws/aws-sdk-go-v2/credentials/stscreds`
-
-
-#### Modularization
-
-New modules were added to the v2 preview SDK to allow the components to be versioned independently from each other. This allows your application to depend on specific versions of an API client module, and take discrete updates from the SDK core and other API client modules as desired.
-
-* [github.com/aws/aws-sdk-go-v2/config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config)
-* [github.com/aws/aws-sdk-go-v2/credentials](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials)
-* Module for each API client, e.g. [github.com/aws/aws-sdk-go-v2/service/s3](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3)
-
-
-#### API Clients
-
-The following is a list of the major changes to the API client modules
-
-* Removed paginators: we plan to add these back once they are implemented to integrate with the SDK's new API client design.
-* Removed waiters: we need to further investigate how the V2 SDK should expose waiters, and how their behavior should be modeled.
-* API Clients are now Go modules. When migrating to the v2 preview SDK `v0.25.0`, you'll need to add the API client's module to your application's go.mod file.
-* API parameter nested types have been moved to a `types` package within the API client's module, e.g. `github.com/aws/aws-sdk-go-v2/service/s3/types` These types were moved to improve documentation and discovery of the API client, operation, and input/output types. For example Amazon S3's ListObject's operation [ListObjectOutput.Contents](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3/#ListObjectsOutput) input parameter is a slice of [types.Object](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3/types#Object).
-* The client operation method has been renamed, removing the `Request` suffix. The method now invokes the operation instead of constructing a request, which needed to be invoked separately. The operation methods were also expanded to include functional options for providing operation specific configuration, such as modifying the request pipeline.
-
-```go
-result, err := client.Scan(context.TODO(), &dynamodb.ScanInput{
- TableName: aws.String("exampleTable"),
-}, func(o *Options) {
- // Limit operation calls to only 1 attempt.
- o.Retryer = retry.AddWithMaxAttempts(o.Retryer, 1)
-})
-```
-
-
-#### Configuration
-
-In addition to the `github.com/aws/aws-sdk-go-v2/aws/external` package being made a module at `github.com/aws/aws-sdk-go-v2/config`, the `LoadDefaultAWSConfig` function was renamed to `LoadDefaultConfig`.
-
-The `github.com/aws/aws-sdk-go-v2/aws/defaults` package has been removed. Its components have been migrated to the `github.com/aws/aws-sdk-go-v2/aws` package, and `github.com/aws/aws-sdk-go-v2/config` module.
-
-
-#### Error Handling
-
-The `github.com/aws/aws-sdk-go-v2/aws/awserr` package was removed as a part of the SDK error handling refactor. The SDK now uses typed errors built around [Go v1.13](https://golang.org/doc/go1.13#error_wrapping)'s [errors.As](https://pkg.go.dev/errors#As) and [errors.Unwrap](https://pkg.go.dev/errors#Unwrap) features. All SDK error types that wrap other errors implement the `Unwrap` method. Generic v2 preview SDK errors created with `fmt.Errorf` use `%w` to wrap the underlying error.
-
-The SDK API clients now include generated public error types for errors modeled for an API. The SDK will automatically deserialize the error response from the API into the appropriate error type. Your application should use `errors.As` to check if the returned error matches one it is interested in. Your application can also use the generic interface [smithy.APIError](https://pkg.go.dev/github.com/awslabs/smithy-go/#APIError) to test if the API client's operation method returned an API error, but not check against a specific error.
-
-API client errors returned to the caller will use error wrapping to layer the error values. This allows underlying error types to be specific to their use case, and the SDK's more generic error types to wrap the underlying error.
-
-For example, if an [Amazon DynamoDB](https://aws.amazon.com/dynamodb/) [Scan](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb#Scan) operation call cannot find the `TableName` requested, the error returned will contain [dynamodb.ResourceNotFoundException](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb/types#ResourceNotFoundException). The SDK will return this error value wrapped in a couple layers, with each layer adding additional contextual information such as [ResponseError](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/transport/http#ResponseError) for AWS HTTP response error metadata , and [smithy.OperationError](https://pkg.go.dev/github.com/awslabs/smithy-go/#OperationError) for API operation call metadata.
-
-```go
-result, err := client.Scan(context.TODO(), params)
-if err != nil {
- // To get a specific API error
- var notFoundErr *types.ResourceNotFoundException
- if errors.As(err, ¬FoundErr) {
- log.Printf("scan failed because the table was not found, %v",
- notFoundErr.ErrorMessage())
- }
-
- // To get any API error
- var apiErr smithy.APIError
- if errors.As(err, &apiErr) {
- log.Printf("scan failed because of an API error, Code: %v, Message: %v",
- apiErr.ErrorCode(), apiErr.ErrorMessage())
- }
-
- // To get the AWS response metadata, such as RequestID
- var respErr *awshttp.ResponseError // Using import alias "awshttp" for package github.com/aws/aws-sdk-go-v2/aws/transport/http
- if errors.As(err, &respErr) {
- log.Printf("scan failed with HTTP status code %v, Request ID %v and error %v",
- respErr.HTTPStatusCode(), respErr.ServiceRequestID(), respErr)
- }
-
- return err
-}
-```
-
-Logging an error value will include information from each wrapped error. For example, the following is a mock error logged for a Scan operation call that failed because the table was not found.
-
-> 2020/10/15 16:03:37 operation error DynamoDB: Scan, https response error StatusCode: 400, RequestID: ABCREQUESTID123, ResourceNotFoundException: Requested resource not found
-
-
-#### Endpoints
-
-The `github.com/aws/aws-sdk-go-v2/aws/endpoints` has been removed from the SDK, along with all exported endpoint definitions and iteration behavior. Each generated API client now includes its own endpoint definition internally to the module.
-
-API clients can optionally be configured with a generic [aws.EndpointResolver](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#EndpointResolver) via the [aws.Config.EndpointResolver](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config.EndpointResolver). If the API client is not configured with a custom endpoint resolver it will defer to the endpoint resolver the client module was generated with.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md b/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
deleted file mode 100644
index 3b644668..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## Code of Conduct
-This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
-For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
-opensource-codeofconduct@amazon.com with any additional questions or comments.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
deleted file mode 100644
index c2fc3b8f..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
+++ /dev/null
@@ -1,178 +0,0 @@
-# Contributing to the AWS SDK for Go
-
-Thank you for your interest in contributing to the AWS SDK for Go!
-We work hard to provide a high-quality and useful SDK, and we greatly value
-feedback and contributions from our community. Whether it's a bug report,
-new feature, correction, or additional documentation, we welcome your issues
-and pull requests. Please read through this document before submitting any
-[issues] or [pull requests][pr] to ensure we have all the necessary information to
-effectively respond to your bug report or contribution.
-
-Jump To:
-
-* [Bug Reports](#bug-reports)
-* [Feature Requests](#feature-requests)
-* [Code Contributions](#code-contributions)
-
-
-## How to contribute
-
-*Before you send us a pull request, please be sure that:*
-
-1. You're working from the latest source on the master branch.
-2. You check existing open, and recently closed, pull requests to be sure
- that someone else hasn't already addressed the problem.
-3. You create an issue before working on a contribution that will take a
- significant amount of your time.
-
-*Creating a Pull Request*
-
-1. Fork the repository.
-2. In your fork, make your change in a branch that's based on this repo's master branch.
-3. Commit the change to your fork, using a clear and descriptive commit message.
-4. Create a pull request, answering any questions in the pull request form.
-
-For contributions that will take a significant amount of time, open a new
-issue to pitch your idea before you get started. Explain the problem and
-describe the content you want to see added to the documentation. Let us know
-if you'll write it yourself or if you'd like us to help. We'll discuss your
-proposal with you and let you know whether we're likely to accept it.
-
-## Bug Reports
-
-You can file bug reports against the SDK on the [GitHub issues][issues] page.
-
-If you are filing a report for a bug or regression in the SDK, it's extremely
-helpful to provide as much information as possible when opening the original
-issue. This helps us reproduce and investigate the possible bug without having
-to wait for this extra information to be provided. Please read the following
-guidelines prior to filing a bug report.
-
-1. Search through existing [issues][] to ensure that your specific issue has
- not yet been reported. If it is a common issue, it is likely there is
- already a bug report for your problem.
-
-2. Ensure that you have tested the latest version of the SDK. Although you
- may have an issue against an older version of the SDK, we cannot provide
- bug fixes for old versions. It's also possible that the bug may have been
- fixed in the latest release.
-
-3. Provide as much information about your environment, SDK version, and
- relevant dependencies as possible. For example, let us know what version
- of Go you are using, which and version of the operating system, and the
- the environment your code is running in. e.g Container.
-
-4. Provide a minimal test case that reproduces your issue or any error
- information you related to your problem. We can provide feedback much
- more quickly if we know what operations you are calling in the SDK. If
- you cannot provide a full test case, provide as much code as you can
- to help us diagnose the problem. Any relevant information should be provided
- as well, like whether this is a persistent issue, or if it only occurs
- some of the time.
-
-## Feature Requests
-
-Open an [issue][issues] with the following:
-
-* A short, descriptive title. Ideally, other community members should be able
- to get a good idea of the feature just from reading the title.
-* A detailed description of the the proposed feature.
- * Why it should be added to the SDK.
- * If possible, example code to illustrate how it should work.
-* Use Markdown to make the request easier to read;
-* If you intend to implement this feature, indicate that you'd like to the issue to be assigned to you.
-
-## Code Contributions
-
-We are always happy to receive code and documentation contributions to the SDK.
-Please be aware of the following notes prior to opening a pull request:
-
-1. The SDK is released under the [Apache license][license]. Any code you submit
- will be released under that license. For substantial contributions, we may
- ask you to sign a [Contributor License Agreement (CLA)][cla].
-
-2. If you would like to implement support for a significant feature that is not
- yet available in the SDK, please talk to us beforehand to avoid any
- duplication of effort.
-
-3. Wherever possible, pull requests should contain tests as appropriate.
- Bugfixes should contain tests that exercise the corrected behavior (i.e., the
- test should fail without the bugfix and pass with it), and new features
- should be accompanied by tests exercising the feature.
-
-4. Pull requests that contain failing tests will not be merged until the test
- failures are addressed. Pull requests that cause a significant drop in the
- SDK's test coverage percentage are unlikely to be merged until tests have
- been added.
-
-5. The JSON files under the SDK's `models` folder are sourced from outside the SDK.
- Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests
- directly on these models. If you discover an issue with the models please
- create a [GitHub issue][issues] describing the issue.
-
-### Testing
-
-To run the tests locally, running the `make unit` command will `go get` the
-SDK's testing dependencies, and run vet, link and unit tests for the SDK.
-
-```
-make unit
-```
-
-Standard go testing functionality is supported as well. To test SDK code that
-is tagged with `codegen` you'll need to set the build tag in the go test
-command. The `make unit` command will do this automatically.
-
-```
-go test -tags codegen ./private/...
-```
-
-See the `Makefile` for additional testing tags that can be used in testing.
-
-To test on multiple platform the SDK includes several DockerFiles under the
-`awstesting/sandbox` folder, and associated make recipes to to execute
-unit testing within environments configured for specific Go versions.
-
-```
-make sandbox-test-go18
-```
-
-To run all sandbox environments use the following make recipe
-
-```
-# Optionally update the Go tip that will be used during the batch testing
-make update-aws-golang-tip
-
-# Run all SDK tests for supported Go versions in sandboxes
-make sandbox-test
-```
-
-In addition the sandbox environment include make recipes for interactive modes
-so you can run command within the Docker container and context of the SDK.
-
-```
-make sandbox-go18
-```
-
-### Changelog Documents
-
-You can see all release changes in the `CHANGELOG.md` file at the root of the
-repository. The release notes added to this file will contain service client
-updates, and major SDK changes. When submitting a pull request please include an entry in `CHANGELOG_PENDING.md` under the appropriate changelog type so your changelog entry is included on the following release.
-
-#### Changelog Types
-
-* `SDK Features` - For major additive features, internal changes that have
-outward impact, or updates to the SDK foundations. This will result in a minor
-version change.
-* `SDK Enhancements` - For minor additive features or incremental sized changes.
-This will result in a patch version change.
-* `SDK Bugs` - For minor changes that resolve an issue. This will result in a
-patch version change.
-
-[issues]: https://github.com/aws/aws-sdk-go/issues
-[pr]: https://github.com/aws/aws-sdk-go/pulls
-[license]: http://aws.amazon.com/apache2.0/
-[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement
-[releasenotes]: https://github.com/aws/aws-sdk-go/releases
-
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md b/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
deleted file mode 100644
index 8490c7d6..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
+++ /dev/null
@@ -1,15 +0,0 @@
-Open Discussions
----
-The following issues are currently open for community feedback.
-All discourse must adhere to the [Code of Conduct] policy.
-
-* [Refactoring API Client Paginators](https://github.com/aws/aws-sdk-go-v2/issues/439)
-* [Refactoring API Client Waiters](https://github.com/aws/aws-sdk-go-v2/issues/442)
-* [Refactoring API Client Enums and Types to Discrete Packages](https://github.com/aws/aws-sdk-go-v2/issues/445)
-* [SDK Modularization](https://github.com/aws/aws-sdk-go-v2/issues/444)
-
-Past Discussions
----
-The issues listed here are for documentation purposes, and is used to capture issues and their associated discussions.
-
-[Code of Conduct]: https://github.com/aws/aws-sdk-go-v2/blob/master/CODE_OF_CONDUCT.md
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/Makefile b/vendor/github.com/aws/aws-sdk-go-v2/Makefile
deleted file mode 100644
index b139a334..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/Makefile
+++ /dev/null
@@ -1,492 +0,0 @@
-# Lint rules to ignore
-LINTIGNORESINGLEFIGHT='internal/sync/singleflight/singleflight.go:.+error should be the last type'
-LINT_IGNORE_S3MANAGER_INPUT='feature/s3/manager/upload.go:.+struct field SSEKMSKeyId should be SSEKMSKeyID'
-
-UNIT_TEST_TAGS=
-BUILD_TAGS=-tags "example,codegen,integration,ec2env,perftest"
-
-SMITHY_GO_SRC ?= $(shell pwd)/../smithy-go
-
-SDK_MIN_GO_VERSION ?= 1.15
-
-EACHMODULE_FAILFAST ?= true
-EACHMODULE_FAILFAST_FLAG=-fail-fast=${EACHMODULE_FAILFAST}
-
-EACHMODULE_CONCURRENCY ?= 1
-EACHMODULE_CONCURRENCY_FLAG=-c ${EACHMODULE_CONCURRENCY}
-
-EACHMODULE_SKIP ?=
-EACHMODULE_SKIP_FLAG=-skip="${EACHMODULE_SKIP}"
-
-EACHMODULE_FLAGS=${EACHMODULE_CONCURRENCY_FLAG} ${EACHMODULE_FAILFAST_FLAG} ${EACHMODULE_SKIP_FLAG}
-
-# SDK's Core and client packages that are compatible with Go 1.9+.
-SDK_CORE_PKGS=./aws/... ./internal/...
-SDK_CLIENT_PKGS=./service/...
-SDK_COMPA_PKGS=${SDK_CORE_PKGS} ${SDK_CLIENT_PKGS}
-
-# SDK additional packages that are used for development of the SDK.
-SDK_EXAMPLES_PKGS=
-SDK_ALL_PKGS=${SDK_COMPA_PKGS} ${SDK_EXAMPLES_PKGS}
-
-RUN_NONE=-run NONE
-RUN_INTEG=-run '^TestInteg_'
-
-CODEGEN_RESOURCES_PATH=$(shell pwd)/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen
-CODEGEN_API_MODELS_PATH=$(shell pwd)/codegen/sdk-codegen/aws-models
-ENDPOINTS_JSON=${CODEGEN_RESOURCES_PATH}/endpoints.json
-ENDPOINT_PREFIX_JSON=${CODEGEN_RESOURCES_PATH}/endpoint-prefix.json
-
-LICENSE_FILE=$(shell pwd)/LICENSE.txt
-
-SMITHY_GO_VERSION ?=
-PRE_RELEASE_VERSION ?=
-RELEASE_MANIFEST_FILE ?=
-RELEASE_CHGLOG_DESC_FILE ?=
-
-REPOTOOLS_VERSION ?= latest
-REPOTOOLS_MODULE = github.com/awslabs/aws-go-multi-module-repository-tools
-REPOTOOLS_CMD_ANNOTATE_STABLE_GEN = ${REPOTOOLS_MODULE}/cmd/annotatestablegen@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_MAKE_RELATIVE = ${REPOTOOLS_MODULE}/cmd/makerelative@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_CALCULATE_RELEASE = ${REPOTOOLS_MODULE}/cmd/calculaterelease@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_UPDATE_REQUIRES = ${REPOTOOLS_MODULE}/cmd/updaterequires@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_UPDATE_MODULE_METADATA = ${REPOTOOLS_MODULE}/cmd/updatemodulemeta@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_GENERATE_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/generatechangelog@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION}
-REPOTOOLS_CMD_EDIT_MODULE_DEPENDENCY = ${REPOTOOLS_MODULE}/cmd/editmoduledependency@${REPOTOOLS_VERSION}
-
-REPOTOOLS_CALCULATE_RELEASE_VERBOSE ?= false
-REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG=-v=${REPOTOOLS_CALCULATE_RELEASE_VERBOSE}
-
-REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS ?=
-
-ifneq ($(PRE_RELEASE_VERSION),)
- REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION}
-endif
-
-.PHONY: all
-all: generate unit
-
-###################
-# Code Generation #
-###################
-.PHONY: generate smithy-generate smithy-build smithy-build-% smithy-clean smithy-go-publish-local format \
-gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy gen-aws-ptrs tidy-modules-% \
-add-module-license-files sync-models sync-endpoints-model sync-endpoints.json clone-v1-models gen-internal-codegen \
-sync-api-models copy-attributevalue-feature min-go-version-% update-requires smithy-annotate-stable \
-update-module-metadata download-modules-%
-
-generate: smithy-generate update-requires gen-repo-mod-replace update-module-metadata smithy-annotate-stable \
-gen-config-asserts gen-internal-codegen copy-attributevalue-feature gen-mod-dropreplace-smithy min-go-version-. \
-tidy-modules-. add-module-license-files gen-aws-ptrs format
-
-smithy-generate:
- cd codegen && ./gradlew clean build -Plog-tests && ./gradlew clean
-
-smithy-build: gen-repo-mod-replace
- cd codegen && ./gradlew clean build -Plog-tests
-
-smithy-build-%: gen-repo-mod-replace
- @# smithy-build- command that uses the pattern to define build filter that
- @# the smithy API model service id starts with. Strips off the
- @# "smithy-build-".
- @#
- @# e.g. smithy-build-com.amazonaws.rds
- @# e.g. smithy-build-com.amazonaws.rds#AmazonRDSv19
- cd codegen && \
- SMITHY_GO_BUILD_API="$(subst smithy-build-,,$@)" ./gradlew clean build -Plog-tests
-
-smithy-annotate-stable:
- go run ${REPOTOOLS_CMD_ANNOTATE_STABLE_GEN}
-
-smithy-clean:
- cd codegen && ./gradlew clean
-
-smithy-go-publish-local:
- rm -rf /tmp/smithy-go-local
- git clone https://github.com/aws/smithy-go /tmp/smithy-go-local
- make -C /tmp/smithy-go-local smithy-clean smithy-publish-local
-
-format:
- gofmt -w -s .
-
-gen-config-asserts:
- @echo "Generating SDK config package implementor assertions"
- cd config \
- && go mod tidy \
- && go generate
-
-gen-internal-codegen:
- @echo "Generating internal/codegen"
- cd internal/codegen \
- && go generate
-
-gen-repo-mod-replace:
- @echo "Generating go.mod replace for repo modules"
- go run ${REPOTOOLS_CMD_MAKE_RELATIVE}
-
-gen-mod-replace-smithy:
- cd ./internal/repotools/cmd/eachmodule \
- && go run . "go mod edit -replace github.com/aws/smithy-go=${SMITHY_GO_SRC}"
-
-gen-mod-dropreplace-smithy:
- cd ./internal/repotools/cmd/eachmodule \
- && go run . "go mod edit -dropreplace github.com/aws/smithy-go"
-
-gen-aws-ptrs:
- cd aws && go generate
-
-tidy-modules-%:
- @# tidy command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "tidy-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. tidy-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst tidy-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go mod tidy"
-
-download-modules-%:
- @# download command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "download-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. download-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst download-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go mod download all"
-
-add-module-license-files:
- cd internal/repotools/cmd/eachmodule && \
- go run . -skip-root \
- "cp $(LICENSE_FILE) ."
-
-sync-models: sync-endpoints-model sync-api-models
-
-sync-endpoints-model: sync-endpoints.json
-
-sync-endpoints.json:
- [[ ! -z "${ENDPOINTS_MODEL}" ]] && cp ${ENDPOINTS_MODEL} ${ENDPOINTS_JSON} || echo "ENDPOINTS_MODEL not set, must not be empty"
-
-clone-v1-models:
- rm -rf /tmp/aws-sdk-go-model-sync
- git clone https://github.com/aws/aws-sdk-go.git --depth 1 /tmp/aws-sdk-go-model-sync
-
-sync-api-models:
- cd internal/repotools/cmd/syncAPIModels && \
- go run . \
- -m ${API_MODELS} \
- -o ${CODEGEN_API_MODELS_PATH}
-
-copy-attributevalue-feature:
- cd ./feature/dynamodbstreams/attributevalue && \
- find . -name "*.go" | grep -v "doc.go" | xargs -I % rm % && \
- find ../../dynamodb/attributevalue -name "*.go" | grep -v "doc.go" | xargs -I % cp % . && \
- ls *.go | grep -v "convert.go" | grep -v "doc.go" | \
- xargs -I % sed -i.bk -E 's:github.com/aws/aws-sdk-go-v2/(service|feature)/dynamodb:github.com/aws/aws-sdk-go-v2/\1/dynamodbstreams:g' % && \
- ls *.go | grep -v "convert.go" | grep -v "doc.go" | \
- xargs -I % sed -i.bk 's:DynamoDB:DynamoDBStreams:g' % && \
- ls *.go | grep -v "doc.go" | \
- xargs -I % sed -i.bk 's:dynamodb\.:dynamodbstreams.:g' % && \
- sed -i.bk 's:streams\.:ddbtypes.:g' "convert.go" && \
- sed -i.bk 's:ddb\.:streams.:g' "convert.go" && \
- sed -i.bk 's:ddbtypes\.:ddb.:g' "convert.go" &&\
- sed -i.bk 's:Streams::g' "convert.go" && \
- rm -rf ./*.bk && \
- go mod tidy && \
- gofmt -w -s . && \
- go test .
-
-min-go-version-%:
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst min-go-version-,,$@)) ${EACHMODULE_FLAGS} \
- "go mod edit -go=${SDK_MIN_GO_VERSION}"
-
-update-requires:
- go run ${REPOTOOLS_CMD_UPDATE_REQUIRES}
-
-update-module-metadata:
- go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA}
-
-################
-# Unit Testing #
-################
-.PHONY: unit unit-race unit-test unit-race-test unit-race-modules-% unit-modules-% build build-modules-% \
-go-build-modules-% test test-race-modules-% test-modules-% cachedep cachedep-modules-% api-diff-modules-%
-
-unit: lint unit-modules-.
-unit-race: lint unit-race-modules-.
-
-unit-test: test-modules-.
-unit-race-test: test-race-modules-.
-
-unit-race-modules-%:
- @# unit command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "unit-race-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. unit-race-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst unit-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go vet ${BUILD_TAGS} --all ./..." \
- "go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
- "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
-
-
-unit-modules-%:
- @# unit command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "unit-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. unit-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst unit-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go vet ${BUILD_TAGS} --all ./..." \
- "go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
- "go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
-
-build: build-modules-.
-
-build-modules-%:
- @# build command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "build-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. build-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst build-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go test ${BUILD_TAGS} ${RUN_NONE} ./..."
-
-go-build-modules-%:
- @# build command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "build-modules-" and
- @# replaces all "_" with "/".
- @#
- @# Validates that all modules in the repo have buildable Go files.
- @#
- @# e.g. go-build-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst go-build-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go build ${BUILD_TAGS} ./..."
-
-test: test-modules-.
-
-test-race-modules-%:
- @# Test command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "test-race-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. test-race-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst test-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
-
-test-modules-%:
- @# Test command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "test-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. test-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst test-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
-
-cachedep: cachedep-modules-.
-
-cachedep-modules-%:
- @# build command that uses the pattern to define the root path that the
- @# module caching will start from. Strips off the "cachedep-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. cachedep-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst cachedep-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go mod download"
-
-api-diff-modules-%:
- @# Command that uses the pattern to define the root path that the
- @# module testing will start from. Strips off the "api-diff-modules-" and
- @# replaces all "_" with "/".
- @#
- @# Requires golang.org/x/exp/cmd/gorelease to be available in the GOPATH.
- @#
- @# e.g. api-diff-modules-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst api-diff-modules-,,$@)) \
- -fail-fast=true \
- -c 1 \
- -skip="internal/repotools" \
- "$$(go env GOPATH)/bin/gorelease"
-
-##############
-# CI Testing #
-##############
-.PHONY: ci-test ci-test-no-generate ci-test-generate-validate
-
-ci-test: generate unit-race ci-test-generate-validate
-ci-test-no-generate: unit-race
-
-ci-test-generate-validate:
- @echo "CI test validate no generated code changes"
- git update-index --assume-unchanged go.mod go.sum
- git add . -A
- gitstatus=`git diff --cached --ignore-space-change`; \
- echo "$$gitstatus"; \
- if [ "$$gitstatus" != "" ] && [ "$$gitstatus" != "skipping validation" ]; then echo "$$gitstatus"; exit 1; fi
- git update-index --no-assume-unchanged go.mod go.sum
-
-ci-lint: ci-lint-.
-
-ci-lint-%:
- @# Run golangci-lint command that uses the pattern to define the root path that the
- @# module check will start from. Strips off the "ci-lint-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. ci-lint-internal_protocoltest
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst ci-lint-,,$@)) \
- -fail-fast=false \
- -c 1 \
- -skip="internal/repotools" \
- "golangci-lint run"
-
-ci-lint-install:
- @# Installs golangci-lint at GoPATH.
- @# This should be used to run golangci-lint locally.
- @#
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
-
-#######################
-# Integration Testing #
-#######################
-.PHONY: integration integ-modules-% cleanup-integ-buckets
-
-integration: integ-modules-service
-
-integ-modules-%:
- @# integration command that uses the pattern to define the root path that
- @# the module testing will start from. Strips off the "integ-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. test-modules-service_dynamodb
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst integ-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go test -timeout=10m -tags "integration" -v ${RUN_INTEG} -count 1 ./..."
-
-cleanup-integ-buckets:
- @echo "Cleaning up SDK integration resources"
- go run -tags "integration" ./internal/awstesting/cmd/bucket_cleanup/main.go "aws-sdk-go-integration"
-
-##############
-# Benchmarks #
-##############
-.PHONY: bench bench-modules-%
-
-bench: bench-modules-.
-
-bench-modules-%:
- @# benchmark command that uses the pattern to define the root path that
- @# the module testing will start from. Strips off the "bench-modules-" and
- @# replaces all "_" with "/".
- @#
- @# e.g. bench-modules-service_dynamodb
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst bench-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go test -timeout=10m -bench . --benchmem ${BUILD_TAGS} ${RUN_NONE} ./..."
-
-
-#####################
-# Release Process #
-#####################
-.PHONY: preview-release pre-release-validation release
-
-ls-changes:
- go run ${REPOTOOLS_CMD_CHANGELOG} ls
-
-preview-release:
- go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} ${REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS}
-
-pre-release-validation:
- @if [[ -z "${RELEASE_MANIFEST_FILE}" ]]; then \
- echo "RELEASE_MANIFEST_FILE is required to specify the file to write the release manifest" && false; \
- fi
- @if [[ -z "${RELEASE_CHGLOG_DESC_FILE}" ]]; then \
- echo "RELEASE_CHGLOG_DESC_FILE is required to specify the file to write the release notes" && false; \
- fi
-
-release: pre-release-validation
- go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} -o ${RELEASE_MANIFEST_FILE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} ${REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS}
- go run ${REPOTOOLS_CMD_UPDATE_REQUIRES} -release ${RELEASE_MANIFEST_FILE}
- go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA} -release ${RELEASE_MANIFEST_FILE}
- go run ${REPOTOOLS_CMD_GENERATE_CHANGELOG} -release ${RELEASE_MANIFEST_FILE} -o ${RELEASE_CHGLOG_DESC_FILE}
- go run ${REPOTOOLS_CMD_CHANGELOG} rm -all
- go run ${REPOTOOLS_CMD_TAG_RELEASE} -release ${RELEASE_MANIFEST_FILE}
-
-##############
-# Repo Tools #
-##############
-.PHONY: install-repotools
-
-install-repotools:
- go install ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
-
-set-smithy-go-version:
- @if [[ -z "${SMITHY_GO_VERSION}" ]]; then \
- echo "SMITHY_GO_VERSION is required to update SDK's smithy-go module dependency version" && false; \
- fi
- go run ${REPOTOOLS_CMD_EDIT_MODULE_DEPENDENCY} -s "github.com/aws/smithy-go" -v "${SMITHY_GO_VERSION}"
-
-##################
-# Linting/Verify #
-##################
-.PHONY: verify lint vet vet-modules-% sdkv1check
-
-verify: lint vet sdkv1check
-
-lint:
- @echo "go lint SDK and vendor packages"
- @lint=`golint ./...`; \
- dolint=`echo "$$lint" | grep -E -v \
- -e ${LINT_IGNORE_S3MANAGER_INPUT} \
- -e ${LINTIGNORESINGLEFIGHT}`; \
- echo "$$dolint"; \
- if [ "$$dolint" != "" ]; then exit 1; fi
-
-vet: vet-modules-.
-
-vet-modules-%:
- cd ./internal/repotools/cmd/eachmodule \
- && go run . -p $(subst _,/,$(subst vet-modules-,,$@)) ${EACHMODULE_FLAGS} \
- "go vet ${BUILD_TAGS} --all ./..."
-
-sdkv1check:
- @echo "Checking for usage of AWS SDK for Go v1"
- @sdkv1usage=`go list -test -f '''{{ if not .Standard }}{{ range $$_, $$name := .Imports }} * {{ $$.ImportPath }} -> {{ $$name }}{{ print "\n" }}{{ end }}{{ range $$_, $$name := .TestImports }} *: {{ $$.ImportPath }} -> {{ $$name }}{{ print "\n" }}{{ end }}{{ end}}''' ./... | sort -u | grep '''/aws-sdk-go/'''`; \
- echo "$$sdkv1usage"; \
- if [ "$$sdkv1usage" != "" ]; then exit 1; fi
-
-###################
-# Sandbox Testing #
-###################
-.PHONY: sandbox-tests sandbox-build-% sandbox-run-% sandbox-test-% update-aws-golang-tip
-
-sandbox-tests: sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-go1.17 sandbox-test-gotip
-
-sandbox-build-%:
- @# sandbox-build-go1.17
- @# sandbox-build-gotip
- docker build \
- -f ./internal/awstesting/sandbox/Dockerfile.test.$(subst sandbox-build-,,$@) \
- -t "aws-sdk-go-$(subst sandbox-build-,,$@)" .
-sandbox-run-%: sandbox-build-%
- @# sandbox-run-go1.17
- @# sandbox-run-gotip
- docker run -i -t "aws-sdk-go-$(subst sandbox-run-,,$@)" bash
-sandbox-test-%: sandbox-build-%
- @# sandbox-test-go1.17
- @# sandbox-test-gotip
- docker run -t "aws-sdk-go-$(subst sandbox-test-,,$@)"
-
-update-aws-golang-tip:
- docker build --no-cache=true -f ./internal/awstesting/sandbox/Dockerfile.golang-tip -t "aws-golang:tip" .
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
index 5f14d116..899129ec 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
+++ b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
@@ -1,3 +1,3 @@
AWS SDK for Go
-Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2014-2015 Stripe, Inc.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/README.md b/vendor/github.com/aws/aws-sdk-go-v2/README.md
deleted file mode 100644
index bb4349fe..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/README.md
+++ /dev/null
@@ -1,155 +0,0 @@
-# AWS SDK for Go v2
-
-[![Go Build status](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml)[![Codegen Build status](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml) [![SDK Documentation](https://img.shields.io/badge/SDK-Documentation-blue)](https://aws.github.io/aws-sdk-go-v2/docs/) [![Migration Guide](https://img.shields.io/badge/Migration-Guide-blue)](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) [![API Reference](https://img.shields.io/badge/api-reference-blue.svg)](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
-
-
-`aws-sdk-go-v2` is the v2 AWS SDK for the Go programming language.
-
-The v2 SDK requires a minimum version of `Go 1.15`.
-
-Checkout out the [release notes](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) for information about the latest bug
-fixes, updates, and features added to the SDK.
-
-Jump To:
-* [Getting Started](#getting-started)
-* [Getting Help](#getting-help)
-* [Contributing](#feedback-and-contributing)
-* [More Resources](#resources)
-
-## Maintenance and support for SDK major versions
-
-For information about maintenance and support for SDK major versions and their underlying dependencies, see the
-following in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide:
-
-* [AWS SDKs and Tools Maintenance Policy](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html)
-* [AWS SDKs and Tools Version Support Matrix](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html)
-
-## Getting started
-To get started working with the SDK setup your project for Go modules, and retrieve the SDK dependencies with `go get`.
-This example shows how you can use the v2 SDK to make an API request using the SDK's [Amazon DynamoDB] client.
-
-###### Initialize Project
-```sh
-$ mkdir ~/helloaws
-$ cd ~/helloaws
-$ go mod init helloaws
-```
-###### Add SDK Dependencies
-```sh
-$ go get github.com/aws/aws-sdk-go-v2/aws
-$ go get github.com/aws/aws-sdk-go-v2/config
-$ go get github.com/aws/aws-sdk-go-v2/service/dynamodb
-```
-
-###### Write Code
-In your preferred editor add the following content to `main.go`
-
-```go
-package main
-
-import (
- "context"
- "fmt"
- "log"
-
- "github.com/aws/aws-sdk-go-v2/aws"
- "github.com/aws/aws-sdk-go-v2/config"
- "github.com/aws/aws-sdk-go-v2/service/dynamodb"
-)
-
-func main() {
- // Using the SDK's default configuration, loading additional config
- // and credentials values from the environment variables, shared
- // credentials, and shared configuration files
- cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-west-2"))
- if err != nil {
- log.Fatalf("unable to load SDK config, %v", err)
- }
-
- // Using the Config value, create the DynamoDB client
- svc := dynamodb.NewFromConfig(cfg)
-
- // Build the request with its input parameters
- resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
- Limit: aws.Int32(5),
- })
- if err != nil {
- log.Fatalf("failed to list tables, %v", err)
- }
-
- fmt.Println("Tables:")
- for _, tableName := range resp.TableNames {
- fmt.Println(tableName)
- }
-}
-```
-
-###### Compile and Execute
-```sh
-$ go run .
-Table:
-tableOne
-tableTwo
-```
-
-## Getting Help
-
-Please use these community resources for getting help. We use the GitHub issues
-for tracking bugs and feature requests.
-
-* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag.
-* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
-* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go-v2/issues/new/choose).
-
-This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/).
-
-### Opening Issues
-
-If you encounter a bug with the AWS SDK for Go we would like to hear about it.
-Search the [existing issues][Issues] and see
-if others are also experiencing the issue before opening a new issue. Please
-include the version of AWS SDK for Go, Go language, and OS you’re using. Please
-also include reproduction case when appropriate.
-
-The GitHub issues are intended for bug reports and feature requests. For help
-and questions with using AWS SDK for Go please make use of the resources listed
-in the [Getting Help](#getting-help) section.
-Keeping the list of open issues lean will help us respond in a timely manner.
-
-## Feedback and contributing
-
-The v2 SDK will use GitHub [Issues] to track feature requests and issues with the SDK. In addition, we'll use GitHub [Projects] to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways.
-
-**GitHub issues**. To provide feedback or report bugs, file GitHub [Issues] on the SDK. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated, and included in our roadmap for the GA launch.
-
-**Contributing**. You can open pull requests for fixes or additions to the AWS SDK for Go 2.0. All pull requests must be submitted under the Apache 2.0 license and will be reviewed by an SDK team member before being merged in. Accompanying unit tests, where possible, are appreciated.
-
-## Resources
-
-[SDK Developer Guide](https://aws.github.io/aws-sdk-go-v2/docs/) - Use this document to learn how to get started and
-use the AWS SDK for Go V2.
-
-[SDK API Reference Documentation](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) - Use this
-document to look up all API operation input and output parameters for AWS
-services supported by the SDK. The API reference also includes documentation of
-the SDK, and examples how to using the SDK, service client API operations, and
-API operation require parameters.
-
-[Service Documentation](https://aws.amazon.com/documentation/) - Use this
-documentation to learn how to interface with AWS services. These guides are
-great for getting started with a service, or when looking for more
-information about a service. While this document is not required for coding,
-services may supply helpful samples to look out for.
-
-[Forum](https://forums.aws.amazon.com/forum.jspa?forumID=293) - Ask questions, get help, and give feedback
-
-[Issues] - Report issues, submit pull requests, and get involved
- (see [Apache 2.0 License][license])
-
-[Dep]: https://github.com/golang/dep
-[Issues]: https://github.com/aws/aws-sdk-go-v2/issues
-[Projects]: https://github.com/aws/aws-sdk-go-v2/projects
-[CHANGELOG]: https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md
-[Amazon DynamoDB]: https://aws.amazon.com/dynamodb/
-[design]: https://github.com/aws/aws-sdk-go-v2/blob/master/DESIGN.md
-[license]: http://aws.amazon.com/apache2.0/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
index df2abb58..2264200c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
@@ -3,13 +3,14 @@ package aws
import (
"net/http"
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
)
// HTTPClient provides the interface to provide custom HTTPClients. Generally
// *http.Client is sufficient for most use cases. The HTTPClient should not
-// follow redirects.
+// follow 301 or 302 redirects.
type HTTPClient interface {
Do(*http.Request) (*http.Response, error)
}
@@ -25,11 +26,23 @@ type Config struct {
// information on AWS regions.
Region string
- // The credentials object to use when signing requests. Defaults to a
- // chain of credential providers to search for credentials in environment
- // variables, shared credential file, and EC2 Instance Roles.
+ // The credentials object to use when signing requests.
+ // Use the LoadDefaultConfig to load configuration from all the SDK's supported
+ // sources, and resolve credentials using the SDK's default credential chain.
Credentials CredentialsProvider
+ // The Bearer Authentication token provider to use for authenticating API
+ // operation calls with a Bearer Authentication token. The API clients and
+ // operation must support Bearer Authentication scheme in order for the
+ // token provider to be used. API clients created with NewFromConfig will
+ // automatically be configured with this option, if the API client support
+ // Bearer Authentication.
+ //
+ // The SDK's config.LoadDefaultConfig can automatically populate this
+ // option for external configuration options such as SSO session.
+ // https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+ BearerAuthTokenProvider smithybearer.TokenProvider
+
// The HTTP Client the SDK's API clients will use to invoke HTTP requests.
// The SDK defaults to a BuildableClient allowing API clients to create
// copies of the HTTP Client for service specific customizations.
@@ -55,6 +68,12 @@ type Config struct {
//
// See the `aws.EndpointResolverWithOptions` documentation for additional
// usage information.
+ //
+ // Deprecated: with the release of endpoint resolution v2 in API clients,
+ // EndpointResolver and EndpointResolverWithOptions are deprecated.
+ // Providing a value for this field will likely prevent you from using
+ // newer endpoint-related service features. See API client options
+ // EndpointResolverV2 and BaseEndpoint.
EndpointResolverWithOptions EndpointResolverWithOptions
// RetryMaxAttempts specifies the maximum number attempts an API client
@@ -119,6 +138,30 @@ type Config struct {
// `config.LoadDefaultConfig`. You should not populate this structure
// programmatically, or rely on the values here within your applications.
RuntimeEnvironment RuntimeEnvironment
+
+ // AppId is an optional application specific identifier that can be set.
+ // When set it will be appended to the User-Agent header of every request
+ // in the form of App/{AppId}. This variable is sourced from environment
+ // variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
+ // See https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html for
+ // more information on environment variables and shared config settings.
+ AppID string
+
+ // BaseEndpoint is an intermediary transfer location to a service specific
+ // BaseEndpoint on a service's Options.
+ BaseEndpoint *string
+
+ // DisableRequestCompression toggles if an operation request could be
+ // compressed or not. Will be set to false by default. This variable is sourced from
+ // environment variable AWS_DISABLE_REQUEST_COMPRESSION or the shared config profile attribute
+ // disable_request_compression
+ DisableRequestCompression bool
+
+ // RequestMinCompressSizeBytes sets the inclusive min bytes of a request body that could be
+ // compressed. Will be set to 10240 by default and must be within 0 and 10485760 bytes inclusively.
+ // This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or
+ // the shared config profile attribute request_min_compression_size_bytes
+ RequestMinCompressSizeBytes int64
}
// NewConfig returns a new Config pointer that can be chained with builder
@@ -127,8 +170,7 @@ func NewConfig() *Config {
return &Config{}
}
-// Copy will return a shallow copy of the Config object. If any additional
-// configurations are provided they will be merged into the new config returned.
+// Copy will return a shallow copy of the Config object.
func (c Config) Copy() Config {
cp := c
return cp
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
index dfd2b1dd..781ac0ae 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
@@ -46,14 +46,14 @@ type CredentialsCacheOptions struct {
// CredentialsCache will look for optional interfaces on the Provider to adjust
// how the credential cache handles credentials caching.
//
-// * HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle
-// credential refresh failures. This could return an updated Credentials
-// value, or attempt another means of retrieving credentials.
+// - HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle
+// credential refresh failures. This could return an updated Credentials
+// value, or attempt another means of retrieving credentials.
//
-// * AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how
-// credentials Expires is modified. This could modify how the Credentials
-// Expires is adjusted based on the CredentialsCache ExpiryWindow option.
-// Such as providing a floor not to reduce the Expires below.
+// - AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how
+// credentials Expires is modified. This could modify how the Credentials
+// Expires is adjusted based on the CredentialsCache ExpiryWindow option.
+// Such as providing a floor not to reduce the Expires below.
type CredentialsCache struct {
provider CredentialsProvider
@@ -178,6 +178,12 @@ func (p *CredentialsCache) Invalidate() {
p.creds.Store((*Credentials)(nil))
}
+// IsCredentialsProvider returns whether credential provider wrapped by CredentialsCache
+// matches the target provider type.
+func (p *CredentialsCache) IsCredentialsProvider(target CredentialsProvider) bool {
+ return IsCredentialsProvider(p.provider, target)
+}
+
// HandleFailRefreshCredentialsCacheStrategy is an interface for
// CredentialsCache to allow CredentialsProvider how failed to refresh
// credentials is handled.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
index 0fffc53e..714d4ad8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
@@ -3,6 +3,7 @@ package aws
import (
"context"
"fmt"
+ "reflect"
"time"
"github.com/aws/aws-sdk-go-v2/internal/sdk"
@@ -23,41 +24,41 @@ import (
// The following example demonstrates using the AnonymousCredentials to prevent
// SDK's external config loading attempt to resolve credentials.
//
-// cfg, err := config.LoadDefaultConfig(context.TODO(),
-// config.WithCredentialsProvider(aws.AnonymousCredentials{}),
-// )
-// if err != nil {
-// log.Fatalf("failed to load config, %v", err)
-// }
+// cfg, err := config.LoadDefaultConfig(context.TODO(),
+// config.WithCredentialsProvider(aws.AnonymousCredentials{}),
+// )
+// if err != nil {
+// log.Fatalf("failed to load config, %v", err)
+// }
//
-// client := s3.NewFromConfig(cfg)
+// client := s3.NewFromConfig(cfg)
//
// Alternatively you can leave the API client Option's `Credential` member to
// nil. If using the `NewFromConfig` constructor you'll need to explicitly set
// the `Credentials` member to nil, if the external config resolved a
// credential provider.
//
-// client := s3.New(s3.Options{
-// // Credentials defaults to a nil value.
-// })
+// client := s3.New(s3.Options{
+// // Credentials defaults to a nil value.
+// })
//
// This can also be configured for specific operations calls too.
//
-// cfg, err := config.LoadDefaultConfig(context.TODO())
-// if err != nil {
-// log.Fatalf("failed to load config, %v", err)
-// }
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// log.Fatalf("failed to load config, %v", err)
+// }
//
-// client := s3.NewFromConfig(config)
+// client := s3.NewFromConfig(config)
//
-// result, err := client.GetObject(context.TODO(), s3.GetObject{
-// Bucket: aws.String("example-bucket"),
-// Key: aws.String("example-key"),
-// }, func(o *s3.Options) {
-// o.Credentials = nil
-// // Or
-// o.Credentials = aws.AnonymousCredentials{}
-// })
+// result, err := client.GetObject(context.TODO(), s3.GetObject{
+// Bucket: aws.String("example-bucket"),
+// Key: aws.String("example-key"),
+// }, func(o *s3.Options) {
+// o.Credentials = nil
+// // Or
+// o.Credentials = aws.AnonymousCredentials{}
+// })
type AnonymousCredentials struct{}
// Retrieve implements the CredentialsProvider interface, but will always
@@ -129,3 +130,41 @@ type CredentialsProviderFunc func(context.Context) (Credentials, error)
func (fn CredentialsProviderFunc) Retrieve(ctx context.Context) (Credentials, error) {
return fn(ctx)
}
+
+type isCredentialsProvider interface {
+ IsCredentialsProvider(CredentialsProvider) bool
+}
+
+// IsCredentialsProvider returns whether the target CredentialProvider is the same type as provider when comparing the
+// implementation type.
+//
+// If provider has a method IsCredentialsProvider(CredentialsProvider) bool it will be responsible for validating
+// whether target matches the credential provider type.
+//
+// When comparing the CredentialProvider implementations provider and target for equality, the following rules are used:
+//
+// If provider is of type T and target is of type V, true if type *T is the same as type *V, otherwise false
+// If provider is of type *T and target is of type V, true if type *T is the same as type *V, otherwise false
+// If provider is of type T and target is of type *V, true if type *T is the same as type *V, otherwise false
+// If provider is of type *T and target is of type *V,true if type *T is the same as type *V, otherwise false
+func IsCredentialsProvider(provider, target CredentialsProvider) bool {
+ if target == nil || provider == nil {
+ return provider == target
+ }
+
+ if x, ok := provider.(isCredentialsProvider); ok {
+ return x.IsCredentialsProvider(target)
+ }
+
+ targetType := reflect.TypeOf(target)
+ if targetType.Kind() != reflect.Ptr {
+ targetType = reflect.PtrTo(targetType)
+ }
+
+ providerType := reflect.TypeOf(provider)
+ if providerType.Kind() != reflect.Ptr {
+ providerType = reflect.PtrTo(providerType)
+ }
+
+ return targetType.AssignableTo(providerType)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
index befc3bee..d8b6e09e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
@@ -1,7 +1,7 @@
// Package aws provides the core SDK's utilities and shared types. Use this package's
// utilities to simplify setting and reading API operations parameters.
//
-// Value and Pointer Conversion Utilities
+// # Value and Pointer Conversion Utilities
//
// This package includes a helper conversion utility for each scalar type the SDK's
// API use. These utilities make getting a pointer of the scalar, and dereferencing
@@ -16,33 +16,33 @@
// to get pointer of a literal string value, because getting the address of a
// literal requires assigning the value to a variable first.
//
-// var strPtr *string
+// var strPtr *string
//
-// // Without the SDK's conversion functions
-// str := "my string"
-// strPtr = &str
+// // Without the SDK's conversion functions
+// str := "my string"
+// strPtr = &str
//
-// // With the SDK's conversion functions
-// strPtr = aws.String("my string")
+// // With the SDK's conversion functions
+// strPtr = aws.String("my string")
//
-// // Convert *string to string value
-// str = aws.ToString(strPtr)
+// // Convert *string to string value
+// str = aws.ToString(strPtr)
//
// In addition to scalars the aws package also includes conversion utilities for
// map and slice for commonly types used in API parameters. The map and slice
// conversion functions use similar naming pattern as the scalar conversion
// functions.
//
-// var strPtrs []*string
-// var strs []string = []string{"Go", "Gophers", "Go"}
+// var strPtrs []*string
+// var strs []string = []string{"Go", "Gophers", "Go"}
//
-// // Convert []string to []*string
-// strPtrs = aws.StringSlice(strs)
+// // Convert []string to []*string
+// strPtrs = aws.StringSlice(strs)
//
-// // Convert []*string to []string
-// strs = aws.ToStringSlice(strPtrs)
+// // Convert []*string to []string
+// strs = aws.ToStringSlice(strPtrs)
//
-// SDK Default HTTP Client
+// # SDK Default HTTP Client
//
// The SDK will use the http.DefaultClient if a HTTP client is not provided to
// the SDK's Session, or service client constructor. This means that if the
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
index f12e3356..70c109f9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
@@ -3,4 +3,4 @@
package aws
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.16.2"
+const goModuleVersion = "1.25.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
index 9e34d26f..91c94d98 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
@@ -7,10 +7,12 @@ package aws
// The entire 64-bit group is reserved for later expansion by the SDK.
//
// Example: Setting ClientLogMode to enable logging of retries and requests
-// clientLogMode := aws.LogRetries | aws.LogRequest
+//
+// clientLogMode := aws.LogRetries | aws.LogRequest
//
// Example: Adding an additional log mode to an existing ClientLogMode value
-// clientLogMode |= aws.LogResponse
+//
+// clientLogMode |= aws.LogResponse
type ClientLogMode uint64
// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
index e6e87ac7..d66f0960 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
@@ -2,6 +2,7 @@ package middleware
import (
"context"
+
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/smithy-go/middleware"
@@ -42,12 +43,13 @@ func (s RegisterServiceMetadata) HandleInitialize(
// service metadata keys for storing and lookup of runtime stack information.
type (
- serviceIDKey struct{}
- signingNameKey struct{}
- signingRegionKey struct{}
- regionKey struct{}
- operationNameKey struct{}
- partitionIDKey struct{}
+ serviceIDKey struct{}
+ signingNameKey struct{}
+ signingRegionKey struct{}
+ regionKey struct{}
+ operationNameKey struct{}
+ partitionIDKey struct{}
+ requiresLegacyEndpointsKey struct{}
)
// GetServiceID retrieves the service id from the context.
@@ -63,6 +65,9 @@ func GetServiceID(ctx context.Context) (v string) {
//
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
+//
+// Deprecated: This value is unstable. The resolved signing name is available
+// in the signer properties object passed to the signer.
func GetSigningName(ctx context.Context) (v string) {
v, _ = middleware.GetStackValue(ctx, signingNameKey{}).(string)
return v
@@ -72,6 +77,9 @@ func GetSigningName(ctx context.Context) (v string) {
//
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
+//
+// Deprecated: This value is unstable. The resolved signing region is available
+// in the signer properties object passed to the signer.
func GetSigningRegion(ctx context.Context) (v string) {
v, _ = middleware.GetStackValue(ctx, signingRegionKey{}).(string)
return v
@@ -104,10 +112,32 @@ func GetPartitionID(ctx context.Context) string {
return v
}
-// SetSigningName set or modifies the signing name on the context.
+// GetRequiresLegacyEndpoints the flag used to indicate if legacy endpoint
+// customizations need to be executed.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetRequiresLegacyEndpoints(ctx context.Context) bool {
+ v, _ := middleware.GetStackValue(ctx, requiresLegacyEndpointsKey{}).(bool)
+ return v
+}
+
+// SetRequiresLegacyEndpoints set or modifies the flag indicated that
+// legacy endpoint customizations are needed.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetRequiresLegacyEndpoints(ctx context.Context, value bool) context.Context {
+ return middleware.WithStackValue(ctx, requiresLegacyEndpointsKey{}, value)
+}
+
+// SetSigningName set or modifies the sigv4 or sigv4a signing name on the context.
//
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
+//
+// Deprecated: This value is unstable. Use WithSigV4SigningName client option
+// funcs instead.
func SetSigningName(ctx context.Context, value string) context.Context {
return middleware.WithStackValue(ctx, signingNameKey{}, value)
}
@@ -116,6 +146,9 @@ func SetSigningName(ctx context.Context, value string) context.Context {
//
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
+//
+// Deprecated: This value is unstable. Use WithSigV4SigningRegion client option
+// funcs instead.
func SetSigningRegion(ctx context.Context, value string) context.Context {
return middleware.WithStackValue(ctx, signingRegionKey{}, value)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go
index 9bd0dfb1..6d5f0079 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go
@@ -139,16 +139,16 @@ func AddRecordResponseTiming(stack *middleware.Stack) error {
// raw response within the response metadata.
type rawResponseKey struct{}
-// addRawResponse middleware adds raw response on to the metadata
-type addRawResponse struct{}
+// AddRawResponse middleware adds raw response on to the metadata
+type AddRawResponse struct{}
// ID the identifier for the ClientRequestID
-func (m *addRawResponse) ID() string {
+func (m *AddRawResponse) ID() string {
return "AddRawResponseToMetadata"
}
// HandleDeserialize adds raw response on the middleware metadata
-func (m addRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m AddRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -159,7 +159,7 @@ func (m addRawResponse) HandleDeserialize(ctx context.Context, in middleware.Des
// AddRawResponseToMetadata adds middleware to the middleware stack that
// store raw response on to the metadata.
func AddRawResponseToMetadata(stack *middleware.Stack) error {
- return stack.Deserialize.Add(&addRawResponse{}, middleware.Before)
+ return stack.Deserialize.Add(&AddRawResponse{}, middleware.Before)
}
// GetRawResponse returns raw response set on metadata
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go
new file mode 100644
index 00000000..b0133f4c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go
@@ -0,0 +1,319 @@
+// Package metrics implements metrics gathering for SDK development purposes.
+//
+// This package is designated as private and is intended for use only by the
+// AWS client runtime. The exported API therein is not considered stable and
+// is subject to breaking changes without notice.
+package metrics
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "sync"
+ "time"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+const (
+ // ServiceIDKey is the key for the service ID metric.
+ ServiceIDKey = "ServiceId"
+ // OperationNameKey is the key for the operation name metric.
+ OperationNameKey = "OperationName"
+ // ClientRequestIDKey is the key for the client request ID metric.
+ ClientRequestIDKey = "ClientRequestId"
+ // APICallDurationKey is the key for the API call duration metric.
+ APICallDurationKey = "ApiCallDuration"
+ // APICallSuccessfulKey is the key for the API call successful metric.
+ APICallSuccessfulKey = "ApiCallSuccessful"
+ // MarshallingDurationKey is the key for the marshalling duration metric.
+ MarshallingDurationKey = "MarshallingDuration"
+ // InThroughputKey is the key for the input throughput metric.
+ InThroughputKey = "InThroughput"
+ // OutThroughputKey is the key for the output throughput metric.
+ OutThroughputKey = "OutThroughput"
+ // RetryCountKey is the key for the retry count metric.
+ RetryCountKey = "RetryCount"
+ // HTTPStatusCodeKey is the key for the HTTP status code metric.
+ HTTPStatusCodeKey = "HttpStatusCode"
+ // AWSExtendedRequestIDKey is the key for the AWS extended request ID metric.
+ AWSExtendedRequestIDKey = "AwsExtendedRequestId"
+ // AWSRequestIDKey is the key for the AWS request ID metric.
+ AWSRequestIDKey = "AwsRequestId"
+ // BackoffDelayDurationKey is the key for the backoff delay duration metric.
+ BackoffDelayDurationKey = "BackoffDelayDuration"
+ // StreamThroughputKey is the key for the stream throughput metric.
+ StreamThroughputKey = "Throughput"
+ // ConcurrencyAcquireDurationKey is the key for the concurrency acquire duration metric.
+ ConcurrencyAcquireDurationKey = "ConcurrencyAcquireDuration"
+ // PendingConcurrencyAcquiresKey is the key for the pending concurrency acquires metric.
+ PendingConcurrencyAcquiresKey = "PendingConcurrencyAcquires"
+ // SigningDurationKey is the key for the signing duration metric.
+ SigningDurationKey = "SigningDuration"
+ // UnmarshallingDurationKey is the key for the unmarshalling duration metric.
+ UnmarshallingDurationKey = "UnmarshallingDuration"
+ // TimeToFirstByteKey is the key for the time to first byte metric.
+ TimeToFirstByteKey = "TimeToFirstByte"
+ // ServiceCallDurationKey is the key for the service call duration metric.
+ ServiceCallDurationKey = "ServiceCallDuration"
+ // EndpointResolutionDurationKey is the key for the endpoint resolution duration metric.
+ EndpointResolutionDurationKey = "EndpointResolutionDuration"
+ // AttemptNumberKey is the key for the attempt number metric.
+ AttemptNumberKey = "AttemptNumber"
+ // MaxConcurrencyKey is the key for the max concurrency metric.
+ MaxConcurrencyKey = "MaxConcurrency"
+ // AvailableConcurrencyKey is the key for the available concurrency metric.
+ AvailableConcurrencyKey = "AvailableConcurrency"
+)
+
+// MetricPublisher provides the interface to provide custom MetricPublishers.
+// PostRequestMetrics will be invoked by the MetricCollection middleware to post request.
+// PostStreamMetrics will be invoked by ReadCloserWithMetrics to post stream metrics.
+type MetricPublisher interface {
+ PostRequestMetrics(*MetricData) error
+ PostStreamMetrics(*MetricData) error
+}
+
+// Serializer provides the interface to provide custom Serializers.
+// Serialize will transform any input object in its corresponding string representation.
+type Serializer interface {
+ Serialize(obj interface{}) (string, error)
+}
+
+// DefaultSerializer is an implementation of the Serializer interface.
+type DefaultSerializer struct{}
+
+// Serialize uses the default JSON serializer to obtain the string representation of an object.
+func (DefaultSerializer) Serialize(obj interface{}) (string, error) {
+ bytes, err := json.Marshal(obj)
+ if err != nil {
+ return "", err
+ }
+ return string(bytes), nil
+}
+
+type metricContextKey struct{}
+
+// MetricContext contains fields to store metric-related information.
+type MetricContext struct {
+ connectionCounter *SharedConnectionCounter
+ publisher MetricPublisher
+ data *MetricData
+}
+
+// MetricData stores the collected metric data.
+type MetricData struct {
+ RequestStartTime time.Time
+ RequestEndTime time.Time
+ APICallDuration time.Duration
+ SerializeStartTime time.Time
+ SerializeEndTime time.Time
+ MarshallingDuration time.Duration
+ ResolveEndpointStartTime time.Time
+ ResolveEndpointEndTime time.Time
+ EndpointResolutionDuration time.Duration
+ InThroughput float64
+ OutThroughput float64
+ RetryCount int
+ Success uint8
+ StatusCode int
+ ClientRequestID string
+ ServiceID string
+ OperationName string
+ PartitionID string
+ Region string
+ RequestContentLength int64
+ Stream StreamMetrics
+ Attempts []AttemptMetrics
+}
+
+// StreamMetrics stores metrics related to streaming data.
+type StreamMetrics struct {
+ ReadDuration time.Duration
+ ReadBytes int64
+ Throughput float64
+}
+
+// AttemptMetrics stores metrics related to individual attempts.
+type AttemptMetrics struct {
+ ServiceCallStart time.Time
+ ServiceCallEnd time.Time
+ ServiceCallDuration time.Duration
+ FirstByteTime time.Time
+ TimeToFirstByte time.Duration
+ ConnRequestedTime time.Time
+ ConnObtainedTime time.Time
+ ConcurrencyAcquireDuration time.Duration
+ CredentialFetchStartTime time.Time
+ CredentialFetchEndTime time.Time
+ SignStartTime time.Time
+ SignEndTime time.Time
+ SigningDuration time.Duration
+ DeserializeStartTime time.Time
+ DeserializeEndTime time.Time
+ UnMarshallingDuration time.Duration
+ RetryDelay time.Duration
+ ResponseContentLength int64
+ StatusCode int
+ RequestID string
+ ExtendedRequestID string
+ HTTPClient string
+ MaxConcurrency int
+ PendingConnectionAcquires int
+ AvailableConcurrency int
+ ActiveRequests int
+ ReusedConnection bool
+}
+
+// Data returns the MetricData associated with the MetricContext.
+func (mc *MetricContext) Data() *MetricData {
+ return mc.data
+}
+
+// ConnectionCounter returns the SharedConnectionCounter associated with the MetricContext.
+func (mc *MetricContext) ConnectionCounter() *SharedConnectionCounter {
+ return mc.connectionCounter
+}
+
+// Publisher returns the MetricPublisher associated with the MetricContext.
+func (mc *MetricContext) Publisher() MetricPublisher {
+ return mc.publisher
+}
+
+// ComputeRequestMetrics calculates and populates derived metrics based on the collected data.
+func (md *MetricData) ComputeRequestMetrics() {
+
+ for idx := range md.Attempts {
+ attempt := &md.Attempts[idx]
+ attempt.ConcurrencyAcquireDuration = attempt.ConnObtainedTime.Sub(attempt.ConnRequestedTime)
+ attempt.SigningDuration = attempt.SignEndTime.Sub(attempt.SignStartTime)
+ attempt.UnMarshallingDuration = attempt.DeserializeEndTime.Sub(attempt.DeserializeStartTime)
+ attempt.TimeToFirstByte = attempt.FirstByteTime.Sub(attempt.ServiceCallStart)
+ attempt.ServiceCallDuration = attempt.ServiceCallEnd.Sub(attempt.ServiceCallStart)
+ }
+
+ md.APICallDuration = md.RequestEndTime.Sub(md.RequestStartTime)
+ md.MarshallingDuration = md.SerializeEndTime.Sub(md.SerializeStartTime)
+ md.EndpointResolutionDuration = md.ResolveEndpointEndTime.Sub(md.ResolveEndpointStartTime)
+
+ md.RetryCount = len(md.Attempts) - 1
+
+ latestAttempt, err := md.LatestAttempt()
+
+ if err != nil {
+ fmt.Printf("error retrieving attempts data due to: %s. Skipping Throughput metrics", err.Error())
+ } else {
+
+ md.StatusCode = latestAttempt.StatusCode
+
+ if md.Success == 1 {
+ if latestAttempt.ResponseContentLength > 0 && latestAttempt.ServiceCallDuration > 0 {
+ md.InThroughput = float64(latestAttempt.ResponseContentLength) / latestAttempt.ServiceCallDuration.Seconds()
+ }
+ if md.RequestContentLength > 0 && latestAttempt.ServiceCallDuration > 0 {
+ md.OutThroughput = float64(md.RequestContentLength) / latestAttempt.ServiceCallDuration.Seconds()
+ }
+ }
+ }
+}
+
+// LatestAttempt returns the latest attempt metrics.
+// It returns an error if no attempts are initialized.
+func (md *MetricData) LatestAttempt() (*AttemptMetrics, error) {
+ if md.Attempts == nil || len(md.Attempts) == 0 {
+ return nil, fmt.Errorf("no attempts initialized. NewAttempt() should be called first")
+ }
+ return &md.Attempts[len(md.Attempts)-1], nil
+}
+
+// NewAttempt initializes new attempt metrics.
+func (md *MetricData) NewAttempt() {
+ if md.Attempts == nil {
+ md.Attempts = []AttemptMetrics{}
+ }
+ md.Attempts = append(md.Attempts, AttemptMetrics{})
+}
+
+// SharedConnectionCounter is a counter shared across API calls.
+type SharedConnectionCounter struct {
+ mu sync.Mutex
+
+ activeRequests int
+ pendingConnectionAcquire int
+}
+
+// ActiveRequests returns the count of active requests.
+func (cc *SharedConnectionCounter) ActiveRequests() int {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+
+ return cc.activeRequests
+}
+
+// PendingConnectionAcquire returns the count of pending connection acquires.
+func (cc *SharedConnectionCounter) PendingConnectionAcquire() int {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+
+ return cc.pendingConnectionAcquire
+}
+
+// AddActiveRequest increments the count of active requests.
+func (cc *SharedConnectionCounter) AddActiveRequest() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+
+ cc.activeRequests++
+}
+
+// RemoveActiveRequest decrements the count of active requests.
+func (cc *SharedConnectionCounter) RemoveActiveRequest() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+
+ cc.activeRequests--
+}
+
+// AddPendingConnectionAcquire increments the count of pending connection acquires.
+func (cc *SharedConnectionCounter) AddPendingConnectionAcquire() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+
+ cc.pendingConnectionAcquire++
+}
+
+// RemovePendingConnectionAcquire decrements the count of pending connection acquires.
+func (cc *SharedConnectionCounter) RemovePendingConnectionAcquire() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+
+ cc.pendingConnectionAcquire--
+}
+
+// InitMetricContext initializes the metric context with the provided counter and publisher.
+// It returns the updated context.
+func InitMetricContext(
+ ctx context.Context, counter *SharedConnectionCounter, publisher MetricPublisher,
+) context.Context {
+ if middleware.GetStackValue(ctx, metricContextKey{}) == nil {
+ ctx = middleware.WithStackValue(ctx, metricContextKey{}, &MetricContext{
+ connectionCounter: counter,
+ publisher: publisher,
+ data: &MetricData{
+ Attempts: []AttemptMetrics{},
+ Stream: StreamMetrics{},
+ },
+ })
+ }
+ return ctx
+}
+
+// Context returns the metric context from the given context.
+// It returns nil if the metric context is not found.
+func Context(ctx context.Context) *MetricContext {
+ mctx := middleware.GetStackValue(ctx, metricContextKey{})
+ if mctx == nil {
+ return nil
+ }
+ return mctx.(*MetricContext)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go
new file mode 100644
index 00000000..3f6aaf23
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go
@@ -0,0 +1,94 @@
+package middleware
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "os"
+)
+
+const envAwsLambdaFunctionName = "AWS_LAMBDA_FUNCTION_NAME"
+const envAmznTraceID = "_X_AMZN_TRACE_ID"
+const amznTraceIDHeader = "X-Amzn-Trace-Id"
+
+// AddRecursionDetection adds recursionDetection to the middleware stack
+func AddRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&RecursionDetection{}, middleware.After)
+}
+
+// RecursionDetection detects Lambda environment and sets its X-Ray trace ID to request header if absent
+// to avoid recursion invocation in Lambda
+type RecursionDetection struct{}
+
+// ID returns the middleware identifier
+func (m *RecursionDetection) ID() string {
+ return "RecursionDetection"
+}
+
+// HandleBuild detects Lambda environment and adds its trace ID to request header if absent
+func (m *RecursionDetection) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ _, hasLambdaEnv := os.LookupEnv(envAwsLambdaFunctionName)
+ xAmznTraceID, hasTraceID := os.LookupEnv(envAmznTraceID)
+ value := req.Header.Get(amznTraceIDHeader)
+ // only set the X-Amzn-Trace-Id header when it is not set initially, the
+ // current environment is Lambda and the _X_AMZN_TRACE_ID env variable exists
+ if value != "" || !hasLambdaEnv || !hasTraceID {
+ return next.HandleBuild(ctx, in)
+ }
+
+ req.Header.Set(amznTraceIDHeader, percentEncode(xAmznTraceID))
+ return next.HandleBuild(ctx, in)
+}
+
+func percentEncode(s string) string {
+ upperhex := "0123456789ABCDEF"
+ hexCount := 0
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if shouldEncode(c) {
+ hexCount++
+ }
+ }
+
+ if hexCount == 0 {
+ return s
+ }
+
+ required := len(s) + 2*hexCount
+ t := make([]byte, required)
+ j := 0
+ for i := 0; i < len(s); i++ {
+ if c := s[i]; shouldEncode(c) {
+ t[j] = '%'
+ t[j+1] = upperhex[c>>4]
+ t[j+2] = upperhex[c&15]
+ j += 3
+ } else {
+ t[j] = c
+ j++
+ }
+ }
+ return string(t)
+}
+
+func shouldEncode(c byte) bool {
+ if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' {
+ return false
+ }
+ switch c {
+ case '-', '=', ';', ':', '+', '&', '[', ']', '{', '}', '"', '\'', ',':
+ return false
+ default:
+ return true
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
index 7ce48c61..e7d268c3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
@@ -11,18 +11,22 @@ import (
func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
// add error wrapper middleware before operation deserializers so that it can wrap the error response
// returned by operation deserializers
- return stack.Deserialize.Insert(&requestIDRetriever{}, "OperationDeserializer", middleware.Before)
+ return stack.Deserialize.Insert(&RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
}
-type requestIDRetriever struct {
+// RequestIDRetriever middleware captures the AWS service request ID from the
+// raw response.
+type RequestIDRetriever struct {
}
// ID returns the middleware identifier
-func (m *requestIDRetriever) ID() string {
+func (m *RequestIDRetriever) ID() string {
return "RequestIDRetriever"
}
-func (m *requestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+// HandleDeserialize pulls the AWS request ID from the response, storing it in
+// operation metadata.
+func (m *RequestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
index d5adfec9..db7cda42 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
@@ -59,25 +59,32 @@ func (k SDKAgentKeyType) string() string {
const execEnvVar = `AWS_EXECUTION_ENV`
-// requestUserAgent is a build middleware that set the User-Agent for the request.
-type requestUserAgent struct {
+var validChars = map[rune]bool{
+ '!': true, '#': true, '$': true, '%': true, '&': true, '\'': true, '*': true, '+': true,
+ '-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true,
+}
+
+// RequestUserAgent is a build middleware that set the User-Agent for the request.
+type RequestUserAgent struct {
sdkAgent, userAgent *smithyhttp.UserAgentBuilder
}
-// newRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
+// NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
// request.
//
// User-Agent example:
-// aws-sdk-go-v2/1.2.3
+//
+// aws-sdk-go-v2/1.2.3
//
// X-Amz-User-Agent example:
-// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
-func newRequestUserAgent() *requestUserAgent {
+//
+// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
+func NewRequestUserAgent() *RequestUserAgent {
userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder()
addProductName(userAgent)
addProductName(sdkAgent)
- r := &requestUserAgent{
+ r := &RequestUserAgent{
sdkAgent: sdkAgent,
userAgent: userAgent,
}
@@ -87,7 +94,7 @@ func newRequestUserAgent() *requestUserAgent {
return r
}
-func addSDKMetadata(r *requestUserAgent) {
+func addSDKMetadata(r *RequestUserAgent) {
r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName())
r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion)
r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS)
@@ -155,18 +162,18 @@ func AddRequestUserAgentMiddleware(stack *middleware.Stack) error {
return err
}
-func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error) {
- id := (*requestUserAgent)(nil).ID()
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*RequestUserAgent, error) {
+ id := (*RequestUserAgent)(nil).ID()
bm, ok := stack.Build.Get(id)
if !ok {
- bm = newRequestUserAgent()
+ bm = NewRequestUserAgent()
err := stack.Build.Add(bm, middleware.After)
if err != nil {
return nil, err
}
}
- requestUserAgent, ok := bm.(*requestUserAgent)
+ requestUserAgent, ok := bm.(*RequestUserAgent)
if !ok {
return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id)
}
@@ -175,34 +182,34 @@ func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error
}
// AddUserAgentKey adds the component identified by name to the User-Agent string.
-func (u *requestUserAgent) AddUserAgentKey(key string) {
- u.userAgent.AddKey(key)
+func (u *RequestUserAgent) AddUserAgentKey(key string) {
+ u.userAgent.AddKey(strings.Map(rules, key))
}
// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
-func (u *requestUserAgent) AddUserAgentKeyValue(key, value string) {
- u.userAgent.AddKeyValue(key, value)
+func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string) {
+ u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value))
}
-// AddUserAgentKey adds the component identified by name to the User-Agent string.
-func (u *requestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
+// AddSDKAgentKey adds the component identified by name to the User-Agent string.
+func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
// TODO: should target sdkAgent
- u.userAgent.AddKey(keyType.string() + "/" + key)
+ u.userAgent.AddKey(keyType.string() + "/" + strings.Map(rules, key))
}
-// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
-func (u *requestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) {
+// AddSDKAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
+func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) {
// TODO: should target sdkAgent
- u.userAgent.AddKeyValue(keyType.string()+"/"+key, value)
+ u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value))
}
// ID the name of the middleware.
-func (u *requestUserAgent) ID() string {
+func (u *RequestUserAgent) ID() string {
return "UserAgent"
}
// HandleBuild adds or appends the constructed user agent to the request.
-func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
out middleware.BuildOutput, metadata middleware.Metadata, err error,
) {
switch req := in.Request.(type) {
@@ -217,12 +224,12 @@ func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildI
return next.HandleBuild(ctx, in)
}
-func (u *requestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
+func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
const userAgent = "User-Agent"
updateHTTPHeader(request, userAgent, u.userAgent.Build())
}
-func (u *requestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
+func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
const sdkAgent = "X-Amz-User-Agent"
updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build())
}
@@ -239,3 +246,16 @@ func updateHTTPHeader(request *smithyhttp.Request, header string, value string)
}
request.Header[header] = append(request.Header[header][:0], current)
}
+
+func rules(r rune) rune {
+ switch {
+ case r >= '0' && r <= '9':
+ return r
+ case r >= 'A' && r <= 'Z' || r >= 'a' && r <= 'z':
+ return r
+ case validChars[r]:
+ return r
+ default:
+ return '-'
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
index 46ff9e51..3d87e85d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
@@ -1,3 +1,83 @@
+# v1.6.1 (2024-02-21)
+
+* No change notes available for this release.
+
+# v1.6.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+
+# v1.5.4 (2023-12-07)
+
+* No change notes available for this release.
+
+# v1.5.3 (2023-11-30)
+
+* No change notes available for this release.
+
+# v1.5.2 (2023-11-29)
+
+* No change notes available for this release.
+
+# v1.5.1 (2023-11-15)
+
+* No change notes available for this release.
+
+# v1.5.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+
+# v1.4.14 (2023-10-06)
+
+* No change notes available for this release.
+
+# v1.4.13 (2023-08-18)
+
+* No change notes available for this release.
+
+# v1.4.12 (2023-08-07)
+
+* No change notes available for this release.
+
+# v1.4.11 (2023-07-31)
+
+* No change notes available for this release.
+
+# v1.4.10 (2022-12-02)
+
+* No change notes available for this release.
+
+# v1.4.9 (2022-10-24)
+
+* No change notes available for this release.
+
+# v1.4.8 (2022-09-14)
+
+* No change notes available for this release.
+
+# v1.4.7 (2022-09-02)
+
+* No change notes available for this release.
+
+# v1.4.6 (2022-08-31)
+
+* No change notes available for this release.
+
+# v1.4.5 (2022-08-29)
+
+* No change notes available for this release.
+
+# v1.4.4 (2022-08-09)
+
+* No change notes available for this release.
+
+# v1.4.3 (2022-06-29)
+
+* No change notes available for this release.
+
+# v1.4.2 (2022-06-07)
+
+* No change notes available for this release.
+
# v1.4.1 (2022-03-24)
* No change notes available for this release.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
index bdf01173..e21db4e1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
@@ -3,4 +3,4 @@
package eventstream
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.4.1"
+const goModuleVersion = "1.6.1"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
index 77dd4d8d..47ebc0f5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
@@ -9,9 +9,9 @@ import (
// representation of a list of values of a fixed type. A serialized array might
// look like the following:
//
-// ListName.member.1=foo
-// &ListName.member.2=bar
-// &Listname.member.3=baz
+// ListName.member.1=foo
+// &ListName.member.2=bar
+// &Listname.member.3=baz
type Array struct {
// The query values to add the array to.
values url.Values
@@ -36,20 +36,31 @@ type Array struct {
memberName string
// Elements are stored in values, so we keep track of the list size here.
size int32
+ // Empty lists are encoded as "=", if we add a value later we will
+ // remove this encoding
+ emptyValue Value
}
func newArray(values url.Values, prefix string, flat bool, memberName string) *Array {
+ emptyValue := newValue(values, prefix, flat)
+ emptyValue.String("")
+
return &Array{
values: values,
prefix: prefix,
flat: flat,
memberName: memberName,
+ emptyValue: emptyValue,
}
}
// Value adds a new element to the Query Array. Returns a Value type used to
// encode the array element.
func (a *Array) Value() Value {
+ if a.size == 0 {
+ delete(a.values, a.emptyValue.key)
+ }
+
// Query lists start a 1, so adjust the size first
a.size++
prefix := a.prefix
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
index ab91e357..dea242b8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
@@ -11,10 +11,10 @@ import (
// the values must all be of the same type, and that map entries are ordered.
// A serialized map might look like the following:
//
-// MapName.entry.1.key=Foo
-// &MapName.entry.1.value=spam
-// &MapName.entry.2.key=Bar
-// &MapName.entry.2.value=eggs
+// MapName.entry.1.key=Foo
+// &MapName.entry.1.value=spam
+// &MapName.entry.2.key=Bar
+// &MapName.entry.2.value=eggs
type Map struct {
// The query values to add the map to.
values url.Values
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
index debb413d..455b9251 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
@@ -10,8 +10,8 @@ import (
// values where there is a fixed set of keys whose values each have their
// own known type. A serialized object might look like the following:
//
-// ObjectName.Foo=value
-// &ObjectName.Bar=5
+// ObjectName.Foo=value
+// &ObjectName.Bar=5
type Object struct {
// The query values to add the object to.
values url.Values
@@ -41,6 +41,12 @@ func (o *Object) Key(name string) Value {
return o.key(name, false)
}
+// KeyWithValues adds the given named key to the Query object.
+// Returns a Value encoder that should be used to encode a Query list of values.
+func (o *Object) KeyWithValues(name string) Value {
+ return o.keyWithValues(name, false)
+}
+
// FlatKey adds the given named key to the Query object.
// Returns a Value encoder that should be used to encode a Query value type. The
// value will be flattened if it is a map or array.
@@ -54,3 +60,10 @@ func (o *Object) key(name string, flatValue bool) Value {
}
return newValue(o.values, name, flatValue)
}
+
+func (o *Object) keyWithValues(name string, flatValue bool) Value {
+ if o.prefix != "" {
+ return newAppendValue(o.values, fmt.Sprintf("%s.%s", o.prefix, name), flatValue)
+ }
+ return newAppendValue(o.values, name, flatValue)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
index 302525ab..a9251521 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
@@ -27,6 +27,15 @@ func newValue(values url.Values, key string, flat bool) Value {
}
}
+func newAppendValue(values url.Values, key string, flat bool) Value {
+ return Value{
+ values: values,
+ key: key,
+ flat: flat,
+ queryValue: httpbinding.NewQueryValue(values, key, true),
+ }
+}
+
func newBaseValue(values url.Values) Value {
return Value{
values: values,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
index c228f7d8..6975ce65 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
@@ -21,26 +21,18 @@ func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorCompone
if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
}
- return ErrorComponents{
- Code: errResponse.Code,
- Message: errResponse.Message,
- RequestID: errResponse.RequestID,
- }, nil
+ return ErrorComponents(errResponse), nil
}
var errResponse wrappedErrorResponse
if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
}
- return ErrorComponents{
- Code: errResponse.Code,
- Message: errResponse.Message,
- RequestID: errResponse.RequestID,
- }, nil
+ return ErrorComponents(errResponse), nil
}
// noWrappedErrorResponse represents the error response body with
-// no internal ...
+// wrapped within Error
type wrappedErrorResponse struct {
Code string `xml:"Error>Code"`
Message string `xml:"Error>Message"`
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
index 12a3f0c4..d89090ad 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
@@ -30,10 +30,6 @@ func NewTokenRateLimit(tokens uint) *TokenRateLimit {
}
}
-func isTimeoutError(error) bool {
- return false
-}
-
type canceledError struct {
Err error
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go
index b9fce01d..4dfde857 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go
@@ -93,7 +93,7 @@ func (a *AdaptiveMode) IsErrorRetryable(err error) bool {
}
// MaxAttempts returns the maximum number of attempts that can be made for
-// a attempt before failing. A value of 0 implies that the attempt should
+// an attempt before failing. A value of 0 implies that the attempt should
// be retried until it succeeds if the errors are retryable.
func (a *AdaptiveMode) MaxAttempts() int {
return a.retryer.MaxAttempts()
@@ -127,7 +127,7 @@ func (a *AdaptiveMode) GetInitialToken() (releaseToken func(error) error) {
// GetAttemptToken returns the attempt token that can be used to rate limit
// attempt calls. Will be used by the SDK's retry package's Attempt
-// middleware to get a attempt token prior to calling the temp and releasing
+// middleware to get an attempt token prior to calling the temp and releasing
// the attempt token after the attempt has been made.
func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, error) {
for {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
index 42ced06e..3a08ebe0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
@@ -1,12 +1,12 @@
// Package retry provides interfaces and implementations for SDK request retry behavior.
//
-// Retryer Interface and Implementations
+// # Retryer Interface and Implementations
//
-// This packages defines Retryer interface that is used to either implement custom retry behavior
-// or to extend the existing retry implementations provided by the SDK. This packages provides a single
-// retry implementations: Standard.
+// This package defines Retryer interface that is used to either implement custom retry behavior
+// or to extend the existing retry implementations provided by the SDK. This package provides a single
+// retry implementation: Standard.
//
-// Standard
+// # Standard
//
// Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited
// retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs.
@@ -15,66 +15,66 @@
//
// By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether
// a given error is retryable. By default this list of retryables includes the following:
-// - Retrying errors that implement the RetryableError method, and return true.
-// - Connection Errors
-// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true.
-// - Connection Reset Errors.
-// - net.OpErr types that are dialing errors or are temporary.
-// - HTTP Status Codes: 500, 502, 503, and 504.
-// - API Error Codes
-// - RequestTimeout, RequestTimeoutException
-// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException,
-// RequestThrottled, SlowDown, EC2ThrottledException
-// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException
-// - TransactionInProgressException, PriorRequestNotComplete
+// - Retrying errors that implement the RetryableError method, and return true.
+// - Connection Errors
+// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true.
+// - Connection Reset Errors.
+// - net.OpErr types that are dialing errors or are temporary.
+// - HTTP Status Codes: 500, 502, 503, and 504.
+// - API Error Codes
+// - RequestTimeout, RequestTimeoutException
+// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException,
+// RequestThrottled, SlowDown, EC2ThrottledException
+// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException
+// - TransactionInProgressException, PriorRequestNotComplete
//
// The standard retryer will not retry a request in the event if the context associated with the request
// has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context
// value.
//
// You can configure the standard retryer implementation to fit your applications by constructing a standard retryer
-// using the NewStandard function, and providing one more functional arguments that mutate the StandardOptions
+// using the NewStandard function, and providing one more functional argument that mutate the StandardOptions
// structure. StandardOptions provides the ability to modify the token bucket rate limiter, retryable error conditions,
// and the retry delay policy.
//
// For example to modify the default retry attempts for the standard retryer:
//
-// // configure the custom retryer
-// customRetry := retry.NewStandard(func(o *retry.StandardOptions) {
-// o.MaxAttempts = 5
-// })
+// // configure the custom retryer
+// customRetry := retry.NewStandard(func(o *retry.StandardOptions) {
+// o.MaxAttempts = 5
+// })
//
-// // create a service client with the retryer
-// s3.NewFromConfig(cfg, func(o *s3.Options) {
-// o.Retryer = customRetry
-// })
+// // create a service client with the retryer
+// s3.NewFromConfig(cfg, func(o *s3.Options) {
+// o.Retryer = customRetry
+// })
//
-// Utilities
+// # Utilities
//
// A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic
// way. These are:
//
-// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable
-// in addition to those considered retryable by the provided retryer.
+// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable
+// in addition to those considered retryable by the provided retryer.
//
-// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping
-// a retryer implementation.
+// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping
+// a retryer implementation.
//
-// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a
-// request by wrapping a retryer implementation.
+// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a
+// request by wrapping a retryer implementation.
//
// The following package functions have been provided to easily satisfy different retry interfaces to further customize
// a given retryer's behavior:
//
-// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example,
-// you can use this method to easily create custom back off policies to be used with the
-// standard retryer.
+// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example,
+// you can use this method to easily create custom back off policies to be used with the
+// standard retryer.
//
-// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example,
-// this can be used to extend the standard retryer to add additional logic ot determine if a
-// error should be retried.
+// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example,
+// this can be used to extend the standard retryer to add additional logic to determine if an
+// error should be retried.
//
-// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example,
-// this can be used to extend the standard retryer to add additional logic to determine if an
-// error should be considered a timeout.
+// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example,
+// this can be used to extend the standard retryer to add additional logic to determine if an
+// error should be considered a timeout.
package retry
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
index 926f5f5e..dc703d48 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
@@ -3,6 +3,7 @@ package retry
import (
"context"
"fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
"strconv"
"strings"
"time"
@@ -11,7 +12,6 @@ import (
awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/internal/sdk"
"github.com/aws/smithy-go/logging"
- "github.com/aws/smithy-go/middleware"
smithymiddle "github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/transport/http"
)
@@ -90,7 +90,7 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next)
attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata)
- // AttempResult Retried states that the attempt was not successful, and
+ // AttemptResult Retried states that the attempt was not successful, and
// should be retried.
shouldRetry := attemptResult.Retried
@@ -226,6 +226,13 @@ func (r *Attempt) handleAttempt(
// that time. Potentially early exist if the sleep is canceled via the
// context.
retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err)
+ mctx := metrics.Context(ctx)
+ if mctx != nil {
+ attempt, err := mctx.Data().LatestAttempt()
+ if err != nil {
+ attempt.RetryDelay = retryDelay
+ }
+ }
if reqErr != nil {
return out, attemptResult, releaseRetryToken, reqErr
}
@@ -292,7 +299,7 @@ type retryMetadataKey struct{}
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) {
- metadata, ok = middleware.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata)
+ metadata, ok = smithymiddle.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata)
return metadata, ok
}
@@ -301,7 +308,7 @@ func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) {
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
func setRetryMetadata(ctx context.Context, metadata retryMetadata) context.Context {
- return middleware.WithStackValue(ctx, retryMetadataKey{}, metadata)
+ return smithymiddle.WithStackValue(ctx, retryMetadataKey{}, metadata)
}
// AddRetryMiddlewaresOptions is the set of options that can be passed to
@@ -321,10 +328,12 @@ func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresO
middleware.LogAttempts = options.LogRetryAttempts
})
- if err := stack.Finalize.Add(attempt, smithymiddle.After); err != nil {
+ // index retry to before signing, if signing exists
+ if err := stack.Finalize.Insert(attempt, "Signing", smithymiddle.Before); err != nil {
return err
}
- if err := stack.Finalize.Add(&MetricsHeader{}, smithymiddle.After); err != nil {
+
+ if err := stack.Finalize.Insert(&MetricsHeader{}, attempt.ID(), smithymiddle.After); err != nil {
return err
}
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
index c695e6fe..987affdd 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
@@ -95,6 +95,21 @@ func (r RetryableConnectionError) IsErrorRetryable(err error) aws.Ternary {
var timeoutErr interface{ Timeout() bool }
var urlErr *url.Error
var netOpErr *net.OpError
+ var dnsError *net.DNSError
+
+ if errors.As(err, &dnsError) {
+ // NXDOMAIN errors should not be retried
+ if dnsError.IsNotFound {
+ return aws.BoolTernary(false)
+ }
+
+ // if !dnsError.Temporary(), error may or may not be temporary,
+ // (i.e. !Temporary() =/=> !retryable) so we should fall through to
+ // remaining checks
+ if dnsError.Temporary() {
+ return aws.BoolTernary(true)
+ }
+ }
switch {
case errors.As(err, &conErr) && conErr.ConnectionError():
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
index 1e378f86..b0ba4cb2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
@@ -49,12 +49,12 @@ type Retryer interface {
IsErrorRetryable(error) bool
// MaxAttempts returns the maximum number of attempts that can be made for
- // a attempt before failing. A value of 0 implies that the attempt should
+ // an attempt before failing. A value of 0 implies that the attempt should
// be retried until it succeeds if the errors are retryable.
MaxAttempts() int
// RetryDelay returns the delay that should be used before retrying the
- // attempt. Will return error if the if the delay could not be determined.
+ // attempt. Will return error if the delay could not be determined.
RetryDelay(attempt int, opErr error) (time.Duration, error)
// GetRetryToken attempts to deduct the retry cost from the retry token pool.
@@ -66,7 +66,7 @@ type Retryer interface {
GetInitialToken() (releaseToken func(error) error)
}
-// RetryerV2 is an interface to determine if a given error from a attempt
+// RetryerV2 is an interface to determine if a given error from an attempt
// should be retried, and if so what backoff delay to apply. The default
// implementation used by most services is the retry package's Standard type.
// Which contains basic retry logic using exponential backoff.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
index 85a1d8f0..ca738f23 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
@@ -7,6 +7,7 @@ var IgnoredHeaders = Rules{
"Authorization": struct{}{},
"User-Agent": struct{}{},
"X-Amzn-Trace-Id": struct{}{},
+ "Expect": struct{}{},
},
},
}
@@ -37,6 +38,7 @@ var RequiredSignedHeaders = Rules{
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
+ "X-Amz-Expected-Bucket-Owner": struct{}{},
"X-Amz-Grant-Full-control": struct{}{},
"X-Amz-Grant-Read": struct{}{},
"X-Amz-Grant-Read-Acp": struct{}{},
@@ -47,6 +49,7 @@ var RequiredSignedHeaders = Rules{
"X-Amz-Request-Payer": struct{}{},
"X-Amz-Server-Side-Encryption": struct{}{},
"X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{},
+ "X-Amz-Server-Side-Encryption-Context": struct{}{},
"X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{},
"X-Amz-Server-Side-Encryption-Customer-Key": struct{}{},
"X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
index 0cb9cffa..d025dbaa 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
@@ -46,19 +46,35 @@ func StripExcessSpaces(str string) string {
return string(buf[:m])
}
-// GetURIPath returns the escaped URI component from the provided URL
+// GetURIPath returns the escaped URI component from the provided URL.
func GetURIPath(u *url.URL) string {
- var uri string
+ var uriPath string
if len(u.Opaque) > 0 {
- uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/")
+ const schemeSep, pathSep, queryStart = "//", "/", "?"
+
+ opaque := u.Opaque
+ // Cut off the query string if present.
+ if idx := strings.Index(opaque, queryStart); idx >= 0 {
+ opaque = opaque[:idx]
+ }
+
+ // Cutout the scheme separator if present.
+ if strings.Index(opaque, schemeSep) == 0 {
+ opaque = opaque[len(schemeSep):]
+ }
+
+ // capture URI path starting with first path separator.
+ if idx := strings.Index(opaque, pathSep); idx >= 0 {
+ uriPath = opaque[idx:]
+ }
} else {
- uri = u.EscapedPath()
+ uriPath = u.EscapedPath()
}
- if len(uri) == 0 {
- uri = "/"
+ if len(uriPath) == 0 {
+ uriPath = "/"
}
- return uri
+ return uriPath
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
index 3f3bcf45..febeb048 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
@@ -11,7 +11,9 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
"github.com/aws/aws-sdk-go-v2/internal/sdk"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
@@ -57,7 +59,7 @@ func (e *SigningError) Unwrap() error {
// S3 PutObject API allows unsigned payload signing auth usage when TLS is enabled, and uses this middleware to
// dynamically switch between unsigned and signed payload based on TLS state for request.
func UseDynamicPayloadSigningMiddleware(stack *middleware.Stack) error {
- _, err := stack.Build.Swap(computePayloadHashMiddlewareID, &dynamicPayloadSigningMiddleware{})
+ _, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &dynamicPayloadSigningMiddleware{})
return err
}
@@ -70,27 +72,25 @@ func (m *dynamicPayloadSigningMiddleware) ID() string {
return computePayloadHashMiddlewareID
}
-// HandleBuild sets a resolver that directs to the payload sha256 compute handler.
-func (m *dynamicPayloadSigningMiddleware) HandleBuild(
- ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+// HandleFinalize delegates SHA256 computation according to whether the request
+// is TLS-enabled.
+func (m *dynamicPayloadSigningMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
}
- // if TLS is enabled, use unsigned payload when supported
- if strings.EqualFold(req.URL.Scheme, "https") {
- return (&unsignedPayload{}).HandleBuild(ctx, in, next)
+ if req.IsHTTPS() {
+ return (&UnsignedPayload{}).HandleFinalize(ctx, in, next)
}
-
- // else fall back to signed payload
- return (&computePayloadSHA256{}).HandleBuild(ctx, in, next)
+ return (&ComputePayloadSHA256{}).HandleFinalize(ctx, in, next)
}
-// unsignedPayload sets the SigV4 request payload hash to unsigned.
+// UnsignedPayload sets the SigV4 request payload hash to unsigned.
//
// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
// stored in the context. (e.g. application pre-computed SHA256 before making
@@ -98,39 +98,32 @@ func (m *dynamicPayloadSigningMiddleware) HandleBuild(
//
// This middleware does not check the X-Amz-Content-Sha256 header, if that
// header is serialized a middleware must translate it into the context.
-type unsignedPayload struct{}
+type UnsignedPayload struct{}
// AddUnsignedPayloadMiddleware adds unsignedPayload to the operation
// middleware stack
func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error {
- return stack.Build.Add(&unsignedPayload{}, middleware.After)
+ return stack.Finalize.Insert(&UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
}
// ID returns the unsignedPayload identifier
-func (m *unsignedPayload) ID() string {
+func (m *UnsignedPayload) ID() string {
return computePayloadHashMiddlewareID
}
-// HandleBuild sets the payload hash to be an unsigned payload
-func (m *unsignedPayload) HandleBuild(
- ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+// HandleFinalize sets the payload hash magic value to the unsigned sentinel.
+func (m *UnsignedPayload) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
- // This should not compute the content SHA256 if the value is already
- // known. (e.g. application pre-computed SHA256 before making API call).
- // Does not have any tight coupling to the X-Amz-Content-Sha256 header, if
- // that header is provided a middleware must translate it into the context.
- contentSHA := GetPayloadHash(ctx)
- if len(contentSHA) == 0 {
- contentSHA = v4Internal.UnsignedPayload
+ if GetPayloadHash(ctx) == "" {
+ ctx = SetPayloadHash(ctx, v4Internal.UnsignedPayload)
}
-
- ctx = SetPayloadHash(ctx, contentSHA)
- return next.HandleBuild(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
-// computePayloadSHA256 computes SHA256 payload hash to sign.
+// ComputePayloadSHA256 computes SHA256 payload hash to sign.
//
// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
// stored in the context. (e.g. application pre-computed SHA256 before making
@@ -138,32 +131,37 @@ func (m *unsignedPayload) HandleBuild(
//
// This middleware does not check the X-Amz-Content-Sha256 header, if that
// header is serialized a middleware must translate it into the context.
-type computePayloadSHA256 struct{}
+type ComputePayloadSHA256 struct{}
// AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the
// operation middleware stack
func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error {
- return stack.Build.Add(&computePayloadSHA256{}, middleware.After)
+ return stack.Finalize.Insert(&ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
}
// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the
// operation middleware stack
func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error {
- _, err := stack.Build.Remove(computePayloadHashMiddlewareID)
+ _, err := stack.Finalize.Remove(computePayloadHashMiddlewareID)
return err
}
// ID is the middleware name
-func (m *computePayloadSHA256) ID() string {
+func (m *ComputePayloadSHA256) ID() string {
return computePayloadHashMiddlewareID
}
-// HandleBuild compute the payload hash for the request payload
-func (m *computePayloadSHA256) HandleBuild(
- ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+// HandleFinalize computes the payload hash for the request, storing it to the
+// context. This is a no-op if a caller has previously set that value.
+func (m *ComputePayloadSHA256) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
+ if GetPayloadHash(ctx) != "" {
+ return next.HandleFinalize(ctx, in)
+ }
+
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &HashComputationError{
@@ -171,14 +169,6 @@ func (m *computePayloadSHA256) HandleBuild(
}
}
- // This should not compute the content SHA256 if the value is already
- // known. (e.g. application pre-computed SHA256 before making API call)
- // Does not have any tight coupling to the X-Amz-Content-Sha256 header, if
- // that header is provided a middleware must translate it into the context.
- if contentSHA := GetPayloadHash(ctx); len(contentSHA) != 0 {
- return next.HandleBuild(ctx, in)
- }
-
hash := sha256.New()
if stream := req.GetStream(); stream != nil {
_, err = io.Copy(hash, stream)
@@ -197,7 +187,7 @@ func (m *computePayloadSHA256) HandleBuild(
ctx = SetPayloadHash(ctx, hex.EncodeToString(hash.Sum(nil)))
- return next.HandleBuild(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
// SwapComputePayloadSHA256ForUnsignedPayloadMiddleware replaces the
@@ -206,38 +196,38 @@ func (m *computePayloadSHA256) HandleBuild(
// Use this to disable computing the Payload SHA256 checksum and instead use
// UNSIGNED-PAYLOAD for the SHA256 value.
func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error {
- _, err := stack.Build.Swap(computePayloadHashMiddlewareID, &unsignedPayload{})
+ _, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &UnsignedPayload{})
return err
}
-// contentSHA256Header sets the X-Amz-Content-Sha256 header value to
+// ContentSHA256Header sets the X-Amz-Content-Sha256 header value to
// the Payload hash stored in the context.
-type contentSHA256Header struct{}
+type ContentSHA256Header struct{}
// AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the
// operation middleware stack
func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
- return stack.Build.Insert(&contentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
+ return stack.Finalize.Insert(&ContentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
}
// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware
// from the operation middleware stack
func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
- _, err := stack.Build.Remove((*contentSHA256Header)(nil).ID())
+ _, err := stack.Finalize.Remove((*ContentSHA256Header)(nil).ID())
return err
}
// ID returns the ContentSHA256HeaderMiddleware identifier
-func (m *contentSHA256Header) ID() string {
+func (m *ContentSHA256Header) ID() string {
return "SigV4ContentSHA256Header"
}
-// HandleBuild sets the X-Amz-Content-Sha256 header value to the Payload hash
+// HandleFinalize sets the X-Amz-Content-Sha256 header value to the Payload hash
// stored in the context.
-func (m *contentSHA256Header) HandleBuild(
- ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+func (m *ContentSHA256Header) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
@@ -245,25 +235,35 @@ func (m *contentSHA256Header) HandleBuild(
}
req.Header.Set(v4Internal.ContentSHAKey, GetPayloadHash(ctx))
-
- return next.HandleBuild(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
-// SignHTTPRequestMiddlewareOptions is the configuration options for the SignHTTPRequestMiddleware middleware.
+// SignHTTPRequestMiddlewareOptions is the configuration options for
+// [SignHTTPRequestMiddleware].
+//
+// Deprecated: [SignHTTPRequestMiddleware] is deprecated.
type SignHTTPRequestMiddlewareOptions struct {
CredentialsProvider aws.CredentialsProvider
Signer HTTPSigner
LogSigning bool
}
-// SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation for SigV4 HTTP Signing
+// SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation for SigV4
+// HTTP Signing.
+//
+// Deprecated: AWS service clients no longer use this middleware. Signing as an
+// SDK operation is now performed through an internal per-service middleware
+// which opaquely selects and uses the signer from the resolved auth scheme.
type SignHTTPRequestMiddleware struct {
credentialsProvider aws.CredentialsProvider
signer HTTPSigner
logSigning bool
}
-// NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given Signer for signing requests
+// NewSignHTTPRequestMiddleware constructs a [SignHTTPRequestMiddleware] using
+// the given [Signer] for signing requests.
+//
+// Deprecated: SignHTTPRequestMiddleware is deprecated.
func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware {
return &SignHTTPRequestMiddleware{
credentialsProvider: options.CredentialsProvider,
@@ -272,12 +272,17 @@ func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *Sig
}
}
-// ID is the SignHTTPRequestMiddleware identifier
+// ID is the SignHTTPRequestMiddleware identifier.
+//
+// Deprecated: SignHTTPRequestMiddleware is deprecated.
func (s *SignHTTPRequestMiddleware) ID() string {
return "Signing"
}
-// HandleFinalize will take the provided input and sign the request using the SigV4 authentication scheme
+// HandleFinalize will take the provided input and sign the request using the
+// SigV4 authentication scheme.
+//
+// Deprecated: SignHTTPRequestMiddleware is deprecated.
func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
@@ -296,16 +301,56 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")}
}
+ mctx := metrics.Context(ctx)
+
+ if mctx != nil {
+ if attempt, err := mctx.Data().LatestAttempt(); err == nil {
+ attempt.CredentialFetchStartTime = sdk.NowTime()
+ }
+ }
+
credentials, err := s.credentialsProvider.Retrieve(ctx)
+
+ if mctx != nil {
+ if attempt, err := mctx.Data().LatestAttempt(); err == nil {
+ attempt.CredentialFetchEndTime = sdk.NowTime()
+ }
+ }
+
if err != nil {
return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
}
- err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(),
+ signerOptions := []func(o *SignerOptions){
func(o *SignerOptions) {
o.Logger = middleware.GetLogger(ctx)
o.LogSigning = s.logSigning
+ },
+ }
+
+ // existing DisableURIPathEscaping is equivalent in purpose
+ // to authentication scheme property DisableDoubleEncoding
+ disableDoubleEncoding, overridden := internalauth.GetDisableDoubleEncoding(ctx)
+ if overridden {
+ signerOptions = append(signerOptions, func(o *SignerOptions) {
+ o.DisableURIPathEscaping = disableDoubleEncoding
})
+ }
+
+ if mctx != nil {
+ if attempt, err := mctx.Data().LatestAttempt(); err == nil {
+ attempt.SignStartTime = sdk.NowTime()
+ }
+ }
+
+ err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(), signerOptions...)
+
+ if mctx != nil {
+ if attempt, err := mctx.Data().LatestAttempt(); err == nil {
+ attempt.SignEndTime = sdk.NowTime()
+ }
+ }
+
if err != nil {
return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
}
@@ -315,21 +360,24 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
return next.HandleFinalize(ctx, in)
}
-type streamingEventsPayload struct{}
+// StreamingEventsPayload signs input event stream messages.
+type StreamingEventsPayload struct{}
// AddStreamingEventsPayload adds the streamingEventsPayload middleware to the stack.
func AddStreamingEventsPayload(stack *middleware.Stack) error {
- return stack.Build.Add(&streamingEventsPayload{}, middleware.After)
+ return stack.Finalize.Add(&StreamingEventsPayload{}, middleware.Before)
}
-func (s *streamingEventsPayload) ID() string {
+// ID identifies the middleware.
+func (s *StreamingEventsPayload) ID() string {
return computePayloadHashMiddlewareID
}
-func (s *streamingEventsPayload) HandleBuild(
- ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+// HandleFinalize marks the input stream to be signed with SigV4.
+func (s *StreamingEventsPayload) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
contentSHA := GetPayloadHash(ctx)
if len(contentSHA) == 0 {
@@ -338,7 +386,7 @@ func (s *streamingEventsPayload) HandleBuild(
ctx = SetPayloadHash(ctx, contentSHA)
- return next.HandleBuild(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
// GetSignedRequestSignature attempts to extract the signature of the request.
@@ -371,13 +419,8 @@ func haveCredentialProvider(p aws.CredentialsProvider) bool {
if p == nil {
return false
}
- switch p.(type) {
- case aws.AnonymousCredentials,
- *aws.AnonymousCredentials:
- return false
- }
- return true
+ return !aws.IsCredentialsProvider(p, (*aws.AnonymousCredentials)(nil))
}
type payloadHashKey struct{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
index 06ba7773..bb61904e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
@@ -3,20 +3,22 @@
// Provides request signing for request that need to be signed with
// AWS V4 Signatures.
//
-// Standalone Signer
+// # Standalone Signer
//
// Generally using the signer outside of the SDK should not require any additional
-// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
+//
+// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
+//
// additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent
// to the service as.
//
// The signer will first check the URL.Opaque field, and use its value if set.
// The signer does require the URL.Opaque field to be set in the form of:
//
-// "///"
+// "///"
//
-// // e.g.
-// "//example.com/some/path"
+// // e.g.
+// "//example.com/some/path"
//
// The leading "//" and hostname are required or the URL.Opaque escaping will
// not work correctly.
@@ -66,6 +68,9 @@ import (
const (
signingAlgorithm = "AWS4-HMAC-SHA256"
authorizationHeader = "Authorization"
+
+ // Version of signing v4
+ Version = "SigV4"
)
// HTTPSigner is an interface to a SigV4 signer that can sign HTTP requests
@@ -101,6 +106,11 @@ type SignerOptions struct {
// This will enable logging of the canonical request, the string to sign, and for presigning the subsequent
// presigned URL.
LogSigning bool
+
+ // Disables setting the session token on the request as part of signing
+ // through X-Amz-Security-Token. This is needed for variations of v4 that
+ // present the token elsewhere.
+ DisableSessionToken bool
}
// Signer applies AWS v4 signing to given request. Use this to sign requests
@@ -134,6 +144,7 @@ type httpSigner struct {
DisableHeaderHoisting bool
DisableURIPathEscaping bool
+ DisableSessionToken bool
}
func (s *httpSigner) Build() (signedRequest, error) {
@@ -252,7 +263,7 @@ func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature
// request has no payload you should use the hex encoded SHA-256 of an empty
// string as the payloadHash value.
//
-// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
//
// Some services such as Amazon S3 accept alternative values for the payload
// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
@@ -282,6 +293,7 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht
Time: v4Internal.NewSigningTime(signingTime.UTC()),
DisableHeaderHoisting: options.DisableHeaderHoisting,
DisableURIPathEscaping: options.DisableURIPathEscaping,
+ DisableSessionToken: options.DisableSessionToken,
KeyDerivator: s.keyDerivator,
}
@@ -311,7 +323,7 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht
// request has no payload you should use the hex encoded SHA-256 of an empty
// string as the payloadHash value.
//
-// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
//
// Some services such as Amazon S3 accept alternative values for the payload
// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
@@ -331,10 +343,10 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht
// parameter is not used by all AWS services, and is most notable used by
// Amazon S3 APIs.
//
-// expires := 20 * time.Minute
-// query := req.URL.Query()
-// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10)
-// req.URL.RawQuery = query.Encode()
+// expires := 20 * time.Minute
+// query := req.URL.Query()
+// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10))
+// req.URL.RawQuery = query.Encode()
//
// This method does not modify the provided request.
func (s *Signer) PresignHTTP(
@@ -358,6 +370,7 @@ func (s *Signer) PresignHTTP(
IsPreSign: true,
DisableHeaderHoisting: options.DisableHeaderHoisting,
DisableURIPathEscaping: options.DisableURIPathEscaping,
+ DisableSessionToken: options.DisableSessionToken,
KeyDerivator: s.keyDerivator,
}
@@ -407,8 +420,8 @@ func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, he
headers = append(headers, hostHeader)
signed[hostHeader] = append(signed[hostHeader], host)
+ const contentLengthHeader = "content-length"
if length > 0 {
- const contentLengthHeader = "content-length"
headers = append(headers, contentLengthHeader)
signed[contentLengthHeader] = append(signed[contentLengthHeader], strconv.FormatInt(length, 10))
}
@@ -417,6 +430,10 @@ func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, he
if !rule.IsValid(k) {
continue // ignored header
}
+ if strings.EqualFold(k, contentLengthHeader) {
+ // prevent signing already handled content-length header.
+ continue
+ }
lowerCaseKey := strings.ToLower(k)
if _, ok := signed[lowerCaseKey]; ok {
@@ -496,7 +513,8 @@ func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Val
if s.IsPreSign {
query.Set(v4Internal.AmzAlgorithmKey, signingAlgorithm)
- if sessionToken := s.Credentials.SessionToken; len(sessionToken) > 0 {
+ sessionToken := s.Credentials.SessionToken
+ if !s.DisableSessionToken && len(sessionToken) > 0 {
query.Set("X-Amz-Security-Token", sessionToken)
}
@@ -506,7 +524,7 @@ func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Val
headers[v4Internal.AmzDateKey] = append(headers[v4Internal.AmzDateKey][:0], amzDate)
- if len(s.Credentials.SessionToken) > 0 {
+ if !s.DisableSessionToken && len(s.Credentials.SessionToken) > 0 {
headers[v4Internal.AmzSecurityTokenKey] = append(headers[v4Internal.AmzSecurityTokenKey][:0], s.Credentials.SessionToken)
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
index 8fd14cec..a1ad20fe 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
@@ -12,18 +12,20 @@ import (
func AddResponseErrorMiddleware(stack *middleware.Stack) error {
// add error wrapper middleware before request id retriever middleware so that it can wrap the error response
// returned by operation deserializers
- return stack.Deserialize.Insert(&responseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+ return stack.Deserialize.Insert(&ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
}
-type responseErrorWrapper struct {
+// ResponseErrorWrapper wraps operation errors with ResponseError.
+type ResponseErrorWrapper struct {
}
// ID returns the middleware identifier
-func (m *responseErrorWrapper) ID() string {
+func (m *ResponseErrorWrapper) ID() string {
return "ResponseErrorWrapper"
}
-func (m *responseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+// HandleDeserialize wraps the stack error with smithyhttp.ResponseError.
+func (m *ResponseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml b/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml
deleted file mode 100644
index b11df508..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-version: 0.2
-
-phases:
- build:
- commands:
- - echo Build started on `date`
- - export GOPATH=/go
- - export SDK_CODEBUILD_ROOT=`pwd`
- - make ci-test-no-generate
- post_build:
- commands:
- - echo Build completed on `date`
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
index b8a779e1..1f37d5f2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
@@ -1,3 +1,468 @@
+# v1.27.7 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.6 (2024-03-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.5 (2024-03-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.4 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.3 (2024-02-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.2 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.1 (2024-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.6 (2024-01-22)
+
+* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.5 (2024-01-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.4 (2024-01-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.3 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.2 (2023-12-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.1 (2023-12-08)
+
+* **Bug Fix**: Correct loading of [services *] sections into shared config.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.0 (2023-12-07)
+
+* **Feature**: Support modeled request compression. The only algorithm supported at this time is `gzip`.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.12 (2023-12-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.11 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.10 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.9 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.8 (2023-11-28.3)
+
+* **Bug Fix**: Correct resolution of S3Express auth disable toggle.
+
+# v1.25.7 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.6 (2023-11-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.5 (2023-11-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.3 (2023-11-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.2 (2023-11-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.1 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.0 (2023-11-14)
+
+* **Feature**: Add support for dynamic auth token from file and EKS container host in absolute/relative URIs in the HTTP credential provider.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.0 (2023-11-13)
+
+* **Feature**: Replace the legacy config parser with a modern, less-strict implementation. Parsing failures within a section will now simply ignore the invalid line rather than silently drop the entire section.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.0 (2023-11-09.2)
+
+* **Feature**: BREAKFIX: In order to support subproperty parsing, invalid property definitions must not be ignored
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.22.3 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.22.2 (2023-11-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.22.1 (2023-11-06)
+
+* No change notes available for this release.
+
+# v1.22.0 (2023-11-02)
+
+* **Feature**: Add env and shared config settings for disabling IMDSv1 fallback.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.1 (2023-10-24)
+
+* No change notes available for this release.
+
+# v1.19.0 (2023-10-16)
+
+* **Feature**: Modify logic of retrieving user agent appID from env config
+
+# v1.18.45 (2023-10-12)
+
+* **Bug Fix**: Fail to load config if an explicitly provided profile doesn't exist.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.44 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.43 (2023-10-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.42 (2023-09-22)
+
+* **Bug Fix**: Fixed a bug where merging `max_attempts` or `duration_seconds` fields across shared config files with invalid values would silently default them to 0.
+* **Bug Fix**: Move type assertion of config values out of the parsing stage, which resolves an issue where the contents of a profile would silently be dropped with certain numeric formats.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.41 (2023-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.40 (2023-09-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.39 (2023-09-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.38 (2023-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.37 (2023-08-23)
+
+* No change notes available for this release.
+
+# v1.18.36 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.35 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.34 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.33 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.32 (2023-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.31 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.30 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.29 (2023-07-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.28 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.27 (2023-06-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.26 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.25 (2023-05-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.24 (2023-05-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.23 (2023-05-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.22 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.21 (2023-04-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.20 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.19 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.18 (2023-03-16)
+
+* **Bug Fix**: Allow RoleARN to be set as functional option on STS WebIdentityRoleOptions. Fixes aws/aws-sdk-go-v2#2015.
+
+# v1.18.17 (2023-03-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.16 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.15 (2023-02-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.14 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.13 (2023-02-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.12 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.11 (2023-02-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.10 (2023-01-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.9 (2023-01-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.8 (2023-01-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.7 (2022-12-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.6 (2022-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.5 (2022-12-15)
+
+* **Bug Fix**: Unify logic between shared config and in finding home directory
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.4 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.3 (2022-11-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.2 (2022-11-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.1 (2022-11-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.0 (2022-11-11)
+
+* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846
+* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.11 (2022-11-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.10 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.9 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.8 (2022-09-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.7 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.6 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.5 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.4 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.3 (2022-08-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2022-08-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2022-08-14)
+
+* **Feature**: Add alternative mechanism for determning the users `$HOME` or `%USERPROFILE%` location when the environment variables are not present.
+
+# v1.16.1 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2022-08-10)
+
+* **Feature**: Adds support for the following settings in the `~/.aws/credentials` file: `sso_account_id`, `sso_region`, `sso_role_name`, `sso_start_url`, and `ca_bundle`.
+
+# v1.15.17 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.16 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.15 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.14 (2022-07-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.13 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.12 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.11 (2022-06-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.10 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.9 (2022-05-26)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.8 (2022-05-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.7 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.6 (2022-05-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.5 (2022-05-09)
+
+* **Bug Fix**: Fixes a bug in LoadDefaultConfig to correctly assign ConfigSources so all config resolvers have access to the config sources. This fixes the feature/ec2/imds client not having configuration applied via config.LoadOptions such as EC2IMDSClientEnableState. PR [#1682](https://github.com/aws/aws-sdk-go-v2/pull/1682)
+
+# v1.15.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.15.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
index 79f06701..50582d89 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
@@ -2,18 +2,11 @@ package config
import (
"context"
+ "os"
"github.com/aws/aws-sdk-go-v2/aws"
)
-// defaultLoaders are a slice of functions that will read external configuration
-// sources for configuration values. These values are read by the AWSConfigResolvers
-// using interfaces to extract specific information from the external configuration.
-var defaultLoaders = []loader{
- loadEnvConfig,
- loadSharedConfigIgnoreNotExist,
-}
-
// defaultAWSConfigResolvers are a slice of functions that will resolve external
// configuration values into AWS configuration values.
//
@@ -72,6 +65,21 @@ var defaultAWSConfigResolvers = []awsConfigResolver{
// implementations depend on or can be configured with earlier resolved
// configuration options.
resolveCredentials,
+
+ // Sets the resolved bearer authentication token API clients will use for
+ // httpBearerAuth authentication scheme.
+ resolveBearerAuthToken,
+
+ // Sets the sdk app ID if present in env var or shared config profile
+ resolveAppID,
+
+ resolveBaseEndpoint,
+
+ // Sets the DisableRequestCompression if present in env var or shared config profile
+ resolveDisableRequestCompression,
+
+ // Sets the RequestMinCompressSizeBytes if present in env var or shared config profile
+ resolveRequestMinCompressSizeBytes,
}
// A Config represents a generic configuration value or set of values. This type
@@ -137,17 +145,10 @@ func (cs configs) ResolveAWSConfig(ctx context.Context, resolvers []awsConfigRes
for _, fn := range resolvers {
if err := fn(ctx, &cfg, cs); err != nil {
- // TODO provide better error?
return aws.Config{}, err
}
}
- var sources []interface{}
- for _, s := range cs {
- sources = append(sources, s)
- }
- cfg.ConfigSources = sources
-
return cfg, nil
}
@@ -169,13 +170,12 @@ func (cs configs) ResolveConfig(f func(configs []interface{}) error) error {
// The custom configurations must satisfy the respective providers for their data
// or the custom data will be ignored by the resolvers and config loaders.
//
-// cfg, err := config.LoadDefaultConfig( context.TODO(),
-// WithSharedConfigProfile("test-profile"),
-// )
-// if err != nil {
-// panic(fmt.Sprintf("failed loading config, %v", err))
-// }
-//
+// cfg, err := config.LoadDefaultConfig( context.TODO(),
+// config.WithSharedConfigProfile("test-profile"),
+// )
+// if err != nil {
+// panic(fmt.Sprintf("failed loading config, %v", err))
+// }
//
// The default configuration sources are:
// * Environment Variables
@@ -191,7 +191,7 @@ func LoadDefaultConfig(ctx context.Context, optFns ...func(*LoadOptions) error)
// assign Load Options to configs
var cfgCpy = configs{options}
- cfgCpy, err = cfgCpy.AppendFromLoaders(ctx, defaultLoaders)
+ cfgCpy, err = cfgCpy.AppendFromLoaders(ctx, resolveConfigLoaders(&options))
if err != nil {
return aws.Config{}, err
}
@@ -203,3 +203,17 @@ func LoadDefaultConfig(ctx context.Context, optFns ...func(*LoadOptions) error)
return cfg, nil
}
+
+func resolveConfigLoaders(options *LoadOptions) []loader {
+ loaders := make([]loader, 2)
+ loaders[0] = loadEnvConfig
+
+ // specification of a profile should cause a load failure if it doesn't exist
+ if os.Getenv(awsProfileEnvVar) != "" || options.SharedConfigProfile != "" {
+ loaders[1] = loadSharedConfig
+ } else {
+ loaders[1] = loadSharedConfigIgnoreNotExist
+ }
+
+ return loaders
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
index 31648ffb..aab7164e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
@@ -15,6 +15,6 @@
// take precedence over the default environment and shared config sources used by the SDK. If one or more Config sources
// implement the same provider interface, priority will be handled by the order in which the sources were passed in.
//
-// A number of helpers (prefixed by ``With``) are provided in this package that implement their respective provider
+// A number of helpers (prefixed by “With“) are provided in this package that implement their respective provider
// interface. These helpers should be used for overriding configuration programmatically at runtime.
package config
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
index 18c8e012..88550198 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
@@ -12,6 +12,7 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ smithyrequestcompression "github.com/aws/smithy-go/private/requestcompression"
)
// CredentialsSourceName provides a name of the provider when config is
@@ -57,7 +58,8 @@ const (
awsEc2MetadataServiceEndpointEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT"
- awsEc2MetadataDisabled = "AWS_EC2_METADATA_DISABLED"
+ awsEc2MetadataDisabled = "AWS_EC2_METADATA_DISABLED"
+ awsEc2MetadataV1DisabledEnvVar = "AWS_EC2_METADATA_V1_DISABLED"
awsS3DisableMultiRegionAccessPointEnvVar = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"
@@ -69,6 +71,15 @@ const (
awsRetryMaxAttempts = "AWS_MAX_ATTEMPTS"
awsRetryMode = "AWS_RETRY_MODE"
+ awsSdkAppID = "AWS_SDK_UA_APP_ID"
+
+ awsIgnoreConfiguredEndpoints = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS"
+ awsEndpointURL = "AWS_ENDPOINT_URL"
+
+ awsDisableRequestCompression = "AWS_DISABLE_REQUEST_COMPRESSION"
+ awsRequestMinCompressionSizeBytes = "AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES"
+
+ awsS3DisableExpressSessionAuthEnv = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH"
)
var (
@@ -205,6 +216,11 @@ type EnvConfig struct {
// AWS_EC2_METADATA_DISABLED=true
EC2IMDSClientEnableState imds.ClientEnableState
+ // Specifies if EC2 IMDSv1 fallback is disabled.
+ //
+ // AWS_EC2_METADATA_V1_DISABLED=true
+ EC2IMDSv1Disabled *bool
+
// Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
//
// AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
@@ -248,6 +264,32 @@ type EnvConfig struct {
//
// aws_retry_mode=standard
RetryMode aws.RetryMode
+
+ // aws sdk app ID that can be added to user agent header string
+ AppID string
+
+ // Flag used to disable configured endpoints.
+ IgnoreConfiguredEndpoints *bool
+
+ // Value to contain configured endpoints to be propagated to
+ // corresponding endpoint resolution field.
+ BaseEndpoint string
+
+ // determine if request compression is allowed, default to false
+ // retrieved from env var AWS_DISABLE_REQUEST_COMPRESSION
+ DisableRequestCompression *bool
+
+ // inclusive threshold request body size to trigger compression,
+ // default to 10240 and must be within 0 and 10485760 bytes inclusive
+ // retrieved from env var AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES
+ RequestMinCompressSizeBytes *int64
+
+ // Whether S3Express auth is disabled.
+ //
+ // This will NOT prevent requests from being made to S3Express buckets, it
+ // will only bypass the modified endpoint routing and signing behaviors
+ // associated with the feature.
+ S3DisableExpressAuth *bool
}
// loadEnvConfig reads configuration values from the OS's environment variables.
@@ -288,6 +330,15 @@ func NewEnvConfig() (EnvConfig, error) {
cfg.RoleARN = os.Getenv(awsRoleARNEnvVar)
cfg.RoleSessionName = os.Getenv(awsRoleSessionNameEnvVar)
+ cfg.AppID = os.Getenv(awsSdkAppID)
+
+ if err := setBoolPtrFromEnvVal(&cfg.DisableRequestCompression, []string{awsDisableRequestCompression}); err != nil {
+ return cfg, err
+ }
+ if err := setInt64PtrFromEnvVal(&cfg.RequestMinCompressSizeBytes, []string{awsRequestMinCompressionSizeBytes}, smithyrequestcompression.MaxRequestMinCompressSizeBytes); err != nil {
+ return cfg, err
+ }
+
if err := setEndpointDiscoveryTypeFromEnvVal(&cfg.EnableEndpointDiscovery, []string{awsEnableEndpointDiscoveryEnvVar}); err != nil {
return cfg, err
}
@@ -301,6 +352,9 @@ func NewEnvConfig() (EnvConfig, error) {
return cfg, err
}
cfg.EC2IMDSEndpoint = os.Getenv(awsEc2MetadataServiceEndpointEnvVar)
+ if err := setBoolPtrFromEnvVal(&cfg.EC2IMDSv1Disabled, []string{awsEc2MetadataV1DisabledEnvVar}); err != nil {
+ return cfg, err
+ }
if err := setBoolPtrFromEnvVal(&cfg.S3DisableMultiRegionAccessPoints, []string{awsS3DisableMultiRegionAccessPointEnvVar}); err != nil {
return cfg, err
@@ -325,6 +379,16 @@ func NewEnvConfig() (EnvConfig, error) {
return cfg, err
}
+ setStringFromEnvVal(&cfg.BaseEndpoint, []string{awsEndpointURL})
+
+ if err := setBoolPtrFromEnvVal(&cfg.IgnoreConfiguredEndpoints, []string{awsIgnoreConfiguredEndpoints}); err != nil {
+ return cfg, err
+ }
+
+ if err := setBoolPtrFromEnvVal(&cfg.S3DisableExpressAuth, []string{awsS3DisableExpressSessionAuthEnv}); err != nil {
+ return cfg, err
+ }
+
return cfg, nil
}
@@ -335,6 +399,24 @@ func (c EnvConfig) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool,
return c.DefaultsMode, true, nil
}
+func (c EnvConfig) getAppID(context.Context) (string, bool, error) {
+ return c.AppID, len(c.AppID) > 0, nil
+}
+
+func (c EnvConfig) getDisableRequestCompression(context.Context) (bool, bool, error) {
+ if c.DisableRequestCompression == nil {
+ return false, false, nil
+ }
+ return *c.DisableRequestCompression, true, nil
+}
+
+func (c EnvConfig) getRequestMinCompressSizeBytes(context.Context) (int64, bool, error) {
+ if c.RequestMinCompressSizeBytes == nil {
+ return 0, false, nil
+ }
+ return *c.RequestMinCompressSizeBytes, true, nil
+}
+
// GetRetryMaxAttempts returns the value of AWS_MAX_ATTEMPTS if was specified,
// and not 0.
func (c EnvConfig) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) {
@@ -472,6 +554,34 @@ func (c EnvConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) {
return bytes.NewReader(b), true, nil
}
+// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured
+// endpoints feature.
+func (c EnvConfig) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) {
+ if c.IgnoreConfiguredEndpoints == nil {
+ return false, false, nil
+ }
+
+ return *c.IgnoreConfiguredEndpoints, true, nil
+}
+
+func (c EnvConfig) getBaseEndpoint(context.Context) (string, bool, error) {
+ return c.BaseEndpoint, len(c.BaseEndpoint) > 0, nil
+}
+
+// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use
+// with configured endpoints.
+func (c EnvConfig) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) {
+ if endpt := os.Getenv(fmt.Sprintf("%s_%s", awsEndpointURL, normalizeEnv(sdkID))); endpt != "" {
+ return endpt, true, nil
+ }
+ return "", false, nil
+}
+
+func normalizeEnv(sdkID string) string {
+ upper := strings.ToUpper(sdkID)
+ return strings.ReplaceAll(upper, " ", "_")
+}
+
// GetS3UseARNRegion returns whether to allow ARNs to direct the region
// the S3 client's requests are sent to.
func (c EnvConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) {
@@ -482,9 +592,9 @@ func (c EnvConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err e
return *c.S3UseARNRegion, true, nil
}
-// GetS3DisableMultRegionAccessPoints returns whether to disable multi-region access point
+// GetS3DisableMultiRegionAccessPoints returns whether to disable multi-region access point
// support for the S3 client.
-func (c EnvConfig) GetS3DisableMultRegionAccessPoints(ctx context.Context) (value, ok bool, err error) {
+func (c EnvConfig) GetS3DisableMultiRegionAccessPoints(ctx context.Context) (value, ok bool, err error) {
if c.S3DisableMultiRegionAccessPoints == nil {
return false, false, nil
}
@@ -563,6 +673,30 @@ func setBoolPtrFromEnvVal(dst **bool, keys []string) error {
return nil
}
+func setInt64PtrFromEnvVal(dst **int64, keys []string, max int64) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+
+ v, err := strconv.ParseInt(value, 10, 64)
+ if err != nil {
+ return fmt.Errorf("invalid value for env var, %s=%s, need int64", k, value)
+ } else if v < 0 || v > max {
+ return fmt.Errorf("invalid range for env var min request compression size bytes %q, must be within 0 and 10485760 inclusively", v)
+ }
+ if *dst == nil {
+ *dst = new(int64)
+ }
+
+ **dst = v
+ break
+ }
+
+ return nil
+}
+
func setEndpointDiscoveryTypeFromEnvVal(dst *aws.EndpointDiscoveryEnableState, keys []string) error {
for _, k := range keys {
value := os.Getenv(k)
@@ -663,3 +797,23 @@ func (c EnvConfig) GetEC2IMDSEndpoint() (string, bool, error) {
return c.EC2IMDSEndpoint, true, nil
}
+
+// GetEC2IMDSV1FallbackDisabled implements an EC2IMDSV1FallbackDisabled option
+// resolver interface.
+func (c EnvConfig) GetEC2IMDSV1FallbackDisabled() (bool, bool) {
+ if c.EC2IMDSv1Disabled == nil {
+ return false, false
+ }
+
+ return *c.EC2IMDSv1Disabled, true
+}
+
+// GetS3DisableExpressAuth returns the configured value for
+// [EnvConfig.S3DisableExpressAuth].
+func (c EnvConfig) GetS3DisableExpressAuth() (value, ok bool) {
+ if c.S3DisableExpressAuth == nil {
+ return false, false
+ }
+
+ return *c.S3DisableExpressAuth, true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
index bbfd4924..b52b7834 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
@@ -3,4 +3,4 @@
package config
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.15.3"
+const goModuleVersion = "1.27.7"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
index 22e6019f..06596c1b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
@@ -11,6 +11,7 @@ import (
"github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
)
@@ -28,6 +29,9 @@ type LoadOptions struct {
// Credentials object to use when signing requests.
Credentials aws.CredentialsProvider
+ // Token provider for authentication operations with bearer authentication.
+ BearerAuthTokenProvider smithybearer.TokenProvider
+
// HTTPClient the SDK's API clients will use to invoke HTTP requests.
HTTPClient HTTPClient
@@ -128,6 +132,14 @@ type LoadOptions struct {
// aws.CredentialsCacheOptions
CredentialsCacheOptions func(*aws.CredentialsCacheOptions)
+ // BearerAuthTokenCacheOptions is a function for setting the smithy-go
+ // auth/bearer#TokenCacheOptions
+ BearerAuthTokenCacheOptions func(*smithybearer.TokenCacheOptions)
+
+ // SSOTokenProviderOptions is a function for setting the
+ // credentials/ssocreds.SSOTokenProviderOptions
+ SSOTokenProviderOptions func(*ssocreds.SSOTokenProviderOptions)
+
// ProcessCredentialOptions is a function for setting
// the processcreds.Options
ProcessCredentialOptions func(*processcreds.Options)
@@ -160,6 +172,10 @@ type LoadOptions struct {
// the region, the client's requests are sent to.
S3UseARNRegion *bool
+ // S3DisableMultiRegionAccessPoints specifies if the S3 service should disable
+ // the S3 Multi-Region access points feature.
+ S3DisableMultiRegionAccessPoints *bool
+
// EnableEndpointDiscovery specifies if endpoint discovery is enable for
// the client.
EnableEndpointDiscovery aws.EndpointDiscoveryEnableState
@@ -187,6 +203,18 @@ type LoadOptions struct {
// Specifies the SDK configuration mode for defaults.
DefaultsModeOptions DefaultsModeOptions
+
+ // The sdk app ID retrieved from env var or shared config to be added to request user agent header
+ AppID string
+
+ // Specifies whether an operation request could be compressed
+ DisableRequestCompression *bool
+
+ // The inclusive min bytes of a request body that could be compressed
+ RequestMinCompressSizeBytes *int64
+
+ // Whether S3 Express auth is disabled.
+ S3DisableExpressAuth *bool
}
func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) {
@@ -229,6 +257,27 @@ func (o LoadOptions) getRegion(ctx context.Context) (string, bool, error) {
return o.Region, true, nil
}
+// getAppID returns AppID from config's LoadOptions
+func (o LoadOptions) getAppID(ctx context.Context) (string, bool, error) {
+ return o.AppID, len(o.AppID) > 0, nil
+}
+
+// getDisableRequestCompression returns DisableRequestCompression from config's LoadOptions
+func (o LoadOptions) getDisableRequestCompression(ctx context.Context) (bool, bool, error) {
+ if o.DisableRequestCompression == nil {
+ return false, false, nil
+ }
+ return *o.DisableRequestCompression, true, nil
+}
+
+// getRequestMinCompressSizeBytes returns RequestMinCompressSizeBytes from config's LoadOptions
+func (o LoadOptions) getRequestMinCompressSizeBytes(ctx context.Context) (int64, bool, error) {
+ if o.RequestMinCompressSizeBytes == nil {
+ return 0, false, nil
+ }
+ return *o.RequestMinCompressSizeBytes, true, nil
+}
+
// WithRegion is a helper function to construct functional options
// that sets Region on config's LoadOptions. Setting the region to
// an empty string, will result in the region value being ignored.
@@ -241,6 +290,39 @@ func WithRegion(v string) LoadOptionsFunc {
}
}
+// WithAppID is a helper function to construct functional options
+// that sets AppID on config's LoadOptions.
+func WithAppID(ID string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.AppID = ID
+ return nil
+ }
+}
+
+// WithDisableRequestCompression is a helper function to construct functional options
+// that sets DisableRequestCompression on config's LoadOptions.
+func WithDisableRequestCompression(DisableRequestCompression *bool) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ if DisableRequestCompression == nil {
+ return nil
+ }
+ o.DisableRequestCompression = DisableRequestCompression
+ return nil
+ }
+}
+
+// WithRequestMinCompressSizeBytes is a helper function to construct functional options
+// that sets RequestMinCompressSizeBytes on config's LoadOptions.
+func WithRequestMinCompressSizeBytes(RequestMinCompressSizeBytes *int64) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ if RequestMinCompressSizeBytes == nil {
+ return nil
+ }
+ o.RequestMinCompressSizeBytes = RequestMinCompressSizeBytes
+ return nil
+ }
+}
+
// getDefaultRegion returns DefaultRegion from config's LoadOptions
func (o LoadOptions) getDefaultRegion(ctx context.Context) (string, bool, error) {
if len(o.DefaultRegion) == 0 {
@@ -451,6 +533,73 @@ func WithCredentialsCacheOptions(v func(*aws.CredentialsCacheOptions)) LoadOptio
}
}
+// getBearerAuthTokenProvider returns the credentials value
+func (o LoadOptions) getBearerAuthTokenProvider(ctx context.Context) (smithybearer.TokenProvider, bool, error) {
+ if o.BearerAuthTokenProvider == nil {
+ return nil, false, nil
+ }
+
+ return o.BearerAuthTokenProvider, true, nil
+}
+
+// WithBearerAuthTokenProvider is a helper function to construct functional options
+// that sets Credential provider value on config's LoadOptions. If credentials
+// provider is set to nil, the credentials provider value will be ignored.
+// If multiple WithBearerAuthTokenProvider calls are made, the last call overrides
+// the previous call values.
+func WithBearerAuthTokenProvider(v smithybearer.TokenProvider) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.BearerAuthTokenProvider = v
+ return nil
+ }
+}
+
+// getBearerAuthTokenCacheOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions
+func (o LoadOptions) getBearerAuthTokenCacheOptions(ctx context.Context) (func(*smithybearer.TokenCacheOptions), bool, error) {
+ if o.BearerAuthTokenCacheOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.BearerAuthTokenCacheOptions, true, nil
+}
+
+// WithBearerAuthTokenCacheOptions is a helper function to construct functional options
+// that sets a function to modify the TokenCacheOptions the smithy-go
+// auth/bearer#TokenCache will be configured with, if the TokenCache is used by
+// the configuration loader.
+//
+// If multiple WithBearerAuthTokenCacheOptions calls are made, the last call overrides
+// the previous call values.
+func WithBearerAuthTokenCacheOptions(v func(*smithybearer.TokenCacheOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.BearerAuthTokenCacheOptions = v
+ return nil
+ }
+}
+
+// getSSOTokenProviderOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions
+func (o LoadOptions) getSSOTokenProviderOptions(ctx context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error) {
+ if o.SSOTokenProviderOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.SSOTokenProviderOptions, true, nil
+}
+
+// WithSSOTokenProviderOptions is a helper function to construct functional
+// options that sets a function to modify the SSOtokenProviderOptions the SDK's
+// credentials/ssocreds#SSOProvider will be configured with, if the
+// SSOTokenProvider is used by the configuration loader.
+//
+// If multiple WithSSOTokenProviderOptions calls are made, the last call overrides
+// the previous call values.
+func WithSSOTokenProviderOptions(v func(*ssocreds.SSOTokenProviderOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SSOTokenProviderOptions = v
+ return nil
+ }
+}
+
// getProcessCredentialOptions returns the wrapped function to set processcreds.Options
func (o LoadOptions) getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error) {
if o.ProcessCredentialOptions == nil {
@@ -780,6 +929,26 @@ func WithS3UseARNRegion(v bool) LoadOptionsFunc {
}
}
+// GetS3DisableMultiRegionAccessPoints returns whether to disable
+// the S3 multi-region access points feature.
+func (o LoadOptions) GetS3DisableMultiRegionAccessPoints(ctx context.Context) (v bool, found bool, err error) {
+ if o.S3DisableMultiRegionAccessPoints == nil {
+ return false, false, nil
+ }
+ return *o.S3DisableMultiRegionAccessPoints, true, nil
+}
+
+// WithS3DisableMultiRegionAccessPoints is a helper function to construct functional options
+// that can be used to set S3DisableMultiRegionAccessPoints on LoadOptions.
+// If multiple WithS3DisableMultiRegionAccessPoints calls are made, the last call overrides
+// the previous call values.
+func WithS3DisableMultiRegionAccessPoints(v bool) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.S3DisableMultiRegionAccessPoints = &v
+ return nil
+ }
+}
+
// GetEnableEndpointDiscovery returns if the EnableEndpointDiscovery flag is set.
func (o LoadOptions) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, ok bool, err error) {
if o.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset {
@@ -924,3 +1093,22 @@ func WithDefaultsMode(mode aws.DefaultsMode, optFns ...func(options *DefaultsMod
return nil
}
}
+
+// GetS3DisableExpressAuth returns the configured value for
+// [EnvConfig.S3DisableExpressAuth].
+func (o LoadOptions) GetS3DisableExpressAuth() (value, ok bool) {
+ if o.S3DisableExpressAuth == nil {
+ return false, false
+ }
+
+ return *o.S3DisableExpressAuth, true
+}
+
+// WithS3DisableExpressAuth sets [LoadOptions.S3DisableExpressAuth]
+// to the value provided.
+func WithS3DisableExpressAuth(v bool) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.S3DisableExpressAuth = &v
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
index 3f12df1b..13745fc9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
@@ -12,6 +12,7 @@ import (
"github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
)
@@ -121,6 +122,109 @@ func getRegion(ctx context.Context, configs configs) (value string, found bool,
return
}
+// IgnoreConfiguredEndpointsProvider is needed to search for all providers
+// that provide a flag to disable configured endpoints.
+type IgnoreConfiguredEndpointsProvider interface {
+ GetIgnoreConfiguredEndpoints(ctx context.Context) (bool, bool, error)
+}
+
+// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured
+// endpoints feature.
+func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok {
+ value, found, err = p.GetIgnoreConfiguredEndpoints(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+type baseEndpointProvider interface {
+ getBaseEndpoint(ctx context.Context) (string, bool, error)
+}
+
+func getBaseEndpoint(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(baseEndpointProvider); ok {
+ value, found, err = p.getBaseEndpoint(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+type servicesObjectProvider interface {
+ getServicesObject(ctx context.Context) (map[string]map[string]string, bool, error)
+}
+
+func getServicesObject(ctx context.Context, configs configs) (value map[string]map[string]string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(servicesObjectProvider); ok {
+ value, found, err = p.getServicesObject(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// appIDProvider provides access to the sdk app ID value
+type appIDProvider interface {
+ getAppID(ctx context.Context) (string, bool, error)
+}
+
+func getAppID(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(appIDProvider); ok {
+ value, found, err = p.getAppID(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// disableRequestCompressionProvider provides access to the DisableRequestCompression
+type disableRequestCompressionProvider interface {
+ getDisableRequestCompression(context.Context) (bool, bool, error)
+}
+
+func getDisableRequestCompression(ctx context.Context, configs configs) (value bool, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(disableRequestCompressionProvider); ok {
+ value, found, err = p.getDisableRequestCompression(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// requestMinCompressSizeBytesProvider provides access to the MinCompressSizeBytes
+type requestMinCompressSizeBytesProvider interface {
+ getRequestMinCompressSizeBytes(context.Context) (int64, bool, error)
+}
+
+func getRequestMinCompressSizeBytes(ctx context.Context, configs configs) (value int64, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(requestMinCompressSizeBytesProvider); ok {
+ value, found, err = p.getRequestMinCompressSizeBytes(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
// ec2IMDSRegionProvider provides access to the ec2 imds region
// configuration value
type ec2IMDSRegionProvider interface {
@@ -185,6 +289,73 @@ func getCredentialsCacheOptionsProvider(ctx context.Context, configs configs) (
return
}
+// bearerAuthTokenProviderProvider provides access to the bearer authentication
+// token external configuration value.
+type bearerAuthTokenProviderProvider interface {
+ getBearerAuthTokenProvider(context.Context) (smithybearer.TokenProvider, bool, error)
+}
+
+// getBearerAuthTokenProvider searches the config sources for a
+// bearerAuthTokenProviderProvider and returns the value if found. Returns an
+// error if a provider fails before a value is found.
+func getBearerAuthTokenProvider(ctx context.Context, configs configs) (p smithybearer.TokenProvider, found bool, err error) {
+ for _, cfg := range configs {
+ if provider, ok := cfg.(bearerAuthTokenProviderProvider); ok {
+ p, found, err = provider.getBearerAuthTokenProvider(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// bearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for
+// setting the smithy-go auth/bearer#TokenCacheOptions.
+type bearerAuthTokenCacheOptionsProvider interface {
+ getBearerAuthTokenCacheOptions(context.Context) (func(*smithybearer.TokenCacheOptions), bool, error)
+}
+
+// getBearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for
+// setting the smithy-go auth/bearer#TokenCacheOptions.
+func getBearerAuthTokenCacheOptions(ctx context.Context, configs configs) (
+ f func(*smithybearer.TokenCacheOptions), found bool, err error,
+) {
+ for _, config := range configs {
+ if p, ok := config.(bearerAuthTokenCacheOptionsProvider); ok {
+ f, found, err = p.getBearerAuthTokenCacheOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ssoTokenProviderOptionsProvider is an interface for retrieving a function for
+// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions.
+type ssoTokenProviderOptionsProvider interface {
+ getSSOTokenProviderOptions(context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error)
+}
+
+// getSSOTokenProviderOptions is an interface for retrieving a function for
+// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions.
+func getSSOTokenProviderOptions(ctx context.Context, configs configs) (
+ f func(*ssocreds.SSOTokenProviderOptions), found bool, err error,
+) {
+ for _, config := range configs {
+ if p, ok := config.(ssoTokenProviderOptionsProvider); ok {
+ f, found, err = p.getSSOTokenProviderOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ssoTokenProviderOptionsProvider
+
// processCredentialOptions is an interface for retrieving a function for setting
// the processcreds.Options.
type processCredentialOptions interface {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
index 4a802476..fde2e398 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
@@ -21,9 +21,14 @@ import (
// This should be used as the first resolver in the slice of resolvers when
// resolving external configuration.
func resolveDefaultAWSConfig(ctx context.Context, cfg *aws.Config, cfgs configs) error {
+ var sources []interface{}
+ for _, s := range cfgs {
+ sources = append(sources, s)
+ }
+
*cfg = aws.Config{
- Credentials: aws.AnonymousCredentials{},
- Logger: logging.NewStandardLogger(os.Stderr),
+ Logger: logging.NewStandardLogger(os.Stderr),
+ ConfigSources: sources,
}
return nil
}
@@ -100,6 +105,67 @@ func resolveRegion(ctx context.Context, cfg *aws.Config, configs configs) error
return nil
}
+func resolveBaseEndpoint(ctx context.Context, cfg *aws.Config, configs configs) error {
+ var downcastCfgSources []interface{}
+ for _, cs := range configs {
+ downcastCfgSources = append(downcastCfgSources, interface{}(cs))
+ }
+
+ if val, found, err := GetIgnoreConfiguredEndpoints(ctx, downcastCfgSources); found && val && err == nil {
+ cfg.BaseEndpoint = nil
+ return nil
+ }
+
+ v, found, err := getBaseEndpoint(ctx, configs)
+ if err != nil {
+ return err
+ }
+
+ if !found {
+ return nil
+ }
+ cfg.BaseEndpoint = aws.String(v)
+ return nil
+}
+
+// resolveAppID extracts the sdk app ID from the configs slice's SharedConfig or env var
+func resolveAppID(ctx context.Context, cfg *aws.Config, configs configs) error {
+ ID, _, err := getAppID(ctx, configs)
+ if err != nil {
+ return err
+ }
+
+ cfg.AppID = ID
+ return nil
+}
+
+// resolveDisableRequestCompression extracts the DisableRequestCompression from the configs slice's
+// SharedConfig or EnvConfig
+func resolveDisableRequestCompression(ctx context.Context, cfg *aws.Config, configs configs) error {
+ disable, _, err := getDisableRequestCompression(ctx, configs)
+ if err != nil {
+ return err
+ }
+
+ cfg.DisableRequestCompression = disable
+ return nil
+}
+
+// resolveRequestMinCompressSizeBytes extracts the RequestMinCompressSizeBytes from the configs slice's
+// SharedConfig or EnvConfig
+func resolveRequestMinCompressSizeBytes(ctx context.Context, cfg *aws.Config, configs configs) error {
+ minBytes, found, err := getRequestMinCompressSizeBytes(ctx, configs)
+ if err != nil {
+ return err
+ }
+ // must set a default min size 10240 if not configured
+ if !found {
+ minBytes = 10240
+ }
+ cfg.RequestMinCompressSizeBytes = minBytes
+ return nil
+}
+
// resolveDefaultRegion extracts the first instance of a default region and sets `aws.Config.Region` to the default
// region if region had not been resolved from other sources.
func resolveDefaultRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go
new file mode 100644
index 00000000..a8ebb3c0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go
@@ -0,0 +1,122 @@
+package config
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/service/ssooidc"
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
+)
+
+// resolveBearerAuthToken extracts a token provider from the config sources.
+//
+// If an explicit bearer authentication token provider is not found the
+// resolver will fallback to resolving token provider via other config sources
+// such as SharedConfig.
+func resolveBearerAuthToken(ctx context.Context, cfg *aws.Config, configs configs) error {
+ found, err := resolveBearerAuthTokenProvider(ctx, cfg, configs)
+ if found || err != nil {
+ return err
+ }
+
+ return resolveBearerAuthTokenProviderChain(ctx, cfg, configs)
+}
+
+// resolveBearerAuthTokenProvider extracts the first instance of
+// BearerAuthTokenProvider from the config sources.
+//
+// The resolved BearerAuthTokenProvider will be wrapped in a cache to ensure
+// the Token is only refreshed when needed. This also protects the
+// TokenProvider so it can be used concurrently.
+//
+// Config providers used:
+// * bearerAuthTokenProviderProvider
+func resolveBearerAuthTokenProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) {
+ tokenProvider, found, err := getBearerAuthTokenProvider(ctx, configs)
+ if !found || err != nil {
+ return false, err
+ }
+
+ cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache(
+ ctx, configs, tokenProvider)
+ if err != nil {
+ return false, err
+ }
+
+ return true, nil
+}
+
+func resolveBearerAuthTokenProviderChain(ctx context.Context, cfg *aws.Config, configs configs) (err error) {
+ _, sharedConfig, _ := getAWSConfigSources(configs)
+
+ var provider smithybearer.TokenProvider
+
+ if sharedConfig.SSOSession != nil {
+ provider, err = resolveBearerAuthSSOTokenProvider(
+ ctx, cfg, sharedConfig.SSOSession, configs)
+ }
+
+ if err == nil && provider != nil {
+ cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache(
+ ctx, configs, provider)
+ }
+
+ return err
+}
+
+func resolveBearerAuthSSOTokenProvider(ctx context.Context, cfg *aws.Config, session *SSOSession, configs configs) (*ssocreds.SSOTokenProvider, error) {
+ ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err)
+ }
+
+ var optFns []func(*ssocreds.SSOTokenProviderOptions)
+ if found {
+ optFns = append(optFns, ssoTokenProviderOptionsFn)
+ }
+
+ cachePath, err := ssocreds.StandardCachedTokenFilepath(session.Name)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get SSOTokenProvider's cache path, %w", err)
+ }
+
+ client := ssooidc.NewFromConfig(*cfg)
+ provider := ssocreds.NewSSOTokenProvider(client, cachePath, optFns...)
+
+ return provider, nil
+}
+
+// wrapWithBearerAuthTokenCache will wrap provider with an smithy-go
+// bearer/auth#TokenCache with the provided options if the provider is not
+// already a TokenCache.
+func wrapWithBearerAuthTokenCache(
+ ctx context.Context,
+ cfgs configs,
+ provider smithybearer.TokenProvider,
+ optFns ...func(*smithybearer.TokenCacheOptions),
+) (smithybearer.TokenProvider, error) {
+ _, ok := provider.(*smithybearer.TokenCache)
+ if ok {
+ return provider, nil
+ }
+
+ tokenCacheConfigOptions, optionsFound, err := getBearerAuthTokenCacheOptions(ctx, cfgs)
+ if err != nil {
+ return nil, err
+ }
+
+ opts := make([]func(*smithybearer.TokenCacheOptions), 0, 2+len(optFns))
+ opts = append(opts, func(o *smithybearer.TokenCacheOptions) {
+ o.RefreshBeforeExpires = 5 * time.Minute
+ o.RetrieveBearerTokenTimeout = 30 * time.Second
+ })
+ opts = append(opts, optFns...)
+ if optionsFound {
+ opts = append(opts, tokenCacheConfigOptions)
+ }
+
+ return smithybearer.NewTokenCache(provider, opts...), nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
index 42904ed7..89368520 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
@@ -3,7 +3,10 @@ package config
import (
"context"
"fmt"
+ "io/ioutil"
+ "net"
"net/url"
+ "os"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
@@ -15,39 +18,56 @@ import (
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
"github.com/aws/aws-sdk-go-v2/service/sso"
+ "github.com/aws/aws-sdk-go-v2/service/ssooidc"
"github.com/aws/aws-sdk-go-v2/service/sts"
)
const (
// valid credential source values
- credSourceEc2Metadata = "Ec2InstanceMetadata"
- credSourceEnvironment = "Environment"
- credSourceECSContainer = "EcsContainer"
+ credSourceEc2Metadata = "Ec2InstanceMetadata"
+ credSourceEnvironment = "Environment"
+ credSourceECSContainer = "EcsContainer"
+ httpProviderAuthFileEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"
)
+// direct representation of the IPv4 address for the ECS container
+// "169.254.170.2"
+var ecsContainerIPv4 net.IP = []byte{
+ 169, 254, 170, 2,
+}
+
+// direct representation of the IPv4 address for the EKS container
+// "169.254.170.23"
+var eksContainerIPv4 net.IP = []byte{
+ 169, 254, 170, 23,
+}
+
+// direct representation of the IPv6 address for the EKS container
+// "fd00:ec2::23"
+var eksContainerIPv6 net.IP = []byte{
+ 0xFD, 0, 0xE, 0xC2,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0x23,
+}
+
var (
ecsContainerEndpoint = "http://169.254.170.2" // not constant to allow for swapping during unit-testing
)
-// resolveCredentials extracts a credential provider from slice of config sources.
+// resolveCredentials extracts a credential provider from slice of config
+// sources.
//
-// If an explict credential provider is not found the resolver will fallback to resolving
-// credentials by extracting a credential provider from EnvConfig and SharedConfig.
+// If an explicit credential provider is not found the resolver will fallback
+// to resolving credentials by extracting a credential provider from EnvConfig
+// and SharedConfig.
func resolveCredentials(ctx context.Context, cfg *aws.Config, configs configs) error {
found, err := resolveCredentialProvider(ctx, cfg, configs)
- if err != nil {
+ if found || err != nil {
return err
}
- if found {
- return nil
- }
- err = resolveCredentialChain(ctx, cfg, configs)
- if err != nil {
- return err
- }
-
- return nil
+ return resolveCredentialChain(ctx, cfg, configs)
}
// resolveCredentialProvider extracts the first instance of Credentials from the
@@ -61,12 +81,9 @@ func resolveCredentials(ctx context.Context, cfg *aws.Config, configs configs) e
// * credentialsProviderProvider
func resolveCredentialProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) {
credProvider, found, err := getCredentialsProvider(ctx, configs)
- if err != nil {
+ if !found || err != nil {
return false, err
}
- if !found {
- return false, nil
- }
cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, credProvider)
if err != nil {
@@ -180,7 +197,30 @@ func resolveSSOCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *S
}
cfgCopy := cfg.Copy()
- cfgCopy.Region = sharedConfig.SSORegion
+
+ if sharedConfig.SSOSession != nil {
+ ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs)
+ if err != nil {
+ return fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err)
+ }
+ var optFns []func(*ssocreds.SSOTokenProviderOptions)
+ if found {
+ optFns = append(optFns, ssoTokenProviderOptionsFn)
+ }
+ cfgCopy.Region = sharedConfig.SSOSession.SSORegion
+ cachedPath, err := ssocreds.StandardCachedTokenFilepath(sharedConfig.SSOSession.Name)
+ if err != nil {
+ return err
+ }
+ oidcClient := ssooidc.NewFromConfig(cfgCopy)
+ tokenProvider := ssocreds.NewSSOTokenProvider(oidcClient, cachedPath, optFns...)
+ options = append(options, func(o *ssocreds.Options) {
+ o.SSOTokenProvider = tokenProvider
+ o.CachedTokenFilepath = cachedPath
+ })
+ } else {
+ cfgCopy.Region = sharedConfig.SSORegion
+ }
cfg.Credentials = ssocreds.New(sso.NewFromConfig(cfgCopy), sharedConfig.SSOAccountID, sharedConfig.SSORoleName, sharedConfig.SSOStartURL, options...)
@@ -207,6 +247,36 @@ func processCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *Shar
return nil
}
+// isAllowedHost allows host to be loopback or known ECS/EKS container IPs
+//
+// host can either be an IP address OR an unresolved hostname - resolution will
+// be automatically performed in the latter case
+func isAllowedHost(host string) (bool, error) {
+ if ip := net.ParseIP(host); ip != nil {
+ return isIPAllowed(ip), nil
+ }
+
+ addrs, err := lookupHostFn(host)
+ if err != nil {
+ return false, err
+ }
+
+ for _, addr := range addrs {
+ if ip := net.ParseIP(addr); ip == nil || !isIPAllowed(ip) {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func isIPAllowed(ip net.IP) bool {
+ return ip.IsLoopback() ||
+ ip.Equal(ecsContainerIPv4) ||
+ ip.Equal(eksContainerIPv4) ||
+ ip.Equal(eksContainerIPv6)
+}
+
func resolveLocalHTTPCredProvider(ctx context.Context, cfg *aws.Config, endpointURL, authToken string, configs configs) error {
var resolveErr error
@@ -217,10 +287,12 @@ func resolveLocalHTTPCredProvider(ctx context.Context, cfg *aws.Config, endpoint
host := parsed.Hostname()
if len(host) == 0 {
resolveErr = fmt.Errorf("unable to parse host from local HTTP cred provider URL")
- } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil {
- resolveErr = fmt.Errorf("failed to resolve host %q, %v", host, loopbackErr)
- } else if !isLoopback {
- resolveErr = fmt.Errorf("invalid endpoint host, %q, only loopback hosts are allowed", host)
+ } else if parsed.Scheme == "http" {
+ if isAllowedHost, allowHostErr := isAllowedHost(host); allowHostErr != nil {
+ resolveErr = fmt.Errorf("failed to resolve host %q, %v", host, allowHostErr)
+ } else if !isAllowedHost {
+ resolveErr = fmt.Errorf("invalid endpoint host, %q, only loopback/ecs/eks hosts are allowed", host)
+ }
}
}
@@ -237,6 +309,16 @@ func resolveHTTPCredProvider(ctx context.Context, cfg *aws.Config, url, authToke
if len(authToken) != 0 {
options.AuthorizationToken = authToken
}
+ if authFilePath := os.Getenv(httpProviderAuthFileEnvVar); authFilePath != "" {
+ options.AuthorizationTokenProvider = endpointcreds.TokenProviderFunc(func() (string, error) {
+ var contents []byte
+ var err error
+ if contents, err = ioutil.ReadFile(authFilePath); err != nil {
+ return "", fmt.Errorf("failed to read authorization token from %v: %v", authFilePath, err)
+ }
+ return string(contents), nil
+ })
+ }
options.APIOptions = cfg.APIOptions
if cfg.Retryer != nil {
options.Retryer = cfg.Retryer()
@@ -369,10 +451,6 @@ func assumeWebIdentity(ctx context.Context, cfg *aws.Config, filepath string, ro
return fmt.Errorf("token file path is not set")
}
- if len(roleARN) == 0 {
- return fmt.Errorf("role ARN is not set")
- }
-
optFns := []func(*stscreds.WebIdentityRoleOptions){
func(options *stscreds.WebIdentityRoleOptions) {
options.RoleSessionName = sessionName
@@ -383,11 +461,29 @@ func assumeWebIdentity(ctx context.Context, cfg *aws.Config, filepath string, ro
if err != nil {
return err
}
+
if found {
optFns = append(optFns, optFn)
}
- provider := stscreds.NewWebIdentityRoleProvider(sts.NewFromConfig(*cfg), roleARN, stscreds.IdentityTokenFile(filepath), optFns...)
+ opts := stscreds.WebIdentityRoleOptions{
+ RoleARN: roleARN,
+ }
+
+ for _, fn := range optFns {
+ fn(&opts)
+ }
+
+ if len(opts.RoleARN) == 0 {
+ return fmt.Errorf("role ARN is not set")
+ }
+
+ client := opts.Client
+ if client == nil {
+ client = sts.NewFromConfig(*cfg)
+ }
+
+ provider := stscreds.NewWebIdentityRoleProvider(client, roleARN, stscreds.IdentityTokenFile(filepath), optFns...)
cfg.Credentials = provider
@@ -454,7 +550,7 @@ func wrapWithCredentialsCache(
return provider, nil
}
- credCacheOptions, found, err := getCredentialsCacheOptionsProvider(ctx, cfgs)
+ credCacheOptions, optionsFound, err := getCredentialsCacheOptionsProvider(ctx, cfgs)
if err != nil {
return nil, err
}
@@ -462,7 +558,7 @@ func wrapWithCredentialsCache(
// force allocation of a new slice if the additional options are
// needed, to prevent overwriting the passed in slice of options.
optFns = optFns[:len(optFns):len(optFns)]
- if found {
+ if optionsFound {
optFns = append(optFns, credCacheOptions)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
index 4c43a165..c546cb7d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
@@ -15,13 +15,24 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
"github.com/aws/aws-sdk-go-v2/internal/ini"
+ "github.com/aws/aws-sdk-go-v2/internal/shareddefaults"
"github.com/aws/smithy-go/logging"
+ smithyrequestcompression "github.com/aws/smithy-go/private/requestcompression"
)
const (
- // Prefix to use for filtering profiles
+ // Prefix to use for filtering profiles. The profile prefix should only
+ // exist in the shared config file, not the credentials file.
profilePrefix = `profile `
+ // Prefix to be used for SSO sections. These are supposed to only exist in
+ // the shared config file, not the credentials file.
+ ssoSectionPrefix = `sso-session `
+
+ // Prefix for services section. It is referenced in profile via the services
+ // parameter to configure clients for service-specific parameters.
+ servicesPrefix = `services `
+
// string equivalent for boolean
endpointDiscoveryDisabled = `false`
endpointDiscoveryEnabled = `true`
@@ -42,10 +53,13 @@ const (
roleDurationSecondsKey = "duration_seconds" // optional
// AWS Single Sign-On (AWS SSO) group
+ ssoSessionNameKey = "sso_session"
+
+ ssoRegionKey = "sso_region"
+ ssoStartURLKey = "sso_start_url"
+
ssoAccountIDKey = "sso_account_id"
- ssoRegionKey = "sso_region"
ssoRoleNameKey = "sso_role_name"
- ssoStartURL = "sso_start_url"
// Additional Config fields
regionKey = `region`
@@ -66,6 +80,8 @@ const (
ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint"
+ ec2MetadataV1DisabledKey = "ec2_metadata_v1_disabled"
+
// Use DualStack Endpoint Resolution
useDualStackEndpoint = "use_dualstack_endpoint"
@@ -86,6 +102,19 @@ const (
retryModeKey = "retry_mode"
caBundleKey = "ca_bundle"
+
+ sdkAppID = "sdk_ua_app_id"
+
+ ignoreConfiguredEndpoints = "ignore_configured_endpoint_urls"
+
+ endpointURL = "endpoint_url"
+
+ servicesSectionKey = "services"
+
+ disableRequestCompression = "disable_request_compression"
+ requestMinCompressionSizeBytes = "request_min_compression_size_bytes"
+
+ s3DisableExpressSessionAuthKey = "s3_disable_express_session_auth"
)
// defaultSharedConfigProfile allows for swapping the default profile for testing
@@ -99,7 +128,7 @@ var defaultSharedConfigProfile = DefaultSharedConfigProfile
// - Linux/Unix: $HOME/.aws/credentials
// - Windows: %USERPROFILE%\.aws\credentials
func DefaultSharedCredentialsFilename() string {
- return filepath.Join(userHomeDir(), ".aws", "credentials")
+ return filepath.Join(shareddefaults.UserHomeDir(), ".aws", "credentials")
}
// DefaultSharedConfigFilename returns the SDK's default file path for
@@ -110,7 +139,7 @@ func DefaultSharedCredentialsFilename() string {
// - Linux/Unix: $HOME/.aws/config
// - Windows: %USERPROFILE%\.aws\config
func DefaultSharedConfigFilename() string {
- return filepath.Join(userHomeDir(), ".aws", "config")
+ return filepath.Join(shareddefaults.UserHomeDir(), ".aws", "config")
}
// DefaultSharedConfigFiles is a slice of the default shared config files that
@@ -119,12 +148,44 @@ var DefaultSharedConfigFiles = []string{
DefaultSharedConfigFilename(),
}
-// DefaultSharedCredentialsFiles is a slice of the default shared credentials files that
-// the will be used in order to load the SharedConfig.
+// DefaultSharedCredentialsFiles is a slice of the default shared credentials
+// files that the will be used in order to load the SharedConfig.
var DefaultSharedCredentialsFiles = []string{
DefaultSharedCredentialsFilename(),
}
+// SSOSession provides the shared configuration parameters of the sso-session
+// section.
+type SSOSession struct {
+ Name string
+ SSORegion string
+ SSOStartURL string
+}
+
+func (s *SSOSession) setFromIniSection(section ini.Section) {
+ updateString(&s.Name, section, ssoSessionNameKey)
+ updateString(&s.SSORegion, section, ssoRegionKey)
+ updateString(&s.SSOStartURL, section, ssoStartURLKey)
+}
+
+// Services contains values configured in the services section
+// of the AWS configuration file.
+type Services struct {
+ // Services section values
+ // {"serviceId": {"key": "value"}}
+ // e.g. {"s3": {"endpoint_url": "example.com"}}
+ ServiceValues map[string]map[string]string
+}
+
+func (s *Services) setFromIniSection(section ini.Section) {
+ if s.ServiceValues == nil {
+ s.ServiceValues = make(map[string]map[string]string)
+ }
+ for _, service := range section.List() {
+ s.ServiceValues[service] = section.Map(service)
+ }
+}
+
// SharedConfig represents the configuration fields of the SDK config files.
type SharedConfig struct {
Profile string
@@ -144,10 +205,17 @@ type SharedConfig struct {
CredentialProcess string
WebIdentityTokenFile string
+ // SSO session options
+ SSOSessionName string
+ SSOSession *SSOSession
+
+ // Legacy SSO session options
+ SSORegion string
+ SSOStartURL string
+
+ // SSO fields not used
SSOAccountID string
- SSORegion string
SSORoleName string
- SSOStartURL string
RoleARN string
ExternalID string
@@ -188,6 +256,12 @@ type SharedConfig struct {
// ec2_metadata_service_endpoint=http://fd00:ec2::254
EC2IMDSEndpoint string
+ // Specifies that IMDS clients should not fallback to IMDSv1 if token
+ // requests fail.
+ //
+ // ec2_metadata_v1_disabled=true
+ EC2IMDSv1Disabled *bool
+
// Specifies if the S3 service should disable support for Multi-Region
// access-points
//
@@ -237,6 +311,36 @@ type SharedConfig struct {
//
// ca_bundle=$HOME/my_custom_ca_bundle
CustomCABundle string
+
+ // aws sdk app ID that can be added to user agent header string
+ AppID string
+
+ // Flag used to disable configured endpoints.
+ IgnoreConfiguredEndpoints *bool
+
+ // Value to contain configured endpoints to be propagated to
+ // corresponding endpoint resolution field.
+ BaseEndpoint string
+
+ // Services section config.
+ ServicesSectionName string
+ Services Services
+
+ // determine if request compression is allowed, default to false
+ // retrieved from config file's profile field disable_request_compression
+ DisableRequestCompression *bool
+
+ // inclusive threshold request body size to trigger compression,
+ // default to 10240 and must be within 0 and 10485760 bytes inclusive
+ // retrieved from config file's profile field request_min_compression_size_bytes
+ RequestMinCompressSizeBytes *int64
+
+ // Whether S3Express auth is disabled.
+ //
+ // This will NOT prevent requests from being made to S3Express buckets, it
+ // will only bypass the modified endpoint routing and signing behaviors
+ // associated with the feature.
+ S3DisableExpressAuth *bool
}
func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMode, ok bool, err error) {
@@ -326,6 +430,16 @@ func (c SharedConfig) GetEC2IMDSEndpoint() (string, bool, error) {
return c.EC2IMDSEndpoint, true, nil
}
+// GetEC2IMDSV1FallbackDisabled implements an EC2IMDSV1FallbackDisabled option
+// resolver interface.
+func (c SharedConfig) GetEC2IMDSV1FallbackDisabled() (bool, bool) {
+ if c.EC2IMDSv1Disabled == nil {
+ return false, false
+ }
+
+ return *c.EC2IMDSv1Disabled, true
+}
+
// GetUseDualStackEndpoint returns whether the service's dual-stack endpoint should be
// used for requests.
func (c SharedConfig) GetUseDualStackEndpoint(ctx context.Context) (value aws.DualStackEndpointState, found bool, err error) {
@@ -346,6 +460,16 @@ func (c SharedConfig) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEnd
return c.UseFIPSEndpoint, true, nil
}
+// GetS3DisableExpressAuth returns the configured value for
+// [SharedConfig.S3DisableExpressAuth].
+func (c SharedConfig) GetS3DisableExpressAuth() (value, ok bool) {
+ if c.S3DisableExpressAuth == nil {
+ return false, false
+ }
+
+ return *c.S3DisableExpressAuth, true
+}
+
// GetCustomCABundle returns the custom CA bundle's PEM bytes if the file was
func (c SharedConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) {
if len(c.CustomCABundle) == 0 {
@@ -359,6 +483,45 @@ func (c SharedConfig) getCustomCABundle(context.Context) (io.Reader, bool, error
return bytes.NewReader(b), true, nil
}
+// getAppID returns the sdk app ID if set in shared config profile
+func (c SharedConfig) getAppID(context.Context) (string, bool, error) {
+ return c.AppID, len(c.AppID) > 0, nil
+}
+
+// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured
+// endpoints feature.
+func (c SharedConfig) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) {
+ if c.IgnoreConfiguredEndpoints == nil {
+ return false, false, nil
+ }
+
+ return *c.IgnoreConfiguredEndpoints, true, nil
+}
+
+func (c SharedConfig) getBaseEndpoint(context.Context) (string, bool, error) {
+ return c.BaseEndpoint, len(c.BaseEndpoint) > 0, nil
+}
+
+// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use
+// with configured endpoints.
+func (c SharedConfig) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) {
+ if service, ok := c.Services.ServiceValues[normalizeShared(sdkID)]; ok {
+ if endpt, ok := service[endpointURL]; ok {
+ return endpt, true, nil
+ }
+ }
+ return "", false, nil
+}
+
+func normalizeShared(sdkID string) string {
+ lower := strings.ToLower(sdkID)
+ return strings.ReplaceAll(lower, " ", "_")
+}
+
+func (c SharedConfig) getServicesObject(context.Context) (map[string]map[string]string, bool, error) {
+ return c.Services.ServiceValues, c.Services.ServiceValues != nil, nil
+}
+
// loadSharedConfigIgnoreNotExist is an alias for loadSharedConfig with the
// addition of ignoring when none of the files exist or when the profile
// is not found in any of the files.
@@ -463,7 +626,6 @@ type LoadSharedConfigOptions struct {
//
// You can read more about shared config and credentials file location at
// https://docs.aws.amazon.com/credref/latest/refdocs/file-location.html#file-location
-//
func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func(*LoadSharedConfigOptions)) (SharedConfig, error) {
var option LoadSharedConfigOptions
for _, fn := range optFns {
@@ -485,7 +647,7 @@ func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func
}
// check for profile prefix and drop duplicates or invalid profiles
- err = processConfigSections(ctx, configSections, option.Logger)
+ err = processConfigSections(ctx, &configSections, option.Logger)
if err != nil {
return SharedConfig{}, err
}
@@ -497,18 +659,19 @@ func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func
}
// check for profile prefix and drop duplicates or invalid profiles
- err = processCredentialsSections(ctx, credentialsSections, option.Logger)
+ err = processCredentialsSections(ctx, &credentialsSections, option.Logger)
if err != nil {
return SharedConfig{}, err
}
- err = mergeSections(configSections, credentialsSections)
+ err = mergeSections(&configSections, credentialsSections)
if err != nil {
return SharedConfig{}, err
}
cfg := SharedConfig{}
profiles := map[string]struct{}{}
+
if err = cfg.setFromIniSections(profiles, profile, configSections, option.Logger); err != nil {
return SharedConfig{}, err
}
@@ -516,53 +679,74 @@ func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func
return cfg, nil
}
-func processConfigSections(ctx context.Context, sections ini.Sections, logger logging.Logger) error {
+func processConfigSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error {
+ skipSections := map[string]struct{}{}
+
for _, section := range sections.List() {
- // drop profiles without prefix for config files
- if !strings.HasPrefix(section, profilePrefix) && !strings.EqualFold(section, "default") {
+ if _, ok := skipSections[section]; ok {
+ continue
+ }
+
+ // drop sections from config file that do not have expected prefixes.
+ switch {
+ case strings.HasPrefix(section, profilePrefix):
+ // Rename sections to remove "profile " prefixing to match with
+ // credentials file. If default is already present, it will be
+ // dropped.
+ newName, err := renameProfileSection(section, sections, logger)
+ if err != nil {
+ return fmt.Errorf("failed to rename profile section, %w", err)
+ }
+ skipSections[newName] = struct{}{}
+
+ case strings.HasPrefix(section, ssoSectionPrefix):
+ case strings.HasPrefix(section, servicesPrefix):
+ case strings.EqualFold(section, "default"):
+ default:
// drop this section, as invalid profile name
sections.DeleteSection(section)
if logger != nil {
- logger.Logf(logging.Debug,
- "A profile defined with name `%v` is ignored. For use within a shared configuration file, "+
- "a non-default profile must have `profile ` prefixed to the profile name.\n",
+ logger.Logf(logging.Debug, "A profile defined with name `%v` is ignored. "+
+ "For use within a shared configuration file, "+
+ "a non-default profile must have `profile ` "+
+ "prefixed to the profile name.",
section,
)
}
}
}
+ return nil
+}
- // rename sections to remove `profile ` prefixing to match with credentials file.
- // if default is already present, it will be dropped.
- for _, section := range sections.List() {
- if strings.HasPrefix(section, profilePrefix) {
- v, ok := sections.GetSection(section)
- if !ok {
- return fmt.Errorf("error processing profiles within the shared configuration files")
- }
-
- // delete section with profile as prefix
- sections.DeleteSection(section)
+func renameProfileSection(section string, sections *ini.Sections, logger logging.Logger) (string, error) {
+ v, ok := sections.GetSection(section)
+ if !ok {
+ return "", fmt.Errorf("error processing profiles within the shared configuration files")
+ }
- // set the value to non-prefixed name in sections.
- section = strings.TrimPrefix(section, profilePrefix)
- if sections.HasSection(section) {
- oldSection, _ := sections.GetSection(section)
- v.Logs = append(v.Logs,
- fmt.Sprintf("A default profile prefixed with `profile ` found in %s, "+
- "overrided non-prefixed default profile from %s", v.SourceFile, oldSection.SourceFile))
- }
+ // delete section with profile as prefix
+ sections.DeleteSection(section)
- // assign non-prefixed name to section
- v.Name = section
- sections.SetSection(section, v)
- }
+ // set the value to non-prefixed name in sections.
+ section = strings.TrimPrefix(section, profilePrefix)
+ if sections.HasSection(section) {
+ oldSection, _ := sections.GetSection(section)
+ v.Logs = append(v.Logs,
+ fmt.Sprintf("A non-default profile not prefixed with `profile ` found in %s, "+
+ "overriding non-default profile from %s",
+ v.SourceFile, oldSection.SourceFile))
+ sections.DeleteSection(section)
}
- return nil
+
+ // assign non-prefixed name to section
+ v.Name = section
+ sections.SetSection(section, v)
+
+ return section, nil
}
-func processCredentialsSections(ctx context.Context, sections ini.Sections, logger logging.Logger) error {
+func processCredentialsSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error {
for _, section := range sections.List() {
// drop profiles with prefix for credential files
if strings.HasPrefix(section, profilePrefix) {
@@ -596,7 +780,7 @@ func loadIniFiles(filenames []string) (ini.Sections, error) {
}
// mergeSections into mergedSections
- err = mergeSections(mergedSections, sections)
+ err = mergeSections(&mergedSections, sections)
if err != nil {
return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err}
}
@@ -606,7 +790,7 @@ func loadIniFiles(filenames []string) (ini.Sections, error) {
}
// mergeSections merges source section properties into destination section properties
-func mergeSections(dst, src ini.Sections) error {
+func mergeSections(dst *ini.Sections, src ini.Sections) error {
for _, sectionName := range src.List() {
srcSection, _ := src.GetSection(sectionName)
@@ -676,29 +860,29 @@ func mergeSections(dst, src ini.Sections) error {
s3DisableMultiRegionAccessPointsKey,
ec2MetadataServiceEndpointModeKey,
ec2MetadataServiceEndpointKey,
+ ec2MetadataV1DisabledKey,
useDualStackEndpoint,
useFIPSEndpointKey,
defaultsModeKey,
retryModeKey,
- }
- for i := range stringKeys {
- if err := mergeStringKey(&srcSection, &dstSection, sectionName, stringKeys[i]); err != nil {
- return err
- }
- }
-
- intKeys := []string{
+ caBundleKey,
roleDurationSecondsKey,
retryMaxAttemptsKey,
+
+ ssoSessionNameKey,
+ ssoAccountIDKey,
+ ssoRegionKey,
+ ssoRoleNameKey,
+ ssoStartURLKey,
}
- for i := range intKeys {
- if err := mergeIntKey(&srcSection, &dstSection, sectionName, intKeys[i]); err != nil {
+ for i := range stringKeys {
+ if err := mergeStringKey(&srcSection, &dstSection, sectionName, stringKeys[i]); err != nil {
return err
}
}
// set srcSection on dst srcSection
- dst = dst.SetSection(sectionName, dstSection)
+ *dst = dst.SetSection(sectionName, dstSection)
}
return nil
@@ -723,26 +907,6 @@ func mergeStringKey(srcSection *ini.Section, dstSection *ini.Section, sectionNam
return nil
}
-func mergeIntKey(srcSection *ini.Section, dstSection *ini.Section, sectionName, key string) error {
- if srcSection.Has(key) {
- srcValue := srcSection.Int(key)
- v, err := ini.NewIntValue(srcValue)
- if err != nil {
- return fmt.Errorf("error merging %s, %w", key, err)
- }
-
- if dstSection.Has(key) {
- dstSection.Logs = append(dstSection.Logs, newMergeKeyLogMessage(sectionName, key,
- dstSection.SourceFile[key], srcSection.SourceFile[key]))
-
- }
-
- dstSection.UpdateValue(key, v)
- dstSection.UpdateSourceFile(key, srcSection.SourceFile[key])
- }
- return nil
-}
-
func newMergeKeyLogMessage(sectionName, key, dstSourceFile, srcSourceFile string) string {
return fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
"with a %v value found in a duplicate profile defined at file %v. \n",
@@ -769,7 +933,7 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile
}
}
- // set config from the provided ini section
+ // set config from the provided INI section
err := c.setFromIniSection(profile, section)
if err != nil {
return fmt.Errorf("error fetching config from profile, %v, %w", profile, err)
@@ -782,9 +946,8 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile
// profile only have credential provider options.
c.clearAssumeRoleOptions()
} else {
- // First time a profile has been seen, It must either be a assume role
- // credentials, or SSO. Assert if the credential type requires a role ARN,
- // the ARN is also set, or validate that the SSO configuration is complete.
+ // First time a profile has been seen. Assert if the credential type
+ // requires a role ARN, the ARN is also set
if err := c.validateCredentialsConfig(profile); err != nil {
return err
}
@@ -832,11 +995,34 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile
c.Source = srcCfg
}
+ // If the profile contains an SSO session parameter, the session MUST exist
+ // as a section in the config file. Load the SSO session using the name
+ // provided. If the session section is not found or incomplete an error
+ // will be returned.
+ if c.hasSSOTokenProviderConfiguration() {
+ section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(c.SSOSessionName))
+ if !ok {
+ return fmt.Errorf("failed to find SSO session section, %v", c.SSOSessionName)
+ }
+ var ssoSession SSOSession
+ ssoSession.setFromIniSection(section)
+ ssoSession.Name = c.SSOSessionName
+ c.SSOSession = &ssoSession
+ }
+
+ if len(c.ServicesSectionName) > 0 {
+ if section, ok := sections.GetSection(servicesPrefix + c.ServicesSectionName); ok {
+ var svcs Services
+ svcs.setFromIniSection(section)
+ c.Services = svcs
+ }
+ }
+
return nil
}
// setFromIniSection loads the configuration from the profile section defined in
-// the provided ini file. A SharedConfig pointer type value is used so that
+// the provided INI file. A SharedConfig pointer type value is used so that
// multiple config file loadings can be chained.
//
// Only loads complete logically grouped values, and will not set fields in cfg
@@ -871,14 +1057,27 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
updateString(&c.Region, section, regionKey)
// AWS Single Sign-On (AWS SSO)
- updateString(&c.SSOAccountID, section, ssoAccountIDKey)
+ // SSO session options
+ updateString(&c.SSOSessionName, section, ssoSessionNameKey)
+
+ // Legacy SSO session options
updateString(&c.SSORegion, section, ssoRegionKey)
+ updateString(&c.SSOStartURL, section, ssoStartURLKey)
+
+ // SSO fields not used
+ updateString(&c.SSOAccountID, section, ssoAccountIDKey)
updateString(&c.SSORoleName, section, ssoRoleNameKey)
- updateString(&c.SSOStartURL, section, ssoStartURL)
+ // we're retaining a behavioral quirk with this field that existed before
+ // the removal of literal parsing for #2276:
+ // - if the key is missing, the config field will not be set
+ // - if the key is set to a non-numeric, the config field will be set to 0
if section.Has(roleDurationSecondsKey) {
- d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second
- c.RoleDurationSeconds = &d
+ if v, ok := section.Int(roleDurationSecondsKey); ok {
+ c.RoleDurationSeconds = aws.Duration(time.Duration(v) * time.Second)
+ } else {
+ c.RoleDurationSeconds = aws.Duration(time.Duration(0))
+ }
}
updateString(&c.CredentialProcess, section, credentialProcessKey)
@@ -887,11 +1086,13 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
updateEndpointDiscoveryType(&c.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey)
updateBoolPtr(&c.S3UseARNRegion, section, s3UseARNRegionKey)
updateBoolPtr(&c.S3DisableMultiRegionAccessPoints, section, s3DisableMultiRegionAccessPointsKey)
+ updateBoolPtr(&c.S3DisableExpressAuth, section, s3DisableExpressSessionAuthKey)
if err := updateEC2MetadataServiceEndpointMode(&c.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil {
return fmt.Errorf("failed to load %s from shared config, %v", ec2MetadataServiceEndpointModeKey, err)
}
updateString(&c.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey)
+ updateBoolPtr(&c.EC2IMDSv1Disabled, section, ec2MetadataV1DisabledKey)
updateUseDualStackEndpoint(&c.UseDualStackEndpoint, section, useDualStackEndpoint)
updateUseFIPSEndpoint(&c.UseFIPSEndpoint, section, useFIPSEndpointKey)
@@ -909,6 +1110,20 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
updateString(&c.CustomCABundle, section, caBundleKey)
+ // user agent app ID added to request User-Agent header
+ updateString(&c.AppID, section, sdkAppID)
+
+ updateBoolPtr(&c.IgnoreConfiguredEndpoints, section, ignoreConfiguredEndpoints)
+
+ updateString(&c.BaseEndpoint, section, endpointURL)
+
+ if err := updateDisableRequestCompression(&c.DisableRequestCompression, section, disableRequestCompression); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %w", disableRequestCompression, err)
+ }
+ if err := updateRequestMinCompressSizeBytes(&c.RequestMinCompressSizeBytes, section, requestMinCompressionSizeBytes); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %w", requestMinCompressionSizeBytes, err)
+ }
+
// Shared Credentials
creds := aws.Credentials{
AccessKeyID: section.String(accessKeyIDKey),
@@ -921,9 +1136,61 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
c.Credentials = creds
}
+ updateString(&c.ServicesSectionName, section, servicesSectionKey)
+
return nil
}
+func updateRequestMinCompressSizeBytes(bytes **int64, sec ini.Section, key string) error {
+ if !sec.Has(key) {
+ return nil
+ }
+
+ v, ok := sec.Int(key)
+ if !ok {
+ return fmt.Errorf("invalid value for min request compression size bytes %s, need int64", sec.String(key))
+ }
+ if v < 0 || v > smithyrequestcompression.MaxRequestMinCompressSizeBytes {
+ return fmt.Errorf("invalid range for min request compression size bytes %d, must be within 0 and 10485760 inclusively", v)
+ }
+ *bytes = new(int64)
+ **bytes = v
+ return nil
+}
+
+func updateDisableRequestCompression(disable **bool, sec ini.Section, key string) error {
+ if !sec.Has(key) {
+ return nil
+ }
+
+ v := sec.String(key)
+ switch {
+ case v == "true":
+ *disable = new(bool)
+ **disable = true
+ case v == "false":
+ *disable = new(bool)
+ **disable = false
+ default:
+ return fmt.Errorf("invalid value for shared config profile field, %s=%s, need true or false", key, v)
+ }
+ return nil
+}
+
+func (c SharedConfig) getRequestMinCompressSizeBytes(ctx context.Context) (int64, bool, error) {
+ if c.RequestMinCompressSizeBytes == nil {
+ return 0, false, nil
+ }
+ return *c.RequestMinCompressSizeBytes, true, nil
+}
+
+func (c SharedConfig) getDisableRequestCompression(ctx context.Context) (bool, bool, error) {
+ if c.DisableRequestCompression == nil {
+ return false, false, nil
+ }
+ return *c.DisableRequestCompression, true, nil
+}
+
func updateDefaultsMode(mode *aws.DefaultsMode, section ini.Section, key string) error {
if !section.Has(key) {
return nil
@@ -992,39 +1259,88 @@ func (c *SharedConfig) validateCredentialType() error {
len(c.CredentialProcess) != 0,
len(c.WebIdentityTokenFile) != 0,
) {
- return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso")
+ return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token")
}
return nil
}
func (c *SharedConfig) validateSSOConfiguration() error {
- if !c.hasSSOConfiguration() {
+ if c.hasSSOTokenProviderConfiguration() {
+ err := c.validateSSOTokenProviderConfiguration()
+ if err != nil {
+ return err
+ }
return nil
}
+ if c.hasLegacySSOConfiguration() {
+ err := c.validateLegacySSOConfiguration()
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (c *SharedConfig) validateSSOTokenProviderConfiguration() error {
var missing []string
- if len(c.SSOAccountID) == 0 {
- missing = append(missing, ssoAccountIDKey)
+
+ if len(c.SSOSessionName) == 0 {
+ missing = append(missing, ssoSessionNameKey)
}
+ if c.SSOSession == nil {
+ missing = append(missing, ssoSectionPrefix)
+ } else {
+ if len(c.SSOSession.SSORegion) == 0 {
+ missing = append(missing, ssoRegionKey)
+ }
+
+ if len(c.SSOSession.SSOStartURL) == 0 {
+ missing = append(missing, ssoStartURLKey)
+ }
+ }
+
+ if len(missing) > 0 {
+ return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s",
+ c.Profile, strings.Join(missing, ", "))
+ }
+
+ if len(c.SSORegion) > 0 && c.SSORegion != c.SSOSession.SSORegion {
+ return fmt.Errorf("%s in profile %q must match %s in %s", ssoRegionKey, c.Profile, ssoRegionKey, ssoSectionPrefix)
+ }
+
+ if len(c.SSOStartURL) > 0 && c.SSOStartURL != c.SSOSession.SSOStartURL {
+ return fmt.Errorf("%s in profile %q must match %s in %s", ssoStartURLKey, c.Profile, ssoStartURLKey, ssoSectionPrefix)
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) validateLegacySSOConfiguration() error {
+ var missing []string
+
if len(c.SSORegion) == 0 {
missing = append(missing, ssoRegionKey)
}
- if len(c.SSORoleName) == 0 {
- missing = append(missing, ssoRoleNameKey)
+ if len(c.SSOStartURL) == 0 {
+ missing = append(missing, ssoStartURLKey)
}
- if len(c.SSOStartURL) == 0 {
- missing = append(missing, ssoStartURL)
+ if len(c.SSOAccountID) == 0 {
+ missing = append(missing, ssoAccountIDKey)
+ }
+
+ if len(c.SSORoleName) == 0 {
+ missing = append(missing, ssoRoleNameKey)
}
if len(missing) > 0 {
return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s",
c.Profile, strings.Join(missing, ", "))
}
-
return nil
}
@@ -1044,15 +1360,15 @@ func (c *SharedConfig) hasCredentials() bool {
}
func (c *SharedConfig) hasSSOConfiguration() bool {
- switch {
- case len(c.SSOAccountID) != 0:
- case len(c.SSORegion) != 0:
- case len(c.SSORoleName) != 0:
- case len(c.SSOStartURL) != 0:
- default:
- return false
- }
- return true
+ return c.hasSSOTokenProviderConfiguration() || c.hasLegacySSOConfiguration()
+}
+
+func (c *SharedConfig) hasSSOTokenProviderConfiguration() bool {
+ return len(c.SSOSessionName) > 0
+}
+
+func (c *SharedConfig) hasLegacySSOConfiguration() bool {
+ return len(c.SSORegion) > 0 || len(c.SSOAccountID) > 0 || len(c.SSOStartURL) > 0 || len(c.SSORoleName) > 0
}
func (c *SharedConfig) clearAssumeRoleOptions() {
@@ -1143,12 +1459,6 @@ func (e CredentialRequiresARNError) Error() string {
)
}
-func userHomeDir() string {
- // Ignore errors since we only care about Windows and *nix.
- homedir, _ := os.UserHomeDir()
- return homedir
-}
-
func oneOrNone(bs ...bool) bool {
var count int
@@ -1182,12 +1492,13 @@ func updateInt(dst *int, section ini.Section, key string) error {
if !section.Has(key) {
return nil
}
- if vt, _ := section.ValueType(key); vt != ini.IntegerType {
- return fmt.Errorf("invalid value %s=%s, expect integer",
- key, section.String(key))
+ v, ok := section.Int(key)
+ if !ok {
+ return fmt.Errorf("invalid value %s=%s, expect integer", key, section.String(key))
}
- *dst = int(section.Int(key))
+
+ *dst = int(v)
return nil
}
@@ -1197,7 +1508,10 @@ func updateBool(dst *bool, section ini.Section, key string) {
if !section.Has(key) {
return
}
- *dst = section.Bool(key)
+
+ // retains pre-#2276 behavior where non-bool value would resolve to false
+ v, _ := section.Bool(key)
+ *dst = v
}
// updateBoolPtr will only update the dst with the value in the section key,
@@ -1206,8 +1520,11 @@ func updateBoolPtr(dst **bool, section ini.Section, key string) {
if !section.Has(key) {
return
}
+
+ // retains pre-#2276 behavior where non-bool value would resolve to false
+ v, _ := section.Bool(key)
*dst = new(bool)
- **dst = section.Bool(key)
+ **dst = v
}
// updateEndpointDiscoveryType will only update the dst with the value in the section, if
@@ -1239,7 +1556,8 @@ func updateUseDualStackEndpoint(dst *aws.DualStackEndpointState, section ini.Sec
return
}
- if section.Bool(key) {
+ // retains pre-#2276 behavior where non-bool value would resolve to false
+ if v, _ := section.Bool(key); v {
*dst = aws.DualStackEndpointStateEnabled
} else {
*dst = aws.DualStackEndpointStateDisabled
@@ -1255,7 +1573,8 @@ func updateUseFIPSEndpoint(dst *aws.FIPSEndpointState, section ini.Section, key
return
}
- if section.Bool(key) {
+ // retains pre-#2276 behavior where non-bool value would resolve to false
+ if v, _ := section.Bool(key); v {
*dst = aws.FIPSEndpointStateEnabled
} else {
*dst = aws.FIPSEndpointStateDisabled
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
index e98bdbdc..7f1c7490 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
@@ -1,3 +1,402 @@
+# v1.17.7 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.6 (2024-03-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.5 (2024-03-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.4 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.3 (2024-02-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2024-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.16 (2024-01-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.15 (2024-01-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.14 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.13 (2023-12-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.12 (2023-12-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.11 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.10 (2023-12-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.9 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.8 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.7 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.6 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.5 (2023-11-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.4 (2023-11-21)
+
+* **Bug Fix**: Don't expect error responses to have a JSON payload in the endpointcreds provider.
+
+# v1.16.3 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.2 (2023-11-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.1 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2023-11-14)
+
+* **Feature**: Add support for dynamic auth token from file and EKS container host in absolute/relative URIs in the HTTP credential provider.
+
+# v1.15.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2023-11-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.43 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.42 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.41 (2023-10-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.40 (2023-09-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.39 (2023-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.38 (2023-09-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.37 (2023-09-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.36 (2023-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.35 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.34 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.33 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.32 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.31 (2023-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.30 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.29 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.28 (2023-07-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.27 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.26 (2023-06-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.25 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.24 (2023-05-09)
+
+* No change notes available for this release.
+
+# v1.13.23 (2023-05-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.22 (2023-05-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.21 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.20 (2023-04-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.19 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.18 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.17 (2023-03-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.16 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.15 (2023-02-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.14 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.13 (2023-02-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.12 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.11 (2023-02-01)
+
+* No change notes available for this release.
+
+# v1.13.10 (2023-01-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.9 (2023-01-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.8 (2023-01-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.7 (2022-12-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.6 (2022-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.5 (2022-12-15)
+
+* **Bug Fix**: Unify logic between shared config and in finding home directory
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.4 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.3 (2022-11-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.2 (2022-11-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.1 (2022-11-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2022-11-11)
+
+* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846
+* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider
+
+# v1.12.24 (2022-11-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.23 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.22 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.21 (2022-09-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.20 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.19 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.18 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.17 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.16 (2022-08-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.15 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.14 (2022-08-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.13 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.12 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.11 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.10 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.9 (2022-07-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2022-06-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.5 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.4 (2022-05-26)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.3 (2022-05-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.2 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.1 (2022-05-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2022-04-25)
+
+* **Feature**: Adds Duration and Policy options that can be used when creating stscreds.WebIdentityRoleProvider credentials provider.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.11.2 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
index ae25c3a4..6ed71b42 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
@@ -1,27 +1,27 @@
// Package ec2rolecreds provides the credentials provider implementation for
// retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS.
//
-// Concurrency and caching
+// # Concurrency and caching
//
// The Provider is not safe to be used concurrently, and does not provide any
// caching of credentials retrieved. You should wrap the Provider with a
// `aws.CredentialsCache` to provide concurrency safety, and caching of
// credentials.
//
-// Loading credentials with the SDK's AWS Config
+// # Loading credentials with the SDK's AWS Config
//
// The EC2 Instance role credentials provider will automatically be the resolved
-// credential provider int he credential chain if no other credential provider is
+// credential provider in the credential chain if no other credential provider is
// resolved first.
//
// To explicitly instruct the SDK's credentials resolving to use the EC2 Instance
// role for credentials, you specify a `credentials_source` property in the config
// profile the SDK will load.
//
-// [default]
-// credential_source = Ec2InstanceMetadata
+// [default]
+// credential_source = Ec2InstanceMetadata
//
-// Loading credentials with the Provider directly
+// # Loading credentials with the Provider directly
//
// Another way to use the EC2 Instance role credentials provider is to create it
// directly and assign it as the credentials provider for an API client.
@@ -30,28 +30,28 @@
// it with the CredentialsCache before assigning the provider to the Amazon S3 API
// client's Credentials option.
//
-// provider := imds.New(imds.Options{})
+// provider := imds.New(imds.Options{})
//
-// // Create the service client value configured for credentials.
-// svc := s3.New(s3.Options{
-// Credentials: aws.NewCredentialsCache(provider),
-// })
+// // Create the service client value configured for credentials.
+// svc := s3.New(s3.Options{
+// Credentials: aws.NewCredentialsCache(provider),
+// })
//
// If you need more control, you can set the configuration options on the
// credentials provider using the imds.Options type to configure the EC2 IMDS
// API Client and ExpiryWindow of the retrieved credentials.
//
-// provider := imds.New(imds.Options{
-// // See imds.Options type's documentation for more options available.
-// Client: imds.New(Options{
-// HTTPClient: customHTTPClient,
-// }),
+// provider := imds.New(imds.Options{
+// // See imds.Options type's documentation for more options available.
+// Client: imds.New(Options{
+// HTTPClient: customHTTPClient,
+// }),
//
-// // Modify how soon credentials expire prior to their original expiry time.
-// ExpiryWindow: 5 * time.Minute,
-// })
+// // Modify how soon credentials expire prior to their original expiry time.
+// ExpiryWindow: 5 * time.Minute,
+// })
//
-// EC2 IMDS API Client
+// # EC2 IMDS API Client
//
// See the github.com/aws/aws-sdk-go-v2/feature/ec2/imds module for more details on
// configuring the client, and options available.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
index aeb79ac3..5c699f16 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
@@ -33,9 +33,9 @@ type GetMetadataAPIClient interface {
//
// The New function must be used to create the with a custom EC2 IMDS client.
//
-// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{
-// o.Client = imds.New(imds.Options{/* custom options */})
-// })
+// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{
+// o.Client = imds.New(imds.Options{/* custom options */})
+// })
type Provider struct {
options Options
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/auth.go
new file mode 100644
index 00000000..c3f5dadc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/auth.go
@@ -0,0 +1,48 @@
+package client
+
+import (
+ "context"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
+
+type signRequestMiddleware struct {
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
index 60b8298f..9a869f89 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
@@ -62,7 +62,16 @@ func New(options Options, optFns ...func(*Options)) *Client {
}
if options.Retryer == nil {
- options.Retryer = retry.NewStandard()
+ // Amazon-owned implementations of this endpoint are known to sometimes
+ // return plaintext responses (i.e. no Code) like normal, add a few
+ // additional status codes
+ options.Retryer = retry.NewStandard(func(o *retry.StandardOptions) {
+ o.Retryables = append(o.Retryables, retry.RetryableHTTPStatusCode{
+ Codes: map[int]struct{}{
+ http.StatusTooManyRequests: {},
+ },
+ })
+ })
}
for _, fn := range optFns {
@@ -92,6 +101,7 @@ func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput
stack.Serialize.Add(&serializeOpGetCredential{}, smithymiddleware.After)
stack.Build.Add(&buildEndpoint{Endpoint: options.Endpoint}, smithymiddleware.After)
stack.Deserialize.Add(&deserializeOpGetCredential{}, smithymiddleware.After)
+ addProtocolFinalizerMiddlewares(stack, options, "GetCredentials")
retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{Retryer: options.Retryer})
middleware.AddSDKAgentKey(middleware.FeatureMetadata, ServiceID)
smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)
@@ -122,9 +132,10 @@ type GetCredentialsOutput struct {
// EndpointError is an error returned from the endpoint service
type EndpointError struct {
- Code string `json:"code"`
- Message string `json:"message"`
- Fault smithy.ErrorFault `json:"-"`
+ Code string `json:"code"`
+ Message string `json:"message"`
+ Fault smithy.ErrorFault `json:"-"`
+ statusCode int `json:"-"`
}
// Error is the error mesage string
@@ -146,3 +157,8 @@ func (e *EndpointError) ErrorMessage() string {
func (e *EndpointError) ErrorFault() smithy.ErrorFault {
return e.Fault
}
+
+// HTTPStatusCode implements retry.HTTPStatusCode.
+func (e *EndpointError) HTTPStatusCode() int {
+ return e.statusCode
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/endpoints.go
new file mode 100644
index 00000000..748ee672
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/endpoints.go
@@ -0,0 +1,20 @@
+package client
+
+import (
+ "context"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
index 40747a53..f2820d20 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
+ "io"
"net/url"
"github.com/aws/smithy-go"
@@ -104,17 +105,60 @@ func (d *deserializeOpGetCredential) HandleDeserialize(ctx context.Context, in s
}
func deserializeError(response *smithyhttp.Response) error {
- var errShape *EndpointError
- err := json.NewDecoder(response.Body).Decode(&errShape)
+ // we could be talking to anything, json isn't guaranteed
+ // see https://github.com/aws/aws-sdk-go-v2/issues/2316
+ if response.Header.Get("Content-Type") == "application/json" {
+ return deserializeJSONError(response)
+ }
+
+ msg, err := io.ReadAll(response.Body)
if err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode error message, %w", err)}
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("read response, %w", err),
+ }
+ }
+
+ return &EndpointError{
+ // no sensible value for Code
+ Message: string(msg),
+ Fault: stof(response.StatusCode),
+ statusCode: response.StatusCode,
}
+}
- if response.StatusCode >= 500 {
- errShape.Fault = smithy.FaultServer
- } else {
- errShape.Fault = smithy.FaultClient
+func deserializeJSONError(response *smithyhttp.Response) error {
+ var errShape *EndpointError
+ if err := json.NewDecoder(response.Body).Decode(&errShape); err != nil {
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode error message, %w", err),
+ }
}
+ errShape.Fault = stof(response.StatusCode)
+ errShape.statusCode = response.StatusCode
return errShape
}
+
+// maps HTTP status code to smithy ErrorFault
+func stof(code int) smithy.ErrorFault {
+ if code >= 500 {
+ return smithy.FaultServer
+ }
+ return smithy.FaultClient
+}
+
+func addProtocolFinalizerMiddlewares(stack *smithymiddleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, smithymiddleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", smithymiddleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %w", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", smithymiddleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %w", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", smithymiddleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
index 40cd7add..0c3c4d68 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
@@ -7,32 +7,36 @@
//
// Static credentials will never expire once they have been retrieved. The format
// of the static credentials response:
-// {
-// "AccessKeyId" : "MUA...",
-// "SecretAccessKey" : "/7PC5om....",
-// }
+//
+// {
+// "AccessKeyId" : "MUA...",
+// "SecretAccessKey" : "/7PC5om....",
+// }
//
// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration
// value in the response. The format of the refreshable credentials response:
-// {
-// "AccessKeyId" : "MUA...",
-// "SecretAccessKey" : "/7PC5om....",
-// "Token" : "AQoDY....=",
-// "Expiration" : "2016-02-25T06:03:31Z"
-// }
+//
+// {
+// "AccessKeyId" : "MUA...",
+// "SecretAccessKey" : "/7PC5om....",
+// "Token" : "AQoDY....=",
+// "Expiration" : "2016-02-25T06:03:31Z"
+// }
//
// Errors should be returned in the following format and only returned with 400
// or 500 HTTP status codes.
-// {
-// "code": "ErrorCode",
-// "message": "Helpful error message."
-// }
+//
+// {
+// "code": "ErrorCode",
+// "message": "Helpful error message."
+// }
package endpointcreds
import (
"context"
"fmt"
"net/http"
+ "strings"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client"
@@ -78,7 +82,37 @@ type Options struct {
// Optional authorization token value if set will be used as the value of
// the Authorization header of the endpoint credential request.
+ //
+ // When constructed from environment, the provider will use the value of
+ // AWS_CONTAINER_AUTHORIZATION_TOKEN environment variable as the token
+ //
+ // Will be overridden if AuthorizationTokenProvider is configured
AuthorizationToken string
+
+ // Optional auth provider func to dynamically load the auth token from a file
+ // everytime a credential is retrieved
+ //
+ // When constructed from environment, the provider will read and use the content
+ // of the file pointed to by AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE environment variable
+ // as the auth token everytime credentials are retrieved
+ //
+ // Will override AuthorizationToken if configured
+ AuthorizationTokenProvider AuthTokenProvider
+}
+
+// AuthTokenProvider defines an interface to dynamically load a value to be passed
+// for the Authorization header of a credentials request.
+type AuthTokenProvider interface {
+ GetToken() (string, error)
+}
+
+// TokenProviderFunc is a func type implementing AuthTokenProvider interface
+// and enables customizing token provider behavior
+type TokenProviderFunc func() (string, error)
+
+// GetToken func retrieves auth token according to TokenProviderFunc implementation
+func (p TokenProviderFunc) GetToken() (string, error) {
+ return p()
}
// New returns a credentials Provider for retrieving AWS credentials
@@ -129,5 +163,30 @@ func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
}
func (p *Provider) getCredentials(ctx context.Context) (*client.GetCredentialsOutput, error) {
- return p.client.GetCredentials(ctx, &client.GetCredentialsInput{AuthorizationToken: p.options.AuthorizationToken})
+ authToken, err := p.resolveAuthToken()
+ if err != nil {
+ return nil, fmt.Errorf("resolve auth token: %v", err)
+ }
+
+ return p.client.GetCredentials(ctx, &client.GetCredentialsInput{
+ AuthorizationToken: authToken,
+ })
+}
+
+func (p *Provider) resolveAuthToken() (string, error) {
+ authToken := p.options.AuthorizationToken
+
+ var err error
+ if p.options.AuthorizationTokenProvider != nil {
+ authToken, err = p.options.AuthorizationTokenProvider.GetToken()
+ if err != nil {
+ return "", err
+ }
+ }
+
+ if strings.ContainsAny(authToken, "\r\n") {
+ return "", fmt.Errorf("authorization token contains invalid newline sequence")
+ }
+
+ return authToken, nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
index 5705e865..a31e899c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
@@ -3,4 +3,4 @@
package credentials
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.11.2"
+const goModuleVersion = "1.17.7"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
index d56dd826..a3137b8f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
@@ -7,14 +7,14 @@
// option, you should make sure that the config file is as locked down as possible
// using security best practices for your operating system.
//
-// Concurrency and caching
+// # Concurrency and caching
//
// The Provider is not safe to be used concurrently, and does not provide any
// caching of credentials retrieved. You should wrap the Provider with a
// `aws.CredentialsCache` to provide concurrency safety, and caching of
// credentials.
//
-// Loading credentials with the SDKs AWS Config
+// # Loading credentials with the SDKs AWS Config
//
// You can use credentials from a AWS shared config `credential_process` in a
// variety of ways.
@@ -24,20 +24,20 @@
// called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable
// (e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file.
//
-// [default]
-// credential_process = /command/to/call
+// [default]
+// credential_process = /command/to/call
//
// Loading configuration using external will use the credential process to
// retrieve credentials. NOTE: If there are credentials in the profile you are
// using, the credential process will not be used.
//
-// // Initialize a session to load credentials.
-// cfg, _ := config.LoadDefaultConfig(context.TODO())
+// // Initialize a session to load credentials.
+// cfg, _ := config.LoadDefaultConfig(context.TODO())
//
-// // Create S3 service client to use the credentials.
-// svc := s3.NewFromConfig(cfg)
+// // Create S3 service client to use the credentials.
+// svc := s3.NewFromConfig(cfg)
//
-// Loading credentials with the Provider directly
+// # Loading credentials with the Provider directly
//
// Another way to use the credentials process provider is by using the
// `NewProvider` constructor to create the provider and providing a it with a
@@ -47,46 +47,46 @@
// it with the CredentialsCache before assigning the provider to the Amazon S3 API
// client's Credentials option.
//
-// // Create credentials using the Provider.
-// provider := processcreds.NewProvider("/path/to/command")
+// // Create credentials using the Provider.
+// provider := processcreds.NewProvider("/path/to/command")
//
-// // Create the service client value configured for credentials.
-// svc := s3.New(s3.Options{
-// Credentials: aws.NewCredentialsCache(provider),
-// })
+// // Create the service client value configured for credentials.
+// svc := s3.New(s3.Options{
+// Credentials: aws.NewCredentialsCache(provider),
+// })
//
// If you need more control, you can set any configurable options in the
// credentials using one or more option functions.
//
-// provider := processcreds.NewProvider("/path/to/command",
-// func(o *processcreds.Options) {
-// // Override the provider's default timeout
-// o.Timeout = 2 * time.Minute
-// })
+// provider := processcreds.NewProvider("/path/to/command",
+// func(o *processcreds.Options) {
+// // Override the provider's default timeout
+// o.Timeout = 2 * time.Minute
+// })
//
// You can also use your own `exec.Cmd` value by satisfying a value that satisfies
// the `NewCommandBuilder` interface and use the `NewProviderCommand` constructor.
//
-// // Create an exec.Cmd
-// cmdBuilder := processcreds.NewCommandBuilderFunc(
-// func(ctx context.Context) (*exec.Cmd, error) {
-// cmd := exec.CommandContext(ctx,
-// "customCLICommand",
-// "-a", "argument",
-// )
-// cmd.Env = []string{
-// "ENV_VAR_FOO=value",
-// "ENV_VAR_BAR=other_value",
-// }
-//
-// return cmd, nil
-// },
-// )
-//
-// // Create credentials using your exec.Cmd and custom timeout
-// provider := processcreds.NewProviderCommand(cmdBuilder,
-// func(opt *processcreds.Provider) {
-// // optionally override the provider's default timeout
-// opt.Timeout = 1 * time.Second
-// })
+// // Create an exec.Cmd
+// cmdBuilder := processcreds.NewCommandBuilderFunc(
+// func(ctx context.Context) (*exec.Cmd, error) {
+// cmd := exec.CommandContext(ctx,
+// "customCLICommand",
+// "-a", "argument",
+// )
+// cmd.Env = []string{
+// "ENV_VAR_FOO=value",
+// "ENV_VAR_BAR=other_value",
+// }
+//
+// return cmd, nil
+// },
+// )
+//
+// // Create credentials using your exec.Cmd and custom timeout
+// provider := processcreds.NewProviderCommand(cmdBuilder,
+// func(opt *processcreds.Provider) {
+// // optionally override the provider's default timeout
+// opt.Timeout = 1 * time.Second
+// })
package processcreds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
index 3921da34..fe9345e2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
@@ -149,12 +149,24 @@ func NewProviderCommand(builder NewCommandBuilder, options ...func(*Options)) *P
return p
}
-type credentialProcessResponse struct {
- Version int
- AccessKeyID string `json:"AccessKeyId"`
+// A CredentialProcessResponse is the AWS credentials format that must be
+// returned when executing an external credential_process.
+type CredentialProcessResponse struct {
+ // As of this writing, the Version key must be set to 1. This might
+ // increment over time as the structure evolves.
+ Version int
+
+ // The access key ID that identifies the temporary security credentials.
+ AccessKeyID string `json:"AccessKeyId"`
+
+ // The secret access key that can be used to sign requests.
SecretAccessKey string
- SessionToken string
- Expiration *time.Time
+
+ // The token that users must pass to the service API to use the temporary credentials.
+ SessionToken string
+
+ // The date on which the current credentials expire.
+ Expiration *time.Time
}
// Retrieve executes the credential process command and returns the
@@ -166,7 +178,7 @@ func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
}
// Serialize and validate response
- resp := &credentialProcessResponse{}
+ resp := &CredentialProcessResponse{}
if err = json.Unmarshal(out, resp); err != nil {
return aws.Credentials{Source: ProviderName}, &ProviderError{
Err: fmt.Errorf("parse failed of process output: %s, error: %w", out, err),
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
index 2f396c0a..ece1e65f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
@@ -1,63 +1,81 @@
-// Package ssocreds provides a credential provider for retrieving temporary AWS credentials using an SSO access token.
+// Package ssocreds provides a credential provider for retrieving temporary AWS
+// credentials using an SSO access token.
//
-// IMPORTANT: The provider in this package does not initiate or perform the AWS SSO login flow. The SDK provider
-// expects that you have already performed the SSO login flow using AWS CLI using the "aws sso login" command, or by
-// some other mechanism. The provider must find a valid non-expired access token for the AWS SSO user portal URL in
-// ~/.aws/sso/cache. If a cached token is not found, it is expired, or the file is malformed an error will be returned.
+// IMPORTANT: The provider in this package does not initiate or perform the AWS
+// SSO login flow. The SDK provider expects that you have already performed the
+// SSO login flow using AWS CLI using the "aws sso login" command, or by some
+// other mechanism. The provider must find a valid non-expired access token for
+// the AWS SSO user portal URL in ~/.aws/sso/cache. If a cached token is not
+// found, it is expired, or the file is malformed an error will be returned.
//
-// Loading AWS SSO credentials with the AWS shared configuration file
+// # Loading AWS SSO credentials with the AWS shared configuration file
//
// You can use configure AWS SSO credentials from the AWS shared configuration file by
-// providing the specifying the required keys in the profile:
+// specifying the required keys in the profile and referencing an sso-session:
//
-// sso_account_id
-// sso_region
-// sso_role_name
-// sso_start_url
+// sso_session
+// sso_account_id
+// sso_role_name
//
-// For example, the following defines a profile "devsso" and specifies the AWS SSO parameters that defines the target
-// account, role, sign-on portal, and the region where the user portal is located. Note: all SSO arguments must be
+// For example, the following defines a profile "devsso" and specifies the AWS
+// SSO parameters that defines the target account, role, sign-on portal, and
+// the region where the user portal is located. Note: all SSO arguments must be
// provided, or an error will be returned.
//
-// [profile devsso]
-// sso_start_url = https://my-sso-portal.awsapps.com/start
-// sso_role_name = SSOReadOnlyRole
-// sso_region = us-east-1
-// sso_account_id = 123456789012
-//
-// Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to
-// retrieve credentials. For example:
-//
-// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso"))
-// if err != nil {
-// return err
-// }
-//
-// Programmatically loading AWS SSO credentials directly
-//
-// You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information
-// to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache.
-//
-// client := sso.NewFromConfig(cfg)
-//
-// var provider aws.CredentialsProvider
-// provider = ssocreds.New(client, "123456789012", "SSOReadOnlyRole", "us-east-1", "https://my-sso-portal.awsapps.com/start")
-//
-// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time
-// provider = aws.NewCredentialsCache(provider)
-//
-// credentials, err := provider.Retrieve(context.TODO())
-// if err != nil {
-// return err
-// }
-//
-// It is important that you wrap the Provider with aws.CredentialsCache if you are programmatically constructing the
-// provider directly. This prevents your application from accessing the cached access token and requesting new
+// [profile devsso]
+// sso_session = dev-session
+// sso_role_name = SSOReadOnlyRole
+// sso_account_id = 123456789012
+//
+// [sso-session dev-session]
+// sso_start_url = https://my-sso-portal.awsapps.com/start
+// sso_region = us-east-1
+// sso_registration_scopes = sso:account:access
+//
+// Using the config module, you can load the AWS SDK shared configuration, and
+// specify that this profile be used to retrieve credentials. For example:
+//
+// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso"))
+// if err != nil {
+// return err
+// }
+//
+// # Programmatically loading AWS SSO credentials directly
+//
+// You can programmatically construct the AWS SSO Provider in your application,
+// and provide the necessary information to load and retrieve temporary
+// credentials using an access token from ~/.aws/sso/cache.
+//
+// ssoClient := sso.NewFromConfig(cfg)
+// ssoOidcClient := ssooidc.NewFromConfig(cfg)
+// tokenPath, err := ssocreds.StandardCachedTokenFilepath("dev-session")
+// if err != nil {
+// return err
+// }
+//
+// var provider aws.CredentialsProvider
+// provider = ssocreds.New(ssoClient, "123456789012", "SSOReadOnlyRole", "https://my-sso-portal.awsapps.com/start", func(options *ssocreds.Options) {
+// options.SSOTokenProvider = ssocreds.NewSSOTokenProvider(ssoOidcClient, tokenPath)
+// })
+//
+// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time
+// provider = aws.NewCredentialsCache(provider)
+//
+// credentials, err := provider.Retrieve(context.TODO())
+// if err != nil {
+// return err
+// }
+//
+// It is important that you wrap the Provider with aws.CredentialsCache if you
+// are programmatically constructing the provider directly. This prevents your
+// application from accessing the cached access token and requesting new
// credentials each time the credentials are used.
//
-// Additional Resources
+// # Additional Resources
//
-// Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+// Configuring the AWS CLI to use AWS Single Sign-On:
+// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
//
-// AWS Single Sign-On User Guide: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
+// AWS Single Sign-On User Guide:
+// https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
package ssocreds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os.go
deleted file mode 100644
index d4df39a7..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os.go
+++ /dev/null
@@ -1,10 +0,0 @@
-//go:build !windows
-// +build !windows
-
-package ssocreds
-
-import "os"
-
-func getHomeDirectory() string {
- return os.Getenv("HOME")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os_windows.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os_windows.go
deleted file mode 100644
index eb48f61e..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os_windows.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package ssocreds
-
-import "os"
-
-func getHomeDirectory() string {
- return os.Getenv("USERPROFILE")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go
deleted file mode 100644
index 279df7a1..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go
+++ /dev/null
@@ -1,184 +0,0 @@
-package ssocreds
-
-import (
- "context"
- "crypto/sha1"
- "encoding/hex"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "path/filepath"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go-v2/aws"
- "github.com/aws/aws-sdk-go-v2/internal/sdk"
- "github.com/aws/aws-sdk-go-v2/service/sso"
-)
-
-// ProviderName is the name of the provider used to specify the source of credentials.
-const ProviderName = "SSOProvider"
-
-var defaultCacheLocation func() string
-
-func defaultCacheLocationImpl() string {
- return filepath.Join(getHomeDirectory(), ".aws", "sso", "cache")
-}
-
-func init() {
- defaultCacheLocation = defaultCacheLocationImpl
-}
-
-// GetRoleCredentialsAPIClient is a API client that implements the GetRoleCredentials operation.
-type GetRoleCredentialsAPIClient interface {
- GetRoleCredentials(ctx context.Context, params *sso.GetRoleCredentialsInput, optFns ...func(*sso.Options)) (*sso.GetRoleCredentialsOutput, error)
-}
-
-// Options is the Provider options structure.
-type Options struct {
- // The Client which is configured for the AWS Region where the AWS SSO user portal is located.
- Client GetRoleCredentialsAPIClient
-
- // The AWS account that is assigned to the user.
- AccountID string
-
- // The role name that is assigned to the user.
- RoleName string
-
- // The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal.
- StartURL string
-}
-
-// Provider is an AWS credential provider that retrieves temporary AWS credentials by exchanging an SSO login token.
-type Provider struct {
- options Options
-}
-
-// New returns a new AWS Single Sign-On (AWS SSO) credential provider. The provided client is expected to be configured
-// for the AWS Region where the AWS SSO user portal is located.
-func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL string, optFns ...func(options *Options)) *Provider {
- options := Options{
- Client: client,
- AccountID: accountID,
- RoleName: roleName,
- StartURL: startURL,
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &Provider{
- options: options,
- }
-}
-
-// Retrieve retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal
-// by exchanging the accessToken present in ~/.aws/sso/cache.
-func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
- tokenFile, err := loadTokenFile(p.options.StartURL)
- if err != nil {
- return aws.Credentials{}, err
- }
-
- output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{
- AccessToken: &tokenFile.AccessToken,
- AccountId: &p.options.AccountID,
- RoleName: &p.options.RoleName,
- })
- if err != nil {
- return aws.Credentials{}, err
- }
-
- return aws.Credentials{
- AccessKeyID: aws.ToString(output.RoleCredentials.AccessKeyId),
- SecretAccessKey: aws.ToString(output.RoleCredentials.SecretAccessKey),
- SessionToken: aws.ToString(output.RoleCredentials.SessionToken),
- Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(),
- CanExpire: true,
- Source: ProviderName,
- }, nil
-}
-
-func getCacheFileName(url string) (string, error) {
- hash := sha1.New()
- _, err := hash.Write([]byte(url))
- if err != nil {
- return "", err
- }
- return strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json", nil
-}
-
-type rfc3339 time.Time
-
-func (r *rfc3339) UnmarshalJSON(bytes []byte) error {
- var value string
-
- if err := json.Unmarshal(bytes, &value); err != nil {
- return err
- }
-
- parse, err := time.Parse(time.RFC3339, value)
- if err != nil {
- return fmt.Errorf("expected RFC3339 timestamp: %w", err)
- }
-
- *r = rfc3339(parse)
-
- return nil
-}
-
-type token struct {
- AccessToken string `json:"accessToken"`
- ExpiresAt rfc3339 `json:"expiresAt"`
- Region string `json:"region,omitempty"`
- StartURL string `json:"startUrl,omitempty"`
-}
-
-func (t token) Expired() bool {
- return sdk.NowTime().Round(0).After(time.Time(t.ExpiresAt))
-}
-
-// InvalidTokenError is the error type that is returned if loaded token has expired or is otherwise invalid.
-// To refresh the SSO session run aws sso login with the corresponding profile.
-type InvalidTokenError struct {
- Err error
-}
-
-func (i *InvalidTokenError) Unwrap() error {
- return i.Err
-}
-
-func (i *InvalidTokenError) Error() string {
- const msg = "the SSO session has expired or is invalid"
- if i.Err == nil {
- return msg
- }
- return msg + ": " + i.Err.Error()
-}
-
-func loadTokenFile(startURL string) (t token, err error) {
- key, err := getCacheFileName(startURL)
- if err != nil {
- return token{}, &InvalidTokenError{Err: err}
- }
-
- fileBytes, err := ioutil.ReadFile(filepath.Join(defaultCacheLocation(), key))
- if err != nil {
- return token{}, &InvalidTokenError{Err: err}
- }
-
- if err := json.Unmarshal(fileBytes, &t); err != nil {
- return token{}, &InvalidTokenError{Err: err}
- }
-
- if len(t.AccessToken) == 0 {
- return token{}, &InvalidTokenError{}
- }
-
- if t.Expired() {
- return token{}, &InvalidTokenError{Err: fmt.Errorf("access token is expired")}
- }
-
- return t, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go
new file mode 100644
index 00000000..3b97e6dd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go
@@ -0,0 +1,233 @@
+package ssocreds
+
+import (
+ "crypto/sha1"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/internal/shareddefaults"
+)
+
+var osUserHomeDur = shareddefaults.UserHomeDir
+
+// StandardCachedTokenFilepath returns the filepath for the cached SSO token file, or
+// error if unable get derive the path. Key that will be used to compute a SHA1
+// value that is hex encoded.
+//
+// Derives the filepath using the Key as:
+//
+// ~/.aws/sso/cache/.json
+func StandardCachedTokenFilepath(key string) (string, error) {
+ homeDir := osUserHomeDur()
+ if len(homeDir) == 0 {
+ return "", fmt.Errorf("unable to get USER's home directory for cached token")
+ }
+ hash := sha1.New()
+ if _, err := hash.Write([]byte(key)); err != nil {
+ return "", fmt.Errorf("unable to compute cached token filepath key SHA1 hash, %w", err)
+ }
+
+ cacheFilename := strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json"
+
+ return filepath.Join(homeDir, ".aws", "sso", "cache", cacheFilename), nil
+}
+
+type tokenKnownFields struct {
+ AccessToken string `json:"accessToken,omitempty"`
+ ExpiresAt *rfc3339 `json:"expiresAt,omitempty"`
+
+ RefreshToken string `json:"refreshToken,omitempty"`
+ ClientID string `json:"clientId,omitempty"`
+ ClientSecret string `json:"clientSecret,omitempty"`
+}
+
+type token struct {
+ tokenKnownFields
+ UnknownFields map[string]interface{} `json:"-"`
+}
+
+func (t token) MarshalJSON() ([]byte, error) {
+ fields := map[string]interface{}{}
+
+ setTokenFieldString(fields, "accessToken", t.AccessToken)
+ setTokenFieldRFC3339(fields, "expiresAt", t.ExpiresAt)
+
+ setTokenFieldString(fields, "refreshToken", t.RefreshToken)
+ setTokenFieldString(fields, "clientId", t.ClientID)
+ setTokenFieldString(fields, "clientSecret", t.ClientSecret)
+
+ for k, v := range t.UnknownFields {
+ if _, ok := fields[k]; ok {
+ return nil, fmt.Errorf("unknown token field %v, duplicates known field", k)
+ }
+ fields[k] = v
+ }
+
+ return json.Marshal(fields)
+}
+
+func setTokenFieldString(fields map[string]interface{}, key, value string) {
+ if value == "" {
+ return
+ }
+ fields[key] = value
+}
+func setTokenFieldRFC3339(fields map[string]interface{}, key string, value *rfc3339) {
+ if value == nil {
+ return
+ }
+ fields[key] = value
+}
+
+func (t *token) UnmarshalJSON(b []byte) error {
+ var fields map[string]interface{}
+ if err := json.Unmarshal(b, &fields); err != nil {
+ return nil
+ }
+
+ t.UnknownFields = map[string]interface{}{}
+
+ for k, v := range fields {
+ var err error
+ switch k {
+ case "accessToken":
+ err = getTokenFieldString(v, &t.AccessToken)
+ case "expiresAt":
+ err = getTokenFieldRFC3339(v, &t.ExpiresAt)
+ case "refreshToken":
+ err = getTokenFieldString(v, &t.RefreshToken)
+ case "clientId":
+ err = getTokenFieldString(v, &t.ClientID)
+ case "clientSecret":
+ err = getTokenFieldString(v, &t.ClientSecret)
+ default:
+ t.UnknownFields[k] = v
+ }
+
+ if err != nil {
+ return fmt.Errorf("field %q, %w", k, err)
+ }
+ }
+
+ return nil
+}
+
+func getTokenFieldString(v interface{}, value *string) error {
+ var ok bool
+ *value, ok = v.(string)
+ if !ok {
+ return fmt.Errorf("expect value to be string, got %T", v)
+ }
+ return nil
+}
+
+func getTokenFieldRFC3339(v interface{}, value **rfc3339) error {
+ var stringValue string
+ if err := getTokenFieldString(v, &stringValue); err != nil {
+ return err
+ }
+
+ timeValue, err := parseRFC3339(stringValue)
+ if err != nil {
+ return err
+ }
+
+ *value = &timeValue
+ return nil
+}
+
+func loadCachedToken(filename string) (token, error) {
+ fileBytes, err := ioutil.ReadFile(filename)
+ if err != nil {
+ return token{}, fmt.Errorf("failed to read cached SSO token file, %w", err)
+ }
+
+ var t token
+ if err := json.Unmarshal(fileBytes, &t); err != nil {
+ return token{}, fmt.Errorf("failed to parse cached SSO token file, %w", err)
+ }
+
+ if len(t.AccessToken) == 0 || t.ExpiresAt == nil || time.Time(*t.ExpiresAt).IsZero() {
+ return token{}, fmt.Errorf(
+ "cached SSO token must contain accessToken and expiresAt fields")
+ }
+
+ return t, nil
+}
+
+func storeCachedToken(filename string, t token, fileMode os.FileMode) (err error) {
+ tmpFilename := filename + ".tmp-" + strconv.FormatInt(sdk.NowTime().UnixNano(), 10)
+ if err := writeCacheFile(tmpFilename, fileMode, t); err != nil {
+ return err
+ }
+
+ if err := os.Rename(tmpFilename, filename); err != nil {
+ return fmt.Errorf("failed to replace old cached SSO token file, %w", err)
+ }
+
+ return nil
+}
+
+func writeCacheFile(filename string, fileMode os.FileMode, t token) (err error) {
+ var f *os.File
+ f, err = os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_RDWR, fileMode)
+ if err != nil {
+ return fmt.Errorf("failed to create cached SSO token file %w", err)
+ }
+
+ defer func() {
+ closeErr := f.Close()
+ if err == nil && closeErr != nil {
+ err = fmt.Errorf("failed to close cached SSO token file, %w", closeErr)
+ }
+ }()
+
+ encoder := json.NewEncoder(f)
+
+ if err = encoder.Encode(t); err != nil {
+ return fmt.Errorf("failed to serialize cached SSO token, %w", err)
+ }
+
+ return nil
+}
+
+type rfc3339 time.Time
+
+func parseRFC3339(v string) (rfc3339, error) {
+ parsed, err := time.Parse(time.RFC3339, v)
+ if err != nil {
+ return rfc3339{}, fmt.Errorf("expected RFC3339 timestamp: %w", err)
+ }
+
+ return rfc3339(parsed), nil
+}
+
+func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) {
+ var value string
+
+ // Use JSON unmarshal to unescape the quoted value making use of JSON's
+ // unquoting rules.
+ if err = json.Unmarshal(bytes, &value); err != nil {
+ return err
+ }
+
+ *r, err = parseRFC3339(value)
+
+ return nil
+}
+
+func (r *rfc3339) MarshalJSON() ([]byte, error) {
+ value := time.Time(*r).Format(time.RFC3339)
+
+ // Use JSON unmarshal to unescape the quoted value making use of JSON's
+ // quoting rules.
+ return json.Marshal(value)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go
new file mode 100644
index 00000000..b3cf7853
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go
@@ -0,0 +1,152 @@
+package ssocreds
+
+import (
+ "context"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/service/sso"
+)
+
+// ProviderName is the name of the provider used to specify the source of
+// credentials.
+const ProviderName = "SSOProvider"
+
+// GetRoleCredentialsAPIClient is a API client that implements the
+// GetRoleCredentials operation.
+type GetRoleCredentialsAPIClient interface {
+ GetRoleCredentials(context.Context, *sso.GetRoleCredentialsInput, ...func(*sso.Options)) (
+ *sso.GetRoleCredentialsOutput, error,
+ )
+}
+
+// Options is the Provider options structure.
+type Options struct {
+ // The Client which is configured for the AWS Region where the AWS SSO user
+ // portal is located.
+ Client GetRoleCredentialsAPIClient
+
+ // The AWS account that is assigned to the user.
+ AccountID string
+
+ // The role name that is assigned to the user.
+ RoleName string
+
+ // The URL that points to the organization's AWS Single Sign-On (AWS SSO)
+ // user portal.
+ StartURL string
+
+ // The filepath the cached token will be retrieved from. If unset Provider will
+ // use the startURL to determine the filepath at.
+ //
+ // ~/.aws/sso/cache/.json
+ //
+ // If custom cached token filepath is used, the Provider's startUrl
+ // parameter will be ignored.
+ CachedTokenFilepath string
+
+ // Used by the SSOCredentialProvider if a token configuration
+ // profile is used in the shared config
+ SSOTokenProvider *SSOTokenProvider
+}
+
+// Provider is an AWS credential provider that retrieves temporary AWS
+// credentials by exchanging an SSO login token.
+type Provider struct {
+ options Options
+
+ cachedTokenFilepath string
+}
+
+// New returns a new AWS Single Sign-On (AWS SSO) credential provider. The
+// provided client is expected to be configured for the AWS Region where the
+// AWS SSO user portal is located.
+func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL string, optFns ...func(options *Options)) *Provider {
+ options := Options{
+ Client: client,
+ AccountID: accountID,
+ RoleName: roleName,
+ StartURL: startURL,
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &Provider{
+ options: options,
+ cachedTokenFilepath: options.CachedTokenFilepath,
+ }
+}
+
+// Retrieve retrieves temporary AWS credentials from the configured Amazon
+// Single Sign-On (AWS SSO) user portal by exchanging the accessToken present
+// in ~/.aws/sso/cache. However, if a token provider configuration exists
+// in the shared config, then we ought to use the token provider rather then
+// direct access on the cached token.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ var accessToken *string
+ if p.options.SSOTokenProvider != nil {
+ token, err := p.options.SSOTokenProvider.RetrieveBearerToken(ctx)
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+ accessToken = &token.Value
+ } else {
+ if p.cachedTokenFilepath == "" {
+ cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL)
+ if err != nil {
+ return aws.Credentials{}, &InvalidTokenError{Err: err}
+ }
+ p.cachedTokenFilepath = cachedTokenFilepath
+ }
+
+ tokenFile, err := loadCachedToken(p.cachedTokenFilepath)
+ if err != nil {
+ return aws.Credentials{}, &InvalidTokenError{Err: err}
+ }
+
+ if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) {
+ return aws.Credentials{}, &InvalidTokenError{}
+ }
+ accessToken = &tokenFile.AccessToken
+ }
+
+ output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{
+ AccessToken: accessToken,
+ AccountId: &p.options.AccountID,
+ RoleName: &p.options.RoleName,
+ })
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+
+ return aws.Credentials{
+ AccessKeyID: aws.ToString(output.RoleCredentials.AccessKeyId),
+ SecretAccessKey: aws.ToString(output.RoleCredentials.SecretAccessKey),
+ SessionToken: aws.ToString(output.RoleCredentials.SessionToken),
+ CanExpire: true,
+ Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(),
+ Source: ProviderName,
+ }, nil
+}
+
+// InvalidTokenError is the error type that is returned if loaded token has
+// expired or is otherwise invalid. To refresh the SSO session run AWS SSO
+// login with the corresponding profile.
+type InvalidTokenError struct {
+ Err error
+}
+
+func (i *InvalidTokenError) Unwrap() error {
+ return i.Err
+}
+
+func (i *InvalidTokenError) Error() string {
+ const msg = "the SSO session has expired or is invalid"
+ if i.Err == nil {
+ return msg
+ }
+ return msg + ": " + i.Err.Error()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go
new file mode 100644
index 00000000..7f4fc546
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go
@@ -0,0 +1,147 @@
+package ssocreds
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/service/ssooidc"
+ "github.com/aws/smithy-go/auth/bearer"
+)
+
+// CreateTokenAPIClient provides the interface for the SSOTokenProvider's API
+// client for calling CreateToken operation to refresh the SSO token.
+type CreateTokenAPIClient interface {
+ CreateToken(context.Context, *ssooidc.CreateTokenInput, ...func(*ssooidc.Options)) (
+ *ssooidc.CreateTokenOutput, error,
+ )
+}
+
+// SSOTokenProviderOptions provides the options for configuring the
+// SSOTokenProvider.
+type SSOTokenProviderOptions struct {
+ // Client that can be overridden
+ Client CreateTokenAPIClient
+
+ // The set of API Client options to be applied when invoking the
+ // CreateToken operation.
+ ClientOptions []func(*ssooidc.Options)
+
+ // The path the file containing the cached SSO token will be read from.
+ // Initialized the NewSSOTokenProvider's cachedTokenFilepath parameter.
+ CachedTokenFilepath string
+}
+
+// SSOTokenProvider provides an utility for refreshing SSO AccessTokens for
+// Bearer Authentication. The SSOTokenProvider can only be used to refresh
+// already cached SSO Tokens. This utility cannot perform the initial SSO
+// create token.
+//
+// The SSOTokenProvider is not safe to use concurrently. It must be wrapped in
+// a utility such as smithy-go's auth/bearer#TokenCache. The SDK's
+// config.LoadDefaultConfig will automatically wrap the SSOTokenProvider with
+// the smithy-go TokenCache, if the external configuration loaded configured
+// for an SSO session.
+//
+// The initial SSO create token should be preformed with the AWS CLI before the
+// Go application using the SSOTokenProvider will need to retrieve the SSO
+// token. If the AWS CLI has not created the token cache file, this provider
+// will return an error when attempting to retrieve the cached token.
+//
+// This provider will attempt to refresh the cached SSO token periodically if
+// needed when RetrieveBearerToken is called.
+//
+// A utility such as the AWS CLI must be used to initially create the SSO
+// session and cached token file.
+// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+type SSOTokenProvider struct {
+ options SSOTokenProviderOptions
+}
+
+var _ bearer.TokenProvider = (*SSOTokenProvider)(nil)
+
+// NewSSOTokenProvider returns an initialized SSOTokenProvider that will
+// periodically refresh the SSO token cached stored in the cachedTokenFilepath.
+// The cachedTokenFilepath file's content will be rewritten by the token
+// provider when the token is refreshed.
+//
+// The client must be configured for the AWS region the SSO token was created for.
+func NewSSOTokenProvider(client CreateTokenAPIClient, cachedTokenFilepath string, optFns ...func(o *SSOTokenProviderOptions)) *SSOTokenProvider {
+ options := SSOTokenProviderOptions{
+ Client: client,
+ CachedTokenFilepath: cachedTokenFilepath,
+ }
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ provider := &SSOTokenProvider{
+ options: options,
+ }
+
+ return provider
+}
+
+// RetrieveBearerToken returns the SSO token stored in the cachedTokenFilepath
+// the SSOTokenProvider was created with. If the token has expired
+// RetrieveBearerToken will attempt to refresh it. If the token cannot be
+// refreshed or is not present an error will be returned.
+//
+// A utility such as the AWS CLI must be used to initially create the SSO
+// session and cached token file. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+func (p SSOTokenProvider) RetrieveBearerToken(ctx context.Context) (bearer.Token, error) {
+ cachedToken, err := loadCachedToken(p.options.CachedTokenFilepath)
+ if err != nil {
+ return bearer.Token{}, err
+ }
+
+ if cachedToken.ExpiresAt != nil && sdk.NowTime().After(time.Time(*cachedToken.ExpiresAt)) {
+ cachedToken, err = p.refreshToken(ctx, cachedToken)
+ if err != nil {
+ return bearer.Token{}, fmt.Errorf("refresh cached SSO token failed, %w", err)
+ }
+ }
+
+ expiresAt := aws.ToTime((*time.Time)(cachedToken.ExpiresAt))
+ return bearer.Token{
+ Value: cachedToken.AccessToken,
+ CanExpire: !expiresAt.IsZero(),
+ Expires: expiresAt,
+ }, nil
+}
+
+func (p SSOTokenProvider) refreshToken(ctx context.Context, cachedToken token) (token, error) {
+ if cachedToken.ClientSecret == "" || cachedToken.ClientID == "" || cachedToken.RefreshToken == "" {
+ return token{}, fmt.Errorf("cached SSO token is expired, or not present, and cannot be refreshed")
+ }
+
+ createResult, err := p.options.Client.CreateToken(ctx, &ssooidc.CreateTokenInput{
+ ClientId: &cachedToken.ClientID,
+ ClientSecret: &cachedToken.ClientSecret,
+ RefreshToken: &cachedToken.RefreshToken,
+ GrantType: aws.String("refresh_token"),
+ }, p.options.ClientOptions...)
+ if err != nil {
+ return token{}, fmt.Errorf("unable to refresh SSO token, %w", err)
+ }
+
+ expiresAt := sdk.NowTime().Add(time.Duration(createResult.ExpiresIn) * time.Second)
+
+ cachedToken.AccessToken = aws.ToString(createResult.AccessToken)
+ cachedToken.ExpiresAt = (*rfc3339)(&expiresAt)
+ cachedToken.RefreshToken = aws.ToString(createResult.RefreshToken)
+
+ fileInfo, err := os.Stat(p.options.CachedTokenFilepath)
+ if err != nil {
+ return token{}, fmt.Errorf("failed to stat cached SSO token file %w", err)
+ }
+
+ if err = storeCachedToken(p.options.CachedTokenFilepath, cachedToken, fileInfo.Mode()); err != nil {
+ return token{}, fmt.Errorf("unable to cache refreshed SSO token, %w", err)
+ }
+
+ return cachedToken, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
index f8c1ae6a..289707b6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
@@ -8,31 +8,31 @@
// ensure synchronous usage of the AssumeRoleProvider if the value is shared
// between multiple Credentials or service clients.
//
-// Assume Role
+// # Assume Role
//
// To assume an IAM role using STS with the SDK you can create a new Credentials
// with the SDKs's stscreds package.
//
-// // Initial credentials loaded from SDK's default credential chain. Such as
-// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
-// // Role. These credentials will be used to to make the STS Assume Role API.
-// cfg, err := config.LoadDefaultConfig(context.TODO())
-// if err != nil {
-// panic(err)
-// }
+// // Initial credentials loaded from SDK's default credential chain. Such as
+// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
+// // Role. These credentials will be used to to make the STS Assume Role API.
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
//
-// // Create the credentials from AssumeRoleProvider to assume the role
-// // referenced by the "myRoleARN" ARN.
-// stsSvc := sts.NewFromConfig(cfg)
-// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn")
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN.
+// stsSvc := sts.NewFromConfig(cfg)
+// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn")
//
-// cfg.Credentials = aws.NewCredentialsCache(creds)
+// cfg.Credentials = aws.NewCredentialsCache(creds)
//
-// // Create service client value configured for credentials
-// // from assumed role.
-// svc := s3.NewFromConfig(cfg)
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
//
-// Assume Role with custom MFA Token provider
+// # Assume Role with custom MFA Token provider
//
// To assume an IAM role with a MFA token you can either specify a custom MFA
// token provider or use the SDK's built in StdinTokenProvider that will prompt
@@ -43,29 +43,29 @@
// With a custom token provider, the provider is responsible for refreshing the
// token code when called.
//
-// cfg, err := config.LoadDefaultConfig(context.TODO())
-// if err != nil {
-// panic(err)
-// }
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
//
-// staticTokenProvider := func() (string, error) {
-// return someTokenCode, nil
-// }
+// staticTokenProvider := func() (string, error) {
+// return someTokenCode, nil
+// }
//
-// // Create the credentials from AssumeRoleProvider to assume the role
-// // referenced by the "myRoleARN" ARN using the MFA token code provided.
-// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
-// o.SerialNumber = aws.String("myTokenSerialNumber")
-// o.TokenProvider = staticTokenProvider
-// })
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN using the MFA token code provided.
+// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
+// o.SerialNumber = aws.String("myTokenSerialNumber")
+// o.TokenProvider = staticTokenProvider
+// })
//
-// cfg.Credentials = aws.NewCredentialsCache(creds)
+// cfg.Credentials = aws.NewCredentialsCache(creds)
//
-// // Create service client value configured for credentials
-// // from assumed role.
-// svc := s3.NewFromConfig(cfg)
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
//
-// Assume Role with MFA Token Provider
+// # Assume Role with MFA Token Provider
//
// To assume an IAM role with MFA for longer running tasks where the credentials
// may need to be refreshed setting the TokenProvider field of AssumeRoleProvider
@@ -80,23 +80,23 @@
// have undesirable results as the StdinTokenProvider will not be synchronized. A
// single Credentials with an AssumeRoleProvider can be shared safely.
//
-// cfg, err := config.LoadDefaultConfig(context.TODO())
-// if err != nil {
-// panic(err)
-// }
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
//
-// // Create the credentials from AssumeRoleProvider to assume the role
-// // referenced by the "myRoleARN" ARN using the MFA token code provided.
-// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
-// o.SerialNumber = aws.String("myTokenSerialNumber")
-// o.TokenProvider = stscreds.StdinTokenProvider
-// })
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN using the MFA token code provided.
+// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
+// o.SerialNumber = aws.String("myTokenSerialNumber")
+// o.TokenProvider = stscreds.StdinTokenProvider
+// })
//
-// cfg.Credentials = aws.NewCredentialsCache(creds)
+// cfg.Credentials = aws.NewCredentialsCache(creds)
//
-// // Create service client value configured for credentials
-// // from assumed role.
-// svc := s3.NewFromConfig(cfg)
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
package stscreds
import (
@@ -136,8 +136,13 @@ type AssumeRoleAPIClient interface {
AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error)
}
-// DefaultDuration is the default amount of time in minutes that the credentials
-// will be valid for.
+// DefaultDuration is the default amount of time in minutes that the
+// credentials will be valid for. This value is only used by AssumeRoleProvider
+// for specifying the default expiry duration of an assume role.
+//
+// Other providers such as WebIdentityRoleProvider do not use this value, and
+// instead rely on STS API's default parameter handing to assign a default
+// value.
var DefaultDuration = time.Duration(15) * time.Minute
// AssumeRoleProvider retrieves temporary credentials from the STS service, and
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go
index 7854a322..ddaf6df6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go
@@ -5,6 +5,7 @@ import (
"fmt"
"io/ioutil"
"strconv"
+ "time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/retry"
@@ -45,6 +46,19 @@ type WebIdentityRoleOptions struct {
// Session name, if you wish to uniquely identify this session.
RoleSessionName string
+ // Expiry duration of the STS credentials. STS will assign a default expiry
+ // duration if this value is unset. This is different from the Duration
+ // option of AssumeRoleProvider, which automatically assigns 15 minutes if
+ // Duration is unset.
+ //
+ // See the STS AssumeRoleWithWebIdentity API reference guide for more
+ // information on defaults.
+ // https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html
+ Duration time.Duration
+
+ // An IAM policy in JSON format that you want to use as an inline session policy.
+ Policy *string
+
// The Amazon Resource Names (ARNs) of the IAM managed policies that you
// want to use as managed session policies. The policies must exist in the
// same account as the role.
@@ -100,12 +114,21 @@ func (p *WebIdentityRoleProvider) Retrieve(ctx context.Context) (aws.Credentials
// uses unix time in nanoseconds to uniquely identify sessions.
sessionName = strconv.FormatInt(sdk.NowTime().UnixNano(), 10)
}
- resp, err := p.options.Client.AssumeRoleWithWebIdentity(ctx, &sts.AssumeRoleWithWebIdentityInput{
+ input := &sts.AssumeRoleWithWebIdentityInput{
PolicyArns: p.options.PolicyARNs,
RoleArn: &p.options.RoleARN,
RoleSessionName: &sessionName,
WebIdentityToken: aws.String(string(b)),
- }, func(options *sts.Options) {
+ }
+ if p.options.Duration != 0 {
+ // If set use the value, otherwise STS will assign a default expiration duration.
+ input.DurationSeconds = aws.Int32(int32(p.options.Duration / time.Second))
+ }
+ if p.options.Policy != nil {
+ input.Policy = p.options.Policy
+ }
+
+ resp, err := p.options.Client.AssumeRoleWithWebIdentity(ctx, input, func(options *sts.Options) {
options.Retryer = retry.AddWithErrorCodes(options.Retryer, invalidIdentityTokenExceptionCode)
})
if err != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/doc.go
deleted file mode 100644
index 81644bf8..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/doc.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Package sdk is the official AWS SDK v2 for the Go programming language.
-//
-// aws-sdk-go-v2 is the the v2 of the AWS SDK for the Go programming language.
-//
-// Getting started
-//
-// The best way to get started working with the SDK is to use `go get` to add the
-// SDK and desired service clients to your Go dependencies explicitly.
-//
-// go get github.com/aws/aws-sdk-go-v2
-// go get github.com/aws/aws-sdk-go-v2/config
-// go get github.com/aws/aws-sdk-go-v2/service/dynamodb
-//
-// Hello AWS
-//
-// This example shows how you can use the v2 SDK to make an API request using the
-// SDK's Amazon DynamoDB client.
-//
-// package main
-//
-// import (
-// "context"
-// "fmt"
-// "log"
-//
-// "github.com/aws/aws-sdk-go-v2/aws"
-// "github.com/aws/aws-sdk-go-v2/config"
-// "github.com/aws/aws-sdk-go-v2/service/dynamodb"
-// )
-//
-// func main() {
-// // Using the SDK's default configuration, loading additional config
-// // and credentials values from the environment variables, shared
-// // credentials, and shared configuration files
-// cfg, err := config.LoadDefaultConfig(context.TODO(),
-// config.WithRegion("us-west-2"),
-// )
-// if err != nil {
-// log.Fatalf("unable to load SDK config, %v", err)
-// }
-//
-// // Using the Config value, create the DynamoDB client
-// svc := dynamodb.NewFromConfig(cfg)
-//
-// // Build the request with its input parameters
-// resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
-// Limit: aws.Int32(5),
-// })
-// if err != nil {
-// log.Fatalf("failed to list tables, %v", err)
-// }
-//
-// fmt.Println("Tables:")
-// for _, tableName := range resp.TableNames {
-// fmt.Println(tableName)
-// }
-// }
-package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
index 1baeba42..be10a2d8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
@@ -1,3 +1,211 @@
+# v1.15.3 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.2 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.11 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.10 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.9 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.8 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.7 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.6 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.5 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.4 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.3 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.2 (2023-11-02)
+
+* No change notes available for this release.
+
+# v1.14.1 (2023-11-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.13 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.12 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.11 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.10 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.9 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.8 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.7 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.6 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.5 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.4 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.3 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.2 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.1 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2023-03-14)
+
+* **Feature**: Add flag to disable IMDSv1 fallback
+
+# v1.12.24 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.23 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.22 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.21 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.20 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.19 (2022-10-24)
+
+* **Bug Fix**: Fixes an issue that prevented logging of the API request or responses when the respective log modes were enabled.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.18 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.17 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.16 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.15 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.14 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.13 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.12 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.11 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.10 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.9 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.12.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
index 53f3d3c7..46e144d9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
@@ -106,8 +106,10 @@ func New(options Options, optFns ...func(*Options)) *Client {
// or adding custom middleware behavior.
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
opts := Options{
- APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...),
- HTTPClient: cfg.HTTPClient,
+ APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...),
+ HTTPClient: cfg.HTTPClient,
+ ClientLogMode: cfg.ClientLogMode,
+ Logger: cfg.Logger,
}
if cfg.Retryer != nil {
@@ -117,6 +119,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
resolveClientEnableState(cfg, &opts)
resolveEndpointConfig(cfg, &opts)
resolveEndpointModeConfig(cfg, &opts)
+ resolveEnableFallback(cfg, &opts)
return New(opts, optFns...)
}
@@ -172,6 +175,16 @@ type Options struct {
// The logger writer interface to write logging messages to.
Logger logging.Logger
+ // Configure IMDSv1 fallback behavior. By default, the client will attempt
+ // to fall back to IMDSv1 as needed for backwards compatibility. When set to [aws.FalseTernary]
+ // the client will return any errors encountered from attempting to fetch a token
+ // instead of silently using the insecure data flow of IMDSv1.
+ //
+ // See [configuring IMDS] for more information.
+ //
+ // [configuring IMDS]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
+ EnableFallback aws.Ternary
+
// provides the caching of API tokens used for operation calls. If unset,
// the API token will not be retrieved for the operation.
tokenProvider *tokenProvider
@@ -316,3 +329,20 @@ func resolveEndpointConfig(cfg aws.Config, options *Options) error {
options.Endpoint = value
return nil
}
+
+func resolveEnableFallback(cfg aws.Config, options *Options) {
+ if options.EnableFallback != aws.UnknownTernary {
+ return
+ }
+
+ disabled, ok := internalconfig.ResolveV1FallbackDisabled(cfg.ConfigSources)
+ if !ok {
+ return
+ }
+
+ if disabled {
+ options.EnableFallback = aws.FalseTernary
+ } else {
+ options.EnableFallback = aws.TrueTernary
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go
index 9e3bdb0e..af58b6bb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go
@@ -56,6 +56,7 @@ type GetDynamicDataOutput struct {
func addGetDynamicDataMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
+ "GetDynamicData",
buildGetDynamicDataPath,
buildGetDynamicDataOutput)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go
index 24845dcc..5111cc90 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go
@@ -53,6 +53,7 @@ type GetIAMInfoOutput struct {
func addGetIAMInfoMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
+ "GetIAMInfo",
buildGetIAMInfoPath,
buildGetIAMInfoOutput,
)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go
index a87758ed..dc8c09ed 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go
@@ -54,6 +54,7 @@ type GetInstanceIdentityDocumentOutput struct {
func addGetInstanceIdentityDocumentMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
+ "GetInstanceIdentityDocument",
buildGetInstanceIdentityDocumentPath,
buildGetInstanceIdentityDocumentOutput,
)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go
index cb0ce4c0..869bfc9f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go
@@ -56,6 +56,7 @@ type GetMetadataOutput struct {
func addGetMetadataMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
+ "GetMetadata",
buildGetMetadataPath,
buildGetMetadataOutput)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go
index 7b9b4891..8c0572bb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go
@@ -45,6 +45,7 @@ type GetRegionOutput struct {
func addGetRegionMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
+ "GetRegion",
buildGetInstanceIdentityDocumentPath,
buildGetRegionOutput,
)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go
index 841f802c..1f9ee97a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go
@@ -49,6 +49,7 @@ func addGetTokenMiddleware(stack *middleware.Stack, options Options) error {
err := addRequestMiddleware(stack,
options,
"PUT",
+ "GetToken",
buildGetTokenPath,
buildGetTokenOutput)
if err != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go
index 88aa61e9..89036972 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go
@@ -45,6 +45,7 @@ type GetUserDataOutput struct {
func addGetUserDataMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
+ "GetUserData",
buildGetUserDataPath,
buildGetUserDataOutput)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/auth.go
new file mode 100644
index 00000000..ad283cf8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/auth.go
@@ -0,0 +1,48 @@
+package imds
+
+import (
+ "context"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
+
+type signRequestMiddleware struct {
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go
new file mode 100644
index 00000000..d7540da3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go
@@ -0,0 +1,20 @@
+package imds
+
+import (
+ "context"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
index 076de88c..85a0bc6f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
@@ -3,4 +3,4 @@
package imds
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.12.3"
+const goModuleVersion = "1.15.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go
index d72fcb56..ce774558 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go
@@ -58,6 +58,10 @@ type EndpointResolver interface {
GetEC2IMDSEndpoint() (string, bool, error)
}
+type v1FallbackDisabledResolver interface {
+ GetEC2IMDSV1FallbackDisabled() (bool, bool)
+}
+
// ResolveClientEnableState resolves the ClientEnableState from a list of configuration sources.
func ResolveClientEnableState(sources []interface{}) (value ClientEnableState, found bool, err error) {
for _, source := range sources {
@@ -96,3 +100,15 @@ func ResolveEndpointConfig(sources []interface{}) (value string, found bool, err
}
return value, found, err
}
+
+// ResolveV1FallbackDisabled ...
+func ResolveV1FallbackDisabled(sources []interface{}) (bool, bool) {
+ for _, source := range sources {
+ if resolver, ok := source.(v1FallbackDisabledResolver); ok {
+ if v, found := resolver.GetEC2IMDSV1FallbackDisabled(); found {
+ return v, true
+ }
+ }
+ }
+ return false, false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
index 605cbd13..fc948c27 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
@@ -17,10 +17,11 @@ import (
func addAPIRequestMiddleware(stack *middleware.Stack,
options Options,
+ operation string,
getPath func(interface{}) (string, error),
getOutput func(*smithyhttp.Response) (interface{}, error),
) (err error) {
- err = addRequestMiddleware(stack, options, "GET", getPath, getOutput)
+ err = addRequestMiddleware(stack, options, "GET", operation, getPath, getOutput)
if err != nil {
return err
}
@@ -44,6 +45,7 @@ func addAPIRequestMiddleware(stack *middleware.Stack,
func addRequestMiddleware(stack *middleware.Stack,
options Options,
method string,
+ operation string,
getPath func(interface{}) (string, error),
getOutput func(*smithyhttp.Response) (interface{}, error),
) (err error) {
@@ -86,6 +88,25 @@ func addRequestMiddleware(stack *middleware.Stack,
return err
}
+ err = stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: options.ClientLogMode.IsRequest(),
+ LogRequestWithBody: options.ClientLogMode.IsRequestWithBody(),
+ LogResponse: options.ClientLogMode.IsResponse(),
+ LogResponseWithBody: options.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ err = addSetLoggerMiddleware(stack, options)
+ if err != nil {
+ return err
+ }
+
+ if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
+ return fmt.Errorf("add protocol finalizers: %w", err)
+ }
+
// Retry support
return retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{
Retryer: options.Retryer,
@@ -93,6 +114,10 @@ func addRequestMiddleware(stack *middleware.Stack,
})
}
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
type serializeRequest struct {
GetPath func(interface{}) (string, error)
Method string
@@ -264,3 +289,19 @@ func appendURIPath(base, add string) string {
}
return reqPath
}
+
+func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %w", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %w", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go
index 275fade4..5703c6e1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go
@@ -4,12 +4,14 @@ import (
"context"
"errors"
"fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/logging"
"net/http"
"sync"
"sync/atomic"
"time"
- smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
@@ -68,7 +70,7 @@ func (t *tokenProvider) HandleFinalize(
) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
- if !t.enabled() {
+ if t.fallbackEnabled() && !t.enabled() {
// short-circuits to insecure data flow if token provider is disabled.
return next.HandleFinalize(ctx, input)
}
@@ -115,23 +117,15 @@ func (t *tokenProvider) HandleDeserialize(
}
if resp.StatusCode == http.StatusUnauthorized { // unauthorized
- err = &retryableError{Err: err}
t.enable()
+ err = &retryableError{Err: err, isRetryable: true}
}
return out, metadata, err
}
-type retryableError struct {
- Err error
-}
-
-func (*retryableError) RetryableError() bool { return true }
-
-func (e *retryableError) Error() string { return e.Err.Error() }
-
func (t *tokenProvider) getToken(ctx context.Context) (tok *apiToken, err error) {
- if !t.enabled() {
+ if t.fallbackEnabled() && !t.enabled() {
return nil, &bypassTokenRetrievalError{
Err: fmt.Errorf("cannot get API token, provider disabled"),
}
@@ -147,7 +141,7 @@ func (t *tokenProvider) getToken(ctx context.Context) (tok *apiToken, err error)
tok, err = t.updateToken(ctx)
if err != nil {
- return nil, fmt.Errorf("cannot get API token, %w", err)
+ return nil, err
}
return tok, nil
@@ -167,17 +161,19 @@ func (t *tokenProvider) updateToken(ctx context.Context) (*apiToken, error) {
TokenTTL: t.tokenTTL,
})
if err != nil {
- // change the disabled flag on token provider to true, when error is request timeout error.
var statusErr interface{ HTTPStatusCode() int }
if errors.As(err, &statusErr) {
switch statusErr.HTTPStatusCode() {
-
- // Disable get token if failed because of 403, 404, or 405
+ // Disable future get token if failed because of 403, 404, or 405
case http.StatusForbidden,
http.StatusNotFound,
http.StatusMethodNotAllowed:
- t.disable()
+ if t.fallbackEnabled() {
+ logger := middleware.GetLogger(ctx)
+ logger.Logf(logging.Warn, "falling back to IMDSv1: %v", err)
+ t.disable()
+ }
// 400 errors are terminal, and need to be upstreamed
case http.StatusBadRequest:
@@ -192,8 +188,17 @@ func (t *tokenProvider) updateToken(ctx context.Context) (*apiToken, error) {
atomic.StoreUint32(&t.disabled, 1)
}
- // Token couldn't be retrieved, but bypass this, and allow the
- // request to continue.
+ if !t.fallbackEnabled() {
+ // NOTE: getToken() is an implementation detail of some outer operation
+ // (e.g. GetMetadata). It has its own retries that have already been exhausted.
+ // Mark the underlying error as a terminal error.
+ err = &retryableError{Err: err, isRetryable: false}
+ return nil, err
+ }
+
+ // Token couldn't be retrieved, fallback to IMDSv1 insecure flow for this request
+ // and allow the request to proceed. Future requests _may_ re-attempt fetching a
+ // token if not disabled.
return nil, &bypassTokenRetrievalError{Err: err}
}
@@ -206,21 +211,21 @@ func (t *tokenProvider) updateToken(ctx context.Context) (*apiToken, error) {
return tok, nil
}
-type bypassTokenRetrievalError struct {
- Err error
-}
-
-func (e *bypassTokenRetrievalError) Error() string {
- return fmt.Sprintf("bypass token retrieval, %v", e.Err)
-}
-
-func (e *bypassTokenRetrievalError) Unwrap() error { return e.Err }
-
// enabled returns if the token provider is current enabled or not.
func (t *tokenProvider) enabled() bool {
return atomic.LoadUint32(&t.disabled) == 0
}
+// fallbackEnabled returns false if EnableFallback is [aws.FalseTernary], true otherwise
+func (t *tokenProvider) fallbackEnabled() bool {
+ switch t.client.options.EnableFallback {
+ case aws.FalseTernary:
+ return false
+ default:
+ return true
+ }
+}
+
// disable disables the token provider and it will no longer attempt to inject
// the token, nor request updates.
func (t *tokenProvider) disable() {
@@ -235,3 +240,22 @@ func (t *tokenProvider) enable() {
t.tokenMux.Unlock()
atomic.StoreUint32(&t.disabled, 0)
}
+
+type bypassTokenRetrievalError struct {
+ Err error
+}
+
+func (e *bypassTokenRetrievalError) Error() string {
+ return fmt.Sprintf("bypass token retrieval, %v", e.Err)
+}
+
+func (e *bypassTokenRetrievalError) Unwrap() error { return e.Err }
+
+type retryableError struct {
+ Err error
+ isRetryable bool
+}
+
+func (e *retryableError) RetryableError() bool { return e.isRetryable }
+
+func (e *retryableError) Error() string { return e.Err.Error() }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
index b043bb53..41c72ecf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
@@ -1,3 +1,533 @@
+# v1.16.11 (2024-03-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.10 (2024-03-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.9 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.8 (2024-03-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.7 (2024-03-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.6 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.5 (2024-02-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.4 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.3 (2024-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.2 (2024-02-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.1 (2024-02-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.15 (2024-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.14 (2024-01-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.13 (2024-01-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.12 (2024-01-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.11 (2024-01-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.10 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.9 (2023-12-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.8 (2023-12-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.7 (2023-12-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.6 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.5 (2023-12-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.4 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.3 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.2 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2023-11-28.3)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2023-11-28.2)
+
+* **Feature**: Add S3Express support.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.4 (2023-11-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.3 (2023-11-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.2 (2023-11-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.1 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2023-11-17)
+
+* **Feature**: **BREAKING CHANGE** Correct nullability of a large number of S3 structure fields. See https://github.com/aws/aws-sdk-go-v2/issues/2162.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.9 (2023-11-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.8 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.7 (2023-11-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.6 (2023-11-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.5 (2023-11-09.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.4 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.3 (2023-11-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.2 (2023-11-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.1 (2023-11-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.92 (2023-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.91 (2023-10-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.90 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.89 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.88 (2023-10-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.87 (2023-09-26)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.86 (2023-09-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.85 (2023-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.84 (2023-09-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.83 (2023-09-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.82 (2023-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.81 (2023-08-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.80 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.79 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.78 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.77 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.76 (2023-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.75 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.74 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.73 (2023-07-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.72 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.71 (2023-06-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.70 (2023-06-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.69 (2023-06-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.68 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.67 (2023-05-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.66 (2023-05-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.65 (2023-05-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.64 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.63 (2023-04-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.62 (2023-04-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.61 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.60 (2023-03-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.59 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.58 (2023-03-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.57 (2023-03-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.56 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.55 (2023-02-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.54 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.53 (2023-02-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.52 (2023-02-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.51 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.50 (2023-02-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.49 (2023-01-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.48 (2023-01-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.47 (2023-01-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.46 (2022-12-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.45 (2022-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.44 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.43 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.42 (2022-11-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.41 (2022-11-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.40 (2022-11-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.39 (2022-11-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.38 (2022-11-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.37 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.36 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.35 (2022-10-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.34 (2022-09-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.33 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.32 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.31 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.30 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.29 (2022-08-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.28 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.27 (2022-08-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.26 (2022-08-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.25 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.24 (2022-08-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.23 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.22 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.21 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.20 (2022-07-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.19 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.18 (2022-07-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.17 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.16 (2022-06-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.15 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.14 (2022-05-26)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.13 (2022-05-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.12 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.11 (2022-05-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.10 (2022-05-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.9 (2022-05-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.8 (2022-05-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.7 (2022-04-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.6 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.11.5 (2022-04-12)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/bucket_region.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/bucket_region.go
index 2d8bd7e0..a6a9781e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/bucket_region.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/bucket_region.go
@@ -65,7 +65,6 @@ func GetBucketRegion(ctx context.Context, client HeadBucketAPIClient, bucket str
clientOptionFns := make([]func(*s3.Options), len(optFns)+1)
clientOptionFns[0] = func(options *s3.Options) {
- options.Credentials = aws.AnonymousCredentials{}
options.APIOptions = append(options.APIOptions, captureBucketRegion.RegisterMiddleware)
}
copy(clientOptionFns[1:], optFns)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
index c3fbe021..06070ada 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
@@ -100,7 +100,8 @@ func WithDownloaderClientOptions(opts ...func(*s3.Options)) func(*Downloader) {
// interface.
//
// Example:
-// // Load AWS Config
+//
+// // Load AWS Config
// cfg, err := config.LoadDefaultConfig(context.TODO())
// if err != nil {
// panic(err)
@@ -153,6 +154,7 @@ func NewDownloader(c DownloadAPIClient, options ...func(*Downloader)) *Downloade
// and GC runs.
//
// Example:
+//
// // pre-allocate in memory buffer, where headObject type is *s3.HeadObjectOutput
// buf := make([]byte, int(headObject.ContentLength))
// // wrap with aws.WriteAtBuffer
@@ -397,7 +399,11 @@ func (d *downloader) tryDownloadChunk(params *s3.GetObjectInput, w io.Writer) (i
}
d.setTotalBytes(resp) // Set total if not yet set.
- n, err := io.Copy(w, resp.Body)
+ var src io.Reader = resp.Body
+ if d.cfg.BufferProvider != nil {
+ src = &suppressWriterAt{suppressed: src}
+ }
+ n, err := io.Copy(w, src)
resp.Body.Close()
if err != nil {
return n, &errReadingBody{err: err}
@@ -430,8 +436,8 @@ func (d *downloader) setTotalBytes(resp *s3.GetObjectOutput) {
if resp.ContentRange == nil {
// ContentRange is nil when the full file contents is provided, and
// is not chunked. Use ContentLength instead.
- if resp.ContentLength > 0 {
- d.totalBytes = resp.ContentLength
+ if aws.ToInt64(resp.ContentLength) > 0 {
+ d.totalBytes = aws.ToInt64(resp.ContentLength)
return
}
} else {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
index 74ca1f7e..04e2dcaf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
@@ -3,4 +3,4 @@
package manager
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.11.5"
+const goModuleVersion = "1.16.11"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
index 3e80df41..d1be506e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
@@ -13,8 +13,11 @@ import (
"github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
+ internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithymiddleware "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
)
// MaxUploadParts is the maximum allowed number of parts in a multi-part upload
@@ -50,7 +53,6 @@ const DefaultUploadConcurrency = 5
// fmt.Printf("upload failure, %s\n", err.Error())
// }
// }
-//
type MultiUploadFailure interface {
error
@@ -72,7 +74,7 @@ type multiUploadError struct {
// batchItemError returns the string representation of the error.
//
-// See apierr.BaseError ErrorWithExtra for output format
+// # See apierr.BaseError ErrorWithExtra for output format
//
// Satisfies the error interface.
func (m *multiUploadError) Error() string {
@@ -167,7 +169,7 @@ func WithUploaderRequestOptions(opts ...func(*s3.Options)) func(*Uploader) {
// on this structure for multiple objects and across concurrent goroutines.
// Mutating the Uploader's properties is not safe to be done concurrently.
//
-// Pre-computed Checksums
+// # Pre-computed Checksums
//
// Care must be taken when using pre-computed checksums the transfer upload
// manager. The format and value of the checksum differs based on if the upload
@@ -188,7 +190,7 @@ func WithUploaderRequestOptions(opts ...func(*s3.Options)) func(*Uploader) {
// ContentMD5 for multipart upload is explicitly ignored for multipart upload,
// and its value is suppressed.
//
-// Automatically Computed Checksums
+// # Automatically Computed Checksums
//
// When the ChecksumAlgorithm member of Upload's input parameter PutObjectInput
// is set to a valid value, the SDK will automatically compute the checksum of
@@ -250,6 +252,7 @@ type Uploader struct {
// satisfies the client.ConfigProvider interface.
//
// Example:
+//
// // Load AWS Config
// cfg, err := config.LoadDefaultConfig(context.TODO())
// if err != nil {
@@ -308,6 +311,9 @@ func (u Uploader) Upload(ctx context.Context, input *s3.PutObjectInput, opts ...
clientOptions = append(clientOptions, func(o *s3.Options) {
o.APIOptions = append(o.APIOptions,
middleware.AddSDKAgentKey(middleware.FeatureMetadata, userAgentKey),
+ func(s *smithymiddleware.Stack) error {
+ return s.Finalize.Insert(&setS3ExpressDefaultChecksum{}, "ResolveEndpointV2", smithymiddleware.After)
+ },
)
})
clientOptions = append(clientOptions, i.cfg.ClientOptions...)
@@ -501,7 +507,7 @@ func (u *uploader) singlePart(r io.ReadSeeker, cleanup func()) (*UploadOutput, e
return &UploadOutput{
Location: locationRecorder.location,
- BucketKeyEnabled: out.BucketKeyEnabled,
+ BucketKeyEnabled: aws.ToBool(out.BucketKeyEnabled),
ChecksumCRC32: out.ChecksumCRC32,
ChecksumCRC32C: out.ChecksumCRC32C,
ChecksumSHA1: out.ChecksumSHA1,
@@ -568,9 +574,11 @@ type chunk struct {
// since S3 required this list to be sent in sorted order.
type completedParts []types.CompletedPart
-func (a completedParts) Len() int { return len(a) }
-func (a completedParts) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a completedParts) Less(i, j int) bool { return a[i].PartNumber < a[j].PartNumber }
+func (a completedParts) Len() int { return len(a) }
+func (a completedParts) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+func (a completedParts) Less(i, j int) bool {
+ return aws.ToInt32(a[i].PartNumber) < aws.ToInt32(a[j].PartNumber)
+}
// upload will perform a multipart upload using the firstBuf buffer containing
// the first chunk of data.
@@ -639,7 +647,7 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker, cleanup func()) (*UploadO
UploadID: u.uploadID,
CompletedParts: u.parts,
- BucketKeyEnabled: completeOut.BucketKeyEnabled,
+ BucketKeyEnabled: aws.ToBool(completeOut.BucketKeyEnabled),
ChecksumCRC32: completeOut.ChecksumCRC32,
ChecksumCRC32C: completeOut.ChecksumCRC32C,
ChecksumSHA1: completeOut.ChecksumSHA1,
@@ -722,7 +730,7 @@ func (u *multiuploader) send(c chunk) error {
// PutObject as they are never valid for individual parts of a
// multipart upload.
- PartNumber: c.num,
+ PartNumber: aws.Int32(c.num),
UploadId: &u.uploadID,
}
// TODO should do copy then clear?
@@ -734,7 +742,7 @@ func (u *multiuploader) send(c chunk) error {
var completed types.CompletedPart
awsutil.Copy(&completed, resp)
- completed.PartNumber = c.num
+ completed.PartNumber = aws.Int32(c.num)
u.m.Lock()
u.parts = append(u.parts, completed)
@@ -806,3 +814,42 @@ type readerAtSeeker interface {
io.ReaderAt
io.ReadSeeker
}
+
+// setS3ExpressDefaultChecksum defaults to CRC32 for S3Express buckets,
+// which is required when uploading to those through transfer manager.
+type setS3ExpressDefaultChecksum struct{}
+
+func (*setS3ExpressDefaultChecksum) ID() string {
+ return "setS3ExpressDefaultChecksum"
+}
+
+func (*setS3ExpressDefaultChecksum) HandleFinalize(
+ ctx context.Context, in smithymiddleware.FinalizeInput, next smithymiddleware.FinalizeHandler,
+) (
+ out smithymiddleware.FinalizeOutput, metadata smithymiddleware.Metadata, err error,
+) {
+ const checksumHeader = "x-amz-checksum-algorithm"
+
+ if internalcontext.GetS3Backend(ctx) != internalcontext.S3BackendS3Express {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ // If this is CreateMultipartUpload we need to ensure the checksum
+ // algorithm header is present. Otherwise everything is driven off the
+ // context setting and we can let it flow from there.
+ if middleware.GetOperationName(ctx) == "CreateMultipartUpload" {
+ r, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if internalcontext.GetChecksumInputAlgorithm(ctx) == "" {
+ r.Header.Set(checksumHeader, "CRC32")
+ }
+ return next.HandleFinalize(ctx, in)
+ } else if internalcontext.GetChecksumInputAlgorithm(ctx) == "" {
+ ctx = internalcontext.SetChecksumInputAlgorithm(ctx, string(types.ChecksumAlgorithmCrc32))
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/writer_read_from.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/writer_read_from.go
index 3df983a6..fb10ec30 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/writer_read_from.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/writer_read_from.go
@@ -73,3 +73,11 @@ func (p *PooledBufferedReadFromProvider) GetReadFrom(writer io.Writer) (r Writer
}
return r, cleanup
}
+
+type suppressWriterAt struct {
+ suppressed io.Reader
+}
+
+func (s *suppressWriterAt) Read(p []byte) (n int, err error) {
+ return s.suppressed.Read(p)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go
new file mode 100644
index 00000000..0b81db54
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go
@@ -0,0 +1,45 @@
+package auth
+
+import (
+ "github.com/aws/smithy-go/auth"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// HTTPAuthScheme is the SDK's internal implementation of smithyhttp.AuthScheme
+// for pre-existing implementations where the signer was added to client
+// config. SDK clients will key off of this type and ensure per-operation
+// updates to those signers persist on the scheme itself.
+type HTTPAuthScheme struct {
+ schemeID string
+ signer smithyhttp.Signer
+}
+
+var _ smithyhttp.AuthScheme = (*HTTPAuthScheme)(nil)
+
+// NewHTTPAuthScheme returns an auth scheme instance with the given config.
+func NewHTTPAuthScheme(schemeID string, signer smithyhttp.Signer) *HTTPAuthScheme {
+ return &HTTPAuthScheme{
+ schemeID: schemeID,
+ signer: signer,
+ }
+}
+
+// SchemeID identifies the auth scheme.
+func (s *HTTPAuthScheme) SchemeID() string {
+ return s.schemeID
+}
+
+// IdentityResolver gets the identity resolver for the auth scheme.
+func (s *HTTPAuthScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver {
+ return o.GetIdentityResolver(s.schemeID)
+}
+
+// Signer gets the signer for the auth scheme.
+func (s *HTTPAuthScheme) Signer() smithyhttp.Signer {
+ return s.signer
+}
+
+// WithSigner returns a new instance of the auth scheme with the updated signer.
+func (s *HTTPAuthScheme) WithSigner(signer smithyhttp.Signer) *HTTPAuthScheme {
+ return NewHTTPAuthScheme(s.schemeID, signer)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go
new file mode 100644
index 00000000..bbc2ec06
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go
@@ -0,0 +1,191 @@
+package auth
+
+import (
+ "context"
+ "fmt"
+
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// SigV4 is a constant representing
+// Authentication Scheme Signature Version 4
+const SigV4 = "sigv4"
+
+// SigV4A is a constant representing
+// Authentication Scheme Signature Version 4A
+const SigV4A = "sigv4a"
+
+// SigV4S3Express identifies the S3 S3Express auth scheme.
+const SigV4S3Express = "sigv4-s3express"
+
+// None is a constant representing the
+// None Authentication Scheme
+const None = "none"
+
+// SupportedSchemes is a data structure
+// that indicates the list of supported AWS
+// authentication schemes
+var SupportedSchemes = map[string]bool{
+ SigV4: true,
+ SigV4A: true,
+ SigV4S3Express: true,
+ None: true,
+}
+
+// AuthenticationScheme is a representation of
+// AWS authentication schemes
+type AuthenticationScheme interface {
+ isAuthenticationScheme()
+}
+
+// AuthenticationSchemeV4 is a AWS SigV4 representation
+type AuthenticationSchemeV4 struct {
+ Name string
+ SigningName *string
+ SigningRegion *string
+ DisableDoubleEncoding *bool
+}
+
+func (a *AuthenticationSchemeV4) isAuthenticationScheme() {}
+
+// AuthenticationSchemeV4A is a AWS SigV4A representation
+type AuthenticationSchemeV4A struct {
+ Name string
+ SigningName *string
+ SigningRegionSet []string
+ DisableDoubleEncoding *bool
+}
+
+func (a *AuthenticationSchemeV4A) isAuthenticationScheme() {}
+
+// AuthenticationSchemeNone is a representation for the none auth scheme
+type AuthenticationSchemeNone struct{}
+
+func (a *AuthenticationSchemeNone) isAuthenticationScheme() {}
+
+// NoAuthenticationSchemesFoundError is used in signaling
+// that no authentication schemes have been specified.
+type NoAuthenticationSchemesFoundError struct{}
+
+func (e *NoAuthenticationSchemesFoundError) Error() string {
+ return fmt.Sprint("No authentication schemes specified.")
+}
+
+// UnSupportedAuthenticationSchemeSpecifiedError is used in
+// signaling that only unsupported authentication schemes
+// were specified.
+type UnSupportedAuthenticationSchemeSpecifiedError struct {
+ UnsupportedSchemes []string
+}
+
+func (e *UnSupportedAuthenticationSchemeSpecifiedError) Error() string {
+ return fmt.Sprint("Unsupported authentication scheme specified.")
+}
+
+// GetAuthenticationSchemes extracts the relevant authentication scheme data
+// into a custom strongly typed Go data structure.
+func GetAuthenticationSchemes(p *smithy.Properties) ([]AuthenticationScheme, error) {
+ var result []AuthenticationScheme
+ if !p.Has("authSchemes") {
+ return nil, &NoAuthenticationSchemesFoundError{}
+ }
+
+ authSchemes, _ := p.Get("authSchemes").([]interface{})
+
+ var unsupportedSchemes []string
+ for _, scheme := range authSchemes {
+ authScheme, _ := scheme.(map[string]interface{})
+
+ version := authScheme["name"].(string)
+ switch version {
+ case SigV4, SigV4S3Express:
+ v4Scheme := AuthenticationSchemeV4{
+ Name: version,
+ SigningName: getSigningName(authScheme),
+ SigningRegion: getSigningRegion(authScheme),
+ DisableDoubleEncoding: getDisableDoubleEncoding(authScheme),
+ }
+ result = append(result, AuthenticationScheme(&v4Scheme))
+ case SigV4A:
+ v4aScheme := AuthenticationSchemeV4A{
+ Name: SigV4A,
+ SigningName: getSigningName(authScheme),
+ SigningRegionSet: getSigningRegionSet(authScheme),
+ DisableDoubleEncoding: getDisableDoubleEncoding(authScheme),
+ }
+ result = append(result, AuthenticationScheme(&v4aScheme))
+ case None:
+ noneScheme := AuthenticationSchemeNone{}
+ result = append(result, AuthenticationScheme(&noneScheme))
+ default:
+ unsupportedSchemes = append(unsupportedSchemes, authScheme["name"].(string))
+ continue
+ }
+ }
+
+ if len(result) == 0 {
+ return nil, &UnSupportedAuthenticationSchemeSpecifiedError{
+ UnsupportedSchemes: unsupportedSchemes,
+ }
+ }
+
+ return result, nil
+}
+
+type disableDoubleEncoding struct{}
+
+// SetDisableDoubleEncoding sets or modifies the disable double encoding option
+// on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetDisableDoubleEncoding(ctx context.Context, value bool) context.Context {
+ return middleware.WithStackValue(ctx, disableDoubleEncoding{}, value)
+}
+
+// GetDisableDoubleEncoding retrieves the disable double encoding option
+// from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetDisableDoubleEncoding(ctx context.Context) (value bool, ok bool) {
+ value, ok = middleware.GetStackValue(ctx, disableDoubleEncoding{}).(bool)
+ return value, ok
+}
+
+func getSigningName(authScheme map[string]interface{}) *string {
+ signingName, ok := authScheme["signingName"].(string)
+ if !ok || signingName == "" {
+ return nil
+ }
+ return &signingName
+}
+
+func getSigningRegionSet(authScheme map[string]interface{}) []string {
+ untypedSigningRegionSet, ok := authScheme["signingRegionSet"].([]interface{})
+ if !ok {
+ return nil
+ }
+ signingRegionSet := []string{}
+ for _, item := range untypedSigningRegionSet {
+ signingRegionSet = append(signingRegionSet, item.(string))
+ }
+ return signingRegionSet
+}
+
+func getSigningRegion(authScheme map[string]interface{}) *string {
+ signingRegion, ok := authScheme["signingRegion"].(string)
+ if !ok || signingRegion == "" {
+ return nil
+ }
+ return &signingRegion
+}
+
+func getDisableDoubleEncoding(authScheme map[string]interface{}) *bool {
+ disableDoubleEncoding, ok := authScheme["disableDoubleEncoding"].(bool)
+ if !ok {
+ return nil
+ }
+ return &disableDoubleEncoding
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go
new file mode 100644
index 00000000..f059b5d3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go
@@ -0,0 +1,43 @@
+package smithy
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/auth/bearer"
+)
+
+// BearerTokenAdapter adapts smithy bearer.Token to smithy auth.Identity.
+type BearerTokenAdapter struct {
+ Token bearer.Token
+}
+
+var _ auth.Identity = (*BearerTokenAdapter)(nil)
+
+// Expiration returns the time of expiration for the token.
+func (v *BearerTokenAdapter) Expiration() time.Time {
+ return v.Token.Expires
+}
+
+// BearerTokenProviderAdapter adapts smithy bearer.TokenProvider to smithy
+// auth.IdentityResolver.
+type BearerTokenProviderAdapter struct {
+ Provider bearer.TokenProvider
+}
+
+var _ (auth.IdentityResolver) = (*BearerTokenProviderAdapter)(nil)
+
+// GetIdentity retrieves a bearer token using the underlying provider.
+func (v *BearerTokenProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) (
+ auth.Identity, error,
+) {
+ token, err := v.Provider.RetrieveBearerToken(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("get token: %w", err)
+ }
+
+ return &BearerTokenAdapter{Token: token}, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go
new file mode 100644
index 00000000..a8828152
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go
@@ -0,0 +1,35 @@
+package smithy
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/auth/bearer"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// BearerTokenSignerAdapter adapts smithy bearer.Signer to smithy http
+// auth.Signer.
+type BearerTokenSignerAdapter struct {
+ Signer bearer.Signer
+}
+
+var _ (smithyhttp.Signer) = (*BearerTokenSignerAdapter)(nil)
+
+// SignRequest signs the request with the provided bearer token.
+func (v *BearerTokenSignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, _ smithy.Properties) error {
+ ca, ok := identity.(*BearerTokenAdapter)
+ if !ok {
+ return fmt.Errorf("unexpected identity type: %T", identity)
+ }
+
+ signed, err := v.Signer.SignWithBearerToken(ctx, ca.Token, r)
+ if err != nil {
+ return fmt.Errorf("sign request: %w", err)
+ }
+
+ *r = *signed.(*smithyhttp.Request)
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go
new file mode 100644
index 00000000..f926c4aa
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go
@@ -0,0 +1,46 @@
+package smithy
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+)
+
+// CredentialsAdapter adapts aws.Credentials to auth.Identity.
+type CredentialsAdapter struct {
+ Credentials aws.Credentials
+}
+
+var _ auth.Identity = (*CredentialsAdapter)(nil)
+
+// Expiration returns the time of expiration for the credentials.
+func (v *CredentialsAdapter) Expiration() time.Time {
+ return v.Credentials.Expires
+}
+
+// CredentialsProviderAdapter adapts aws.CredentialsProvider to auth.IdentityResolver.
+type CredentialsProviderAdapter struct {
+ Provider aws.CredentialsProvider
+}
+
+var _ (auth.IdentityResolver) = (*CredentialsProviderAdapter)(nil)
+
+// GetIdentity retrieves AWS credentials using the underlying provider.
+func (v *CredentialsProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) (
+ auth.Identity, error,
+) {
+ if v.Provider == nil {
+ return &CredentialsAdapter{Credentials: aws.Credentials{}}, nil
+ }
+
+ creds, err := v.Provider.Retrieve(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("get credentials: %w", err)
+ }
+
+ return &CredentialsAdapter{Credentials: creds}, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go
new file mode 100644
index 00000000..42b45867
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go
@@ -0,0 +1,2 @@
+// Package smithy adapts concrete AWS auth and signing types to the generic smithy versions.
+package smithy
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go
new file mode 100644
index 00000000..0c5a2d40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go
@@ -0,0 +1,53 @@
+package smithy
+
+import (
+ "context"
+ "fmt"
+
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// V4SignerAdapter adapts v4.HTTPSigner to smithy http.Signer.
+type V4SignerAdapter struct {
+ Signer v4.HTTPSigner
+ Logger logging.Logger
+ LogSigning bool
+}
+
+var _ (smithyhttp.Signer) = (*V4SignerAdapter)(nil)
+
+// SignRequest signs the request with the provided identity.
+func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, props smithy.Properties) error {
+ ca, ok := identity.(*CredentialsAdapter)
+ if !ok {
+ return fmt.Errorf("unexpected identity type: %T", identity)
+ }
+
+ name, ok := smithyhttp.GetSigV4SigningName(&props)
+ if !ok {
+ return fmt.Errorf("sigv4 signing name is required")
+ }
+
+ region, ok := smithyhttp.GetSigV4SigningRegion(&props)
+ if !ok {
+ return fmt.Errorf("sigv4 signing region is required")
+ }
+
+ hash := v4.GetPayloadHash(ctx)
+ err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, sdk.NowTime(), func(o *v4.SignerOptions) {
+ o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props)
+
+ o.Logger = v.Logger
+ o.LogSigning = v.LogSigning
+ })
+ if err != nil {
+ return fmt.Errorf("sign http: %w", err)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go
index 7e69bd5e..58ef438a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go
@@ -70,7 +70,7 @@ func rValuesAtPath(v interface{}, path string, createPath, caseSensitive, nilTer
value = value.FieldByNameFunc(func(name string) bool {
if c == name {
return true
- } else if !caseSensitive && strings.ToLower(name) == strings.ToLower(c) {
+ } else if !caseSensitive && strings.EqualFold(name, c) {
return true
}
return false
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
index 856aec91..7b23d3c7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
@@ -1,3 +1,201 @@
+# v1.3.3 (2024-03-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.10 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.9 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.8 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.7 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.6 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.3 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2023-11-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.43 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.42 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.41 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.40 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.39 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.38 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.37 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.36 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.35 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.34 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.33 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.32 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.31 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.30 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.29 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.28 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.27 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.26 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.25 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.24 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.23 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.22 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.21 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.20 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.19 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.18 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.17 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.16 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.15 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.14 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.13 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.12 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.11 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.10 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.1.9 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go
new file mode 100644
index 00000000..e7835f85
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go
@@ -0,0 +1,57 @@
+package configsources
+
+import (
+ "context"
+)
+
+// ServiceBaseEndpointProvider is needed to search for all providers
+// that provide a configured service endpoint
+type ServiceBaseEndpointProvider interface {
+ GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error)
+}
+
+// IgnoreConfiguredEndpointsProvider is needed to search for all providers
+// that provide a flag to disable configured endpoints.
+//
+// Currently duplicated from github.com/aws/aws-sdk-go-v2/config because
+// service packages cannot import github.com/aws/aws-sdk-go-v2/config
+// due to result import cycle error.
+type IgnoreConfiguredEndpointsProvider interface {
+ GetIgnoreConfiguredEndpoints(ctx context.Context) (bool, bool, error)
+}
+
+// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured
+// endpoints feature.
+//
+// Currently duplicated from github.com/aws/aws-sdk-go-v2/config because
+// service packages cannot import github.com/aws/aws-sdk-go-v2/config
+// due to result import cycle error.
+func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok {
+ value, found, err = p.GetIgnoreConfiguredEndpoints(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ResolveServiceBaseEndpoint is used to retrieve service endpoints from configured sources
+// while allowing for configured endpoints to be disabled
+func ResolveServiceBaseEndpoint(ctx context.Context, sdkID string, configs []interface{}) (value string, found bool, err error) {
+ if val, found, _ := GetIgnoreConfiguredEndpoints(ctx, configs); found && val {
+ return "", false, nil
+ }
+
+ for _, cs := range configs {
+ if p, ok := cs.(ServiceBaseEndpointProvider); ok {
+ value, found, err = p.GetServiceBaseEndpoint(context.Background(), sdkID)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
index d17db420..67540f4c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
@@ -3,4 +3,4 @@
package configsources
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.1.9"
+const goModuleVersion = "1.3.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go
new file mode 100644
index 00000000..15bf1047
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go
@@ -0,0 +1,39 @@
+package context
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+type s3BackendKey struct{}
+type checksumInputAlgorithmKey struct{}
+
+const (
+ // S3BackendS3Express identifies the S3Express backend
+ S3BackendS3Express = "S3Express"
+)
+
+// SetS3Backend stores the resolved endpoint backend within the request
+// context, which is required for a variety of custom S3 behaviors.
+func SetS3Backend(ctx context.Context, typ string) context.Context {
+ return middleware.WithStackValue(ctx, s3BackendKey{}, typ)
+}
+
+// GetS3Backend retrieves the stored endpoint backend within the context.
+func GetS3Backend(ctx context.Context) string {
+ v, _ := middleware.GetStackValue(ctx, s3BackendKey{}).(string)
+ return v
+}
+
+// SetChecksumInputAlgorithm sets the request checksum algorithm on the
+// context.
+func SetChecksumInputAlgorithm(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, checksumInputAlgorithmKey{}, value)
+}
+
+// GetChecksumInputAlgorithm returns the checksum algorithm from the context.
+func GetChecksumInputAlgorithm(ctx context.Context) string {
+ v, _ := middleware.GetStackValue(ctx, checksumInputAlgorithmKey{}).(string)
+ return v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go
new file mode 100644
index 00000000..e6223dd3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go
@@ -0,0 +1,94 @@
+package awsrulesfn
+
+import (
+ "strings"
+)
+
+// ARN provides AWS ARN components broken out into a data structure.
+type ARN struct {
+ Partition string
+ Service string
+ Region string
+ AccountId string
+ ResourceId OptionalStringSlice
+}
+
+const (
+ arnDelimiters = ":"
+ resourceDelimiters = "/:"
+ arnSections = 6
+ arnPrefix = "arn:"
+
+ // zero-indexed
+ sectionPartition = 1
+ sectionService = 2
+ sectionRegion = 3
+ sectionAccountID = 4
+ sectionResource = 5
+)
+
+// ParseARN returns an [ARN] value parsed from the input string provided. If
+// the ARN cannot be parsed nil will be returned, and error added to
+// [ErrorCollector].
+func ParseARN(input string) *ARN {
+ if !strings.HasPrefix(input, arnPrefix) {
+ return nil
+ }
+
+ sections := strings.SplitN(input, arnDelimiters, arnSections)
+ if numSections := len(sections); numSections != arnSections {
+ return nil
+ }
+
+ if sections[sectionPartition] == "" {
+ return nil
+ }
+ if sections[sectionService] == "" {
+ return nil
+ }
+ if sections[sectionResource] == "" {
+ return nil
+ }
+
+ return &ARN{
+ Partition: sections[sectionPartition],
+ Service: sections[sectionService],
+ Region: sections[sectionRegion],
+ AccountId: sections[sectionAccountID],
+ ResourceId: splitResource(sections[sectionResource]),
+ }
+}
+
+// splitResource splits the resource components by the ARN resource delimiters.
+func splitResource(v string) []string {
+ var parts []string
+ var offset int
+
+ for offset <= len(v) {
+ idx := strings.IndexAny(v[offset:], "/:")
+ if idx < 0 {
+ parts = append(parts, v[offset:])
+ break
+ }
+ parts = append(parts, v[offset:idx+offset])
+ offset += idx + 1
+ }
+
+ return parts
+}
+
+// OptionalStringSlice provides a helper to safely get the index of a string
+// slice that may be out of bounds. Returns pointer to string if index is
+// valid. Otherwise returns nil.
+type OptionalStringSlice []string
+
+// Get returns a string pointer of the string at index i if the index is valid.
+// Otherwise returns nil.
+func (s OptionalStringSlice) Get(i int) *string {
+ if i < 0 || i >= len(s) {
+ return nil
+ }
+
+ v := s[i]
+ return &v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go
new file mode 100644
index 00000000..d5a36585
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go
@@ -0,0 +1,3 @@
+// Package awsrulesfn provides AWS focused endpoint rule functions for
+// evaluating endpoint resolution rules.
+package awsrulesfn
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go
new file mode 100644
index 00000000..df72da97
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go
@@ -0,0 +1,7 @@
+//go:build codegen
+// +build codegen
+
+package awsrulesfn
+
+//go:generate go run -tags codegen ./internal/partition/codegen.go -model partitions.json -output partitions.go
+//go:generate gofmt -w -s .
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go
new file mode 100644
index 00000000..637e5fc1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go
@@ -0,0 +1,51 @@
+package awsrulesfn
+
+import (
+ "net"
+ "strings"
+
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// IsVirtualHostableS3Bucket returns if the input is a DNS compatible bucket
+// name and can be used with Amazon S3 virtual hosted style addressing. Similar
+// to [rulesfn.IsValidHostLabel] with the added restriction that the length of label
+// must be [3:63] characters long, all lowercase, and not formatted as an IP
+// address.
+func IsVirtualHostableS3Bucket(input string, allowSubDomains bool) bool {
+ // input should not be formatted as an IP address
+ // NOTE: this will technically trip up on IPv6 hosts with zone IDs, but
+ // validation further down will catch that anyway (it's guaranteed to have
+ // unfriendly characters % and : if that's the case)
+ if net.ParseIP(input) != nil {
+ return false
+ }
+
+ var labels []string
+ if allowSubDomains {
+ labels = strings.Split(input, ".")
+ } else {
+ labels = []string{input}
+ }
+
+ for _, label := range labels {
+ // validate special length constraints
+ if l := len(label); l < 3 || l > 63 {
+ return false
+ }
+
+ // Validate no capital letters
+ for _, r := range label {
+ if r >= 'A' && r <= 'Z' {
+ return false
+ }
+ }
+
+ // Validate valid host label
+ if !smithyhttp.ValidHostLabel(label) {
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
new file mode 100644
index 00000000..ba603275
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
@@ -0,0 +1,75 @@
+package awsrulesfn
+
+import "regexp"
+
+// Partition provides the metadata describing an AWS partition.
+type Partition struct {
+ ID string `json:"id"`
+ Regions map[string]RegionOverrides `json:"regions"`
+ RegionRegex string `json:"regionRegex"`
+ DefaultConfig PartitionConfig `json:"outputs"`
+}
+
+// PartitionConfig provides the endpoint metadata for an AWS region or partition.
+type PartitionConfig struct {
+ Name string `json:"name"`
+ DnsSuffix string `json:"dnsSuffix"`
+ DualStackDnsSuffix string `json:"dualStackDnsSuffix"`
+ SupportsFIPS bool `json:"supportsFIPS"`
+ SupportsDualStack bool `json:"supportsDualStack"`
+}
+
+type RegionOverrides struct {
+ Name *string `json:"name"`
+ DnsSuffix *string `json:"dnsSuffix"`
+ DualStackDnsSuffix *string `json:"dualStackDnsSuffix"`
+ SupportsFIPS *bool `json:"supportsFIPS"`
+ SupportsDualStack *bool `json:"supportsDualStack"`
+}
+
+const defaultPartition = "aws"
+
+func getPartition(partitions []Partition, region string) *PartitionConfig {
+ for _, partition := range partitions {
+ if v, ok := partition.Regions[region]; ok {
+ p := mergeOverrides(partition.DefaultConfig, v)
+ return &p
+ }
+ }
+
+ for _, partition := range partitions {
+ regionRegex := regexp.MustCompile(partition.RegionRegex)
+ if regionRegex.MatchString(region) {
+ v := partition.DefaultConfig
+ return &v
+ }
+ }
+
+ for _, partition := range partitions {
+ if partition.ID == defaultPartition {
+ v := partition.DefaultConfig
+ return &v
+ }
+ }
+
+ return nil
+}
+
+func mergeOverrides(into PartitionConfig, from RegionOverrides) PartitionConfig {
+ if from.Name != nil {
+ into.Name = *from.Name
+ }
+ if from.DnsSuffix != nil {
+ into.DnsSuffix = *from.DnsSuffix
+ }
+ if from.DualStackDnsSuffix != nil {
+ into.DualStackDnsSuffix = *from.DualStackDnsSuffix
+ }
+ if from.SupportsFIPS != nil {
+ into.SupportsFIPS = *from.SupportsFIPS
+ }
+ if from.SupportsDualStack != nil {
+ into.SupportsDualStack = *from.SupportsDualStack
+ }
+ return into
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
new file mode 100644
index 00000000..849beffd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
@@ -0,0 +1,381 @@
+// Code generated by endpoint/awsrulesfn/internal/partition. DO NOT EDIT.
+
+package awsrulesfn
+
+// GetPartition returns an AWS [Partition] for the region provided. If the
+// partition cannot be determined nil will be returned.
+func GetPartition(region string) *PartitionConfig {
+ return getPartition(partitions, region)
+}
+
+var partitions = []Partition{
+ {
+ ID: "aws",
+ RegionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws",
+ DnsSuffix: "amazonaws.com",
+ DualStackDnsSuffix: "api.aws",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "af-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-northeast-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-northeast-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-northeast-3": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-south-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-southeast-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-southeast-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-southeast-3": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-southeast-4": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "aws-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ca-central-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-central-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-central-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-north-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-south-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-west-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-west-3": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "il-central-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "me-central-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "me-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "sa-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-east-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-west-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ RegionRegex: "^cn\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-cn",
+ DnsSuffix: "amazonaws.com.cn",
+ DualStackDnsSuffix: "api.amazonwebservices.com.cn",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-cn-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "cn-north-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "cn-northwest-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-us-gov",
+ RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-us-gov",
+ DnsSuffix: "amazonaws.com",
+ DualStackDnsSuffix: "api.aws",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-us-gov-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-gov-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-gov-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-iso",
+ RegionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-iso",
+ DnsSuffix: "c2s.ic.gov",
+ DualStackDnsSuffix: "c2s.ic.gov",
+ SupportsFIPS: true,
+ SupportsDualStack: false,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-iso-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-iso-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-iso-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ RegionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-iso-b",
+ DnsSuffix: "sc2s.sgov.gov",
+ DualStackDnsSuffix: "sc2s.sgov.gov",
+ SupportsFIPS: true,
+ SupportsDualStack: false,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-iso-b-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-isob-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-iso-e",
+ RegionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-iso-e",
+ DnsSuffix: "cloud.adc-e.uk",
+ DualStackDnsSuffix: "cloud.adc-e.uk",
+ SupportsFIPS: true,
+ SupportsDualStack: false,
+ },
+ Regions: map[string]RegionOverrides{},
+ },
+ {
+ ID: "aws-iso-f",
+ RegionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-iso-f",
+ DnsSuffix: "csp.hci.ic.gov",
+ DualStackDnsSuffix: "csp.hci.ic.gov",
+ SupportsFIPS: true,
+ SupportsDualStack: false,
+ },
+ Regions: map[string]RegionOverrides{},
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
new file mode 100644
index 00000000..f376f690
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
@@ -0,0 +1,216 @@
+{
+ "partitions" : [ {
+ "id" : "aws",
+ "outputs" : {
+ "dnsSuffix" : "amazonaws.com",
+ "dualStackDnsSuffix" : "api.aws",
+ "implicitGlobalRegion" : "us-east-1",
+ "name" : "aws",
+ "supportsDualStack" : true,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
+ "regions" : {
+ "af-south-1" : {
+ "description" : "Africa (Cape Town)"
+ },
+ "ap-east-1" : {
+ "description" : "Asia Pacific (Hong Kong)"
+ },
+ "ap-northeast-1" : {
+ "description" : "Asia Pacific (Tokyo)"
+ },
+ "ap-northeast-2" : {
+ "description" : "Asia Pacific (Seoul)"
+ },
+ "ap-northeast-3" : {
+ "description" : "Asia Pacific (Osaka)"
+ },
+ "ap-south-1" : {
+ "description" : "Asia Pacific (Mumbai)"
+ },
+ "ap-south-2" : {
+ "description" : "Asia Pacific (Hyderabad)"
+ },
+ "ap-southeast-1" : {
+ "description" : "Asia Pacific (Singapore)"
+ },
+ "ap-southeast-2" : {
+ "description" : "Asia Pacific (Sydney)"
+ },
+ "ap-southeast-3" : {
+ "description" : "Asia Pacific (Jakarta)"
+ },
+ "ap-southeast-4" : {
+ "description" : "Asia Pacific (Melbourne)"
+ },
+ "aws-global" : {
+ "description" : "AWS Standard global region"
+ },
+ "ca-central-1" : {
+ "description" : "Canada (Central)"
+ },
+ "ca-west-1" : {
+ "description" : "Canada West (Calgary)"
+ },
+ "eu-central-1" : {
+ "description" : "Europe (Frankfurt)"
+ },
+ "eu-central-2" : {
+ "description" : "Europe (Zurich)"
+ },
+ "eu-north-1" : {
+ "description" : "Europe (Stockholm)"
+ },
+ "eu-south-1" : {
+ "description" : "Europe (Milan)"
+ },
+ "eu-south-2" : {
+ "description" : "Europe (Spain)"
+ },
+ "eu-west-1" : {
+ "description" : "Europe (Ireland)"
+ },
+ "eu-west-2" : {
+ "description" : "Europe (London)"
+ },
+ "eu-west-3" : {
+ "description" : "Europe (Paris)"
+ },
+ "il-central-1" : {
+ "description" : "Israel (Tel Aviv)"
+ },
+ "me-central-1" : {
+ "description" : "Middle East (UAE)"
+ },
+ "me-south-1" : {
+ "description" : "Middle East (Bahrain)"
+ },
+ "sa-east-1" : {
+ "description" : "South America (Sao Paulo)"
+ },
+ "us-east-1" : {
+ "description" : "US East (N. Virginia)"
+ },
+ "us-east-2" : {
+ "description" : "US East (Ohio)"
+ },
+ "us-west-1" : {
+ "description" : "US West (N. California)"
+ },
+ "us-west-2" : {
+ "description" : "US West (Oregon)"
+ }
+ }
+ }, {
+ "id" : "aws-cn",
+ "outputs" : {
+ "dnsSuffix" : "amazonaws.com.cn",
+ "dualStackDnsSuffix" : "api.amazonwebservices.com.cn",
+ "implicitGlobalRegion" : "cn-northwest-1",
+ "name" : "aws-cn",
+ "supportsDualStack" : true,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^cn\\-\\w+\\-\\d+$",
+ "regions" : {
+ "aws-cn-global" : {
+ "description" : "AWS China global region"
+ },
+ "cn-north-1" : {
+ "description" : "China (Beijing)"
+ },
+ "cn-northwest-1" : {
+ "description" : "China (Ningxia)"
+ }
+ }
+ }, {
+ "id" : "aws-us-gov",
+ "outputs" : {
+ "dnsSuffix" : "amazonaws.com",
+ "dualStackDnsSuffix" : "api.aws",
+ "implicitGlobalRegion" : "us-gov-west-1",
+ "name" : "aws-us-gov",
+ "supportsDualStack" : true,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^us\\-gov\\-\\w+\\-\\d+$",
+ "regions" : {
+ "aws-us-gov-global" : {
+ "description" : "AWS GovCloud (US) global region"
+ },
+ "us-gov-east-1" : {
+ "description" : "AWS GovCloud (US-East)"
+ },
+ "us-gov-west-1" : {
+ "description" : "AWS GovCloud (US-West)"
+ }
+ }
+ }, {
+ "id" : "aws-iso",
+ "outputs" : {
+ "dnsSuffix" : "c2s.ic.gov",
+ "dualStackDnsSuffix" : "c2s.ic.gov",
+ "implicitGlobalRegion" : "us-iso-east-1",
+ "name" : "aws-iso",
+ "supportsDualStack" : false,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^us\\-iso\\-\\w+\\-\\d+$",
+ "regions" : {
+ "aws-iso-global" : {
+ "description" : "AWS ISO (US) global region"
+ },
+ "us-iso-east-1" : {
+ "description" : "US ISO East"
+ },
+ "us-iso-west-1" : {
+ "description" : "US ISO WEST"
+ }
+ }
+ }, {
+ "id" : "aws-iso-b",
+ "outputs" : {
+ "dnsSuffix" : "sc2s.sgov.gov",
+ "dualStackDnsSuffix" : "sc2s.sgov.gov",
+ "implicitGlobalRegion" : "us-isob-east-1",
+ "name" : "aws-iso-b",
+ "supportsDualStack" : false,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^us\\-isob\\-\\w+\\-\\d+$",
+ "regions" : {
+ "aws-iso-b-global" : {
+ "description" : "AWS ISOB (US) global region"
+ },
+ "us-isob-east-1" : {
+ "description" : "US ISOB East (Ohio)"
+ }
+ }
+ }, {
+ "id" : "aws-iso-e",
+ "outputs" : {
+ "dnsSuffix" : "cloud.adc-e.uk",
+ "dualStackDnsSuffix" : "cloud.adc-e.uk",
+ "implicitGlobalRegion" : "eu-isoe-west-1",
+ "name" : "aws-iso-e",
+ "supportsDualStack" : false,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$",
+ "regions" : { }
+ }, {
+ "id" : "aws-iso-f",
+ "outputs" : {
+ "dnsSuffix" : "csp.hci.ic.gov",
+ "dualStackDnsSuffix" : "csp.hci.ic.gov",
+ "implicitGlobalRegion" : "us-isof-south-1",
+ "name" : "aws-iso-f",
+ "supportsDualStack" : false,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$",
+ "regions" : { }
+ } ],
+ "version" : "1.1"
+}
\ No newline at end of file
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go
new file mode 100644
index 00000000..67950ca3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go
@@ -0,0 +1,201 @@
+package endpoints
+
+import (
+ "fmt"
+ "regexp"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+const (
+ defaultProtocol = "https"
+ defaultSigner = "v4"
+)
+
+var (
+ protocolPriority = []string{"https", "http"}
+ signerPriority = []string{"v4"}
+)
+
+// Options provide configuration needed to direct how endpoints are resolved.
+type Options struct {
+ // Disable usage of HTTPS (TLS / SSL)
+ DisableHTTPS bool
+}
+
+// Partitions is a slice of partition
+type Partitions []Partition
+
+// ResolveEndpoint resolves a service endpoint for the given region and options.
+func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) {
+ if len(ps) == 0 {
+ return aws.Endpoint{}, fmt.Errorf("no partitions found")
+ }
+
+ for i := 0; i < len(ps); i++ {
+ if !ps[i].canResolveEndpoint(region) {
+ continue
+ }
+
+ return ps[i].ResolveEndpoint(region, opts)
+ }
+
+ // fallback to first partition format to use when resolving the endpoint.
+ return ps[0].ResolveEndpoint(region, opts)
+}
+
+// Partition is an AWS partition description for a service and its' region endpoints.
+type Partition struct {
+ ID string
+ RegionRegex *regexp.Regexp
+ PartitionEndpoint string
+ IsRegionalized bool
+ Defaults Endpoint
+ Endpoints Endpoints
+}
+
+func (p Partition) canResolveEndpoint(region string) bool {
+ _, ok := p.Endpoints[region]
+ return ok || p.RegionRegex.MatchString(region)
+}
+
+// ResolveEndpoint resolves and service endpoint for the given region and options.
+func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) {
+ if len(region) == 0 && len(p.PartitionEndpoint) != 0 {
+ region = p.PartitionEndpoint
+ }
+
+ e, _ := p.endpointForRegion(region)
+
+ return e.resolve(p.ID, region, p.Defaults, options), nil
+}
+
+func (p Partition) endpointForRegion(region string) (Endpoint, bool) {
+ if e, ok := p.Endpoints[region]; ok {
+ return e, true
+ }
+
+ if !p.IsRegionalized {
+ return p.Endpoints[p.PartitionEndpoint], region == p.PartitionEndpoint
+ }
+
+ // Unable to find any matching endpoint, return
+ // blank that will be used for generic endpoint creation.
+ return Endpoint{}, false
+}
+
+// Endpoints is a map of service config regions to endpoints
+type Endpoints map[string]Endpoint
+
+// CredentialScope is the credential scope of a region and service
+type CredentialScope struct {
+ Region string
+ Service string
+}
+
+// Endpoint is a service endpoint description
+type Endpoint struct {
+ // True if the endpoint cannot be resolved for this partition/region/service
+ Unresolveable aws.Ternary
+
+ Hostname string
+ Protocols []string
+
+ CredentialScope CredentialScope
+
+ SignatureVersions []string `json:"signatureVersions"`
+}
+
+func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) aws.Endpoint {
+ var merged Endpoint
+ merged.mergeIn(def)
+ merged.mergeIn(e)
+ e = merged
+
+ var u string
+ if e.Unresolveable != aws.TrueTernary {
+ // Only attempt to resolve the endpoint if it can be resolved.
+ hostname := strings.Replace(e.Hostname, "{region}", region, 1)
+
+ scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS)
+ u = scheme + "://" + hostname
+ }
+
+ signingRegion := e.CredentialScope.Region
+ if len(signingRegion) == 0 {
+ signingRegion = region
+ }
+ signingName := e.CredentialScope.Service
+
+ return aws.Endpoint{
+ URL: u,
+ PartitionID: partition,
+ SigningRegion: signingRegion,
+ SigningName: signingName,
+ SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
+ }
+}
+
+func (e *Endpoint) mergeIn(other Endpoint) {
+ if other.Unresolveable != aws.UnknownTernary {
+ e.Unresolveable = other.Unresolveable
+ }
+ if len(other.Hostname) > 0 {
+ e.Hostname = other.Hostname
+ }
+ if len(other.Protocols) > 0 {
+ e.Protocols = other.Protocols
+ }
+ if len(other.CredentialScope.Region) > 0 {
+ e.CredentialScope.Region = other.CredentialScope.Region
+ }
+ if len(other.CredentialScope.Service) > 0 {
+ e.CredentialScope.Service = other.CredentialScope.Service
+ }
+ if len(other.SignatureVersions) > 0 {
+ e.SignatureVersions = other.SignatureVersions
+ }
+}
+
+func getEndpointScheme(protocols []string, disableHTTPS bool) string {
+ if disableHTTPS {
+ return "http"
+ }
+
+ return getByPriority(protocols, protocolPriority, defaultProtocol)
+}
+
+func getByPriority(s []string, p []string, def string) string {
+ if len(s) == 0 {
+ return def
+ }
+
+ for i := 0; i < len(p); i++ {
+ for j := 0; j < len(s); j++ {
+ if s[j] == p[i] {
+ return s[j]
+ }
+ }
+ }
+
+ return s[0]
+}
+
+// MapFIPSRegion extracts the intrinsic AWS region from one that may have an
+// embedded FIPS microformat.
+func MapFIPSRegion(region string) string {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(region, fipsInfix) ||
+ strings.Contains(region, fipsPrefix) ||
+ strings.Contains(region, fipsSuffix) {
+ region = strings.ReplaceAll(region, fipsInfix, "-")
+ region = strings.ReplaceAll(region, fipsPrefix, "")
+ region = strings.ReplaceAll(region, fipsSuffix, "")
+ }
+
+ return region
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
index 3473a982..bf9136e0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
@@ -1,3 +1,202 @@
+# v2.6.3 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.2 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.10 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.9 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.8 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.7 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.6 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.3 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.1 (2023-11-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.5.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.37 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.36 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.35 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.34 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.33 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.32 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.31 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.30 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.29 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.28 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.27 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.26 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.25 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.24 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.23 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.22 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.21 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.20 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.19 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.18 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.17 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.16 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.15 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.14 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.13 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.12 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.11 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.10 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.9 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v2.4.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
index 88f74540..f163d250 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
@@ -3,4 +3,4 @@
package endpoints
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "2.4.3"
+const goModuleVersion = "2.6.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
index 81865856..c0e54faf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
@@ -1,3 +1,187 @@
+# v1.8.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+
+# v1.7.3 (2024-01-22)
+
+* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons.
+
+# v1.7.2 (2023-12-08)
+
+* **Bug Fix**: Correct loading of [services *] sections into shared config.
+
+# v1.7.1 (2023-11-16)
+
+* **Bug Fix**: Fix recognition of trailing comments in shared config properties. # or ; separators that aren't preceded by whitespace at the end of a property value should be considered part of it.
+
+# v1.7.0 (2023-11-13)
+
+* **Feature**: Replace the legacy config parser with a modern, less-strict implementation. Parsing failures within a section will now simply ignore the invalid line rather than silently drop the entire section.
+
+# v1.6.0 (2023-11-09.2)
+
+* **Feature**: BREAKFIX: In order to support subproperty parsing, invalid property definitions must not be ignored
+
+# v1.5.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.1 (2023-11-07)
+
+* **Bug Fix**: Fix subproperty performance regression
+
+# v1.5.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.45 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.44 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.43 (2023-09-22)
+
+* **Bug Fix**: Fixed a bug where merging `max_attempts` or `duration_seconds` fields across shared config files with invalid values would silently default them to 0.
+* **Bug Fix**: Move type assertion of config values out of the parsing stage, which resolves an issue where the contents of a profile would silently be dropped with certain numeric formats.
+
+# v1.3.42 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.41 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.40 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.39 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.38 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.37 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.36 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.35 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.34 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.33 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.32 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.31 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.30 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.29 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.28 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.27 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.26 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.25 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.24 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.23 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.22 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.21 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.20 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.19 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.18 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.17 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.16 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.15 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.14 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.13 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.12 (2022-05-17)
+
+* **Bug Fix**: Removes the fuzz testing files from the module, as they are invalid and not used.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.11 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.3.10 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ast.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ast.go
deleted file mode 100644
index e83a9988..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ast.go
+++ /dev/null
@@ -1,120 +0,0 @@
-package ini
-
-// ASTKind represents different states in the parse table
-// and the type of AST that is being constructed
-type ASTKind int
-
-// ASTKind* is used in the parse table to transition between
-// the different states
-const (
- ASTKindNone = ASTKind(iota)
- ASTKindStart
- ASTKindExpr
- ASTKindEqualExpr
- ASTKindStatement
- ASTKindSkipStatement
- ASTKindExprStatement
- ASTKindSectionStatement
- ASTKindNestedSectionStatement
- ASTKindCompletedNestedSectionStatement
- ASTKindCommentStatement
- ASTKindCompletedSectionStatement
-)
-
-func (k ASTKind) String() string {
- switch k {
- case ASTKindNone:
- return "none"
- case ASTKindStart:
- return "start"
- case ASTKindExpr:
- return "expr"
- case ASTKindStatement:
- return "stmt"
- case ASTKindSectionStatement:
- return "section_stmt"
- case ASTKindExprStatement:
- return "expr_stmt"
- case ASTKindCommentStatement:
- return "comment"
- case ASTKindNestedSectionStatement:
- return "nested_section_stmt"
- case ASTKindCompletedSectionStatement:
- return "completed_stmt"
- case ASTKindSkipStatement:
- return "skip"
- default:
- return ""
- }
-}
-
-// AST interface allows us to determine what kind of node we
-// are on and casting may not need to be necessary.
-//
-// The root is always the first node in Children
-type AST struct {
- Kind ASTKind
- Root Token
- RootToken bool
- Children []AST
-}
-
-func newAST(kind ASTKind, root AST, children ...AST) AST {
- return AST{
- Kind: kind,
- Children: append([]AST{root}, children...),
- }
-}
-
-func newASTWithRootToken(kind ASTKind, root Token, children ...AST) AST {
- return AST{
- Kind: kind,
- Root: root,
- RootToken: true,
- Children: children,
- }
-}
-
-// AppendChild will append to the list of children an AST has.
-func (a *AST) AppendChild(child AST) {
- a.Children = append(a.Children, child)
-}
-
-// GetRoot will return the root AST which can be the first entry
-// in the children list or a token.
-func (a *AST) GetRoot() AST {
- if a.RootToken {
- return *a
- }
-
- if len(a.Children) == 0 {
- return AST{}
- }
-
- return a.Children[0]
-}
-
-// GetChildren will return the current AST's list of children
-func (a *AST) GetChildren() []AST {
- if len(a.Children) == 0 {
- return []AST{}
- }
-
- if a.RootToken {
- return a.Children
- }
-
- return a.Children[1:]
-}
-
-// SetChildren will set and override all children of the AST.
-func (a *AST) SetChildren(children []AST) {
- if a.RootToken {
- a.Children = children
- } else {
- a.Children = append(a.Children[:1], children...)
- }
-}
-
-// Start is used to indicate the starting state of the parse table.
-var Start = newAST(ASTKindStart, AST{})
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comma_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comma_token.go
deleted file mode 100644
index 0895d53c..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comma_token.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package ini
-
-var commaRunes = []rune(",")
-
-func isComma(b rune) bool {
- return b == ','
-}
-
-func newCommaToken() Token {
- return newToken(TokenComma, commaRunes, NoneType)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comment_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comment_token.go
deleted file mode 100644
index 0b76999b..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comment_token.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package ini
-
-// isComment will return whether or not the next byte(s) is a
-// comment.
-func isComment(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- switch b[0] {
- case ';':
- return true
- case '#':
- return true
- }
-
- return false
-}
-
-// newCommentToken will create a comment token and
-// return how many bytes were read.
-func newCommentToken(b []rune) (Token, int, error) {
- i := 0
- for ; i < len(b); i++ {
- if b[i] == '\n' {
- break
- }
-
- if len(b)-i > 2 && b[i] == '\r' && b[i+1] == '\n' {
- break
- }
- }
-
- return newToken(TokenComment, b[:i], NoneType), i, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go
deleted file mode 100644
index f5ebe52e..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package ini
-
-import (
- // internal/ini module was carved out of this module
- _ "github.com/aws/aws-sdk-go-v2"
-)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
deleted file mode 100644
index 1e55bbd0..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Package ini is an LL(1) parser for configuration files.
-//
-// Example:
-// sections, err := ini.OpenFile("/path/to/file")
-// if err != nil {
-// panic(err)
-// }
-//
-// profile := "foo"
-// section, ok := sections.GetSection(profile)
-// if !ok {
-// fmt.Printf("section %q could not be found", profile)
-// }
-//
-// Below is the BNF that describes this parser
-// Grammar:
-// stmt -> section | stmt'
-// stmt' -> epsilon | expr
-// expr -> value (stmt)* | equal_expr (stmt)*
-// equal_expr -> value ( ':' | '=' ) equal_expr'
-// equal_expr' -> number | string | quoted_string
-// quoted_string -> " quoted_string'
-// quoted_string' -> string quoted_string_end
-// quoted_string_end -> "
-//
-// section -> [ section'
-// section' -> section_value section_close
-// section_value -> number | string_subset | boolean | quoted_string_subset
-// quoted_string_subset -> " quoted_string_subset'
-// quoted_string_subset' -> string_subset quoted_string_end
-// quoted_string_subset -> "
-// section_close -> ]
-//
-// value -> number | string_subset | boolean
-// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ?
-// string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ?
-//
-// SkipState will skip (NL WS)+
-//
-// comment -> # comment' | ; comment'
-// comment' -> epsilon | value
-package ini
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/empty_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/empty_token.go
deleted file mode 100644
index 04345a54..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/empty_token.go
+++ /dev/null
@@ -1,4 +0,0 @@
-package ini
-
-// emptyToken is used to satisfy the Token interface
-var emptyToken = newToken(TokenNone, []rune{}, NoneType)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/expression.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/expression.go
deleted file mode 100644
index 91ba2a59..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/expression.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package ini
-
-// newExpression will return an expression AST.
-// Expr represents an expression
-//
-// grammar:
-// expr -> string | number
-func newExpression(tok Token) AST {
- return newASTWithRootToken(ASTKindExpr, tok)
-}
-
-func newEqualExpr(left AST, tok Token) AST {
- return newASTWithRootToken(ASTKindEqualExpr, tok, left)
-}
-
-// EqualExprKey will return a LHS value in the equal expr
-func EqualExprKey(ast AST) string {
- children := ast.GetChildren()
- if len(children) == 0 || ast.Kind != ASTKindEqualExpr {
- return ""
- }
-
- return string(children[0].Root.Raw())
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/fuzz.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/fuzz.go
deleted file mode 100644
index 6e545b63..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/fuzz.go
+++ /dev/null
@@ -1,18 +0,0 @@
-//go:build gofuzz
-// +build gofuzz
-
-package ini
-
-import (
- "bytes"
-)
-
-func Fuzz(data []byte) int {
- b := bytes.NewReader(data)
-
- if _, err := Parse(b); err != nil {
- return 0
- }
-
- return 1
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
index 7dced4ec..6e0b906c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
@@ -3,4 +3,4 @@
package ini
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.3.10"
+const goModuleVersion = "1.8.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
index f7406231..cefcce91 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
@@ -1,13 +1,26 @@
+// Package ini implements parsing of the AWS shared config file.
+//
+// Example:
+// sections, err := ini.OpenFile("/path/to/file")
+// if err != nil {
+// panic(err)
+// }
+//
+// profile := "foo"
+// section, ok := sections.GetSection(profile)
+// if !ok {
+// fmt.Printf("section %q could not be found", profile)
+// }
package ini
import (
"fmt"
"io"
"os"
+ "strings"
)
-// OpenFile takes a path to a given file, and will open and parse
-// that file.
+// OpenFile parses shared config from the given file path.
func OpenFile(path string) (sections Sections, err error) {
f, oerr := os.Open(path)
if oerr != nil {
@@ -26,33 +39,18 @@ func OpenFile(path string) (sections Sections, err error) {
return Parse(f, path)
}
-// Parse will parse the given file using the shared config
-// visitor.
-func Parse(f io.Reader, path string) (Sections, error) {
- tree, err := ParseAST(f)
+// Parse parses shared config from the given reader.
+func Parse(r io.Reader, path string) (Sections, error) {
+ contents, err := io.ReadAll(r)
if err != nil {
- return Sections{}, err
+ return Sections{}, fmt.Errorf("read all: %v", err)
}
- v := NewDefaultVisitor(path)
- if err = Walk(tree, v); err != nil {
- return Sections{}, err
- }
-
- return v.Sections, nil
-}
-
-// ParseBytes will parse the given bytes and return the parsed sections.
-func ParseBytes(b []byte) (Sections, error) {
- tree, err := ParseASTBytes(b)
+ lines := strings.Split(string(contents), "\n")
+ tokens, err := tokenize(lines)
if err != nil {
- return Sections{}, err
- }
-
- v := NewDefaultVisitor("")
- if err = Walk(tree, v); err != nil {
- return Sections{}, err
+ return Sections{}, fmt.Errorf("tokenize: %v", err)
}
- return v.Sections, nil
+ return parse(tokens, path), nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
deleted file mode 100644
index abf1fb03..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
+++ /dev/null
@@ -1,157 +0,0 @@
-package ini
-
-import (
- "bytes"
- "io"
- "io/ioutil"
-)
-
-// TokenType represents the various different tokens types
-type TokenType int
-
-func (t TokenType) String() string {
- switch t {
- case TokenNone:
- return "none"
- case TokenLit:
- return "literal"
- case TokenSep:
- return "sep"
- case TokenOp:
- return "op"
- case TokenWS:
- return "ws"
- case TokenNL:
- return "newline"
- case TokenComment:
- return "comment"
- case TokenComma:
- return "comma"
- default:
- return ""
- }
-}
-
-// TokenType enums
-const (
- TokenNone = TokenType(iota)
- TokenLit
- TokenSep
- TokenComma
- TokenOp
- TokenWS
- TokenNL
- TokenComment
-)
-
-type iniLexer struct{}
-
-// Tokenize will return a list of tokens during lexical analysis of the
-// io.Reader.
-func (l *iniLexer) Tokenize(r io.Reader) ([]Token, error) {
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return nil, &UnableToReadFile{Err: err}
- }
-
- return l.tokenize(b)
-}
-
-func (l *iniLexer) tokenize(b []byte) ([]Token, error) {
- runes := bytes.Runes(b)
- var err error
- n := 0
- tokenAmount := countTokens(runes)
- tokens := make([]Token, tokenAmount)
- count := 0
-
- for len(runes) > 0 && count < tokenAmount {
- switch {
- case isWhitespace(runes[0]):
- tokens[count], n, err = newWSToken(runes)
- case isComma(runes[0]):
- tokens[count], n = newCommaToken(), 1
- case isComment(runes):
- tokens[count], n, err = newCommentToken(runes)
- case isNewline(runes):
- tokens[count], n, err = newNewlineToken(runes)
- case isSep(runes):
- tokens[count], n, err = newSepToken(runes)
- case isOp(runes):
- tokens[count], n, err = newOpToken(runes)
- default:
- tokens[count], n, err = newLitToken(runes)
- }
-
- if err != nil {
- return nil, err
- }
-
- count++
-
- runes = runes[n:]
- }
-
- return tokens[:count], nil
-}
-
-func countTokens(runes []rune) int {
- count, n := 0, 0
- var err error
-
- for len(runes) > 0 {
- switch {
- case isWhitespace(runes[0]):
- _, n, err = newWSToken(runes)
- case isComma(runes[0]):
- _, n = newCommaToken(), 1
- case isComment(runes):
- _, n, err = newCommentToken(runes)
- case isNewline(runes):
- _, n, err = newNewlineToken(runes)
- case isSep(runes):
- _, n, err = newSepToken(runes)
- case isOp(runes):
- _, n, err = newOpToken(runes)
- default:
- _, n, err = newLitToken(runes)
- }
-
- if err != nil {
- return 0
- }
-
- count++
- runes = runes[n:]
- }
-
- return count + 1
-}
-
-// Token indicates a metadata about a given value.
-type Token struct {
- t TokenType
- ValueType ValueType
- base int
- raw []rune
-}
-
-var emptyValue = Value{}
-
-func newToken(t TokenType, raw []rune, v ValueType) Token {
- return Token{
- t: t,
- raw: raw,
- ValueType: v,
- }
-}
-
-// Raw return the raw runes that were consumed
-func (tok Token) Raw() []rune {
- return tok.raw
-}
-
-// Type returns the token type
-func (tok Token) Type() TokenType {
- return tok.t
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
deleted file mode 100644
index 12fc7d5a..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
+++ /dev/null
@@ -1,349 +0,0 @@
-package ini
-
-import (
- "fmt"
- "io"
-)
-
-// ParseState represents the current state of the parser.
-type ParseState uint
-
-// State enums for the parse table
-const (
- InvalidState ParseState = iota
- // stmt -> value stmt'
- StatementState
- // stmt' -> MarkComplete | op stmt
- StatementPrimeState
- // value -> number | string | boolean | quoted_string
- ValueState
- // section -> [ section'
- OpenScopeState
- // section' -> value section_close
- SectionState
- // section_close -> ]
- CloseScopeState
- // SkipState will skip (NL WS)+
- SkipState
- // SkipTokenState will skip any token and push the previous
- // state onto the stack.
- SkipTokenState
- // comment -> # comment' | ; comment'
- // comment' -> MarkComplete | value
- CommentState
- // MarkComplete state will complete statements and move that
- // to the completed AST list
- MarkCompleteState
- // TerminalState signifies that the tokens have been fully parsed
- TerminalState
-)
-
-// parseTable is a state machine to dictate the grammar above.
-var parseTable = map[ASTKind]map[TokenType]ParseState{
- ASTKindStart: {
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: TerminalState,
- },
- ASTKindCommentStatement: {
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindExpr: {
- TokenOp: StatementPrimeState,
- TokenLit: ValueState,
- TokenSep: OpenScopeState,
- TokenWS: ValueState,
- TokenNL: SkipState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindEqualExpr: {
- TokenLit: ValueState,
- TokenSep: ValueState,
- TokenOp: ValueState,
- TokenWS: SkipTokenState,
- TokenNL: SkipState,
- },
- ASTKindStatement: {
- TokenLit: SectionState,
- TokenSep: CloseScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindExprStatement: {
- TokenLit: ValueState,
- TokenSep: ValueState,
- TokenOp: ValueState,
- TokenWS: ValueState,
- TokenNL: MarkCompleteState,
- TokenComment: CommentState,
- TokenNone: TerminalState,
- TokenComma: SkipState,
- },
- ASTKindSectionStatement: {
- TokenLit: SectionState,
- TokenOp: SectionState,
- TokenSep: CloseScopeState,
- TokenWS: SectionState,
- TokenNL: SkipTokenState,
- },
- ASTKindCompletedSectionStatement: {
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindSkipStatement: {
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: TerminalState,
- },
-}
-
-// ParseAST will parse input from an io.Reader using
-// an LL(1) parser.
-func ParseAST(r io.Reader) ([]AST, error) {
- lexer := iniLexer{}
- tokens, err := lexer.Tokenize(r)
- if err != nil {
- return []AST{}, err
- }
-
- return parse(tokens)
-}
-
-// ParseASTBytes will parse input from a byte slice using
-// an LL(1) parser.
-func ParseASTBytes(b []byte) ([]AST, error) {
- lexer := iniLexer{}
- tokens, err := lexer.tokenize(b)
- if err != nil {
- return []AST{}, err
- }
-
- return parse(tokens)
-}
-
-func parse(tokens []Token) ([]AST, error) {
- start := Start
- stack := newParseStack(3, len(tokens))
-
- stack.Push(start)
- s := newSkipper()
-
-loop:
- for stack.Len() > 0 {
- k := stack.Pop()
-
- var tok Token
- if len(tokens) == 0 {
- // this occurs when all the tokens have been processed
- // but reduction of what's left on the stack needs to
- // occur.
- tok = emptyToken
- } else {
- tok = tokens[0]
- }
-
- step := parseTable[k.Kind][tok.Type()]
- if s.ShouldSkip(tok) {
- // being in a skip state with no tokens will break out of
- // the parse loop since there is nothing left to process.
- if len(tokens) == 0 {
- break loop
- }
- // if should skip is true, we skip the tokens until should skip is set to false.
- step = SkipTokenState
- }
-
- switch step {
- case TerminalState:
- // Finished parsing. Push what should be the last
- // statement to the stack. If there is anything left
- // on the stack, an error in parsing has occurred.
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
- break loop
- case SkipTokenState:
- // When skipping a token, the previous state was popped off the stack.
- // To maintain the correct state, the previous state will be pushed
- // onto the stack.
- stack.Push(k)
- case StatementState:
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
- expr := newExpression(tok)
- stack.Push(expr)
- case StatementPrimeState:
- if tok.Type() != TokenOp {
- stack.MarkComplete(k)
- continue
- }
-
- if k.Kind != ASTKindExpr {
- return nil, NewParseError(
- fmt.Sprintf("invalid expression: expected Expr type, but found %T type", k),
- )
- }
-
- k = trimSpaces(k)
- expr := newEqualExpr(k, tok)
- stack.Push(expr)
- case ValueState:
- // ValueState requires the previous state to either be an equal expression
- // or an expression statement.
- switch k.Kind {
- case ASTKindEqualExpr:
- // assigning a value to some key
- k.AppendChild(newExpression(tok))
- stack.Push(newExprStatement(k))
- case ASTKindExpr:
- k.Root.raw = append(k.Root.raw, tok.Raw()...)
- stack.Push(k)
- case ASTKindExprStatement:
- root := k.GetRoot()
- children := root.GetChildren()
- if len(children) == 0 {
- return nil, NewParseError(
- fmt.Sprintf("invalid expression: AST contains no children %s", k.Kind),
- )
- }
-
- rhs := children[len(children)-1]
-
- if rhs.Root.ValueType != QuotedStringType {
- rhs.Root.ValueType = StringType
- rhs.Root.raw = append(rhs.Root.raw, tok.Raw()...)
-
- }
-
- children[len(children)-1] = rhs
- root.SetChildren(children)
-
- stack.Push(k)
- }
- case OpenScopeState:
- if !runeCompare(tok.Raw(), openBrace) {
- return nil, NewParseError("expected '['")
- }
- // If OpenScopeState is not at the start, we must mark the previous ast as complete
- //
- // for example: if previous ast was a skip statement;
- // we should mark it as complete before we create a new statement
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
-
- stmt := newStatement()
- stack.Push(stmt)
- case CloseScopeState:
- if !runeCompare(tok.Raw(), closeBrace) {
- return nil, NewParseError("expected ']'")
- }
-
- k = trimSpaces(k)
- stack.Push(newCompletedSectionStatement(k))
- case SectionState:
- var stmt AST
-
- switch k.Kind {
- case ASTKindStatement:
- // If there are multiple literals inside of a scope declaration,
- // then the current token's raw value will be appended to the Name.
- //
- // This handles cases like [ profile default ]
- //
- // k will represent a SectionStatement with the children representing
- // the label of the section
- stmt = newSectionStatement(tok)
- case ASTKindSectionStatement:
- k.Root.raw = append(k.Root.raw, tok.Raw()...)
- stmt = k
- default:
- return nil, NewParseError(
- fmt.Sprintf("invalid statement: expected statement: %v", k.Kind),
- )
- }
-
- stack.Push(stmt)
- case MarkCompleteState:
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
-
- if stack.Len() == 0 {
- stack.Push(start)
- }
- case SkipState:
- stack.Push(newSkipStatement(k))
- s.Skip()
- case CommentState:
- if k.Kind == ASTKindStart {
- stack.Push(k)
- } else {
- stack.MarkComplete(k)
- }
-
- stmt := newCommentStatement(tok)
- stack.Push(stmt)
- default:
- return nil, NewParseError(
- fmt.Sprintf("invalid state with ASTKind %v and TokenType %v",
- k.Kind, tok.Type()))
- }
-
- if len(tokens) > 0 {
- tokens = tokens[1:]
- }
- }
-
- // this occurs when a statement has not been completed
- if stack.top > 1 {
- return nil, NewParseError(fmt.Sprintf("incomplete ini expression"))
- }
-
- // returns a sublist which exludes the start symbol
- return stack.List(), nil
-}
-
-// trimSpaces will trim spaces on the left and right hand side of
-// the literal.
-func trimSpaces(k AST) AST {
- // trim left hand side of spaces
- for i := 0; i < len(k.Root.raw); i++ {
- if !isWhitespace(k.Root.raw[i]) {
- break
- }
-
- k.Root.raw = k.Root.raw[1:]
- i--
- }
-
- // trim right hand side of spaces
- for i := len(k.Root.raw) - 1; i >= 0; i-- {
- if !isWhitespace(k.Root.raw[i]) {
- break
- }
-
- k.Root.raw = k.Root.raw[:len(k.Root.raw)-1]
- }
-
- return k
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
deleted file mode 100644
index eca42d1b..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
+++ /dev/null
@@ -1,336 +0,0 @@
-package ini
-
-import (
- "fmt"
- "strconv"
- "strings"
- "unicode"
-)
-
-var (
- runesTrue = []rune("true")
- runesFalse = []rune("false")
-)
-
-var literalValues = [][]rune{
- runesTrue,
- runesFalse,
-}
-
-func isBoolValue(b []rune) bool {
- for _, lv := range literalValues {
- if isCaselessLitValue(lv, b) {
- return true
- }
- }
- return false
-}
-
-func isLitValue(want, have []rune) bool {
- if len(have) < len(want) {
- return false
- }
-
- for i := 0; i < len(want); i++ {
- if want[i] != have[i] {
- return false
- }
- }
-
- return true
-}
-
-// isCaselessLitValue is a caseless value comparison, assumes want is already lower-cased for efficiency.
-func isCaselessLitValue(want, have []rune) bool {
- if len(have) < len(want) {
- return false
- }
-
- for i := 0; i < len(want); i++ {
- if want[i] != unicode.ToLower(have[i]) {
- return false
- }
- }
-
- return true
-}
-
-// isNumberValue will return whether not the leading characters in
-// a byte slice is a number. A number is delimited by whitespace or
-// the newline token.
-//
-// A number is defined to be in a binary, octal, decimal (int | float), hex format,
-// or in scientific notation.
-func isNumberValue(b []rune) bool {
- negativeIndex := 0
- helper := numberHelper{}
- needDigit := false
-
- for i := 0; i < len(b); i++ {
- negativeIndex++
-
- switch b[i] {
- case '-':
- if helper.IsNegative() || negativeIndex != 1 {
- return false
- }
- helper.Determine(b[i])
- needDigit = true
- continue
- case 'e', 'E':
- if err := helper.Determine(b[i]); err != nil {
- return false
- }
- negativeIndex = 0
- needDigit = true
- continue
- case 'b':
- if helper.numberFormat == hex {
- break
- }
- fallthrough
- case 'o', 'x':
- needDigit = true
- if i == 0 {
- return false
- }
-
- fallthrough
- case '.':
- if err := helper.Determine(b[i]); err != nil {
- return false
- }
- needDigit = true
- continue
- }
-
- if i > 0 && (isNewline(b[i:]) || isWhitespace(b[i])) {
- return !needDigit
- }
-
- if !helper.CorrectByte(b[i]) {
- return false
- }
- needDigit = false
- }
-
- return !needDigit
-}
-
-func isValid(b []rune) (bool, int, error) {
- if len(b) == 0 {
- // TODO: should probably return an error
- return false, 0, nil
- }
-
- return isValidRune(b[0]), 1, nil
-}
-
-func isValidRune(r rune) bool {
- return r != ':' && r != '=' && r != '[' && r != ']' && r != ' ' && r != '\n'
-}
-
-// ValueType is an enum that will signify what type
-// the Value is
-type ValueType int
-
-func (v ValueType) String() string {
- switch v {
- case NoneType:
- return "NONE"
- case DecimalType:
- return "FLOAT"
- case IntegerType:
- return "INT"
- case StringType:
- return "STRING"
- case BoolType:
- return "BOOL"
- }
-
- return ""
-}
-
-// ValueType enums
-const (
- NoneType = ValueType(iota)
- DecimalType
- IntegerType
- StringType
- QuotedStringType
- BoolType
-)
-
-// Value is a union container
-type Value struct {
- Type ValueType
- raw []rune
-
- integer int64
- decimal float64
- boolean bool
- str string
-}
-
-func newValue(t ValueType, base int, raw []rune) (Value, error) {
- v := Value{
- Type: t,
- raw: raw,
- }
- var err error
-
- switch t {
- case DecimalType:
- v.decimal, err = strconv.ParseFloat(string(raw), 64)
- case IntegerType:
- if base != 10 {
- raw = raw[2:]
- }
-
- v.integer, err = strconv.ParseInt(string(raw), base, 64)
- case StringType:
- v.str = string(raw)
- case QuotedStringType:
- v.str = string(raw[1 : len(raw)-1])
- case BoolType:
- v.boolean = isCaselessLitValue(runesTrue, v.raw)
- }
-
- // issue 2253
- //
- // if the value trying to be parsed is too large, then we will use
- // the 'StringType' and raw value instead.
- if nerr, ok := err.(*strconv.NumError); ok && nerr.Err == strconv.ErrRange {
- v.Type = StringType
- v.str = string(raw)
- err = nil
- }
-
- return v, err
-}
-
-// NewStringValue returns a Value type generated using a string input.
-func NewStringValue(str string) (Value, error) {
- return newValue(StringType, 10, []rune(str))
-}
-
-// NewIntValue returns a Value type generated using an int64 input.
-func NewIntValue(i int64) (Value, error) {
- v := strconv.FormatInt(i, 10)
- return newValue(IntegerType, 10, []rune(v))
-}
-
-func (v Value) String() string {
- switch v.Type {
- case DecimalType:
- return fmt.Sprintf("decimal: %f", v.decimal)
- case IntegerType:
- return fmt.Sprintf("integer: %d", v.integer)
- case StringType:
- return fmt.Sprintf("string: %s", string(v.raw))
- case QuotedStringType:
- return fmt.Sprintf("quoted string: %s", string(v.raw))
- case BoolType:
- return fmt.Sprintf("bool: %t", v.boolean)
- default:
- return "union not set"
- }
-}
-
-func newLitToken(b []rune) (Token, int, error) {
- n := 0
- var err error
-
- token := Token{}
- if b[0] == '"' {
- n, err = getStringValue(b)
- if err != nil {
- return token, n, err
- }
-
- token = newToken(TokenLit, b[:n], QuotedStringType)
- } else if isNumberValue(b) {
- var base int
- base, n, err = getNumericalValue(b)
- if err != nil {
- return token, 0, err
- }
-
- value := b[:n]
- vType := IntegerType
- if contains(value, '.') || hasExponent(value) {
- vType = DecimalType
- }
- token = newToken(TokenLit, value, vType)
- token.base = base
- } else if isBoolValue(b) {
- n, err = getBoolValue(b)
-
- token = newToken(TokenLit, b[:n], BoolType)
- } else {
- n, err = getValue(b)
- token = newToken(TokenLit, b[:n], StringType)
- }
-
- return token, n, err
-}
-
-// IntValue returns an integer value
-func (v Value) IntValue() int64 {
- return v.integer
-}
-
-// FloatValue returns a float value
-func (v Value) FloatValue() float64 {
- return v.decimal
-}
-
-// BoolValue returns a bool value
-func (v Value) BoolValue() bool {
- return v.boolean
-}
-
-func isTrimmable(r rune) bool {
- switch r {
- case '\n', ' ':
- return true
- }
- return false
-}
-
-// StringValue returns the string value
-func (v Value) StringValue() string {
- switch v.Type {
- case StringType:
- return strings.TrimFunc(string(v.raw), isTrimmable)
- case QuotedStringType:
- // preserve all characters in the quotes
- return string(removeEscapedCharacters(v.raw[1 : len(v.raw)-1]))
- default:
- return strings.TrimFunc(string(v.raw), isTrimmable)
- }
-}
-
-func contains(runes []rune, c rune) bool {
- for i := 0; i < len(runes); i++ {
- if runes[i] == c {
- return true
- }
- }
-
- return false
-}
-
-func runeCompare(v1 []rune, v2 []rune) bool {
- if len(v1) != len(v2) {
- return false
- }
-
- for i := 0; i < len(v1); i++ {
- if v1[i] != v2[i] {
- return false
- }
- }
-
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/newline_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/newline_token.go
deleted file mode 100644
index e52ac399..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/newline_token.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package ini
-
-func isNewline(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- if b[0] == '\n' {
- return true
- }
-
- if len(b) < 2 {
- return false
- }
-
- return b[0] == '\r' && b[1] == '\n'
-}
-
-func newNewlineToken(b []rune) (Token, int, error) {
- i := 1
- if b[0] == '\r' && isNewline(b[1:]) {
- i++
- }
-
- if !isNewline([]rune(b[:i])) {
- return emptyToken, 0, NewParseError("invalid new line token")
- }
-
- return newToken(TokenNL, b[:i], NoneType), i, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/number_helper.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/number_helper.go
deleted file mode 100644
index a45c0bc5..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/number_helper.go
+++ /dev/null
@@ -1,152 +0,0 @@
-package ini
-
-import (
- "bytes"
- "fmt"
- "strconv"
-)
-
-const (
- none = numberFormat(iota)
- binary
- octal
- decimal
- hex
- exponent
-)
-
-type numberFormat int
-
-// numberHelper is used to dictate what format a number is in
-// and what to do for negative values. Since -1e-4 is a valid
-// number, we cannot just simply check for duplicate negatives.
-type numberHelper struct {
- numberFormat numberFormat
-
- negative bool
- negativeExponent bool
-}
-
-func (b numberHelper) Exists() bool {
- return b.numberFormat != none
-}
-
-func (b numberHelper) IsNegative() bool {
- return b.negative || b.negativeExponent
-}
-
-func (b *numberHelper) Determine(c rune) error {
- if b.Exists() {
- return NewParseError(fmt.Sprintf("multiple number formats: 0%v", string(c)))
- }
-
- switch c {
- case 'b':
- b.numberFormat = binary
- case 'o':
- b.numberFormat = octal
- case 'x':
- b.numberFormat = hex
- case 'e', 'E':
- b.numberFormat = exponent
- case '-':
- if b.numberFormat != exponent {
- b.negative = true
- } else {
- b.negativeExponent = true
- }
- case '.':
- b.numberFormat = decimal
- default:
- return NewParseError(fmt.Sprintf("invalid number character: %v", string(c)))
- }
-
- return nil
-}
-
-func (b numberHelper) CorrectByte(c rune) bool {
- switch {
- case b.numberFormat == binary:
- if !isBinaryByte(c) {
- return false
- }
- case b.numberFormat == octal:
- if !isOctalByte(c) {
- return false
- }
- case b.numberFormat == hex:
- if !isHexByte(c) {
- return false
- }
- case b.numberFormat == decimal:
- if !isDigit(c) {
- return false
- }
- case b.numberFormat == exponent:
- if !isDigit(c) {
- return false
- }
- case b.negativeExponent:
- if !isDigit(c) {
- return false
- }
- case b.negative:
- if !isDigit(c) {
- return false
- }
- default:
- if !isDigit(c) {
- return false
- }
- }
-
- return true
-}
-
-func (b numberHelper) Base() int {
- switch b.numberFormat {
- case binary:
- return 2
- case octal:
- return 8
- case hex:
- return 16
- default:
- return 10
- }
-}
-
-func (b numberHelper) String() string {
- buf := bytes.Buffer{}
- i := 0
-
- switch b.numberFormat {
- case binary:
- i++
- buf.WriteString(strconv.Itoa(i) + ": binary format\n")
- case octal:
- i++
- buf.WriteString(strconv.Itoa(i) + ": octal format\n")
- case hex:
- i++
- buf.WriteString(strconv.Itoa(i) + ": hex format\n")
- case exponent:
- i++
- buf.WriteString(strconv.Itoa(i) + ": exponent format\n")
- default:
- i++
- buf.WriteString(strconv.Itoa(i) + ": integer format\n")
- }
-
- if b.negative {
- i++
- buf.WriteString(strconv.Itoa(i) + ": negative format\n")
- }
-
- if b.negativeExponent {
- i++
- buf.WriteString(strconv.Itoa(i) + ": negative exponent format\n")
- }
-
- return buf.String()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/op_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/op_tokens.go
deleted file mode 100644
index 8a84c7cb..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/op_tokens.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package ini
-
-import (
- "fmt"
-)
-
-var (
- equalOp = []rune("=")
- equalColonOp = []rune(":")
-)
-
-func isOp(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- switch b[0] {
- case '=':
- return true
- case ':':
- return true
- default:
- return false
- }
-}
-
-func newOpToken(b []rune) (Token, int, error) {
- tok := Token{}
-
- switch b[0] {
- case '=':
- tok = newToken(TokenOp, equalOp, NoneType)
- case ':':
- tok = newToken(TokenOp, equalColonOp, NoneType)
- default:
- return tok, 0, NewParseError(fmt.Sprintf("unexpected op type, %v", b[0]))
- }
- return tok, 1, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse.go
new file mode 100644
index 00000000..2422d904
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse.go
@@ -0,0 +1,109 @@
+package ini
+
+import (
+ "fmt"
+ "strings"
+)
+
+func parse(tokens []lineToken, path string) Sections {
+ parser := &parser{
+ path: path,
+ sections: NewSections(),
+ }
+ parser.parse(tokens)
+ return parser.sections
+}
+
+type parser struct {
+ csection, ckey string // current state
+ path string // source file path
+ sections Sections // parse result
+}
+
+func (p *parser) parse(tokens []lineToken) {
+ for _, otok := range tokens {
+ switch tok := otok.(type) {
+ case *lineTokenProfile:
+ p.handleProfile(tok)
+ case *lineTokenProperty:
+ p.handleProperty(tok)
+ case *lineTokenSubProperty:
+ p.handleSubProperty(tok)
+ case *lineTokenContinuation:
+ p.handleContinuation(tok)
+ }
+ }
+}
+
+func (p *parser) handleProfile(tok *lineTokenProfile) {
+ name := tok.Name
+ if tok.Type != "" {
+ name = fmt.Sprintf("%s %s", tok.Type, tok.Name)
+ }
+ p.ckey = ""
+ p.csection = name
+ if _, ok := p.sections.container[name]; !ok {
+ p.sections.container[name] = NewSection(name)
+ }
+}
+
+func (p *parser) handleProperty(tok *lineTokenProperty) {
+ if p.csection == "" {
+ return // LEGACY: don't error on "global" properties
+ }
+
+ p.ckey = tok.Key
+ if _, ok := p.sections.container[p.csection].values[tok.Key]; ok {
+ section := p.sections.container[p.csection]
+ section.Logs = append(p.sections.container[p.csection].Logs,
+ fmt.Sprintf(
+ "For profile: %v, overriding %v value, with a %v value found in a duplicate profile defined later in the same file %v. \n",
+ p.csection, tok.Key, tok.Key, p.path,
+ ),
+ )
+ p.sections.container[p.csection] = section
+ }
+
+ p.sections.container[p.csection].values[tok.Key] = Value{
+ str: tok.Value,
+ }
+ p.sections.container[p.csection].SourceFile[tok.Key] = p.path
+}
+
+func (p *parser) handleSubProperty(tok *lineTokenSubProperty) {
+ if p.csection == "" {
+ return // LEGACY: don't error on "global" properties
+ }
+
+ if p.ckey == "" || p.sections.container[p.csection].values[p.ckey].str != "" {
+ // This is an "orphaned" subproperty, either because it's at
+ // the beginning of a section or because the last property's
+ // value isn't empty. Either way we're lenient here and
+ // "promote" this to a normal property.
+ p.handleProperty(&lineTokenProperty{
+ Key: tok.Key,
+ Value: strings.TrimSpace(trimPropertyComment(tok.Value)),
+ })
+ return
+ }
+
+ if p.sections.container[p.csection].values[p.ckey].mp == nil {
+ p.sections.container[p.csection].values[p.ckey] = Value{
+ mp: map[string]string{},
+ }
+ }
+ p.sections.container[p.csection].values[p.ckey].mp[tok.Key] = tok.Value
+}
+
+func (p *parser) handleContinuation(tok *lineTokenContinuation) {
+ if p.ckey == "" {
+ return
+ }
+
+ value, _ := p.sections.container[p.csection].values[p.ckey]
+ if value.str != "" && value.mp == nil {
+ value.str = fmt.Sprintf("%s\n%s", value.str, tok.Value)
+ }
+
+ p.sections.container[p.csection].values[p.ckey] = value
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go
deleted file mode 100644
index 30ae0b8f..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package ini
-
-// ParseError is an error which is returned during any part of
-// the parsing process.
-type ParseError struct {
- msg string
-}
-
-// NewParseError will return a new ParseError where message
-// is the description of the error.
-func NewParseError(message string) *ParseError {
- return &ParseError{
- msg: message,
- }
-}
-
-func (err *ParseError) Error() string {
- return err.msg
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_stack.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_stack.go
deleted file mode 100644
index 7f01cf7c..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_stack.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package ini
-
-import (
- "bytes"
- "fmt"
-)
-
-// ParseStack is a stack that contains a container, the stack portion,
-// and the list which is the list of ASTs that have been successfully
-// parsed.
-type ParseStack struct {
- top int
- container []AST
- list []AST
- index int
-}
-
-func newParseStack(sizeContainer, sizeList int) ParseStack {
- return ParseStack{
- container: make([]AST, sizeContainer),
- list: make([]AST, sizeList),
- }
-}
-
-// Pop will return and truncate the last container element.
-func (s *ParseStack) Pop() AST {
- s.top--
- return s.container[s.top]
-}
-
-// Push will add the new AST to the container
-func (s *ParseStack) Push(ast AST) {
- s.container[s.top] = ast
- s.top++
-}
-
-// MarkComplete will append the AST to the list of completed statements
-func (s *ParseStack) MarkComplete(ast AST) {
- s.list[s.index] = ast
- s.index++
-}
-
-// List will return the completed statements
-func (s ParseStack) List() []AST {
- return s.list[:s.index]
-}
-
-// Len will return the length of the container
-func (s *ParseStack) Len() int {
- return s.top
-}
-
-func (s ParseStack) String() string {
- buf := bytes.Buffer{}
- for i, node := range s.list {
- buf.WriteString(fmt.Sprintf("%d: %v\n", i+1, node))
- }
-
- return buf.String()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sections.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sections.go
new file mode 100644
index 00000000..dd89848e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sections.go
@@ -0,0 +1,157 @@
+package ini
+
+import (
+ "sort"
+)
+
+// Sections is a map of Section structures that represent
+// a configuration.
+type Sections struct {
+ container map[string]Section
+}
+
+// NewSections returns empty ini Sections
+func NewSections() Sections {
+ return Sections{
+ container: make(map[string]Section, 0),
+ }
+}
+
+// GetSection will return section p. If section p does not exist,
+// false will be returned in the second parameter.
+func (t Sections) GetSection(p string) (Section, bool) {
+ v, ok := t.container[p]
+ return v, ok
+}
+
+// HasSection denotes if Sections consist of a section with
+// provided name.
+func (t Sections) HasSection(p string) bool {
+ _, ok := t.container[p]
+ return ok
+}
+
+// SetSection sets a section value for provided section name.
+func (t Sections) SetSection(p string, v Section) Sections {
+ t.container[p] = v
+ return t
+}
+
+// DeleteSection deletes a section entry/value for provided section name./
+func (t Sections) DeleteSection(p string) {
+ delete(t.container, p)
+}
+
+// values represents a map of union values.
+type values map[string]Value
+
+// List will return a list of all sections that were successfully
+// parsed.
+func (t Sections) List() []string {
+ keys := make([]string, len(t.container))
+ i := 0
+ for k := range t.container {
+ keys[i] = k
+ i++
+ }
+
+ sort.Strings(keys)
+ return keys
+}
+
+// Section contains a name and values. This represent
+// a sectioned entry in a configuration file.
+type Section struct {
+ // Name is the Section profile name
+ Name string
+
+ // values are the values within parsed profile
+ values values
+
+ // Errors is the list of errors
+ Errors []error
+
+ // Logs is the list of logs
+ Logs []string
+
+ // SourceFile is the INI Source file from where this section
+ // was retrieved. They key is the property, value is the
+ // source file the property was retrieved from.
+ SourceFile map[string]string
+}
+
+// NewSection returns an initialize section for the name
+func NewSection(name string) Section {
+ return Section{
+ Name: name,
+ values: values{},
+ SourceFile: map[string]string{},
+ }
+}
+
+// List will return a list of all
+// services in values
+func (t Section) List() []string {
+ keys := make([]string, len(t.values))
+ i := 0
+ for k := range t.values {
+ keys[i] = k
+ i++
+ }
+
+ sort.Strings(keys)
+ return keys
+}
+
+// UpdateSourceFile updates source file for a property to provided filepath.
+func (t Section) UpdateSourceFile(property string, filepath string) {
+ t.SourceFile[property] = filepath
+}
+
+// UpdateValue updates value for a provided key with provided value
+func (t Section) UpdateValue(k string, v Value) error {
+ t.values[k] = v
+ return nil
+}
+
+// Has will return whether or not an entry exists in a given section
+func (t Section) Has(k string) bool {
+ _, ok := t.values[k]
+ return ok
+}
+
+// ValueType will returned what type the union is set to. If
+// k was not found, the NoneType will be returned.
+func (t Section) ValueType(k string) (ValueType, bool) {
+ v, ok := t.values[k]
+ return v.Type, ok
+}
+
+// Bool returns a bool value at k
+func (t Section) Bool(k string) (bool, bool) {
+ return t.values[k].BoolValue()
+}
+
+// Int returns an integer value at k
+func (t Section) Int(k string) (int64, bool) {
+ return t.values[k].IntValue()
+}
+
+// Map returns a map value at k
+func (t Section) Map(k string) map[string]string {
+ return t.values[k].MapValue()
+}
+
+// Float64 returns a float value at k
+func (t Section) Float64(k string) (float64, bool) {
+ return t.values[k].FloatValue()
+}
+
+// String returns the string value at k
+func (t Section) String(k string) string {
+ _, ok := t.values[k]
+ if !ok {
+ return ""
+ }
+ return t.values[k].StringValue()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sep_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sep_tokens.go
deleted file mode 100644
index f82095ba..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sep_tokens.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package ini
-
-import (
- "fmt"
-)
-
-var (
- emptyRunes = []rune{}
-)
-
-func isSep(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- switch b[0] {
- case '[', ']':
- return true
- default:
- return false
- }
-}
-
-var (
- openBrace = []rune("[")
- closeBrace = []rune("]")
-)
-
-func newSepToken(b []rune) (Token, int, error) {
- tok := Token{}
-
- switch b[0] {
- case '[':
- tok = newToken(TokenSep, openBrace, NoneType)
- case ']':
- tok = newToken(TokenSep, closeBrace, NoneType)
- default:
- return tok, 0, NewParseError(fmt.Sprintf("unexpected sep type, %v", b[0]))
- }
- return tok, 1, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
deleted file mode 100644
index 07e90876..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package ini
-
-// skipper is used to skip certain blocks of an ini file.
-// Currently skipper is used to skip nested blocks of ini
-// files. See example below
-//
-// [ foo ]
-// nested = ; this section will be skipped
-// a=b
-// c=d
-// bar=baz ; this will be included
-type skipper struct {
- shouldSkip bool
- TokenSet bool
- prevTok Token
-}
-
-func newSkipper() skipper {
- return skipper{
- prevTok: emptyToken,
- }
-}
-
-func (s *skipper) ShouldSkip(tok Token) bool {
- // should skip state will be modified only if previous token was new line (NL);
- // and the current token is not WhiteSpace (WS).
- if s.shouldSkip &&
- s.prevTok.Type() == TokenNL &&
- tok.Type() != TokenWS {
- s.Continue()
- return false
- }
-
- s.prevTok = tok
- return s.shouldSkip
-}
-
-func (s *skipper) Skip() {
- s.shouldSkip = true
-}
-
-func (s *skipper) Continue() {
- s.shouldSkip = false
- s.prevTok = emptyToken
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
deleted file mode 100644
index ba0af01b..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package ini
-
-// Statement is an empty AST mostly used for transitioning states.
-func newStatement() AST {
- return newAST(ASTKindStatement, AST{})
-}
-
-// SectionStatement represents a section AST
-func newSectionStatement(tok Token) AST {
- return newASTWithRootToken(ASTKindSectionStatement, tok)
-}
-
-// ExprStatement represents a completed expression AST
-func newExprStatement(ast AST) AST {
- return newAST(ASTKindExprStatement, ast)
-}
-
-// CommentStatement represents a comment in the ini defintion.
-//
-// grammar:
-// comment -> #comment' | ;comment'
-// comment' -> epsilon | value
-func newCommentStatement(tok Token) AST {
- return newAST(ASTKindCommentStatement, newExpression(tok))
-}
-
-// CompletedSectionStatement represents a completed section
-func newCompletedSectionStatement(ast AST) AST {
- return newAST(ASTKindCompletedSectionStatement, ast)
-}
-
-// SkipStatement is used to skip whole statements
-func newSkipStatement(ast AST) AST {
- return newAST(ASTKindSkipStatement, ast)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go
new file mode 100644
index 00000000..ed77d083
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go
@@ -0,0 +1,89 @@
+package ini
+
+import (
+ "strings"
+)
+
+func trimProfileComment(s string) string {
+ r, _, _ := strings.Cut(s, "#")
+ r, _, _ = strings.Cut(r, ";")
+ return r
+}
+
+func trimPropertyComment(s string) string {
+ r, _, _ := strings.Cut(s, " #")
+ r, _, _ = strings.Cut(r, " ;")
+ r, _, _ = strings.Cut(r, "\t#")
+ r, _, _ = strings.Cut(r, "\t;")
+ return r
+}
+
+// assumes no surrounding comment
+func splitProperty(s string) (string, string, bool) {
+ equalsi := strings.Index(s, "=")
+ coloni := strings.Index(s, ":") // LEGACY: also supported for property assignment
+ sep := "="
+ if equalsi == -1 || coloni != -1 && coloni < equalsi {
+ sep = ":"
+ }
+
+ k, v, ok := strings.Cut(s, sep)
+ if !ok {
+ return "", "", false
+ }
+ return strings.TrimSpace(k), strings.TrimSpace(v), true
+}
+
+// assumes no surrounding comment, whitespace, or profile brackets
+func splitProfile(s string) (string, string) {
+ var first int
+ for i, r := range s {
+ if isLineSpace(r) {
+ if first == 0 {
+ first = i
+ }
+ } else {
+ if first != 0 {
+ return s[:first], s[i:]
+ }
+ }
+ }
+ if first == 0 {
+ return "", s // type component is effectively blank
+ }
+ return "", ""
+}
+
+func isLineSpace(r rune) bool {
+ return r == ' ' || r == '\t'
+}
+
+func unquote(s string) string {
+ if isSingleQuoted(s) || isDoubleQuoted(s) {
+ return s[1 : len(s)-1]
+ }
+ return s
+}
+
+// applies various legacy conversions to property values:
+// - remote wrapping single/doublequotes
+func legacyStrconv(s string) string {
+ s = unquote(s)
+ return s
+}
+
+func isSingleQuoted(s string) bool {
+ return hasAffixes(s, "'", "'")
+}
+
+func isDoubleQuoted(s string) bool {
+ return hasAffixes(s, `"`, `"`)
+}
+
+func isBracketed(s string) bool {
+ return hasAffixes(s, "[", "]")
+}
+
+func hasAffixes(s, left, right string) bool {
+ return strings.HasPrefix(s, left) && strings.HasSuffix(s, right)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/token.go
new file mode 100644
index 00000000..6e9a0374
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/token.go
@@ -0,0 +1,32 @@
+package ini
+
+type lineToken interface {
+ isLineToken()
+}
+
+type lineTokenProfile struct {
+ Type string
+ Name string
+}
+
+func (*lineTokenProfile) isLineToken() {}
+
+type lineTokenProperty struct {
+ Key string
+ Value string
+}
+
+func (*lineTokenProperty) isLineToken() {}
+
+type lineTokenContinuation struct {
+ Value string
+}
+
+func (*lineTokenContinuation) isLineToken() {}
+
+type lineTokenSubProperty struct {
+ Key string
+ Value string
+}
+
+func (*lineTokenSubProperty) isLineToken() {}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/tokenize.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/tokenize.go
new file mode 100644
index 00000000..89a77368
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/tokenize.go
@@ -0,0 +1,92 @@
+package ini
+
+import (
+ "strings"
+)
+
+func tokenize(lines []string) ([]lineToken, error) {
+ tokens := make([]lineToken, 0, len(lines))
+ for _, line := range lines {
+ if len(strings.TrimSpace(line)) == 0 || isLineComment(line) {
+ continue
+ }
+
+ if tok := asProfile(line); tok != nil {
+ tokens = append(tokens, tok)
+ } else if tok := asProperty(line); tok != nil {
+ tokens = append(tokens, tok)
+ } else if tok := asSubProperty(line); tok != nil {
+ tokens = append(tokens, tok)
+ } else if tok := asContinuation(line); tok != nil {
+ tokens = append(tokens, tok)
+ } // unrecognized tokens are effectively ignored
+ }
+ return tokens, nil
+}
+
+func isLineComment(line string) bool {
+ trimmed := strings.TrimLeft(line, " \t")
+ return strings.HasPrefix(trimmed, "#") || strings.HasPrefix(trimmed, ";")
+}
+
+func asProfile(line string) *lineTokenProfile { // " [ type name ] ; comment"
+ trimmed := strings.TrimSpace(trimProfileComment(line)) // "[ type name ]"
+ if !isBracketed(trimmed) {
+ return nil
+ }
+ trimmed = trimmed[1 : len(trimmed)-1] // " type name " (or just " name ")
+ trimmed = strings.TrimSpace(trimmed) // "type name" / "name"
+ typ, name := splitProfile(trimmed)
+ return &lineTokenProfile{
+ Type: typ,
+ Name: name,
+ }
+}
+
+func asProperty(line string) *lineTokenProperty {
+ if isLineSpace(rune(line[0])) {
+ return nil
+ }
+
+ trimmed := trimPropertyComment(line)
+ trimmed = strings.TrimRight(trimmed, " \t")
+ k, v, ok := splitProperty(trimmed)
+ if !ok {
+ return nil
+ }
+
+ return &lineTokenProperty{
+ Key: strings.ToLower(k), // LEGACY: normalize key case
+ Value: legacyStrconv(v), // LEGACY: see func docs
+ }
+}
+
+func asSubProperty(line string) *lineTokenSubProperty {
+ if !isLineSpace(rune(line[0])) {
+ return nil
+ }
+
+ // comments on sub-properties are included in the value
+ trimmed := strings.TrimLeft(line, " \t")
+ k, v, ok := splitProperty(trimmed)
+ if !ok {
+ return nil
+ }
+
+ return &lineTokenSubProperty{ // same LEGACY constraints as in normal property
+ Key: strings.ToLower(k),
+ Value: legacyStrconv(v),
+ }
+}
+
+func asContinuation(line string) *lineTokenContinuation {
+ if !isLineSpace(rune(line[0])) {
+ return nil
+ }
+
+ // includes comments like sub-properties
+ trimmed := strings.TrimLeft(line, " \t")
+ return &lineTokenContinuation{
+ Value: trimmed,
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value.go
new file mode 100644
index 00000000..e3706b3c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value.go
@@ -0,0 +1,93 @@
+package ini
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+)
+
+// ValueType is an enum that will signify what type
+// the Value is
+type ValueType int
+
+func (v ValueType) String() string {
+ switch v {
+ case NoneType:
+ return "NONE"
+ case StringType:
+ return "STRING"
+ }
+
+ return ""
+}
+
+// ValueType enums
+const (
+ NoneType = ValueType(iota)
+ StringType
+ QuotedStringType
+)
+
+// Value is a union container
+type Value struct {
+ Type ValueType
+
+ str string
+ mp map[string]string
+}
+
+// NewStringValue returns a Value type generated using a string input.
+func NewStringValue(str string) (Value, error) {
+ return Value{str: str}, nil
+}
+
+func (v Value) String() string {
+ switch v.Type {
+ case StringType:
+ return fmt.Sprintf("string: %s", string(v.str))
+ case QuotedStringType:
+ return fmt.Sprintf("quoted string: %s", string(v.str))
+ default:
+ return "union not set"
+ }
+}
+
+// MapValue returns a map value for sub properties
+func (v Value) MapValue() map[string]string {
+ return v.mp
+}
+
+// IntValue returns an integer value
+func (v Value) IntValue() (int64, bool) {
+ i, err := strconv.ParseInt(string(v.str), 0, 64)
+ if err != nil {
+ return 0, false
+ }
+ return i, true
+}
+
+// FloatValue returns a float value
+func (v Value) FloatValue() (float64, bool) {
+ f, err := strconv.ParseFloat(string(v.str), 64)
+ if err != nil {
+ return 0, false
+ }
+ return f, true
+}
+
+// BoolValue returns a bool value
+func (v Value) BoolValue() (bool, bool) {
+ // we don't use ParseBool as it recognizes more than what we've
+ // historically supported
+ if strings.EqualFold(v.str, "true") {
+ return true, true
+ } else if strings.EqualFold(v.str, "false") {
+ return false, true
+ }
+ return false, false
+}
+
+// StringValue returns the string value
+func (v Value) StringValue() string {
+ return v.str
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value_util.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value_util.go
deleted file mode 100644
index b5480fde..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value_util.go
+++ /dev/null
@@ -1,284 +0,0 @@
-package ini
-
-import (
- "fmt"
-)
-
-// getStringValue will return a quoted string and the amount
-// of bytes read
-//
-// an error will be returned if the string is not properly formatted
-func getStringValue(b []rune) (int, error) {
- if b[0] != '"' {
- return 0, NewParseError("strings must start with '\"'")
- }
-
- endQuote := false
- i := 1
-
- for ; i < len(b) && !endQuote; i++ {
- if escaped := isEscaped(b[:i], b[i]); b[i] == '"' && !escaped {
- endQuote = true
- break
- } else if escaped {
- /*c, err := getEscapedByte(b[i])
- if err != nil {
- return 0, err
- }
-
- b[i-1] = c
- b = append(b[:i], b[i+1:]...)
- i--*/
-
- continue
- }
- }
-
- if !endQuote {
- return 0, NewParseError("missing '\"' in string value")
- }
-
- return i + 1, nil
-}
-
-// getBoolValue will return a boolean and the amount
-// of bytes read
-//
-// an error will be returned if the boolean is not of a correct
-// value
-func getBoolValue(b []rune) (int, error) {
- if len(b) < 4 {
- return 0, NewParseError("invalid boolean value")
- }
-
- n := 0
- for _, lv := range literalValues {
- if len(lv) > len(b) {
- continue
- }
-
- if isCaselessLitValue(lv, b) {
- n = len(lv)
- }
- }
-
- if n == 0 {
- return 0, NewParseError("invalid boolean value")
- }
-
- return n, nil
-}
-
-// getNumericalValue will return a numerical string, the amount
-// of bytes read, and the base of the number
-//
-// an error will be returned if the number is not of a correct
-// value
-func getNumericalValue(b []rune) (int, int, error) {
- if !isDigit(b[0]) {
- return 0, 0, NewParseError("invalid digit value")
- }
-
- i := 0
- helper := numberHelper{}
-
-loop:
- for negativeIndex := 0; i < len(b); i++ {
- negativeIndex++
-
- if !isDigit(b[i]) {
- switch b[i] {
- case '-':
- if helper.IsNegative() || negativeIndex != 1 {
- return 0, 0, NewParseError("parse error '-'")
- }
-
- n := getNegativeNumber(b[i:])
- i += (n - 1)
- helper.Determine(b[i])
- continue
- case '.':
- if err := helper.Determine(b[i]); err != nil {
- return 0, 0, err
- }
- case 'e', 'E':
- if err := helper.Determine(b[i]); err != nil {
- return 0, 0, err
- }
-
- negativeIndex = 0
- case 'b':
- if helper.numberFormat == hex {
- break
- }
- fallthrough
- case 'o', 'x':
- if i == 0 && b[i] != '0' {
- return 0, 0, NewParseError("incorrect base format, expected leading '0'")
- }
-
- if i != 1 {
- return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i))
- }
-
- if err := helper.Determine(b[i]); err != nil {
- return 0, 0, err
- }
- default:
- if isWhitespace(b[i]) {
- break loop
- }
-
- if isNewline(b[i:]) {
- break loop
- }
-
- if !(helper.numberFormat == hex && isHexByte(b[i])) {
- if i+2 < len(b) && !isNewline(b[i:i+2]) {
- return 0, 0, NewParseError("invalid numerical character")
- } else if !isNewline([]rune{b[i]}) {
- return 0, 0, NewParseError("invalid numerical character")
- }
-
- break loop
- }
- }
- }
- }
-
- return helper.Base(), i, nil
-}
-
-// isDigit will return whether or not something is an integer
-func isDigit(b rune) bool {
- return b >= '0' && b <= '9'
-}
-
-func hasExponent(v []rune) bool {
- return contains(v, 'e') || contains(v, 'E')
-}
-
-func isBinaryByte(b rune) bool {
- switch b {
- case '0', '1':
- return true
- default:
- return false
- }
-}
-
-func isOctalByte(b rune) bool {
- switch b {
- case '0', '1', '2', '3', '4', '5', '6', '7':
- return true
- default:
- return false
- }
-}
-
-func isHexByte(b rune) bool {
- if isDigit(b) {
- return true
- }
- return (b >= 'A' && b <= 'F') ||
- (b >= 'a' && b <= 'f')
-}
-
-func getValue(b []rune) (int, error) {
- i := 0
-
- for i < len(b) {
- if isNewline(b[i:]) {
- break
- }
-
- if isOp(b[i:]) {
- break
- }
-
- valid, n, err := isValid(b[i:])
- if err != nil {
- return 0, err
- }
-
- if !valid {
- break
- }
-
- i += n
- }
-
- return i, nil
-}
-
-// getNegativeNumber will return a negative number from a
-// byte slice. This will iterate through all characters until
-// a non-digit has been found.
-func getNegativeNumber(b []rune) int {
- if b[0] != '-' {
- return 0
- }
-
- i := 1
- for ; i < len(b); i++ {
- if !isDigit(b[i]) {
- return i
- }
- }
-
- return i
-}
-
-// isEscaped will return whether or not the character is an escaped
-// character.
-func isEscaped(value []rune, b rune) bool {
- if len(value) == 0 {
- return false
- }
-
- switch b {
- case '\'': // single quote
- case '"': // quote
- case 'n': // newline
- case 't': // tab
- case '\\': // backslash
- default:
- return false
- }
-
- return value[len(value)-1] == '\\'
-}
-
-func getEscapedByte(b rune) (rune, error) {
- switch b {
- case '\'': // single quote
- return '\'', nil
- case '"': // quote
- return '"', nil
- case 'n': // newline
- return '\n', nil
- case 't': // table
- return '\t', nil
- case '\\': // backslash
- return '\\', nil
- default:
- return b, NewParseError(fmt.Sprintf("invalid escaped character %c", b))
- }
-}
-
-func removeEscapedCharacters(b []rune) []rune {
- for i := 0; i < len(b); i++ {
- if isEscaped(b[:i], b[i]) {
- c, err := getEscapedByte(b[i])
- if err != nil {
- return b
- }
-
- b[i-1] = c
- b = append(b[:i], b[i+1:]...)
- i--
- }
- }
-
- return b
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
deleted file mode 100644
index a07a6373..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
+++ /dev/null
@@ -1,269 +0,0 @@
-package ini
-
-import (
- "fmt"
- "sort"
- "strings"
-)
-
-// Visitor is an interface used by walkers that will
-// traverse an array of ASTs.
-type Visitor interface {
- VisitExpr(AST) error
- VisitStatement(AST) error
-}
-
-// DefaultVisitor is used to visit statements and expressions
-// and ensure that they are both of the correct format.
-// In addition, upon visiting this will build sections and populate
-// the Sections field which can be used to retrieve profile
-// configuration.
-type DefaultVisitor struct {
-
- // scope is the profile which is being visited
- scope string
-
- // path is the file path which the visitor is visiting
- path string
-
- // Sections defines list of the profile section
- Sections Sections
-}
-
-// NewDefaultVisitor returns a DefaultVisitor. It takes in a filepath
-// which points to the file it is visiting.
-func NewDefaultVisitor(filepath string) *DefaultVisitor {
- return &DefaultVisitor{
- Sections: Sections{
- container: map[string]Section{},
- },
- path: filepath,
- }
-}
-
-// VisitExpr visits expressions...
-func (v *DefaultVisitor) VisitExpr(expr AST) error {
- t := v.Sections.container[v.scope]
- if t.values == nil {
- t.values = values{}
- }
- if t.SourceFile == nil {
- t.SourceFile = make(map[string]string, 0)
- }
-
- switch expr.Kind {
- case ASTKindExprStatement:
- opExpr := expr.GetRoot()
- switch opExpr.Kind {
- case ASTKindEqualExpr:
- children := opExpr.GetChildren()
- if len(children) <= 1 {
- return NewParseError("unexpected token type")
- }
-
- rhs := children[1]
-
- // The right-hand value side the equality expression is allowed to contain '[', ']', ':', '=' in the values.
- // If the token is not either a literal or one of the token types that identifies those four additional
- // tokens then error.
- if !(rhs.Root.Type() == TokenLit || rhs.Root.Type() == TokenOp || rhs.Root.Type() == TokenSep) {
- return NewParseError("unexpected token type")
- }
-
- key := EqualExprKey(opExpr)
- val, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw())
- if err != nil {
- return err
- }
-
- // lower case key to standardize
- k := strings.ToLower(key)
-
- // identify if the section already had this key, append log on section
- if t.Has(k) {
- t.Logs = append(t.Logs,
- fmt.Sprintf("For profile: %v, overriding %v value, "+
- "with a %v value found in a duplicate profile defined later in the same file %v. \n",
- t.Name, k, k, v.path))
- }
-
- // assign the value
- t.values[k] = val
- // update the source file path for region
- t.SourceFile[k] = v.path
- default:
- return NewParseError(fmt.Sprintf("unsupported expression %v", expr))
- }
- default:
- return NewParseError(fmt.Sprintf("unsupported expression %v", expr))
- }
-
- v.Sections.container[v.scope] = t
- return nil
-}
-
-// VisitStatement visits statements...
-func (v *DefaultVisitor) VisitStatement(stmt AST) error {
- switch stmt.Kind {
- case ASTKindCompletedSectionStatement:
- child := stmt.GetRoot()
- if child.Kind != ASTKindSectionStatement {
- return NewParseError(fmt.Sprintf("unsupported child statement: %T", child))
- }
-
- name := string(child.Root.Raw())
-
- // trim start and end space
- name = strings.TrimSpace(name)
-
- // if has prefix "profile " + [ws+] + "profile-name",
- // we standardize by removing the [ws+] between prefix and profile-name.
- if strings.HasPrefix(name, "profile ") {
- names := strings.SplitN(name, " ", 2)
- name = names[0] + " " + strings.TrimLeft(names[1], " ")
- }
-
- // attach profile name on section
- if !v.Sections.HasSection(name) {
- v.Sections.container[name] = NewSection(name)
- }
- v.scope = name
- default:
- return NewParseError(fmt.Sprintf("unsupported statement: %s", stmt.Kind))
- }
-
- return nil
-}
-
-// Sections is a map of Section structures that represent
-// a configuration.
-type Sections struct {
- container map[string]Section
-}
-
-// NewSections returns empty ini Sections
-func NewSections() Sections {
- return Sections{
- container: make(map[string]Section, 0),
- }
-}
-
-// GetSection will return section p. If section p does not exist,
-// false will be returned in the second parameter.
-func (t Sections) GetSection(p string) (Section, bool) {
- v, ok := t.container[p]
- return v, ok
-}
-
-// HasSection denotes if Sections consist of a section with
-// provided name.
-func (t Sections) HasSection(p string) bool {
- _, ok := t.container[p]
- return ok
-}
-
-// SetSection sets a section value for provided section name.
-func (t Sections) SetSection(p string, v Section) Sections {
- t.container[p] = v
- return t
-}
-
-// DeleteSection deletes a section entry/value for provided section name./
-func (t Sections) DeleteSection(p string) {
- delete(t.container, p)
-}
-
-// values represents a map of union values.
-type values map[string]Value
-
-// List will return a list of all sections that were successfully
-// parsed.
-func (t Sections) List() []string {
- keys := make([]string, len(t.container))
- i := 0
- for k := range t.container {
- keys[i] = k
- i++
- }
-
- sort.Strings(keys)
- return keys
-}
-
-// Section contains a name and values. This represent
-// a sectioned entry in a configuration file.
-type Section struct {
- // Name is the Section profile name
- Name string
-
- // values are the values within parsed profile
- values values
-
- // Errors is the list of errors
- Errors []error
-
- // Logs is the list of logs
- Logs []string
-
- // SourceFile is the INI Source file from where this section
- // was retrieved. They key is the property, value is the
- // source file the property was retrieved from.
- SourceFile map[string]string
-}
-
-// NewSection returns an initialize section for the name
-func NewSection(name string) Section {
- return Section{
- Name: name,
- values: values{},
- SourceFile: map[string]string{},
- }
-}
-
-// UpdateSourceFile updates source file for a property to provided filepath.
-func (t Section) UpdateSourceFile(property string, filepath string) {
- t.SourceFile[property] = filepath
-}
-
-// UpdateValue updates value for a provided key with provided value
-func (t Section) UpdateValue(k string, v Value) error {
- t.values[k] = v
- return nil
-}
-
-// Has will return whether or not an entry exists in a given section
-func (t Section) Has(k string) bool {
- _, ok := t.values[k]
- return ok
-}
-
-// ValueType will returned what type the union is set to. If
-// k was not found, the NoneType will be returned.
-func (t Section) ValueType(k string) (ValueType, bool) {
- v, ok := t.values[k]
- return v.Type, ok
-}
-
-// Bool returns a bool value at k
-func (t Section) Bool(k string) bool {
- return t.values[k].BoolValue()
-}
-
-// Int returns an integer value at k
-func (t Section) Int(k string) int64 {
- return t.values[k].IntValue()
-}
-
-// Float64 returns a float value at k
-func (t Section) Float64(k string) float64 {
- return t.values[k].FloatValue()
-}
-
-// String returns the string value at k
-func (t Section) String(k string) string {
- _, ok := t.values[k]
- if !ok {
- return ""
- }
- return t.values[k].StringValue()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/walker.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/walker.go
deleted file mode 100644
index 99915f7f..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/walker.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package ini
-
-// Walk will traverse the AST using the v, the Visitor.
-func Walk(tree []AST, v Visitor) error {
- for _, node := range tree {
- switch node.Kind {
- case ASTKindExpr,
- ASTKindExprStatement:
-
- if err := v.VisitExpr(node); err != nil {
- return err
- }
- case ASTKindStatement,
- ASTKindCompletedSectionStatement,
- ASTKindNestedSectionStatement,
- ASTKindCompletedNestedSectionStatement:
-
- if err := v.VisitStatement(node); err != nil {
- return err
- }
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ws_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ws_token.go
deleted file mode 100644
index 7ffb4ae0..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ws_token.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package ini
-
-import (
- "unicode"
-)
-
-// isWhitespace will return whether or not the character is
-// a whitespace character.
-//
-// Whitespace is defined as a space or tab.
-func isWhitespace(c rune) bool {
- return unicode.IsSpace(c) && c != '\n' && c != '\r'
-}
-
-func newWSToken(b []rune) (Token, int, error) {
- i := 0
- for ; i < len(b); i++ {
- if !isWhitespace(b[i]) {
- break
- }
- }
-
- return newToken(TokenWS, b[:i], NoneType), i, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go
new file mode 100644
index 00000000..c96b717e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go
@@ -0,0 +1,47 @@
+package shareddefaults
+
+import (
+ "os"
+ "os/user"
+ "path/filepath"
+)
+
+// SharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func SharedCredentialsFilename() string {
+ return filepath.Join(UserHomeDir(), ".aws", "credentials")
+}
+
+// SharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func SharedConfigFilename() string {
+ return filepath.Join(UserHomeDir(), ".aws", "config")
+}
+
+// UserHomeDir returns the home directory for the user the process is
+// running under.
+func UserHomeDir() string {
+ // Ignore errors since we only care about Windows and *nix.
+ home, _ := os.UserHomeDir()
+
+ if len(home) > 0 {
+ return home
+ }
+
+ currUser, _ := user.Current()
+ if currUser != nil {
+ home = currUser.HomeDir
+ }
+
+ return home
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
index 6a66aea5..fe6a6200 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
@@ -14,7 +14,7 @@ distribution.
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+THIS SOFTWARE IS PROVIDED BY THE COPYIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
@@ -25,3 +25,4 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go
new file mode 100644
index 00000000..cb70616e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go
@@ -0,0 +1,7 @@
+// Package singleflight provides a duplicate function call suppression
+// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight
+// package. The package is forked, because the package a part of the unstable
+// and unversioned golang.org/x/sync module.
+//
+// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight
+package singleflight
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
index 14ad0c58..e8a1b17d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
@@ -2,11 +2,44 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package singleflight provides a duplicate function call suppression
-// mechanism.
package singleflight
-import "sync"
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "runtime"
+ "runtime/debug"
+ "sync"
+)
+
+// errGoexit indicates the runtime.Goexit was called in
+// the user given function.
+var errGoexit = errors.New("runtime.Goexit was called")
+
+// A panicError is an arbitrary value recovered from a panic
+// with the stack trace during the execution of given function.
+type panicError struct {
+ value interface{}
+ stack []byte
+}
+
+// Error implements error interface.
+func (p *panicError) Error() string {
+ return fmt.Sprintf("%v\n\n%s", p.value, p.stack)
+}
+
+func newPanicError(v interface{}) error {
+ stack := debug.Stack()
+
+ // The first line of the stack trace is of the form "goroutine N [status]:"
+ // but by the time the panic reaches Do the goroutine may no longer exist
+ // and its status will have changed. Trim out the misleading line.
+ if line := bytes.IndexByte(stack[:], '\n'); line >= 0 {
+ stack = stack[line+1:]
+ }
+ return &panicError{value: v, stack: stack}
+}
// call is an in-flight or completed singleflight.Do call
type call struct {
@@ -57,6 +90,12 @@ func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, e
c.dups++
g.mu.Unlock()
c.wg.Wait()
+
+ if e, ok := c.err.(*panicError); ok {
+ panic(e)
+ } else if c.err == errGoexit {
+ runtime.Goexit()
+ }
return c.val, c.err, true
}
c := new(call)
@@ -70,6 +109,8 @@ func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, e
// DoChan is like Do but returns a channel that will receive the
// results when they are ready.
+//
+// The returned channel will not be closed.
func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
ch := make(chan Result, 1)
g.mu.Lock()
@@ -94,17 +135,66 @@ func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result
// doCall handles the single call for a key.
func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
- c.val, c.err = fn()
- c.wg.Done()
-
- g.mu.Lock()
- if !c.forgotten {
- delete(g.m, key)
- }
- for _, ch := range c.chans {
- ch <- Result{c.val, c.err, c.dups > 0}
+ normalReturn := false
+ recovered := false
+
+ // use double-defer to distinguish panic from runtime.Goexit,
+ // more details see https://golang.org/cl/134395
+ defer func() {
+ // the given function invoked runtime.Goexit
+ if !normalReturn && !recovered {
+ c.err = errGoexit
+ }
+
+ c.wg.Done()
+ g.mu.Lock()
+ defer g.mu.Unlock()
+ if !c.forgotten {
+ delete(g.m, key)
+ }
+
+ if e, ok := c.err.(*panicError); ok {
+ // In order to prevent the waiting channels from being blocked forever,
+ // needs to ensure that this panic cannot be recovered.
+ if len(c.chans) > 0 {
+ go panic(e)
+ select {} // Keep this goroutine around so that it will appear in the crash dump.
+ } else {
+ panic(e)
+ }
+ } else if c.err == errGoexit {
+ // Already in the process of goexit, no need to call again
+ } else {
+ // Normal return
+ for _, ch := range c.chans {
+ ch <- Result{c.val, c.err, c.dups > 0}
+ }
+ }
+ }()
+
+ func() {
+ defer func() {
+ if !normalReturn {
+ // Ideally, we would wait to take a stack trace until we've determined
+ // whether this is a panic or a runtime.Goexit.
+ //
+ // Unfortunately, the only way we can distinguish the two is to see
+ // whether the recover stopped the goroutine from terminating, and by
+ // the time we know that, the part of the stack trace relevant to the
+ // panic has been discarded.
+ if r := recover(); r != nil {
+ c.err = newPanicError(r)
+ }
+ }
+ }()
+
+ c.val, c.err = fn()
+ normalReturn = true
+ }()
+
+ if !normalReturn {
+ recovered = true
}
- g.mu.Unlock()
}
// Forget tells the singleflight to forget about a key. Future calls
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
index 3856a6f5..462dcfee 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
@@ -1,3 +1,208 @@
+# v1.3.3 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.10 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.9 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.8 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.7 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.6 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.3 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2023-11-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.6 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.5 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.4 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.3 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.2 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.1 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.28 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.27 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.26 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.25 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.24 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.23 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.22 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.21 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.20 (2023-02-14)
+
+* No change notes available for this release.
+
+# v1.0.19 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.18 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.17 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.16 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.15 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.14 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.13 (2022-09-14)
+
+* **Bug Fix**: Fixes an issues where an error from an underlying SigV4 credential provider would not be surfaced from the SigV4a credential provider. Contribution by [sakthipriyan-aqfer](https://github.com/sakthipriyan-aqfer).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.12 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.11 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.10 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.9 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.8 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.7 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.6 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.5 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.4 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.3 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.2 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.1 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.0.0 (2022-04-07)
* **Release**: New internal v4a signing module location.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/credentials.go
index 856dcd62..3ae3a019 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/credentials.go
@@ -51,7 +51,7 @@ type SymmetricCredentialAdaptor struct {
func (s *SymmetricCredentialAdaptor) Retrieve(ctx context.Context) (aws.Credentials, error) {
symCreds, err := s.retrieveFromSymmetricProvider(ctx)
if err != nil {
- return aws.Credentials{}, nil
+ return aws.Credentials{}, err
}
if asymCreds := s.getCreds(); asymCreds == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
index 809ae2a3..7abe5775 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
@@ -3,4 +3,4 @@
package v4a
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.0.0"
+const goModuleVersion = "1.3.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto/compare.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto/compare.go
index a93ec40c..1d0f25f8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto/compare.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto/compare.go
@@ -5,10 +5,10 @@ import "fmt"
// ConstantTimeByteCompare is a constant-time byte comparison of x and y. This function performs an absolute comparison
// if the two byte slices assuming they represent a big-endian number.
//
-// error if len(x) != len(y)
-// -1 if x < y
-// 0 if x == y
-// +1 if x > y
+// error if len(x) != len(y)
+// -1 if x < y
+// 0 if x == y
+// +1 if x > y
func ConstantTimeByteCompare(x, y []byte) (int, error) {
if len(x) != len(y) {
return 0, fmt.Errorf("slice lengths do not match")
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/middleware.go
index 55d5e8ab..64b8b4e3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/middleware.go
@@ -3,13 +3,13 @@ package v4a
import (
"context"
"fmt"
- "net/http"
- "time"
-
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "time"
)
// HTTPSigner is SigV4a HTTP signer implementation
@@ -71,10 +71,23 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(
return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
}
- err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, []string{signingRegion}, time.Now().UTC(), func(o *SignerOptions) {
- o.Logger = middleware.GetLogger(ctx)
- o.LogSigning = s.logSigning
- })
+ signerOptions := []func(o *SignerOptions){
+ func(o *SignerOptions) {
+ o.Logger = middleware.GetLogger(ctx)
+ o.LogSigning = s.logSigning
+ },
+ }
+
+ // existing DisableURIPathEscaping is equivalent in purpose
+ // to authentication scheme property DisableDoubleEncoding
+ disableDoubleEncoding, overridden := internalauth.GetDisableDoubleEncoding(ctx)
+ if overridden {
+ signerOptions = append(signerOptions, func(o *SignerOptions) {
+ o.DisableURIPathEscaping = disableDoubleEncoding
+ })
+ }
+
+ err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, []string{signingRegion}, time.Now().UTC(), signerOptions...)
if err != nil {
return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/smithy.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/smithy.go
new file mode 100644
index 00000000..516d459d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/smithy.go
@@ -0,0 +1,86 @@
+package v4a
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// CredentialsAdapter adapts v4a.Credentials to smithy auth.Identity.
+type CredentialsAdapter struct {
+ Credentials Credentials
+}
+
+var _ auth.Identity = (*CredentialsAdapter)(nil)
+
+// Expiration returns the time of expiration for the credentials.
+func (v *CredentialsAdapter) Expiration() time.Time {
+ return v.Credentials.Expires
+}
+
+// CredentialsProviderAdapter adapts v4a.CredentialsProvider to
+// auth.IdentityResolver.
+type CredentialsProviderAdapter struct {
+ Provider CredentialsProvider
+}
+
+var _ (auth.IdentityResolver) = (*CredentialsProviderAdapter)(nil)
+
+// GetIdentity retrieves v4a credentials using the underlying provider.
+func (v *CredentialsProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) (
+ auth.Identity, error,
+) {
+ creds, err := v.Provider.RetrievePrivateKey(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("get credentials: %w", err)
+ }
+
+ return &CredentialsAdapter{Credentials: creds}, nil
+}
+
+// SignerAdapter adapts v4a.HTTPSigner to smithy http.Signer.
+type SignerAdapter struct {
+ Signer HTTPSigner
+ Logger logging.Logger
+ LogSigning bool
+}
+
+var _ (smithyhttp.Signer) = (*SignerAdapter)(nil)
+
+// SignRequest signs the request with the provided identity.
+func (v *SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, props smithy.Properties) error {
+ ca, ok := identity.(*CredentialsAdapter)
+ if !ok {
+ return fmt.Errorf("unexpected identity type: %T", identity)
+ }
+
+ name, ok := smithyhttp.GetSigV4SigningName(&props)
+ if !ok {
+ return fmt.Errorf("sigv4a signing name is required")
+ }
+
+ regions, ok := smithyhttp.GetSigV4ASigningRegions(&props)
+ if !ok {
+ return fmt.Errorf("sigv4a signing region is required")
+ }
+
+ hash := v4.GetPayloadHash(ctx)
+ err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, regions, sdk.NowTime(), func(o *SignerOptions) {
+ o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props)
+
+ o.Logger = v.Logger
+ o.LogSigning = v.LogSigning
+ })
+ if err != nil {
+ return fmt.Errorf("sign http: %w", err)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh b/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh
deleted file mode 100644
index 8a2aea99..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#1/usr/bin/env bash
-
-PROJECT_DIR=""
-SDK_SOURCE_DIR=$(cd `dirname $0` && pwd)
-
-usage() {
- echo "Usage: $0 [-s SDK_SOURCE_DIR] [-d PROJECT_DIR]" 1>&2
- exit 1
-}
-
-while getopts "hs:d:" options; do
- case "${options}" in
- s)
- SDK_SOURCE_DIR=${OPTARG}
- if [ "$SDK_SOURCE_DIR" == "" ]; then
- echo "path to SDK source directory is required" || exit
- usage
- fi
- ;;
- d)
- PROJECT_DIR=${OPTARG}
- ;;
- h)
- usage
- ;;
- *)
- usage
- ;;
- esac
-done
-
-if [ "$PROJECT_DIR" != "" ]; then
- cd $PROJECT_DIR || exit
-fi
-
-go mod graph | awk '{print $1}' | cut -d '@' -f 1 | sort | uniq | grep "github.com/aws/aws-sdk-go-v2" | while read x; do
- repPath=${x/github.com\/aws\/aws-sdk-go-v2/${SDK_SOURCE_DIR}}
- echo -replace $x=$repPath
-done | xargs go mod edit
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/modman.toml b/vendor/github.com/aws/aws-sdk-go-v2/modman.toml
deleted file mode 100644
index bde8e139..00000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/modman.toml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-[dependencies]
- "github.com/aws/smithy-go" = "v1.11.2"
- "github.com/google/go-cmp" = "v0.5.7"
- "github.com/jmespath/go-jmespath" = "v0.4.0"
- "golang.org/x/net" = "v0.0.0-20220127200216-cd36cc0744dd"
-
-[modules]
-
- [modules."."]
- metadata_package = "aws"
-
- [modules."example/service/dynamodb/createTable"]
- no_tag = true
-
- [modules."example/service/dynamodb/scanItems"]
- no_tag = true
-
- [modules."example/service/s3/listObjects"]
- no_tag = true
-
- [modules."example/service/s3/usingPrivateLink"]
- no_tag = true
-
- [modules."feature/ec2/imds/internal/configtesting"]
- no_tag = true
-
- [modules."internal/codegen"]
- no_tag = true
-
- [modules."internal/configsources/configtesting"]
- no_tag = true
-
- [modules."internal/protocoltest/awsrestjson"]
- no_tag = true
-
- [modules."internal/protocoltest/ec2query"]
- no_tag = true
-
- [modules."internal/protocoltest/jsonrpc"]
- no_tag = true
-
- [modules."internal/protocoltest/jsonrpc10"]
- no_tag = true
-
- [modules."internal/protocoltest/query"]
- no_tag = true
-
- [modules."internal/protocoltest/restxml"]
- no_tag = true
-
- [modules."internal/protocoltest/restxmlwithnamespace"]
- no_tag = true
-
- [modules."internal/repotools"]
- no_tag = true
-
- [modules."internal/repotools/changes"]
- no_tag = true
-
- [modules."service/internal/benchmark"]
- no_tag = true
-
- [modules."service/internal/integrationtest"]
- no_tag = true
-
- [modules."service/kinesis/internal/testing"]
- no_tag = true
-
- [modules."service/s3/internal/configtesting"]
- no_tag = true
-
- [modules."service/transcribestreaming/internal/testing"]
- no_tag = true
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
index 7cc42a19..cac6f926 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
@@ -1,3 +1,87 @@
+# v1.11.1 (2024-02-21)
+
+* No change notes available for this release.
+
+# v1.11.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+
+# v1.10.4 (2023-12-07)
+
+* No change notes available for this release.
+
+# v1.10.3 (2023-11-30)
+
+* No change notes available for this release.
+
+# v1.10.2 (2023-11-29)
+
+* No change notes available for this release.
+
+# v1.10.1 (2023-11-15)
+
+* No change notes available for this release.
+
+# v1.10.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+
+# v1.9.15 (2023-10-06)
+
+* No change notes available for this release.
+
+# v1.9.14 (2023-08-18)
+
+* No change notes available for this release.
+
+# v1.9.13 (2023-08-07)
+
+* No change notes available for this release.
+
+# v1.9.12 (2023-07-31)
+
+* No change notes available for this release.
+
+# v1.9.11 (2022-12-02)
+
+* No change notes available for this release.
+
+# v1.9.10 (2022-10-24)
+
+* No change notes available for this release.
+
+# v1.9.9 (2022-09-14)
+
+* No change notes available for this release.
+
+# v1.9.8 (2022-09-02)
+
+* No change notes available for this release.
+
+# v1.9.7 (2022-08-31)
+
+* No change notes available for this release.
+
+# v1.9.6 (2022-08-29)
+
+* No change notes available for this release.
+
+# v1.9.5 (2022-08-11)
+
+* No change notes available for this release.
+
+# v1.9.4 (2022-08-09)
+
+* No change notes available for this release.
+
+# v1.9.3 (2022-06-29)
+
+* No change notes available for this release.
+
+# v1.9.2 (2022-06-07)
+
+* No change notes available for this release.
+
# v1.9.1 (2022-03-24)
* No change notes available for this release.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go
index 3ffac013..7056d9bf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go
@@ -1,7 +1,7 @@
/*
Package acceptencoding provides customizations associated with Accept Encoding Header.
-Accept encoding gzip
+# Accept encoding gzip
The Go HTTP client automatically supports accept-encoding and content-encoding
gzip by default. This default behavior is not desired by the SDK, and prevents
@@ -18,6 +18,5 @@ client's default behavior.
An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using
the below middleware. The option if present can be used to enable auto decompressing
gzip by the SDK.
-
*/
package acceptencoding
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
index af9bc67b..c5ae0f87 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
@@ -3,4 +3,4 @@
package acceptencoding
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.9.1"
+const goModuleVersion = "1.11.1"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md
index 76b389a4..4cf115bd 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md
@@ -1,3 +1,214 @@
+# v1.3.5 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.4 (2024-03-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.3 (2024-03-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.10 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.9 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.8 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.7 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.6 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.3 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2023-11-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.38 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.37 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.36 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.35 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.34 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.33 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.32 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.31 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.30 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.29 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.28 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.27 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.26 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.25 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.24 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.23 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.22 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.21 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.20 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.19 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.18 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.17 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.16 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.15 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.14 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.13 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.12 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.11 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.10 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.9 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.8 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.7 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.6 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.5 (2022-04-27)
+
+* **Bug Fix**: Fixes a bug that could cause the SigV4 payload hash to be incorrectly encoded, leading to signing errors.
+
+# v1.1.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.1.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/aws_chunked_encoding.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/aws_chunked_encoding.go
index e8b5c3f5..3bd320c4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/aws_chunked_encoding.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/aws_chunked_encoding.go
@@ -71,11 +71,11 @@ type awsChunkedTrailerValue struct {
// Here is the aws-chunked payload stream as read from the awsChunkedEncoding
// if original request stream is "Hello world", and checksum hash used is SHA256
//
-// \r\n
-// Hello world\r\n
-// 0\r\n
-// x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n
-// \r\n
+// \r\n
+// Hello world\r\n
+// 0\r\n
+// x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n
+// \r\n
type awsChunkedEncoding struct {
options awsChunkedEncodingOptions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
index 824318f3..0f3b4bb2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
@@ -3,4 +3,4 @@
package checksum
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.1.3"
+const goModuleVersion = "1.3.5"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go
index 3e17d221..1b727acb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go
@@ -2,7 +2,6 @@ package checksum
import (
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// InputMiddlewareOptions provides the options for the request
@@ -81,28 +80,25 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions)
stack.Build.Remove("ContentChecksum")
- // Create the compute checksum middleware that will be added as both a
- // build and finalize handler.
inputChecksum := &computeInputPayloadChecksum{
RequireChecksum: options.RequireChecksum,
EnableTrailingChecksum: options.EnableTrailingChecksum,
EnableComputePayloadHash: options.EnableComputeSHA256PayloadHash,
EnableDecodedContentLengthHeader: options.EnableDecodedContentLengthHeader,
}
-
- // Insert header checksum after ComputeContentLength middleware, must also
- // be before the computePayloadHash middleware handlers.
- err = stack.Build.Insert(inputChecksum,
- (*smithyhttp.ComputeContentLength)(nil).ID(),
- middleware.After)
- if err != nil {
+ if err := stack.Finalize.Insert(inputChecksum, "ResolveEndpointV2", middleware.After); err != nil {
return err
}
// If trailing checksum is not supported no need for finalize handler to be added.
if options.EnableTrailingChecksum {
- err = stack.Finalize.Insert(inputChecksum, "Retry", middleware.After)
- if err != nil {
+ trailerMiddleware := &addInputChecksumTrailer{
+ EnableTrailingChecksum: inputChecksum.EnableTrailingChecksum,
+ RequireChecksum: inputChecksum.RequireChecksum,
+ EnableComputePayloadHash: inputChecksum.EnableComputePayloadHash,
+ EnableDecodedContentLengthHeader: inputChecksum.EnableDecodedContentLengthHeader,
+ }
+ if err := stack.Finalize.Insert(trailerMiddleware, "Retry", middleware.After); err != nil {
return err
}
}
@@ -117,7 +113,6 @@ func RemoveInputMiddleware(stack *middleware.Stack) {
stack.Initialize.Remove(id)
id = (*computeInputPayloadChecksum)(nil).ID()
- stack.Build.Remove(id)
stack.Finalize.Remove(id)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go
index 7c4d419d..7ffca33f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go
@@ -7,9 +7,10 @@ import (
"hash"
"io"
"strconv"
- "strings"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
+ presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
@@ -71,10 +72,11 @@ type computeInputPayloadChecksum struct {
// when used with trailing checksums, and aws-chunked content-encoding.
EnableDecodedContentLengthHeader bool
- buildHandlerRun bool
- deferToFinalizeHandler bool
+ useTrailer bool
}
+type useTrailer struct{}
+
// ID provides the middleware's identifier.
func (m *computeInputPayloadChecksum) ID() string {
return "AWSChecksum:ComputeInputPayloadChecksum"
@@ -97,19 +99,17 @@ func (e computeInputHeaderChecksumError) Error() string {
func (e computeInputHeaderChecksumError) Unwrap() error { return e.Err }
// HandleBuild handles computing the payload's checksum, in the following cases:
-// * Is HTTP, not HTTPS
-// * RequireChecksum is true, and no checksums were specified via the Input
-// * Trailing checksums are not supported
+// - Is HTTP, not HTTPS
+// - RequireChecksum is true, and no checksums were specified via the Input
+// - Trailing checksums are not supported
//
// The build handler must be inserted in the stack before ContentPayloadHash
// and after ComputeContentLength.
-func (m *computeInputPayloadChecksum) HandleBuild(
- ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+func (m *computeInputPayloadChecksum) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
- m.buildHandlerRun = true
-
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, computeInputHeaderChecksumError{
@@ -146,13 +146,13 @@ func (m *computeInputPayloadChecksum) HandleBuild(
}
algorithm = Algorithm("MD5")
}
- return next.HandleBuild(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
// If the checksum header is already set nothing to do.
checksumHeader := AlgorithmHTTPHeader(algorithm)
if checksum = req.Header.Get(checksumHeader); checksum != "" {
- return next.HandleBuild(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
computePayloadHash := m.EnableComputePayloadHash
@@ -170,22 +170,19 @@ func (m *computeInputPayloadChecksum) HandleBuild(
}
// If trailing checksums are supported, the request is HTTPS, and the
- // stream is not nil or empty, there is nothing to do in the build stage.
- // The checksum will be added to the request as a trailing checksum in the
- // finalize handler.
+ // stream is not nil or empty, instead switch to a trailing checksum.
//
// Nil and empty streams will always be handled as a request header,
// regardless if the operation supports trailing checksums or not.
- if strings.EqualFold(req.URL.Scheme, "https") {
+ if req.IsHTTPS() && !presignedurlcust.GetIsPresigning(ctx) {
if stream != nil && streamLength != 0 && m.EnableTrailingChecksum {
if m.EnableComputePayloadHash {
- // payload hash is set as header in Build middleware handler,
- // ContentSHA256Header.
+ // ContentSHA256Header middleware handles the header
ctx = v4.SetPayloadHash(ctx, streamingUnsignedPayloadTrailerPayloadHash)
}
-
- m.deferToFinalizeHandler = true
- return next.HandleBuild(ctx, in)
+ m.useTrailer = true
+ ctx = middleware.WithStackValue(ctx, useTrailer{}, true)
+ return next.HandleFinalize(ctx, in)
}
// If trailing checksums are not enabled but protocol is still HTTPS
@@ -226,7 +223,7 @@ func (m *computeInputPayloadChecksum) HandleBuild(
ctx = v4.SetPayloadHash(ctx, sha256Checksum)
}
- return next.HandleBuild(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
type computeInputTrailingChecksumError struct {
@@ -245,26 +242,31 @@ func (e computeInputTrailingChecksumError) Error() string {
}
func (e computeInputTrailingChecksumError) Unwrap() error { return e.Err }
-// HandleFinalize handles computing the payload's checksum, in the following cases:
-// * Is HTTPS, not HTTP
-// * A checksum was specified via the Input
-// * Trailing checksums are supported.
-//
-// The finalize handler must be inserted in the stack before Signing, and after Retry.
-func (m *computeInputPayloadChecksum) HandleFinalize(
+// addInputChecksumTrailer
+// - Is HTTPS, not HTTP
+// - A checksum was specified via the Input
+// - Trailing checksums are supported.
+type addInputChecksumTrailer struct {
+ EnableTrailingChecksum bool
+ RequireChecksum bool
+ EnableComputePayloadHash bool
+ EnableDecodedContentLengthHeader bool
+}
+
+// ID identifies this middleware.
+func (*addInputChecksumTrailer) ID() string {
+ return "addInputChecksumTrailer"
+}
+
+// HandleFinalize wraps the request body to write the trailing checksum.
+func (m *addInputChecksumTrailer) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
- if !m.deferToFinalizeHandler {
- if !m.buildHandlerRun {
- return out, metadata, computeInputTrailingChecksumError{
- Msg: "build handler was removed without also removing finalize handler",
- }
- }
+ if enabled, _ := middleware.GetStackValue(ctx, useTrailer{}).(bool); !enabled {
return next.HandleFinalize(ctx, in)
}
-
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, computeInputTrailingChecksumError{
@@ -273,7 +275,7 @@ func (m *computeInputPayloadChecksum) HandleFinalize(
}
// Trailing checksums are only supported when TLS is enabled.
- if !strings.EqualFold(req.URL.Scheme, "https") {
+ if !req.IsHTTPS() {
return out, metadata, computeInputTrailingChecksumError{
Msg: "HTTPS required",
}
@@ -375,7 +377,7 @@ func (m *computeInputPayloadChecksum) HandleFinalize(
}
func getInputAlgorithm(ctx context.Context) (Algorithm, bool, error) {
- ctxAlgorithm := getContextInputAlgorithm(ctx)
+ ctxAlgorithm := internalcontext.GetChecksumInputAlgorithm(ctx)
if ctxAlgorithm == "" {
return "", false, nil
}
@@ -422,7 +424,7 @@ func computeStreamChecksum(algorithm Algorithm, stream io.Reader, computePayload
if algorithm != AlgorithmSHA256 {
sha256Checksum = string(hexEncodeHashSum(sha256Hasher))
} else {
- sha256Checksum = checksum
+ sha256Checksum = string(hexEncodeHashSum(hasher))
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go
index f7295254..3db73afe 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go
@@ -3,6 +3,7 @@ package checksum
import (
"context"
+ internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
"github.com/aws/smithy-go/middleware"
)
@@ -35,33 +36,13 @@ func (m *setupInputContext) HandleInitialize(
// check is input resource has a checksum algorithm
algorithm, ok := m.GetAlgorithm(in.Parameters)
if ok && len(algorithm) != 0 {
- ctx = setContextInputAlgorithm(ctx, algorithm)
+ ctx = internalcontext.SetChecksumInputAlgorithm(ctx, algorithm)
}
}
return next.HandleInitialize(ctx, in)
}
-// inputAlgorithmKey is the key set on context used to identify, retrieves the
-// request checksum algorithm if present on the context.
-type inputAlgorithmKey struct{}
-
-// setContextInputAlgorithm sets the request checksum algorithm on the context.
-//
-// Scoped to stack values.
-func setContextInputAlgorithm(ctx context.Context, value string) context.Context {
- return middleware.WithStackValue(ctx, inputAlgorithmKey{}, value)
-}
-
-// getContextInputAlgorithm returns the checksum algorithm from the context if
-// one was specified. Empty string is returned if one is not specified.
-//
-// Scoped to stack values.
-func getContextInputAlgorithm(ctx context.Context) (v string) {
- v, _ = middleware.GetStackValue(ctx, inputAlgorithmKey{}).(string)
- return v
-}
-
type setupOutputContext struct {
// GetValidationMode is a function to get the checksum validation
// mode of the output payload from the input parameters.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
index d779c398..64c3f27e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
@@ -1,3 +1,210 @@
+# v1.11.5 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.4 (2024-03-05)
+
+* **Bug Fix**: Restore typo'd API `AddAsIsInternalPresigingMiddleware` as an alias for backwards compatibility.
+
+# v1.11.3 (2024-03-04)
+
+* **Bug Fix**: Correct a typo in internal AddAsIsPresigningMiddleware API.
+
+# v1.11.2 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.10 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.9 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.8 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.7 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.6 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.3 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.1 (2023-11-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.37 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.36 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.35 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.34 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.33 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.32 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.31 (2023-07-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.30 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.29 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.28 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.27 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.26 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.25 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.24 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.23 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.22 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.21 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.20 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.19 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.18 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.17 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.16 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.15 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.14 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.13 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.12 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.11 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.10 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.9 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.9.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
index cc919701..5d5286f9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
@@ -27,13 +27,21 @@ func GetIsPresigning(ctx context.Context) bool {
type isPresigningKey struct{}
-// AddAsIsPresigingMiddleware adds a middleware to the head of the stack that
+// AddAsIsPresigningMiddleware adds a middleware to the head of the stack that
// will update the stack's context to be flagged as being invoked for the
// purpose of presigning.
-func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
+func AddAsIsPresigningMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before)
}
+// AddAsIsPresigingMiddleware is an alias for backwards compatibility.
+//
+// Deprecated: This API was released with a typo. Use
+// [AddAsIsPresigningMiddleware] instead.
+func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
+ return AddAsIsPresigningMiddleware(stack)
+}
+
type asIsPresigningMiddleware struct{}
func (asIsPresigningMiddleware) ID() string { return "AsIsPresigningMiddleware" }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
index f30bfff6..4ef03ebf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
@@ -3,4 +3,4 @@
package presignedurl
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.9.3"
+const goModuleVersion = "1.11.5"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
index bd373e8e..175caf7d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
@@ -1,3 +1,203 @@
+# v1.17.3 (2024-03-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2024-02-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.10 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.9 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.8 (2023-12-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.7 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.6 (2023-11-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.3 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.2 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.1 (2023-11-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.6 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.5 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.4 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.3 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.2 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.5 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.4 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.3 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.2 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.1 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2023-03-21)
+
+* **Feature**: port v1 sdk 100-continue http header customization for s3 PutObject/UploadPart request and enable user config
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.24 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.23 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.22 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.21 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.20 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.19 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.18 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.17 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.16 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.15 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.14 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.13 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.12 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.11 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.10 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.9 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.13.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/accesspoint_arn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/accesspoint_arn.go
index 4f7017e8..ec290b21 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/accesspoint_arn.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/accesspoint_arn.go
@@ -21,9 +21,8 @@ func (a AccessPointARN) GetARN() arn.ARN {
// AccessPoint resource.
//
// Supported Access point resource format:
-// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
-// - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint
-//
+// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
+// - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint
func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error) {
if isFIPS(a.Region) {
return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/arn_member.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/arn_member.go
new file mode 100644
index 00000000..9a3258e1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/arn_member.go
@@ -0,0 +1,32 @@
+package arn
+
+import "fmt"
+
+// arnable is implemented by the relevant S3/S3Control
+// operations which have members that may need ARN
+// processing.
+type arnable interface {
+ SetARNMember(string) error
+ GetARNMember() (*string, bool)
+}
+
+// GetARNField would be called during middleware execution
+// to retrieve a member value that is an ARN in need of
+// processing.
+func GetARNField(input interface{}) (*string, bool) {
+ v, ok := input.(arnable)
+ if !ok {
+ return nil, false
+ }
+ return v.GetARNMember()
+}
+
+// SetARNField would called during middleware exeuction
+// to set a member value that required ARN processing.
+func SetARNField(input interface{}, v string) error {
+ params, ok := input.(arnable)
+ if !ok {
+ return fmt.Errorf("Params does not contain arn field member")
+ }
+ return params.SetARNMember(v)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/outpost_arn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/outpost_arn.go
index 2b9bd6c2..e06a3028 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/outpost_arn.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/outpost_arn.go
@@ -17,15 +17,14 @@ type OutpostARN interface {
//
// Currently supported outpost ARN formats:
// * Outpost AccessPoint ARN format:
-// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
-// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint
+// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
+// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint
//
// * Outpost Bucket ARN format:
-// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName}
-// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket
+// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName}
+// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket
//
// Other outpost ARN formats may be supported and added in the future.
-//
func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error) {
if len(a.Region) == 0 {
return nil, InvalidARNError{ARN: a, Reason: "region not set"}
@@ -113,7 +112,6 @@ func (o OutpostBucketARN) GetARN() arn.ARN {
// bucket resource id.
//
// parseBucketResource only parses the bucket resource id.
-//
func parseBucketResource(a arn.ARN, resParts []string) (bucketName string, err error) {
if len(resParts) == 0 {
return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config/config.go
index 8926e597..b5d31f5c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config/config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config/config.go
@@ -7,6 +7,11 @@ type UseARNRegionProvider interface {
GetS3UseARNRegion(ctx context.Context) (value bool, found bool, err error)
}
+// DisableMultiRegionAccessPointsProvider is an interface for retrieving external configuration value for DisableMultiRegionAccessPoints
+type DisableMultiRegionAccessPointsProvider interface {
+ GetS3DisableMultiRegionAccessPoints(ctx context.Context) (value bool, found bool, err error)
+}
+
// ResolveUseARNRegion extracts the first instance of a UseARNRegion from the config slice.
// Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered.
func ResolveUseARNRegion(ctx context.Context, configs []interface{}) (value bool, found bool, err error) {
@@ -20,3 +25,17 @@ func ResolveUseARNRegion(ctx context.Context, configs []interface{}) (value bool
}
return
}
+
+// ResolveDisableMultiRegionAccessPoints extracts the first instance of a DisableMultiRegionAccessPoints from the config slice.
+// Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered.
+func ResolveDisableMultiRegionAccessPoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(DisableMultiRegionAccessPointsProvider); ok {
+ value, found, err = p.GetS3DisableMultiRegionAccessPoints(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
index fac99791..ea709870 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
@@ -3,4 +3,4 @@
package s3shared
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.13.3"
+const goModuleVersion = "1.17.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/s3100continue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/s3100continue.go
new file mode 100644
index 00000000..0f43ec0d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/s3100continue.go
@@ -0,0 +1,54 @@
+package s3shared
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const s3100ContinueID = "S3100Continue"
+const default100ContinueThresholdBytes int64 = 1024 * 1024 * 2
+
+// Add100Continue add middleware, which adds {Expect: 100-continue} header for s3 client HTTP PUT request larger than 2MB
+// or with unknown size streaming bodies, during operation builder step
+func Add100Continue(stack *middleware.Stack, continueHeaderThresholdBytes int64) error {
+ return stack.Build.Add(&s3100Continue{
+ continueHeaderThresholdBytes: continueHeaderThresholdBytes,
+ }, middleware.After)
+}
+
+type s3100Continue struct {
+ continueHeaderThresholdBytes int64
+}
+
+// ID returns the middleware identifier
+func (m *s3100Continue) ID() string {
+ return s3100ContinueID
+}
+
+func (m *s3100Continue) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ sizeLimit := default100ContinueThresholdBytes
+ switch {
+ case m.continueHeaderThresholdBytes == -1:
+ return next.HandleBuild(ctx, in)
+ case m.continueHeaderThresholdBytes > 0:
+ sizeLimit = m.continueHeaderThresholdBytes
+ default:
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ if req.ContentLength == -1 || (req.ContentLength == 0 && req.Body != nil) || req.ContentLength >= sizeLimit {
+ req.Header.Set("Expect", "100-continue")
+ }
+
+ return next.HandleBuild(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
index 19795264..52fe0855 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
@@ -1,3 +1,386 @@
+# v1.52.1 (2024-03-15)
+
+* **Documentation**: Documentation updates for Amazon S3.
+
+# v1.52.0 (2024-03-13)
+
+* **Feature**: This release makes the default option for S3 on Outposts request signing to use the SigV4A algorithm when using AWS Common Runtime (CRT).
+
+# v1.51.4 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.51.3 (2024-03-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.51.2 (2024-03-04)
+
+* **Bug Fix**: Update internal/presigned-url dependency for corrected API name.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.51.1 (2024-02-23)
+
+* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.51.0 (2024-02-22)
+
+* **Feature**: Add middleware stack snapshot tests.
+
+# v1.50.3 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.50.2 (2024-02-20)
+
+* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
+
+# v1.50.1 (2024-02-19)
+
+* **Bug Fix**: Prevent potential panic caused by invalid comparison of credentials.
+
+# v1.50.0 (2024-02-16)
+
+* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters.
+
+# v1.49.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.48.1 (2024-01-24)
+
+* No change notes available for this release.
+
+# v1.48.0 (2024-01-05)
+
+* **Feature**: Support smithy sigv4a trait for codegen.
+
+# v1.47.8 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.47.7 (2023-12-20)
+
+* No change notes available for this release.
+
+# v1.47.6 (2023-12-18)
+
+* No change notes available for this release.
+
+# v1.47.5 (2023-12-08)
+
+* **Bug Fix**: Add non-vhostable buckets to request path when using legacy V1 endpoint resolver.
+* **Bug Fix**: Improve uniqueness of default S3Express sesssion credentials cache keying to prevent collision in multi-credential scenarios.
+* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
+
+# v1.47.4 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.47.3 (2023-12-06)
+
+* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
+
+# v1.47.2 (2023-12-01)
+
+* **Bug Fix**: Correct wrapping of errors in authentication workflow.
+* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.47.1 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.47.0 (2023-11-29)
+
+* **Feature**: Expose Options() accessor on service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.46.0 (2023-11-28.2)
+
+* **Feature**: Add S3Express support.
+* **Feature**: Adds support for S3 Express One Zone.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.45.1 (2023-11-28)
+
+* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
+
+# v1.45.0 (2023-11-27)
+
+* **Feature**: Adding new params - Key and Prefix, to S3 API operations for supporting S3 Access Grants. Note - These updates will not change any of the existing S3 API functionality.
+
+# v1.44.0 (2023-11-21)
+
+* **Feature**: Add support for automatic date based partitioning in S3 Server Access Logs.
+* **Bug Fix**: Don't send MaxKeys/MaxUploads=0 when unspecified in ListObjectVersions and ListMultipartUploads paginators.
+
+# v1.43.1 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.43.0 (2023-11-17)
+
+* **Feature**: **BREAKING CHANGE** Correct nullability of a large number of S3 structure fields. See https://github.com/aws/aws-sdk-go-v2/issues/2162.
+* **Feature**: Removes all default 0 values for numbers and false values for booleans
+
+# v1.42.2 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.42.1 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.42.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.41.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.40.2 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.40.1 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.40.0 (2023-09-26)
+
+* **Feature**: This release adds a new field COMPLETED to the ReplicationStatus Enum. You can now use this field to validate the replication status of S3 objects using the AWS SDK.
+
+# v1.39.0 (2023-09-20)
+
+* **Feature**: Fix an issue where the SDK can fail to unmarshall response due to NumberFormatException
+
+# v1.38.5 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.4 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.3 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.38.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.1 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.0 (2023-07-13)
+
+* **Feature**: S3 Inventory now supports Object Access Control List and Object Owner as available object metadata fields in inventory reports.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.36.0 (2023-06-28)
+
+* **Feature**: The S3 LISTObjects, ListObjectsV2 and ListObjectVersions API now supports a new optional header x-amz-optional-object-attributes. If header contains RestoreStatus as the value, then S3 will include Glacier restore status i.e. isRestoreInProgress and RestoreExpiryDate in List response.
+
+# v1.35.0 (2023-06-16)
+
+* **Feature**: This release adds SDK support for request-payer request header and request-charged response header in the "GetBucketAccelerateConfiguration", "ListMultipartUploads", "ListObjects", "ListObjectsV2" and "ListObjectVersions" S3 APIs.
+
+# v1.34.1 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.34.0 (2023-06-13)
+
+* **Feature**: Integrate double encryption feature to SDKs.
+* **Bug Fix**: Fix HeadObject to return types.Nound when an object does not exist. Fixes [2084](https://github.com/aws/aws-sdk-go-v2/issues/2084)
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.1 (2023-05-04)
+
+* **Documentation**: Documentation updates for Amazon S3
+
+# v1.33.0 (2023-04-24)
+
+* **Feature**: added custom paginators for listMultipartUploads and ListObjectVersions
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.0 (2023-04-19)
+
+* **Feature**: Provides support for "Snow" Storage class.
+
+# v1.31.3 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.31.2 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.31.1 (2023-03-31)
+
+* **Documentation**: Documentation updates for Amazon S3
+
+# v1.31.0 (2023-03-21)
+
+* **Feature**: port v1 sdk 100-continue http header customization for s3 PutObject/UploadPart request and enable user config
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.6 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.5 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.30.4 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.3 (2023-02-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.2 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.1 (2023-01-23)
+
+* No change notes available for this release.
+
+# v1.30.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.29.6 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.5 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.4 (2022-11-22)
+
+* No change notes available for this release.
+
+# v1.29.3 (2022-11-16)
+
+* No change notes available for this release.
+
+# v1.29.2 (2022-11-10)
+
+* No change notes available for this release.
+
+# v1.29.1 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.0 (2022-10-21)
+
+* **Feature**: S3 on Outposts launches support for automatic bucket-style alias. You can use the automatic access point alias instead of an access point ARN for any object-level operation in an Outposts bucket.
+* **Bug Fix**: The SDK client has been updated to utilize the `aws.IsCredentialsProvider` function for determining if `aws.AnonymousCredentials` has been configured for the `CredentialProvider`.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.0 (2022-10-19)
+
+* **Feature**: Updates internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
+
+# v1.27.11 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.10 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.9 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.8 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.7 (2022-08-30)
+
+* No change notes available for this release.
+
+# v1.27.6 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.5 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.4 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.3 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.2 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.1 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.0 (2022-07-01)
+
+* **Feature**: Add presign support for HeadBucket, DeleteObject, and DeleteBucket. Fixes [#1076](https://github.com/aws/aws-sdk-go-v2/issues/1076).
+
+# v1.26.12 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.11 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.10 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.9 (2022-05-06)
+
+* No change notes available for this release.
+
+# v1.26.8 (2022-05-03)
+
+* **Documentation**: Documentation only update for doc bug fixes for the S3 API docs.
+
+# v1.26.7 (2022-04-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.6 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.26.5 (2022-04-12)
* **Bug Fix**: Fixes an issue that caused the unexported constructor function names for EventStream types to be swapped for the event reader and writer respectivly.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
index b17db2ae..a31c2e0a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
@@ -11,6 +11,8 @@ import (
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
"github.com/aws/aws-sdk-go-v2/internal/v4a"
acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding"
@@ -32,8 +34,8 @@ import (
const ServiceID = "S3"
const ServiceAPIVersion = "2006-03-01"
-// Client provides the API client to make operations call for Amazon Simple Storage
-// Service.
+// Client provides the API client to make operations call for Amazon Simple
+// Storage Service.
type Client struct {
options Options
}
@@ -54,167 +56,62 @@ func New(options Options, optFns ...func(*Options)) *Client {
resolveHTTPSignerV4(&options)
- resolveDefaultEndpointConfiguration(&options)
+ resolveEndpointResolverV2(&options)
resolveHTTPSignerV4a(&options)
+ resolveAuthSchemeResolver(&options)
+
for _, fn := range optFns {
fn(&options)
}
- resolveCredentialProvider(&options)
-
- client := &Client{
- options: options,
- }
-
- return client
-}
-
-type Options struct {
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- APIOptions []func(*middleware.Stack) error
-
- // Configures the events that will be sent to the configured logger.
- ClientLogMode aws.ClientLogMode
-
- // The credentials object to use when signing requests.
- Credentials aws.CredentialsProvider
-
- // The configuration DefaultsMode that the SDK should use when constructing the
- // clients initial default settings.
- DefaultsMode aws.DefaultsMode
-
- // Allows you to disable S3 Multi-Region access points feature.
- DisableMultiRegionAccessPoints bool
-
- // The endpoint options to be used when attempting to resolve an endpoint.
- EndpointOptions EndpointResolverOptions
-
- // The service endpoint resolver.
- EndpointResolver EndpointResolver
-
- // Signature Version 4 (SigV4) Signer
- HTTPSignerV4 HTTPSignerV4
-
- // The logger writer interface to write logging messages to.
- Logger logging.Logger
-
- // The region to send requests to. (Required)
- Region string
-
- // RetryMaxAttempts specifies the maximum number attempts an API client will call
- // an operation that fails with a retryable error. A value of 0 is ignored, and
- // will not be used to configure the API client created default retryer, or modify
- // per operation call's retry max attempts. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. If specified in an operation call's functional
- // options with a value that is different than the constructed client's Options,
- // the Client's Retryer will be wrapped to use the operation's specific
- // RetryMaxAttempts value.
- RetryMaxAttempts int
-
- // RetryMode specifies the retry mode the API client will be created with, if
- // Retryer option is not also specified. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. Currently does not support per operation call
- // overrides, may in the future.
- RetryMode aws.RetryMode
-
- // Retryer guides how HTTP requests should be retried in case of recoverable
- // failures. When nil the API client will use a default retryer. The kind of
- // default retry created by the API client can be changed with the RetryMode
- // option.
- Retryer aws.Retryer
-
- // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
- // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
- // should not populate this structure programmatically, or rely on the values here
- // within your applications.
- RuntimeEnvironment aws.RuntimeEnvironment
-
- // Allows you to enable arn region support for the service.
- UseARNRegion bool
-
- // Allows you to enable S3 Accelerate feature. All operations compatible with S3
- // Accelerate will use the accelerate endpoint for requests. Requests not
- // compatible will fall back to normal S3 requests. The bucket must be enabled for
- // accelerate to be used with S3 client with accelerate enabled. If the bucket is
- // not enabled for accelerate an error will be returned. The bucket name must be
- // DNS compatible to work with accelerate.
- UseAccelerate bool
+ finalizeRetryMaxAttempts(&options)
- // Allows you to enable dual-stack endpoint support for the service.
- //
- // Deprecated: Set dual-stack by setting UseDualStackEndpoint on
- // EndpointResolverOptions. When EndpointResolverOptions' UseDualStackEndpoint
- // field is set it overrides this field value.
- UseDualstack bool
+ ignoreAnonymousAuth(&options)
- // Allows you to enable the client to use path-style addressing, i.e.,
- // https://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual
- // hosted bucket addressing when possible(https://BUCKET.s3.amazonaws.com/KEY).
- UsePathStyle bool
+ resolveExpressCredentials(&options)
- // Signature Version 4a (SigV4a) Signer
- httpSignerV4a httpSignerV4a
+ finalizeServiceEndpointAuthResolver(&options)
- // The initial DefaultsMode used when the client options were constructed. If the
- // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
- // value was at that point in time. Currently does not support per operation call
- // overrides, may in the future.
- resolvedDefaultsMode aws.DefaultsMode
+ resolveAuthSchemes(&options)
- // The HTTP client to invoke API calls with. Defaults to client's default HTTP
- // implementation if nil.
- HTTPClient HTTPClient
-}
-
-// WithAPIOptions returns a functional option for setting the Client's APIOptions
-// option.
-func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, optFns...)
+ client := &Client{
+ options: options,
}
-}
-// WithEndpointResolver returns a functional option for setting the Client's
-// EndpointResolver option.
-func WithEndpointResolver(v EndpointResolver) func(*Options) {
- return func(o *Options) {
- o.EndpointResolver = v
- }
-}
+ finalizeExpressCredentials(&options, client)
-type HTTPClient interface {
- Do(*http.Request) (*http.Response, error)
+ return client
}
-// Copy creates a clone where the APIOptions list is deep copied.
-func (o Options) Copy() Options {
- to := o
- to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
- copy(to.APIOptions, o.APIOptions)
-
- return to
+// Options returns a copy of the client configuration.
+//
+// Callers SHOULD NOT perform mutations on any inner structures within client
+// config. Config overrides should instead be made on a per-operation basis through
+// functional options.
+func (c *Client) Options() Options {
+ return c.options.Copy()
}
+
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
ctx = middleware.ClearStackValues(ctx)
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
options := c.options.Copy()
+
for _, fn := range optFns {
fn(&options)
}
setSafeEventStreamClientLogMode(&options, opID)
- finalizeRetryMaxAttemptOptions(&options, *c)
+ finalizeOperationRetryMaxAttempts(&options, *c)
finalizeClientEndpointResolverOptions(&options)
- resolveCredentialProvider(&options)
+ finalizeOperationExpressCredentials(&options, *c)
+
+ finalizeOperationEndpointAuthResolver(&options)
for _, fn := range stackFns {
if err := fn(stack, options); err != nil {
@@ -240,8 +137,99 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
return result, metadata, err
}
+type operationInputKey struct{}
+
+func setOperationInput(ctx context.Context, input interface{}) context.Context {
+ return middleware.WithStackValue(ctx, operationInputKey{}, input)
+}
+
+func getOperationInput(ctx context.Context) interface{} {
+ return middleware.GetStackValue(ctx, operationInputKey{})
+}
+
+type setOperationInputMiddleware struct {
+}
+
+func (*setOperationInputMiddleware) ID() string {
+ return "setOperationInput"
+}
+
+func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = setOperationInput(ctx, in.Parameters)
+ return next.HandleSerialize(ctx, in)
+}
+
+func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %v", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %v", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
+func resolveAuthSchemeResolver(options *Options) {
+ if options.AuthSchemeResolver == nil {
+ options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
+ }
+}
+
+func resolveAuthSchemes(options *Options) {
+ if options.AuthSchemes == nil {
+ options.AuthSchemes = []smithyhttp.AuthScheme{
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ internalauth.NewHTTPAuthScheme("com.amazonaws.s3#sigv4express", &s3cust.ExpressSigner{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4a", &v4a.SignerAdapter{
+ Signer: options.httpSignerV4a,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ }
+ }
+}
+
type noSmithyDocumentSerde = smithydocument.NoSerde
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -279,14 +267,18 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
APIOptions: cfg.APIOptions,
Logger: cfg.Logger,
ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
resolveAWSRetryMode(cfg, &opts)
resolveAWSEndpointResolver(cfg, &opts)
resolveUseARNRegion(cfg, &opts)
+ resolveDisableMultiRegionAccessPoints(cfg, &opts)
+ resolveDisableExpressAuth(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
+ resolveBaseEndpoint(cfg, &opts)
return New(opts, optFns...)
}
@@ -378,7 +370,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
o.RetryMaxAttempts = cfg.RetryMaxAttempts
}
-func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+func finalizeRetryMaxAttempts(o *Options) {
+ if o.RetryMaxAttempts == 0 {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
return
}
@@ -390,20 +390,39 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
return
}
- o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
}
-func addClientUserAgent(stack *middleware.Stack) error {
- return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "s3", goModuleVersion)(stack)
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "s3", goModuleVersion)
+ if len(options.AppID) > 0 {
+ ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
+ }
+
+ return nil
}
-func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
- mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
- CredentialsProvider: o.Credentials,
- Signer: o.HTTPSignerV4,
- LogSigning: o.ClientLogMode.IsSigning(),
- })
- return stack.Finalize.Add(mw, middleware.After)
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
+ id := (*awsmiddleware.RequestUserAgent)(nil).ID()
+ mw, ok := stack.Build.Get(id)
+ if !ok {
+ mw = awsmiddleware.NewRequestUserAgent()
+ if err := stack.Build.Add(mw, middleware.After); err != nil {
+ return nil, err
+ }
+ }
+
+ ua, ok := mw.(*awsmiddleware.RequestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
+ }
+
+ return ua, nil
}
type HTTPSignerV4 interface {
@@ -425,12 +444,48 @@ func newDefaultV4Signer(o Options) *v4.Signer {
})
}
-func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
- mo := retry.AddRetryMiddlewaresOptions{
- Retryer: o.Retryer,
- LogRetryAttempts: o.ClientLogMode.IsRetries(),
+func addClientRequestID(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
+}
+
+func addComputeContentLength(stack *middleware.Stack) error {
+ return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
+}
+
+func addRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
+}
+
+func addRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
+}
+func addStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
+}
+
+func addUnsignedPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addComputePayloadSHA256(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addContentSHA256Header(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
+}
+
+func addRetry(stack *middleware.Stack, o Options) error {
+ attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
+ m.LogAttempts = o.ClientLogMode.IsRetries()
+ })
+ if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ return err
}
- return retry.AddRetryMiddlewares(stack, mo)
+ if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
+ return err
+ }
+ return nil
}
// resolves UseARNRegion S3 configuration
@@ -448,6 +503,21 @@ func resolveUseARNRegion(cfg aws.Config, o *Options) error {
return nil
}
+// resolves DisableMultiRegionAccessPoints S3 configuration
+func resolveDisableMultiRegionAccessPoints(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := s3sharedconfig.ResolveDisableMultiRegionAccessPoints(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.DisableMultiRegionAccessPoints = value
+ }
+ return nil
+}
+
// resolves dual-stack endpoint configuration
func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
if len(cfg.ConfigSources) == 0 {
@@ -478,34 +548,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
return nil
}
-func resolveCredentialProvider(o *Options) {
- if o.Credentials == nil {
- return
- }
-
- if _, ok := o.Credentials.(v4a.CredentialsProvider); ok {
- return
- }
-
- switch o.Credentials.(type) {
- case aws.AnonymousCredentials, *aws.AnonymousCredentials:
- return
- }
-
- o.Credentials = &v4a.SymmetricCredentialAdaptor{SymmetricProvider: o.Credentials}
-}
-
-func swapWithCustomHTTPSignerMiddleware(stack *middleware.Stack, o Options) error {
- mw := s3cust.NewSignHTTPRequestMiddleware(s3cust.SignHTTPRequestMiddlewareOptions{
- CredentialsProvider: o.Credentials,
- V4Signer: o.HTTPSignerV4,
- V4aSigner: o.httpSignerV4a,
- LogSigning: o.ClientLogMode.IsSigning(),
- })
-
- return s3cust.RegisterSigningMiddleware(stack, mw)
-}
-
type httpSignerV4a interface {
SignHTTP(ctx context.Context, credentials v4a.Credentials, r *http.Request, payloadHash,
service string, regionSet []string, signingTime time.Time,
@@ -523,7 +565,6 @@ func newDefaultV4aSigner(o Options) *v4a.Signer {
return v4a.NewSigner(func(so *v4a.SignerOptions) {
so.Logger = o.Logger
so.LogSigning = o.ClientLogMode.IsSigning()
- so.DisableURIPathEscaping = true
})
}
@@ -531,8 +572,16 @@ func addMetadataRetrieverMiddleware(stack *middleware.Stack) error {
return s3shared.AddMetadataRetrieverMiddleware(stack)
}
-// ComputedInputChecksumsMetadata provides information about the algorithms used to
-// compute the checksum(s) of the input payload.
+func add100Continue(stack *middleware.Stack, options Options) error {
+ return s3shared.Add100Continue(stack, options.ContinueHeaderThresholdBytes)
+}
+
+func addRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
+}
+
+// ComputedInputChecksumsMetadata provides information about the algorithms used
+// to compute the checksum(s) of the input payload.
type ComputedInputChecksumsMetadata struct {
// ComputedChecksums is a map of algorithm name to checksum value of the computed
// input payload's checksums.
@@ -552,8 +601,8 @@ func GetComputedInputChecksumsMetadata(m middleware.Metadata) (ComputedInputChec
}
-// ChecksumValidationMetadata contains metadata such as the checksum algorithm used
-// for data integrity validation.
+// ChecksumValidationMetadata contains metadata such as the checksum algorithm
+// used for data integrity validation.
type ChecksumValidationMetadata struct {
// AlgorithmsUsed is the set of the checksum algorithms used to validate the
// response payload. The response payload must be completely read in order for the
@@ -562,10 +611,10 @@ type ChecksumValidationMetadata struct {
AlgorithmsUsed []string
}
-// GetChecksumValidationMetadata returns the set of algorithms that will be used to
-// validate the response payload with. The response payload must be completely read
-// in order for the checksum validation to be performed. An error is returned by
-// the operation output's response io.ReadCloser if the computed checksums are
+// GetChecksumValidationMetadata returns the set of algorithms that will be used
+// to validate the response payload with. The response payload must be completely
+// read in order for the checksum validation to be performed. An error is returned
+// by the operation output's response io.ReadCloser if the computed checksums are
// invalid. Returns false if no checksum algorithm used metadata was found.
func GetChecksumValidationMetadata(m middleware.Metadata) (ChecksumValidationMetadata, bool) {
values, ok := internalChecksum.GetOutputValidationAlgorithmsUsed(m)
@@ -592,8 +641,8 @@ func disableAcceptEncodingGzip(stack *middleware.Stack) error {
return acceptencodingcust.AddAcceptEncodingGzip(stack, acceptencodingcust.AddAcceptEncodingGzipOptions{})
}
-// ResponseError provides the HTTP centric error type wrapping the underlying error
-// with the HTTP response value and the deserialized RequestID.
+// ResponseError provides the HTTP centric error type wrapping the underlying
+// error with the HTTP response value and the deserialized RequestID.
type ResponseError interface {
error
@@ -603,8 +652,8 @@ type ResponseError interface {
var _ ResponseError = (*s3shared.ResponseError)(nil)
-// GetHostIDMetadata retrieves the host id from middleware metadata returns host id
-// as string along with a boolean indicating presence of hostId on middleware
+// GetHostIDMetadata retrieves the host id from middleware metadata returns host
+// id as string along with a boolean indicating presence of hostId on middleware
// metadata.
func GetHostIDMetadata(metadata middleware.Metadata) (string, bool) {
return s3shared.GetHostIDMetadata(metadata)
@@ -714,26 +763,77 @@ func withNopHTTPClientAPIOption(o *Options) {
o.HTTPClient = smithyhttp.NopClient{}
}
+type presignContextPolyfillMiddleware struct {
+}
+
+func (*presignContextPolyfillMiddleware) ID() string {
+ return "presignContextPolyfill"
+}
+
+func (m *presignContextPolyfillMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ schemeID := rscheme.Scheme.SchemeID()
+ ctx = s3cust.SetSignerVersion(ctx, schemeID)
+ if schemeID == "aws.auth#sigv4" || schemeID == "com.amazonaws.s3#sigv4express" {
+ if sn, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningName(ctx, sn)
+ }
+ if sr, ok := smithyhttp.GetSigV4SigningRegion(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningRegion(ctx, sr)
+ }
+ } else if schemeID == "aws.auth#sigv4a" {
+ if sn, ok := smithyhttp.GetSigV4ASigningName(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningName(ctx, sn)
+ }
+ if sr, ok := smithyhttp.GetSigV4ASigningRegions(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningRegion(ctx, sr[0])
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
type presignConverter PresignOptions
func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) {
- stack.Finalize.Clear()
+ if _, ok := stack.Finalize.Get((*acceptencodingcust.DisableGzip)(nil).ID()); ok {
+ stack.Finalize.Remove((*acceptencodingcust.DisableGzip)(nil).ID())
+ }
+ if _, ok := stack.Finalize.Get((*retry.Attempt)(nil).ID()); ok {
+ stack.Finalize.Remove((*retry.Attempt)(nil).ID())
+ }
+ if _, ok := stack.Finalize.Get((*retry.MetricsHeader)(nil).ID()); ok {
+ stack.Finalize.Remove((*retry.MetricsHeader)(nil).ID())
+ }
stack.Deserialize.Clear()
stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID())
stack.Build.Remove("UserAgent")
+ if err := stack.Finalize.Insert(&presignContextPolyfillMiddleware{}, "Signing", middleware.Before); err != nil {
+ return err
+ }
+
pmw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
CredentialsProvider: options.Credentials,
Presigner: c.Presigner,
LogSigning: options.ClientLogMode.IsSigning(),
})
- err = stack.Finalize.Add(pmw, middleware.After)
- if err != nil {
+ if _, err := stack.Finalize.Swap("Signing", pmw); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil {
return err
}
- // add multi-region access point presigner
+ // extended s3 presigning
signermv := s3cust.NewPresignHTTPRequestMiddleware(s3cust.PresignHTTPRequestMiddlewareOptions{
CredentialsProvider: options.Credentials,
+ ExpressCredentials: options.ExpressCredentials,
V4Presigner: c.Presigner,
V4aPresigner: c.presignerV4a,
LogSigning: options.ClientLogMode.IsSigning(),
@@ -752,7 +852,7 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
if err != nil {
return err
}
- err = presignedurlcust.AddAsIsPresigingMiddleware(stack)
+ err = presignedurlcust.AddAsIsPresigningMiddleware(stack)
if err != nil {
return err
}
@@ -767,3 +867,32 @@ func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
}, middleware.After)
}
+
+type disableHTTPSMiddleware struct {
+ DisableHTTPS bool
+}
+
+func (*disableHTTPSMiddleware) ID() string {
+ return "disableHTTPS"
+}
+
+func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Finalize.Insert(&disableHTTPSMiddleware{
+ DisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "ResolveEndpointV2", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
index 042e848a..c71060e0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,39 +13,45 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This action aborts a multipart upload. After a multipart upload is aborted, no
-// additional parts can be uploaded using that upload ID. The storage consumed by
-// any previously uploaded parts will be freed. However, if any part uploads are
+// This operation aborts a multipart upload. After a multipart upload is aborted,
+// no additional parts can be uploaded using that upload ID. The storage consumed
+// by any previously uploaded parts will be freed. However, if any part uploads are
// currently in progress, those part uploads might or might not succeed. As a
// result, it might be necessary to abort a given multipart upload multiple times
// in order to completely free all storage consumed by all parts. To verify that
-// all parts have been removed, so you don't get charged for the part storage, you
-// should call the ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) action and
-// ensure that the parts list is empty. For information about permissions required
-// to use the multipart upload, see Multipart Upload and Permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). The
-// following operations are related to AbortMultipartUpload:
+// all parts have been removed and prevent getting charged for the part storage,
+// you should call the ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// API operation and ensure that the parts list is empty. Directory buckets - For
+// directory buckets, you must make requests for this API operation to the Zonal
+// endpoint. These endpoints support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - For information about permissions
+// required to use the multipart upload, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// *
-// CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// *
-// UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// *
-// CompleteMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// *
-// ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// *
-// ListMultipartUploads
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to AbortMultipartUpload :
+// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipartUploadInput, optFns ...func(*Options)) (*AbortMultipartUploadOutput, error) {
if params == nil {
params = &AbortMultipartUploadInput{}
@@ -62,23 +69,31 @@ func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipar
type AbortMultipartUploadInput struct {
- // The bucket name to which the upload was taking place. When using this action
- // with an access point, you must direct requests to the access point hostname. The
- // access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The bucket name to which the upload was taking place. Directory buckets - When
+ // you use this operation with a directory bucket, you must use
+ // virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -93,26 +108,34 @@ type AbortMultipartUploadInput struct {
// This member is required.
UploadId *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
noSmithyDocumentSerde
}
+func (in *AbortMultipartUploadInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type AbortMultipartUploadOutput struct {
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -122,6 +145,9 @@ type AbortMultipartUploadOutput struct {
}
func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpAbortMultipartUpload{}, middleware.After)
if err != nil {
return err
@@ -130,34 +156,38 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AbortMultipartUpload"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -166,7 +196,10 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpAbortMultipartUploadValidationMiddleware(stack); err != nil {
@@ -178,6 +211,9 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addAbortMultipartUploadUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -193,14 +229,26 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *AbortMultipartUploadInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opAbortMultipartUpload(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "AbortMultipartUpload",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
index 95ff6496..8f89d780 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -13,91 +14,87 @@ import (
)
// Completes a multipart upload by assembling previously uploaded parts. You first
-// initiate the multipart upload and then upload all parts using the UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) operation.
-// After successfully uploading all relevant parts of an upload, you call this
-// action to complete the upload. Upon receiving this request, Amazon S3
-// concatenates all the parts in ascending order by part number to create a new
-// object. In the Complete Multipart Upload request, you must provide the parts
-// list. You must ensure that the parts list is complete. This action concatenates
-// the parts that you provide in the list. For each part in the list, you must
-// provide the part number and the ETag value, returned after that part was
-// uploaded. Processing of a Complete Multipart Upload request could take several
-// minutes to complete. After Amazon S3 begins processing the request, it sends an
-// HTTP response header that specifies a 200 OK response. While processing is in
-// progress, Amazon S3 periodically sends white space characters to keep the
-// connection from timing out. Because a request could fail after the initial 200
-// OK response has been sent, it is important that you check the response body to
-// determine whether the request succeeded. Note that if CompleteMultipartUpload
-// fails, applications should be prepared to retry the failed requests. For more
-// information, see Amazon S3 Error Best Practices
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html). You
-// cannot use Content-Type: application/x-www-form-urlencoded with Complete
-// Multipart Upload requests. Also, if you do not provide a Content-Type header,
-// CompleteMultipartUpload returns a 200 OK response. For more information about
-// multipart uploads, see Uploading Objects Using Multipart Upload
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). For
-// information about permissions required to use the multipart upload API, see
-// Multipart Upload and Permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-// CompleteMultipartUpload has the following special errors:
+// initiate the multipart upload and then upload all parts using the UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// operation or the UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
+// operation. After successfully uploading all relevant parts of an upload, you
+// call this CompleteMultipartUpload operation to complete the upload. Upon
+// receiving this request, Amazon S3 concatenates all the parts in ascending order
+// by part number to create a new object. In the CompleteMultipartUpload request,
+// you must provide the parts list and ensure that the parts list is complete. The
+// CompleteMultipartUpload API operation concatenates the parts that you provide in
+// the list. For each part in the list, you must provide the PartNumber value and
+// the ETag value that are returned after that part was uploaded. The processing
+// of a CompleteMultipartUpload request could take several minutes to finalize.
+// After Amazon S3 begins processing the request, it sends an HTTP response header
+// that specifies a 200 OK response. While processing is in progress, Amazon S3
+// periodically sends white space characters to keep the connection from timing
+// out. A request could fail after the initial 200 OK response has been sent. This
+// means that a 200 OK response can contain either a success or an error. The
+// error response might be embedded in the 200 OK response. If you call this API
+// operation directly, make sure to design your application to parse the contents
+// of the response and handle it appropriately. If you use Amazon Web Services
+// SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply
+// error handling per your configuration settings (including automatically retrying
+// the request as appropriate). If the condition persists, the SDKs throw an
+// exception (or, for the SDKs that don't use exceptions, they return an error).
+// Note that if CompleteMultipartUpload fails, applications should be prepared to
+// retry any failed requests (including 500 error responses). For more information,
+// see Amazon S3 Error Best Practices (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html)
+// . You can't use Content-Type: application/x-www-form-urlencoded for the
+// CompleteMultipartUpload requests. Also, if you don't provide a Content-Type
+// header, CompleteMultipartUpload can still return a 200 OK response. For more
+// information about multipart uploads, see Uploading Objects Using Multipart
+// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
+// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
+// make requests for this API operation to the Zonal endpoint. These endpoints
+// support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - For information about permissions
+// required to use the multipart upload API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// * Error code:
-// EntityTooSmall
+// Special errors
+// - Error Code: EntityTooSmall
+// - Description: Your proposed upload is smaller than the minimum allowed
+// object size. Each part must be at least 5 MB in size, except the last part.
+// - HTTP Status Code: 400 Bad Request
+// - Error Code: InvalidPart
+// - Description: One or more of the specified parts could not be found. The
+// part might not have been uploaded, or the specified ETag might not have matched
+// the uploaded part's ETag.
+// - HTTP Status Code: 400 Bad Request
+// - Error Code: InvalidPartOrder
+// - Description: The list of parts was not in ascending order. The parts list
+// must be specified in order by part number.
+// - HTTP Status Code: 400 Bad Request
+// - Error Code: NoSuchUpload
+// - Description: The specified multipart upload does not exist. The upload ID
+// might be invalid, or the multipart upload might have been aborted or completed.
+// - HTTP Status Code: 404 Not Found
//
-// * Description: Your proposed upload is smaller than the minimum
-// allowed object size. Each part must be at least 5 MB in size, except the last
-// part.
-//
-// * 400 Bad Request
-//
-// * Error code: InvalidPart
-//
-// * Description: One or more
-// of the specified parts could not be found. The part might not have been
-// uploaded, or the specified entity tag might not have matched the part's entity
-// tag.
-//
-// * 400 Bad Request
-//
-// * Error code: InvalidPartOrder
-//
-// * Description: The list
-// of parts was not in ascending order. The parts list must be specified in order
-// by part number.
-//
-// * 400 Bad Request
-//
-// * Error code: NoSuchUpload
-//
-// * Description:
-// The specified multipart upload does not exist. The upload ID might be invalid,
-// or the multipart upload might have been aborted or completed.
-//
-// * 404 Not
-// Found
-//
-// The following operations are related to CompleteMultipartUpload:
-//
-// *
-// CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// *
-// UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// *
-// AbortMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// *
-// ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// *
-// ListMultipartUploads
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to CompleteMultipartUpload :
+// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMultipartUploadInput, optFns ...func(*Options)) (*CompleteMultipartUploadOutput, error) {
if params == nil {
params = &CompleteMultipartUploadInput{}
@@ -115,23 +112,31 @@ func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMu
type CompleteMultipartUploadInput struct {
- // Name of the bucket to which the multipart upload was initiated. When using this
- // action with an access point, you must direct requests to the access point
- // hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // Name of the bucket to which the multipart upload was initiated. Directory
+ // buckets - When you use this operation with a directory bucket, you must use
+ // virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -149,130 +154,125 @@ type CompleteMultipartUploadInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32 checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32C checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 160-bit SHA-1 digest of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 256-bit SHA-256 digest of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// The container for the multipart upload request information.
MultipartUpload *types.CompletedMultipartUpload
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The server-side encryption (SSE) algorithm used to encrypt the object. This
- // parameter is needed only when the object was created using a checksum algorithm.
- // For more information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
+ // parameter is required only when the object was created using a checksum
+ // algorithm or if your bucket policy requires the use of SSE-C. For more
+ // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
// The server-side encryption (SSE) customer managed key. This parameter is needed
// only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
+ // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerKey *string
// The MD5 server-side encryption (SSE) customer managed key. This parameter is
// needed only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
+ // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerKeyMD5 *string
noSmithyDocumentSerde
}
+func (in *CompleteMultipartUploadInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type CompleteMultipartUploadOutput struct {
// The name of the bucket that contains the newly created object. Does not return
- // the access point ARN or access point alias if used. When using this action with
- // an access point, you must direct requests to the access point hostname. The
- // access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // the access point ARN or access point alias if used. Access points are not
+ // supported by directory buckets.
Bucket *string
// Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // encryption with Key Management Service (KMS) keys (SSE-KMS). This functionality
+ // is not supported for directory buckets.
+ BucketKeyEnabled *bool
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
@@ -282,13 +282,13 @@ type CompleteMultipartUploadOutput struct {
// data. If the entity tag is not an MD5 digest of the object data, it will contain
// one or more nonhexadecimal characters and/or will consist of less than 32 or
// more than 32 hexadecimal digits. For more information about how the entity tag
- // is calculated, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // is calculated, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ETag *string
- // If the object expiration is configured, this will contain the expiration date
- // (expiry-date) and rule ID (rule-id). The value of rule-id is URL-encoded.
+ // If the object expiration is configured, this will contain the expiration date (
+ // expiry-date ) and rule ID ( rule-id ). The value of rule-id is URL-encoded.
+ // This functionality is not supported for directory buckets.
Expiration *string
// The object key of the newly created object.
@@ -298,22 +298,21 @@ type CompleteMultipartUploadOutput struct {
Location *string
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for the
- // object.
+ // If present, indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // If you specified server-side encryption either with an Amazon S3-managed
- // encryption key or an Amazon Web Services KMS key in your initiate multipart
- // upload request, the response includes this header. It confirms the encryption
- // algorithm that Amazon S3 used to encrypt the object.
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256 , aws:kms ). For directory buckets, only server-side
+ // encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
ServerSideEncryption types.ServerSideEncryption
- // Version ID of the newly created object, in case the bucket has versioning turned
- // on.
+ // Version ID of the newly created object, in case the bucket has versioning
+ // turned on. This functionality is not supported for directory buckets.
VersionId *string
// Metadata pertaining to the operation's result.
@@ -323,6 +322,9 @@ type CompleteMultipartUploadOutput struct {
}
func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpCompleteMultipartUpload{}, middleware.After)
if err != nil {
return err
@@ -331,34 +333,38 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CompleteMultipartUpload"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -367,7 +373,10 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpCompleteMultipartUploadValidationMiddleware(stack); err != nil {
@@ -379,6 +388,9 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addCompleteMultipartUploadUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -397,14 +409,26 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *CompleteMultipartUploadInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opCompleteMultipartUpload(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "CompleteMultipartUpload",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
index 47790077..c7990bab 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
@@ -4,11 +4,13 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
@@ -18,146 +20,97 @@ import (
// up to 5 GB in size in a single atomic action using this API. However, to copy an
// object greater than 5 GB, you must use the multipart upload Upload Part - Copy
// (UploadPartCopy) API. For more information, see Copy Object Using the REST
-// Multipart Upload API
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html).
-// All copy requests must be authenticated. Additionally, you must have read access
-// to the source object and write access to the destination bucket. For more
-// information, see REST Authentication
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). Both
-// the Region that you want to copy the object from and the Region that you want to
-// copy the object to must be enabled for your account. A copy request might return
-// an error when Amazon S3 receives the copy request or while Amazon S3 is copying
-// the files. If the error occurs before the copy action starts, you receive a
-// standard Amazon S3 error. If the error occurs during the copy operation, the
-// error response is embedded in the 200 OK response. This means that a 200 OK
-// response can contain either a success or an error. Design your application to
-// parse the contents of the response and handle it appropriately. If the copy is
-// successful, you receive a response with information about the copied object. If
-// the request is an HTTP 1.1 request, the response is chunk encoded. If it were
-// not, it would not contain the content-length, and you would need to read the
-// entire body. The copy request charge is based on the storage class and Region
-// that you specify for the destination object. For pricing information, see Amazon
-// S3 pricing (http://aws.amazon.com/s3/pricing/). Amazon S3 transfer acceleration
-// does not support cross-Region copies. If you request a cross-Region copy using a
-// transfer acceleration endpoint, you get a 400 Bad Request error. For more
-// information, see Transfer Acceleration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
-// Metadata When copying an object, you can preserve all metadata (default) or
-// specify new metadata. However, the ACL is not preserved and is set to private
-// for the user making the request. To override the default ACL setting, specify a
-// new ACL when generating a copy request. For more information, see Using ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). To
-// specify whether you want the object metadata copied from the source object or
-// replaced with metadata provided in the request, you can optionally add the
-// x-amz-metadata-directive header. When you grant permissions, you can use the
-// s3:x-amz-metadata-directive condition key to enforce certain metadata behavior
-// when objects are uploaded. For more information, see Specifying Conditions in a
-// Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html) in
-// the Amazon S3 User Guide. For a complete list of Amazon S3-specific condition
-// keys, see Actions, Resources, and Condition Keys for Amazon S3
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html).
-// x-amz-copy-source-if Headers To only copy an object under certain conditions,
-// such as whether the Etag matches or whether the object was modified before or
-// after a specified date, use the following request parameters:
+// Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html)
+// . You can copy individual objects between general purpose buckets, between
+// directory buckets, and between general purpose buckets and directory buckets.
+// Directory buckets - For directory buckets, you must make requests for this API
+// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
+// requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Both the Region that you want to copy the object
+// from and the Region that you want to copy the object to must be enabled for your
+// account. For more information about how to enable a Region for your account, see
+// Enable or disable a Region for standalone accounts (https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone)
+// in the Amazon Web Services Account Management Guide. Amazon S3 transfer
+// acceleration does not support cross-Region copies. If you request a cross-Region
+// copy using a transfer acceleration endpoint, you get a 400 Bad Request error.
+// For more information, see Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
+// . Authentication and authorization All CopyObject requests must be
+// authenticated and signed by using IAM credentials (access key ID and secret
+// access key for the IAM identities). All headers with the x-amz- prefix,
+// including x-amz-copy-source , must be signed. For more information, see REST
+// Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+// . Directory buckets - You must use the IAM credentials to authenticate and
+// authorize your access to the CopyObject API operation, instead of using the
+// temporary security credentials through the CreateSession API operation. Amazon
+// Web Services CLI or SDKs handles authentication and authorization on your
+// behalf. Permissions You must have read access to the source object and write
+// access to the destination bucket.
+// - General purpose bucket permissions - You must have permissions in an IAM
+// policy based on the source and destination bucket types in a CopyObject
+// operation.
+// - If the source object is in a general purpose bucket, you must have
+// s3:GetObject permission to read the source object that is being copied.
+// - If the destination bucket is a general purpose bucket, you must have
+// s3:PutObject permission to write the object copy to the destination bucket.
+// - Directory bucket permissions - You must have permissions in a bucket policy
+// or an IAM identity-based policy based on the source and destination bucket types
+// in a CopyObject operation.
+// - If the source object that you want to copy is in a directory bucket, you
+// must have the s3express:CreateSession permission in the Action element of a
+// policy to read the object. By default, the session is in the ReadWrite mode.
+// If you want to restrict the access, you can explicitly set the
+// s3express:SessionMode condition key to ReadOnly on the copy source bucket.
+// - If the copy destination is a directory bucket, you must have the
+// s3express:CreateSession permission in the Action element of a policy to write
+// the object to the destination. The s3express:SessionMode condition key can't
+// be set to ReadOnly on the copy destination bucket. For example policies, see
+// Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
+// and Amazon Web Services Identity and Access Management (IAM) identity-based
+// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html)
+// in the Amazon S3 User Guide.
//
-// *
-// x-amz-copy-source-if-match
+// Response and special errors When the request is an HTTP 1.1 request, the
+// response is chunk encoded. When the request is not an HTTP 1.1 request, the
+// response would not contain the Content-Length . You always need to read the
+// entire response body to check if the copy succeeds. to keep the connection alive
+// while we copy the data.
+// - If the copy is successful, you receive a response with information about
+// the copied object.
+// - A copy request might return an error when Amazon S3 receives the copy
+// request or while Amazon S3 is copying the files. A 200 OK response can contain
+// either a success or an error.
+// - If the error occurs before the copy action starts, you receive a standard
+// Amazon S3 error.
+// - If the error occurs during the copy operation, the error response is
+// embedded in the 200 OK response. For example, in a cross-region copy, you may
+// encounter throttling and receive a 200 OK response. For more information, see
+// Resolve the Error 200 response when copying objects to Amazon S3 (https://repost.aws/knowledge-center/s3-resolve-200-internalerror)
+// . The 200 OK status code means the copy was accepted, but it doesn't mean the
+// copy is complete. Another example is when you disconnect from Amazon S3 before
+// the copy is complete, Amazon S3 might cancel the copy and you may receive a
+// 200 OK response. You must stay connected to Amazon S3 until the entire
+// response is successfully received and processed. If you call this API operation
+// directly, make sure to design your application to parse the content of the
+// response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs
+// handle this condition. The SDKs detect the embedded error and apply error
+// handling per your configuration settings (including automatically retrying the
+// request as appropriate). If the condition persists, the SDKs throw an exception
+// (or, for the SDKs that don't use exceptions, they return an error).
//
-// * x-amz-copy-source-if-none-match
-//
-// *
-// x-amz-copy-source-if-unmodified-since
-//
-// * x-amz-copy-source-if-modified-since
-//
-// If
-// both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
-// headers are present in the request and evaluate as follows, Amazon S3 returns
-// 200 OK and copies the data:
-//
-// * x-amz-copy-source-if-match condition evaluates to
-// true
-//
-// * x-amz-copy-source-if-unmodified-since condition evaluates to false
-//
-// If
-// both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since
-// headers are present in the request and evaluate as follows, Amazon S3 returns
-// the 412 Precondition Failed response code:
-//
-// * x-amz-copy-source-if-none-match
-// condition evaluates to false
-//
-// * x-amz-copy-source-if-modified-since condition
-// evaluates to true
-//
-// All headers with the x-amz- prefix, including
-// x-amz-copy-source, must be signed. Server-side encryption When you perform a
-// CopyObject operation, you can optionally use the appropriate encryption-related
-// headers to encrypt the object using server-side encryption with Amazon Web
-// Services managed encryption keys (SSE-S3 or SSE-KMS) or a customer-provided
-// encryption key. With server-side encryption, Amazon S3 encrypts your data as it
-// writes it to disks in its data centers and decrypts the data when you access it.
-// For more information about server-side encryption, see Using Server-Side
-// Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html). If
-// a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.
-// For more information, see Amazon S3 Bucket Keys
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon
-// S3 User Guide. Access Control List (ACL)-Specific Request Headers When copying
-// an object, you can optionally use headers to grant ACL-based permissions. By
-// default, all objects are private. Only the owner has full access control. When
-// adding a new object, you can grant permissions to individual Amazon Web Services
-// accounts or to predefined groups defined by Amazon S3. These permissions are
-// then added to the ACL on the object. For more information, see Access Control
-// List (ACL) Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) and Managing
-// ACLs Using the REST API
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html). If
-// the bucket that you're copying objects to uses the bucket owner enforced setting
-// for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
-// Buckets that use this setting only accept PUT requests that don't specify an ACL
-// or PUT requests that specify bucket owner full control ACLs, such as the
-// bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed
-// in the XML format. For more information, see Controlling ownership of objects
-// and disabling ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide. If your bucket uses the bucket owner enforced
-// setting for Object Ownership, all objects written to the bucket by any account
-// will be owned by the bucket owner. Checksums When copying an object, if it has a
-// checksum, that checksum will be copied to the new object by default. When you
-// copy the object over, you may optionally specify a different checksum algorithm
-// to use with the x-amz-checksum-algorithm header. Storage Class Options You can
-// use the CopyObject action to change the storage class of an object that is
-// already stored in Amazon S3 using the StorageClass parameter. For more
-// information, see Storage Classes
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
-// the Amazon S3 User Guide. Versioning By default, x-amz-copy-source identifies
-// the current version of an object to copy. If the current version is a delete
-// marker, Amazon S3 behaves as if the object was deleted. To copy a different
-// version, use the versionId subresource. If you enable versioning on the target
-// bucket, Amazon S3 generates a unique version ID for the object being copied.
-// This version ID is different from the version ID of the source object. Amazon S3
-// returns the version ID of the copied object in the x-amz-version-id response
-// header in the response. If you do not enable versioning or suspend it on the
-// target bucket, the version ID that Amazon S3 generates is always null. If the
-// source object's storage class is GLACIER, you must restore a copy of this object
-// before you can use it as a source object for the copy operation. For more
-// information, see RestoreObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). The
-// following operations are related to CopyObject:
-//
-// * PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// *
-// GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// For more
-// information, see Copying Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html).
+// Charge The copy request charge is based on the storage class and Region that
+// you specify for the destination object. The request can also result in a data
+// retrieval charge for the source if the source storage class bills for data
+// retrieval. If the copy source is in a different region, the data transfer is
+// billed to the copy source account. For pricing information, see Amazon S3
+// pricing (http://aws.amazon.com/s3/pricing/) . HTTP Host header syntax Directory
+// buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to CopyObject :
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns ...func(*Options)) (*CopyObjectOutput, error) {
if params == nil {
params = &CopyObjectInput{}
@@ -175,59 +128,81 @@ func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns
type CopyObjectInput struct {
- // The name of the destination bucket. When using this action with an access point,
+ // The name of the destination bucket. Directory buckets - When you use this
+ // operation with a directory bucket, you must use virtual-hosted-style requests in
+ // the format Bucket_name.s3express-az_id.region.amazonaws.com . Path-style
+ // requests are not supported. Directory bucket names must be unique in the chosen
+ // Availability Zone. Bucket names must follow the format
+ // bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
// you must direct requests to the access point hostname. The access point hostname
// takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
// When using this action with an access point through the Amazon Web Services
// SDKs, you provide the access point ARN in place of the bucket name. For more
- // information about access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
- // Specifies the source object for the copy operation. You specify the value in one
- // of two formats, depending on whether you want to access the source object
- // through an access point
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
- //
- // *
- // For objects not accessed through an access point, specify the name of the source
- // bucket and the key of the source object, separated by a slash (/). For example,
- // to copy the object reports/january.pdf from the bucket awsexamplebucket, use
- // awsexamplebucket/reports/january.pdf. The value must be URL-encoded.
- //
- // * For
- // objects accessed through access points, specify the Amazon Resource Name (ARN)
- // of the object as accessed through the access point, in the format
- // arn:aws:s3:::accesspoint//object/. For example, to copy the object
- // reports/january.pdf through access point my-access-point owned by account
- // 123456789012 in Region us-west-2, use the URL encoding of
- // arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
- // The value must be URL encoded. Amazon S3 supports copy operations using access
- // points only when the source and destination buckets are in the same Amazon Web
- // Services Region. Alternatively, for objects accessed through Amazon S3 on
- // Outposts, specify the ARN of the object as accessed in the format
- // arn:aws:s3-outposts:::outpost//object/. For example, to copy the object
- // reports/january.pdf through outpost my-outpost owned by account 123456789012 in
- // Region us-west-2, use the URL encoding of
- // arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
- // The value must be URL-encoded.
- //
- // To copy a specific version of an object, append
- // ?versionId= to the value (for example,
- // awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
- // If you don't specify a version ID, Amazon S3 copies the latest version of the
- // source object.
+ // Specifies the source object for the copy operation. The source object can be up
+ // to 5 GB. If the source object is an object that was uploaded by using a
+ // multipart upload, the object copy will be a single part object after the source
+ // object is copied to the destination bucket. You specify the value of the copy
+ // source in one of two formats, depending on whether you want to access the source
+ // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html)
+ // :
+ // - For objects not accessed through an access point, specify the name of the
+ // source bucket and the key of the source object, separated by a slash (/). For
+ // example, to copy the object reports/january.pdf from the general purpose
+ // bucket awsexamplebucket , use awsexamplebucket/reports/january.pdf . The value
+ // must be URL-encoded. To copy the object reports/january.pdf from the directory
+ // bucket awsexamplebucket--use1-az5--x-s3 , use
+ // awsexamplebucket--use1-az5--x-s3/reports/january.pdf . The value must be
+ // URL-encoded.
+ // - For objects accessed through access points, specify the Amazon Resource
+ // Name (ARN) of the object as accessed through the access point, in the format
+ // arn:aws:s3:::accesspoint//object/ . For example, to copy the object
+ // reports/january.pdf through access point my-access-point owned by account
+ // 123456789012 in Region us-west-2 , use the URL encoding of
+ // arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf
+ // . The value must be URL encoded.
+ // - Amazon S3 supports copy operations using Access points only when the source
+ // and destination buckets are in the same Amazon Web Services Region.
+ // - Access points are not supported by directory buckets. Alternatively, for
+ // objects accessed through Amazon S3 on Outposts, specify the ARN of the object as
+ // accessed in the format arn:aws:s3-outposts:::outpost//object/ . For example,
+ // to copy the object reports/january.pdf through outpost my-outpost owned by
+ // account 123456789012 in Region us-west-2 , use the URL encoding of
+ // arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf
+ // . The value must be URL-encoded.
+ // If your source bucket versioning is enabled, the x-amz-copy-source header by
+ // default identifies the current version of an object to copy. If the current
+ // version is a delete marker, Amazon S3 behaves as if the object was deleted. To
+ // copy a different version, use the versionId query parameter. Specifically,
+ // append ?versionId= to the value (for example,
+ // awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893
+ // ). If you don't specify a version ID, Amazon S3 copies the latest version of the
+ // source object. If you enable versioning on the destination bucket, Amazon S3
+ // generates a unique version ID for the copied object. This version ID is
+ // different from the version ID of the source object. Amazon S3 returns the
+ // version ID of the copied object in the x-amz-version-id response header in the
+ // response. If you do not enable versioning or suspend it on the destination
+ // bucket, the version ID that Amazon S3 generates in the x-amz-version-id
+ // response header is always null. Directory buckets - S3 Versioning isn't enabled
+ // and supported for directory buckets.
//
// This member is required.
CopySource *string
@@ -237,222 +212,426 @@ type CopyObjectInput struct {
// This member is required.
Key *string
- // The canned ACL to apply to the object. This action is not supported by Amazon S3
- // on Outposts.
+ // The canned access control list (ACL) to apply to the object. When you copy an
+ // object, the ACL metadata is not preserved and is set to private by default.
+ // Only the owner has full access control. To override the default ACL setting,
+ // specify a new ACL when you generate a copy request. For more information, see
+ // Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
+ // . If the destination bucket that you're copying objects to uses the bucket owner
+ // enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect
+ // permissions. Buckets that use this setting only accept PUT requests that don't
+ // specify an ACL or PUT requests that specify bucket owner full control ACLs,
+ // such as the bucket-owner-full-control canned ACL or an equivalent form of this
+ // ACL expressed in the XML format. For more information, see Controlling
+ // ownership of objects and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+ // in the Amazon S3 User Guide.
+ // - If your destination bucket uses the bucket owner enforced setting for
+ // Object Ownership, all objects written to the bucket by any account will be owned
+ // by the bucket owner.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
ACL types.ObjectCannedACL
// Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header to true
- // causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
- // Specifying this header with a COPY action doesn’t affect bucket-level settings
- // for S3 Bucket Key.
- BucketKeyEnabled bool
-
- // Specifies caching behavior along the request/reply chain.
+ // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS).
+ // If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.
+ // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object
+ // encryption with SSE-KMS. Specifying this header with a COPY action doesn’t
+ // affect bucket-level settings for S3 Bucket Key. For more information, see
+ // Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
+ // in the Amazon S3 User Guide. This functionality is not supported when the
+ // destination bucket is a directory bucket.
+ BucketKeyEnabled *bool
+
+ // Specifies the caching behavior along the request/reply chain.
CacheControl *string
- // Indicates the algorithm you want Amazon S3 to use to create the checksum for the
- // object. For more information, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
+ // Indicates the algorithm that you want Amazon S3 to use to create the checksum
+ // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // in the Amazon S3 User Guide. When you copy an object, if the source object has a
+ // checksum, that checksum value will be copied to the new object by default. If
+ // the CopyObject request does not include this x-amz-checksum-algorithm header,
+ // the checksum algorithm will be copied from the source object to the destination
+ // object (if it's present on the source object). You can optionally specify a
+ // different checksum algorithm to use with the x-amz-checksum-algorithm header.
+ // Unrecognized or unsupported values will respond with the HTTP status code 400
+ // Bad Request . For directory buckets, when you use Amazon Web Services SDKs,
+ // CRC32 is the default checksum algorithm that's used for performance.
ChecksumAlgorithm types.ChecksumAlgorithm
- // Specifies presentational information for the object.
+ // Specifies presentational information for the object. Indicates whether an
+ // object should be displayed in a web browser or downloaded as a file. It allows
+ // specifying the desired filename for the downloaded file.
ContentDisposition *string
// Specifies what content encodings have been applied to the object and thus what
// decoding mechanisms must be applied to obtain the media-type referenced by the
- // Content-Type header field.
+ // Content-Type header field. For directory buckets, only the aws-chunked value is
+ // supported in this header field.
ContentEncoding *string
// The language the content is in.
ContentLanguage *string
- // A standard MIME type describing the format of the object data.
+ // A standard MIME type that describes the format of the object data.
ContentType *string
- // Copies the object if its entity tag (ETag) matches the specified tag.
+ // Copies the object if its entity tag (ETag) matches the specified tag. If both
+ // the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
+ // headers are present in the request and evaluate as follows, Amazon S3 returns
+ // 200 OK and copies the data:
+ // - x-amz-copy-source-if-match condition evaluates to true
+ // - x-amz-copy-source-if-unmodified-since condition evaluates to false
CopySourceIfMatch *string
- // Copies the object if it has been modified since the specified time.
+ // Copies the object if it has been modified since the specified time. If both the
+ // x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since headers
+ // are present in the request and evaluate as follows, Amazon S3 returns the 412
+ // Precondition Failed response code:
+ // - x-amz-copy-source-if-none-match condition evaluates to false
+ // - x-amz-copy-source-if-modified-since condition evaluates to true
CopySourceIfModifiedSince *time.Time
- // Copies the object if its entity tag (ETag) is different than the specified ETag.
+ // Copies the object if its entity tag (ETag) is different than the specified
+ // ETag. If both the x-amz-copy-source-if-none-match and
+ // x-amz-copy-source-if-modified-since headers are present in the request and
+ // evaluate as follows, Amazon S3 returns the 412 Precondition Failed response
+ // code:
+ // - x-amz-copy-source-if-none-match condition evaluates to false
+ // - x-amz-copy-source-if-modified-since condition evaluates to true
CopySourceIfNoneMatch *string
- // Copies the object if it hasn't been modified since the specified time.
+ // Copies the object if it hasn't been modified since the specified time. If both
+ // the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
+ // headers are present in the request and evaluate as follows, Amazon S3 returns
+ // 200 OK and copies the data:
+ // - x-amz-copy-source-if-match condition evaluates to true
+ // - x-amz-copy-source-if-unmodified-since condition evaluates to false
CopySourceIfUnmodifiedSince *time.Time
// Specifies the algorithm to use when decrypting the source object (for example,
- // AES256).
+ // AES256 ). If the source object for the copy is stored in Amazon S3 using SSE-C,
+ // you must provide the necessary encryption information in your request so that
+ // Amazon S3 can decrypt the object for copying. This functionality is not
+ // supported when the source object is in a directory bucket.
CopySourceSSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
- // the source object. The encryption key provided in this header must be one that
- // was used when the source object was created.
+ // the source object. The encryption key provided in this header must be the same
+ // one that was used when the source object was created. If the source object for
+ // the copy is stored in Amazon S3 using SSE-C, you must provide the necessary
+ // encryption information in your request so that Amazon S3 can decrypt the object
+ // for copying. This functionality is not supported when the source object is in a
+ // directory bucket.
CopySourceSSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. If the source object for the copy
+ // is stored in Amazon S3 using SSE-C, you must provide the necessary encryption
+ // information in your request so that Amazon S3 can decrypt the object for
+ // copying. This functionality is not supported when the source object is in a
+ // directory bucket.
CopySourceSSECustomerKeyMD5 *string
- // The account ID of the expected destination bucket owner. If the destination
- // bucket is owned by a different account, the request fails with the HTTP status
- // code 403 Forbidden (access denied).
+ // The account ID of the expected destination bucket owner. If the account ID that
+ // you provide does not match the actual owner of the destination bucket, the
+ // request fails with the HTTP status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
- // The account ID of the expected source bucket owner. If the source bucket is
- // owned by a different account, the request fails with the HTTP status code 403
- // Forbidden (access denied).
+ // The account ID of the expected source bucket owner. If the account ID that you
+ // provide does not match the actual owner of the source bucket, the request fails
+ // with the HTTP status code 403 Forbidden (access denied).
ExpectedSourceBucketOwner *string
// The date and time at which the object is no longer cacheable.
Expires *time.Time
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
- // action is not supported by Amazon S3 on Outposts.
+ // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantFullControl *string
- // Allows grantee to read the object data and its metadata. This action is not
- // supported by Amazon S3 on Outposts.
+ // Allows grantee to read the object data and its metadata.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantRead *string
- // Allows grantee to read the object ACL. This action is not supported by Amazon S3
- // on Outposts.
+ // Allows grantee to read the object ACL.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantReadACP *string
- // Allows grantee to write the ACL for the applicable object. This action is not
- // supported by Amazon S3 on Outposts.
+ // Allows grantee to write the ACL for the applicable object.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantWriteACP *string
// A map of metadata to store with the object in S3.
Metadata map[string]string
- // Specifies whether the metadata is copied from the source object or replaced with
- // metadata provided in the request.
+ // Specifies whether the metadata is copied from the source object or replaced
+ // with metadata that's provided in the request. When copying an object, you can
+ // preserve all metadata (the default) or specify new metadata. If this header
+ // isn’t specified, COPY is the default behavior. General purpose bucket - For
+ // general purpose buckets, when you grant permissions, you can use the
+ // s3:x-amz-metadata-directive condition key to enforce certain metadata behavior
+ // when objects are uploaded. For more information, see Amazon S3 condition key
+ // examples (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html)
+ // in the Amazon S3 User Guide. x-amz-website-redirect-location is unique to each
+ // object and is not copied when using the x-amz-metadata-directive header. To
+ // copy the value, you must specify x-amz-website-redirect-location in the request
+ // header.
MetadataDirective types.MetadataDirective
- // Specifies whether you want to apply a legal hold to the copied object.
+ // Specifies whether you want to apply a legal hold to the object copy. This
+ // functionality is not supported for directory buckets.
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
- // The Object Lock mode that you want to apply to the copied object.
+ // The Object Lock mode that you want to apply to the object copy. This
+ // functionality is not supported for directory buckets.
ObjectLockMode types.ObjectLockMode
- // The date and time when you want the copied object's Object Lock to expire.
+ // The date and time when you want the Object Lock of the object copy to expire.
+ // This functionality is not supported for directory buckets.
ObjectLockRetainUntilDate *time.Time
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
+ // Specifies the algorithm to use when encrypting the object (for example, AES256
+ // ). When you perform a CopyObject operation, if you want to use a different type
+ // of encryption setting for the target object, you can specify appropriate
+ // encryption-related headers to encrypt the target object with an Amazon S3
+ // managed key, a KMS key, or a customer-provided key. If the encryption setting in
+ // your request is different from the default encryption configuration of the
+ // destination bucket, the encryption setting in your request takes precedence.
+ // This functionality is not supported when the destination bucket is a directory
+ // bucket.
SSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use in
// encrypting data. This value is used to store the object and then it is
- // discarded; Amazon S3 does not store the encryption key. The key must be
+ // discarded. Amazon S3 does not store the encryption key. The key must be
// appropriate for use with the algorithm specified in the
- // x-amz-server-side-encryption-customer-algorithm header.
+ // x-amz-server-side-encryption-customer-algorithm header. This functionality is
+ // not supported when the destination bucket is a directory bucket.
SSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. This functionality is not
+ // supported when the destination bucket is a directory bucket.
SSECustomerKeyMD5 *string
// Specifies the Amazon Web Services KMS Encryption Context to use for object
// encryption. The value of this header is a base64-encoded UTF-8 string holding
- // JSON with the encryption context key-value pairs.
+ // JSON with the encryption context key-value pairs. This value must be explicitly
+ // added to specify encryption context for CopyObject requests. This functionality
+ // is not supported when the destination bucket is a directory bucket.
SSEKMSEncryptionContext *string
- // Specifies the Amazon Web Services KMS key ID to use for object encryption. All
- // GET and PUT requests for an object protected by Amazon Web Services KMS will
- // fail if not made via SSL or using SigV4. For information about configuring using
- // any of the officially supported Amazon Web Services SDKs and Amazon Web Services
- // CLI, see Specifying the Signature Version in Request Authentication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
- // in the Amazon S3 User Guide.
+ // Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object
+ // encryption. All GET and PUT requests for an object protected by KMS will fail if
+ // they're not made via SSL or using SigV4. For information about configuring any
+ // of the officially supported Amazon Web Services SDKs and Amazon Web Services
+ // CLI, see Specifying the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
+ // in the Amazon S3 User Guide. This functionality is not supported when the
+ // destination bucket is a directory bucket.
SSEKMSKeyId *string
// The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // (for example, AES256 , aws:kms , aws:kms:dsse ). Unrecognized or unsupported
+ // values won’t write a destination object and will receive a 400 Bad Request
+ // response. Amazon S3 automatically encrypts all new objects that are copied to an
+ // S3 bucket. When copying an object, if you don't specify encryption information
+ // in your copy request, the encryption setting of the target object is set to the
+ // default encryption configuration of the destination bucket. By default, all
+ // buckets have a base level of encryption configuration that uses server-side
+ // encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a
+ // default encryption configuration that uses server-side encryption with Key
+ // Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with
+ // Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with
+ // customer-provided encryption keys (SSE-C), Amazon S3 uses the corresponding KMS
+ // key, or a customer-provided key to encrypt the target object copy. When you
+ // perform a CopyObject operation, if you want to use a different type of
+ // encryption setting for the target object, you can specify appropriate
+ // encryption-related headers to encrypt the target object with an Amazon S3
+ // managed key, a KMS key, or a customer-provided key. If the encryption setting in
+ // your request is different from the default encryption configuration of the
+ // destination bucket, the encryption setting in your request takes precedence.
+ // With server-side encryption, Amazon S3 encrypts your data as it writes your data
+ // to disks in its data centers and decrypts the data when you access it. For more
+ // information about server-side encryption, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
+ // in the Amazon S3 User Guide. For directory buckets, only server-side encryption
+ // with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
ServerSideEncryption types.ServerSideEncryption
- // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
- // objects. The STANDARD storage class provides high durability and high
- // availability. Depending on performance needs, you can specify a different
- // Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
- // more information, see Storage Classes
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
- // the Amazon S3 User Guide.
+ // If the x-amz-storage-class header is not used, the copied object will be stored
+ // in the STANDARD Storage Class by default. The STANDARD storage class provides
+ // high durability and high availability. Depending on performance needs, you can
+ // specify a different Storage Class.
+ // - Directory buckets - For directory buckets, only the S3 Express One Zone
+ // storage class is supported to store newly created objects. Unsupported storage
+ // class values won't write a destination object and will respond with the HTTP
+ // status code 400 Bad Request .
+ // - Amazon S3 on Outposts - S3 on Outposts only uses the OUTPOSTS Storage Class.
+ // You can use the CopyObject action to change the storage class of an object that
+ // is already stored in Amazon S3 by using the x-amz-storage-class header. For
+ // more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+ // in the Amazon S3 User Guide. Before using an object as a source object for the
+ // copy operation, you must restore a copy of it if it meets any of the following
+ // conditions:
+ // - The storage class of the source object is GLACIER or DEEP_ARCHIVE .
+ // - The storage class of the source object is INTELLIGENT_TIERING and it's S3
+ // Intelligent-Tiering access tier (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition)
+ // is Archive Access or Deep Archive Access .
+ // For more information, see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
+ // and Copying Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html)
+ // in the Amazon S3 User Guide.
StorageClass types.StorageClass
- // The tag-set for the object destination object this value must be used in
- // conjunction with the TaggingDirective. The tag-set must be encoded as URL Query
- // parameters.
+ // The tag-set for the object copy in the destination bucket. This value must be
+ // used in conjunction with the x-amz-tagging-directive if you choose REPLACE for
+ // the x-amz-tagging-directive . If you choose COPY for the x-amz-tagging-directive
+ // , you don't need to set the x-amz-tagging header, because the tag-set will be
+ // copied from the source object directly. The tag-set must be encoded as URL Query
+ // parameters. The default value is the empty value. Directory buckets - For
+ // directory buckets in a CopyObject operation, only the empty tag-set is
+ // supported. Any requests that attempt to write non-empty tags into directory
+ // buckets will receive a 501 Not Implemented status code. When the destination
+ // bucket is a directory bucket, you will receive a 501 Not Implemented response
+ // in any of the following situations:
+ // - When you attempt to COPY the tag-set from an S3 source object that has
+ // non-empty tags.
+ // - When you attempt to REPLACE the tag-set of a source object and set a
+ // non-empty value to x-amz-tagging .
+ // - When you don't set the x-amz-tagging-directive header and the source object
+ // has non-empty tags. This is because the default value of
+ // x-amz-tagging-directive is COPY .
+ // Because only the empty tag-set is supported for directory buckets in a
+ // CopyObject operation, the following situations are allowed:
+ // - When you attempt to COPY the tag-set from a directory bucket source object
+ // that has no tags to a general purpose bucket. It copies an empty tag-set to the
+ // destination object.
+ // - When you attempt to REPLACE the tag-set of a directory bucket source object
+ // and set the x-amz-tagging value of the directory bucket destination object to
+ // empty.
+ // - When you attempt to REPLACE the tag-set of a general purpose bucket source
+ // object that has non-empty tags and set the x-amz-tagging value of the
+ // directory bucket destination object to empty.
+ // - When you attempt to REPLACE the tag-set of a directory bucket source object
+ // and don't set the x-amz-tagging value of the directory bucket destination
+ // object. This is because the default value of x-amz-tagging is the empty value.
Tagging *string
- // Specifies whether the object tag-set are copied from the source object or
- // replaced with tag-set provided in the request.
+ // Specifies whether the object tag-set is copied from the source object or
+ // replaced with the tag-set that's provided in the request. The default value is
+ // COPY . Directory buckets - For directory buckets in a CopyObject operation,
+ // only the empty tag-set is supported. Any requests that attempt to write
+ // non-empty tags into directory buckets will receive a 501 Not Implemented status
+ // code. When the destination bucket is a directory bucket, you will receive a 501
+ // Not Implemented response in any of the following situations:
+ // - When you attempt to COPY the tag-set from an S3 source object that has
+ // non-empty tags.
+ // - When you attempt to REPLACE the tag-set of a source object and set a
+ // non-empty value to x-amz-tagging .
+ // - When you don't set the x-amz-tagging-directive header and the source object
+ // has non-empty tags. This is because the default value of
+ // x-amz-tagging-directive is COPY .
+ // Because only the empty tag-set is supported for directory buckets in a
+ // CopyObject operation, the following situations are allowed:
+ // - When you attempt to COPY the tag-set from a directory bucket source object
+ // that has no tags to a general purpose bucket. It copies an empty tag-set to the
+ // destination object.
+ // - When you attempt to REPLACE the tag-set of a directory bucket source object
+ // and set the x-amz-tagging value of the directory bucket destination object to
+ // empty.
+ // - When you attempt to REPLACE the tag-set of a general purpose bucket source
+ // object that has non-empty tags and set the x-amz-tagging value of the
+ // directory bucket destination object to empty.
+ // - When you attempt to REPLACE the tag-set of a directory bucket source object
+ // and don't set the x-amz-tagging value of the directory bucket destination
+ // object. This is because the default value of x-amz-tagging is the empty value.
TaggingDirective types.TaggingDirective
- // If the bucket is configured as a website, redirects requests for this object to
- // another object in the same bucket or to an external URL. Amazon S3 stores the
- // value of this header in the object metadata.
+ // If the destination bucket is configured as a website, redirects requests for
+ // this object copy to another object in the same bucket or to an external URL.
+ // Amazon S3 stores the value of this header in the object metadata. This value is
+ // unique to each object and is not copied when using the x-amz-metadata-directive
+ // header. Instead, you may opt to provide this header in combination with the
+ // x-amz-metadata-directive header. This functionality is not supported for
+ // directory buckets.
WebsiteRedirectLocation *string
noSmithyDocumentSerde
}
+func (in *CopyObjectInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.DisableS3ExpressSessionAuth = ptr.Bool(true)
+}
+
type CopyObjectOutput struct {
// Indicates whether the copied object uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // encryption with Key Management Service (KMS) keys (SSE-KMS). This functionality
+ // is not supported for directory buckets.
+ BucketKeyEnabled *bool
// Container for all response elements.
CopyObjectResult *types.CopyObjectResult
- // Version of the copied object in the destination bucket.
+ // Version ID of the source object that was copied. This functionality is not
+ // supported when the source object is in a directory bucket.
CopySourceVersionId *string
- // If the object expiration is configured, the response includes this header.
+ // If the object expiration is configured, the response includes this header. This
+ // functionality is not supported for directory buckets.
Expiration *string
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm used.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to confirm the encryption
+ // algorithm that's used. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to provide the round-trip
+ // message integrity verification of the customer-provided encryption key. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
- // If present, specifies the Amazon Web Services KMS Encryption Context to use for
+ // If present, indicates the Amazon Web Services KMS Encryption Context to use for
// object encryption. The value of this header is a base64-encoded UTF-8 string
- // holding JSON with the encryption context key-value pairs.
+ // holding JSON with the encryption context key-value pairs. This functionality is
+ // not supported for directory buckets.
SSEKMSEncryptionContext *string
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for the
- // object.
+ // If present, indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). For directory buckets, only
+ // server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is
+ // supported.
ServerSideEncryption types.ServerSideEncryption
- // Version ID of the newly created copy.
+ // Version ID of the newly created copy. This functionality is not supported for
+ // directory buckets.
VersionId *string
// Metadata pertaining to the operation's result.
@@ -462,6 +641,9 @@ type CopyObjectOutput struct {
}
func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpCopyObject{}, middleware.After)
if err != nil {
return err
@@ -470,34 +652,38 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CopyObject"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -506,7 +692,10 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpCopyObjectValidationMiddleware(stack); err != nil {
@@ -518,6 +707,9 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addCopyObjectUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -536,20 +728,33 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *CopyObjectInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opCopyObject(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "CopyObject",
}
}
-// getCopyObjectBucketMember returns a pointer to string denoting a provided bucket
-// member valueand a boolean indicating if the input has a modeled bucket name,
+// getCopyObjectBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
func getCopyObjectBucketMember(input interface{}) (*string, bool) {
in := input.(*CopyObjectInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
index 27322a2c..b39244bc 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
@@ -4,133 +4,100 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Creates a new S3 bucket. To create a bucket, you must register with Amazon S3
-// and have a valid Amazon Web Services Access Key ID to authenticate requests.
+// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts
+// bucket, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html)
+// . Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and
+// have a valid Amazon Web Services Access Key ID to authenticate requests.
// Anonymous requests are never allowed to create buckets. By creating the bucket,
-// you become the bucket owner. Not every string is an acceptable bucket name. For
-// information about bucket naming restrictions, see Bucket naming rules
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
-// If you want to create an Amazon S3 on Outposts bucket, see Create Bucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html).
-// By default, the bucket is created in the US East (N. Virginia) Region. You can
-// optionally specify a Region in the request body. You might choose a Region to
-// optimize latency, minimize costs, or address regulatory requirements. For
-// example, if you reside in Europe, you will probably find it advantageous to
-// create buckets in the Europe (Ireland) Region. For more information, see
-// Accessing a bucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
-// If you send your create bucket request to the s3.amazonaws.com endpoint, the
-// request goes to the us-east-1 Region. Accordingly, the signature calculations in
-// Signature Version 4 must use us-east-1 as the Region, even if the location
-// constraint in the request specifies another Region where the bucket is to be
-// created. If you create a bucket in a Region other than US East (N. Virginia),
-// your application must be able to handle 307 redirect. For more information, see
-// Virtual hosting of buckets
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html). Access
-// control lists (ACLs) When creating a bucket using this operation, you can
-// optionally configure the bucket ACL to specify the accounts or groups that
-// should be granted specific permissions on the bucket. If your CreateBucket
-// request sets bucket owner enforced for S3 Object Ownership and specifies a
-// bucket ACL that provides access to an external Amazon Web Services account, your
-// request fails with a 400 error and returns the
-// InvalidBucketAclWithObjectOwnership error code. For more information, see
-// Controlling object ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide. There are two ways to grant the appropriate
-// permissions using the request headers.
+// you become the bucket owner. There are two types of buckets: general purpose
+// buckets and directory buckets. For more information about these bucket types,
+// see Creating, configuring, and working with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)
+// in the Amazon S3 User Guide.
+// - General purpose buckets - If you send your CreateBucket request to the
+// s3.amazonaws.com global endpoint, the request goes to the us-east-1 Region. So
+// the signature calculations in Signature Version 4 must use us-east-1 as the
+// Region, even if the location constraint in the request specifies another Region
+// where the bucket is to be created. If you create a bucket in a Region other than
+// US East (N. Virginia), your application must be able to handle 307 redirect. For
+// more information, see Virtual hosting of buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html)
+// in the Amazon S3 User Guide.
+// - Directory buckets - For directory buckets, you must make requests for this
+// API operation to the Regional endpoint. These endpoints support path-style
+// requests in the format
+// https://s3express-control.region_code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information, see
+// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide.
//
-// * Specify a canned ACL using the
-// x-amz-acl request header. Amazon S3 supports a set of predefined ACLs, known as
-// canned ACLs. Each canned ACL has a predefined set of grantees and permissions.
-// For more information, see Canned ACL
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+// Permissions
+// - General purpose bucket permissions - In addition to the s3:CreateBucket
+// permission, the following permissions are required in a policy when your
+// CreateBucket request includes specific headers:
+// - Access control lists (ACLs) - In your CreateBucket request, if you specify
+// an access control list (ACL) and set it to public-read , public-read-write ,
+// authenticated-read , or if you explicitly specify any other custom ACLs, both
+// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your
+// CreateBucket request, if you set the ACL to private , or if you don't specify
+// any ACLs, only the s3:CreateBucket permission is required.
+// - Object Lock - In your CreateBucket request, if you set
+// x-amz-bucket-object-lock-enabled to true, the
+// s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning permissions are
+// required.
+// - S3 Object Ownership - If your CreateBucket request includes the
+// x-amz-object-ownership header, then the s3:PutBucketOwnershipControls
+// permission is required. To set an ACL on a bucket as part of a CreateBucket
+// request, you must explicitly set S3 Object Ownership for the bucket to a
+// different value than the default, BucketOwnerEnforced . Additionally, if your
+// desired bucket ACL grants public access, you must first create the bucket
+// (without the bucket ACL) and then explicitly disable Block Public Access on the
+// bucket before using PutBucketAcl to set the ACL. If you try to create a bucket
+// with a public ACL, the request will fail. For the majority of modern use cases
+// in S3, we recommend that you keep all Block Public Access settings enabled and
+// keep ACLs disabled. If you would like to share data with users outside of your
+// account, you can use bucket policies as needed. For more information, see
+// Controlling ownership of objects and disabling ACLs for your bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+// and Blocking public access to your Amazon S3 storage (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html)
+// in the Amazon S3 User Guide.
+// - S3 Block Public Access - If your specific use case requires granting public
+// access to your S3 resources, you can disable Block Public Access. Specifically,
+// you can create a new bucket with Block Public Access enabled, then separately
+// call the DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
+// API. To use this operation, you must have the s3:PutBucketPublicAccessBlock
+// permission. For more information about S3 Block Public Access, see Blocking
+// public access to your Amazon S3 storage (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - You must have the s3express:CreateBucket
+// permission in an IAM identity-based policy instead of a bucket policy.
+// Cross-account access to this API operation isn't supported. This operation can
+// only be performed by the Amazon Web Services account that owns the resource. For
+// more information about directory bucket policies and permissions, see Amazon
+// Web Services Identity and Access Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
+// in the Amazon S3 User Guide. The permissions for ACLs, Object Lock, S3 Object
+// Ownership, and S3 Block Public Access are not supported for directory buckets.
+// For directory buckets, all Block Public Access settings are enabled at the
+// bucket level and S3 Object Ownership is set to Bucket owner enforced (ACLs
+// disabled). These settings can't be modified. For more information about
+// permissions for creating and working with directory buckets, see Directory
+// buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html)
+// in the Amazon S3 User Guide. For more information about supported S3 features
+// for directory buckets, see Features of S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features)
+// in the Amazon S3 User Guide.
//
-// *
-// Specify access permissions explicitly using the x-amz-grant-read,
-// x-amz-grant-write, x-amz-grant-read-acp, x-amz-grant-write-acp, and
-// x-amz-grant-full-control headers. These headers map to the set of permissions
-// Amazon S3 supports in an ACL. For more information, see Access control list
-// (ACL) overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html). You
-// specify each grantee as a type=value pair, where the type is one of the
-// following:
-//
-// * id – if the value specified is the canonical user ID of an Amazon
-// Web Services account
-//
-// * uri – if you are granting permissions to a predefined
-// group
-//
-// * emailAddress – if the value specified is the email address of an Amazon
-// Web Services account Using email addresses to specify a grantee is only
-// supported in the following Amazon Web Services Regions:
-//
-// * US East (N.
-// Virginia)
-//
-// * US West (N. California)
-//
-// * US West (Oregon)
-//
-// * Asia Pacific
-// (Singapore)
-//
-// * Asia Pacific (Sydney)
-//
-// * Asia Pacific (Tokyo)
-//
-// * Europe
-// (Ireland)
-//
-// * South America (São Paulo)
-//
-// For a list of all the Amazon S3
-// supported Regions and endpoints, see Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
-// Amazon Web Services General Reference.
-//
-// For example, the following
-// x-amz-grant-read header grants the Amazon Web Services accounts identified by
-// account IDs permissions to read object data and its metadata: x-amz-grant-read:
-// id="11112222333", id="444455556666"
-//
-// You can use either a canned ACL or specify
-// access permissions explicitly. You cannot do both. Permissions In addition to
-// s3:CreateBucket, the following permissions are required when your CreateBucket
-// includes specific headers:
-//
-// * ACLs - If your CreateBucket request specifies ACL
-// permissions and the ACL is public-read, public-read-write, authenticated-read,
-// or if you specify access permissions explicitly through any other ACL, both
-// s3:CreateBucket and s3:PutBucketAcl permissions are needed. If the ACL the
-// CreateBucket request is private or doesn't specify any ACLs, only
-// s3:CreateBucket permission is needed.
-//
-// * Object Lock - If
-// ObjectLockEnabledForBucket is set to true in your CreateBucket request,
-// s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning permissions are
-// required.
-//
-// * S3 Object Ownership - If your CreateBucket request includes the the
-// x-amz-object-ownership header, s3:PutBucketOwnershipControls permission is
-// required.
-//
-// The following operations are related to CreateBucket:
-//
-// * PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// *
-// DeleteBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// s3express-control.region.amazonaws.com . The following operations are related to
+// CreateBucket :
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, optFns ...func(*Options)) (*CreateBucketOutput, error) {
if params == nil {
params = &CreateBucketInput{}
@@ -148,37 +115,52 @@ func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, op
type CreateBucketInput struct {
- // The name of the bucket to create.
+ // The name of the bucket to create. General purpose buckets - For information
+ // about bucket naming restrictions, see Bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html)
+ // in the Amazon S3 User Guide. Directory buckets - When you use this operation
+ // with a directory bucket, you must use path-style requests in the format
+ // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // Virtual-hosted-style requests aren't supported. Directory bucket names must be
+ // unique in the chosen Availability Zone. Bucket names must also follow the format
+ // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide
//
// This member is required.
Bucket *string
- // The canned ACL to apply to the bucket.
+ // The canned ACL to apply to the bucket. This functionality is not supported for
+ // directory buckets.
ACL types.BucketCannedACL
// The configuration information for the bucket.
CreateBucketConfiguration *types.CreateBucketConfiguration
// Allows grantee the read, write, read ACP, and write ACP permissions on the
- // bucket.
+ // bucket. This functionality is not supported for directory buckets.
GrantFullControl *string
- // Allows grantee to list the objects in the bucket.
+ // Allows grantee to list the objects in the bucket. This functionality is not
+ // supported for directory buckets.
GrantRead *string
- // Allows grantee to read the bucket ACL.
+ // Allows grantee to read the bucket ACL. This functionality is not supported for
+ // directory buckets.
GrantReadACP *string
// Allows grantee to create new objects in the bucket. For the bucket and object
// owners of existing objects, also allows deletions and overwrites of those
- // objects.
+ // objects. This functionality is not supported for directory buckets.
GrantWrite *string
- // Allows grantee to write the ACL for the applicable bucket.
+ // Allows grantee to write the ACL for the applicable bucket. This functionality
+ // is not supported for directory buckets.
GrantWriteACP *string
// Specifies whether you want S3 Object Lock to be enabled for the new bucket.
- ObjectLockEnabledForBucket bool
+ // This functionality is not supported for directory buckets.
+ ObjectLockEnabledForBucket *bool
// The container element for object ownership for a bucket's ownership controls.
// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the
@@ -188,14 +170,27 @@ type CreateBucketInput struct {
// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
// affect permissions. The bucket owner automatically owns and has full control
// over every object in the bucket. The bucket only accepts PUT requests that don't
- // specify an ACL or bucket owner full control ACLs, such as the
- // bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed
- // in the XML format.
+ // specify an ACL or specify bucket owner full control ACLs (such as the predefined
+ // bucket-owner-full-control canned ACL or a custom ACL in XML format that grants
+ // the same permissions). By default, ObjectOwnership is set to BucketOwnerEnforced
+ // and ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon
+ // use cases where you must control access for each object individually. For more
+ // information about S3 Object Ownership, see Controlling ownership of objects and
+ // disabling ACLs for your bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets. Directory buckets use the bucket owner enforced setting for S3 Object
+ // Ownership.
ObjectOwnership types.ObjectOwnership
noSmithyDocumentSerde
}
+func (in *CreateBucketInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+ p.DisableAccessPoints = ptr.Bool(true)
+}
+
type CreateBucketOutput struct {
// A forward slash followed by the name of the bucket.
@@ -208,6 +203,9 @@ type CreateBucketOutput struct {
}
func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpCreateBucket{}, middleware.After)
if err != nil {
return err
@@ -216,34 +214,38 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateBucket"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -252,7 +254,10 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpCreateBucketValidationMiddleware(stack); err != nil {
@@ -264,6 +269,9 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addCreateBucketUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -279,14 +287,26 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *CreateBucketInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opCreateBucket(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "CreateBucket",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
index 825feebd..c083c32d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -16,223 +17,135 @@ import (
// This action initiates a multipart upload and returns an upload ID. This upload
// ID is used to associate all of the parts in the specific multipart upload. You
// specify this upload ID in each of your subsequent upload part requests (see
-// UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). You also
-// include this upload ID in the final request to either complete or abort the
-// multipart upload request. For more information about multipart uploads, see
-// Multipart Upload Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html). If you have
-// configured a lifecycle rule to abort incomplete multipart uploads, the upload
-// must complete within the number of days specified in the bucket lifecycle
+// UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// ). You also include this upload ID in the final request to either complete or
+// abort the multipart upload request. For more information about multipart
+// uploads, see Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
+// in the Amazon S3 User Guide. After you initiate a multipart upload and upload
+// one or more parts, to stop being charged for storing the uploaded parts, you
+// must either complete or abort the multipart upload. Amazon S3 frees up the space
+// used to store the parts and stops charging you for storing them only after you
+// either complete or abort a multipart upload. If you have configured a lifecycle
+// rule to abort incomplete multipart uploads, the created multipart upload must be
+// completed within the number of days specified in the bucket lifecycle
// configuration. Otherwise, the incomplete multipart upload becomes eligible for
// an abort action and Amazon S3 aborts the multipart upload. For more information,
-// see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
-// For information about the permissions required to use the multipart upload API,
-// see Multipart Upload and Permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). For
-// request signing, multipart upload is just a series of regular requests. You
-// initiate a multipart upload, send one or more requests to upload parts, and then
-// complete the multipart upload process. You sign each request individually. There
-// is nothing special about signing multipart upload requests. For more information
-// about signing, see Authenticating Requests (Amazon Web Services Signature
-// Version 4)
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
-// After you initiate a multipart upload and upload one or more parts, to stop
-// being charged for storing the uploaded parts, you must either complete or abort
-// the multipart upload. Amazon S3 frees up the space used to store the parts and
-// stop charging you for storing them only after you either complete or abort a
-// multipart upload. You can optionally request server-side encryption. For
-// server-side encryption, Amazon S3 encrypts your data as it writes it to disks in
-// its data centers and decrypts it when you access it. You can provide your own
-// encryption key, or use Amazon Web Services KMS keys or Amazon S3-managed
-// encryption keys. If you choose to provide your own encryption key, the request
-// headers you provide in UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) and
-// UploadPartCopy
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
-// requests must match the headers you used in the request to initiate the upload
-// by using CreateMultipartUpload. To perform a multipart upload with encryption
-// using an Amazon Web Services KMS key, the requester must have permission to the
-// kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are
-// required because Amazon S3 must decrypt and read data from the encrypted file
-// parts before it completes the multipart upload. For more information, see
-// Multipart upload API and permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
-// in the Amazon S3 User Guide. If your Identity and Access Management (IAM) user
-// or role is in the same Amazon Web Services account as the KMS key, then you must
-// have these permissions on the key policy. If your IAM user or role belongs to a
-// different account than the key, then you must have the permissions on both the
-// key policy and your IAM user or role. For more information, see Protecting Data
-// Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
-// Access Permissions When copying an object, you can optionally specify the
-// accounts or groups that should be granted specific permissions on the new
-// object. There are two ways to grant the permissions using the request
-// headers:
-//
-// * Specify a canned ACL with the x-amz-acl request header. For more
-// information, see Canned ACL
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// *
-// Specify access permissions explicitly with the x-amz-grant-read,
-// x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
-// headers. These parameters map to the set of permissions that Amazon S3 supports
-// in an ACL. For more information, see Access Control List (ACL) Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
-//
-// You can
-// use either a canned ACL or specify access permissions explicitly. You cannot do
-// both. Server-Side- Encryption-Specific Request Headers You can optionally tell
-// Amazon S3 to encrypt data at rest using server-side encryption. Server-side
-// encryption is for data encryption at rest. Amazon S3 encrypts your data as it
-// writes it to disks in its data centers and decrypts it when you access it. The
-// option you use depends on whether you want to use Amazon Web Services managed
-// encryption keys or provide your own encryption key.
-//
-// * Use encryption keys
-// managed by Amazon S3 or customer managed key stored in Amazon Web Services Key
-// Management Service (Amazon Web Services KMS) – If you want Amazon Web Services
-// to manage the keys used to encrypt data, specify the following headers in the
-// request.
-//
-// * x-amz-server-side-encryption
-//
-// *
-// x-amz-server-side-encryption-aws-kms-key-id
-//
-// *
-// x-amz-server-side-encryption-context
-//
-// If you specify
-// x-amz-server-side-encryption:aws:kms, but don't provide
-// x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web
-// Services managed key in Amazon Web Services KMS to protect the data. All GET and
-// PUT requests for an object protected by Amazon Web Services KMS fail if you
-// don't make them with SSL or by using SigV4. For more information about
-// server-side encryption with KMS key (SSE-KMS), see Protecting Data Using
-// Server-Side Encryption with KMS keys
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
-//
-// *
-// Use customer-provided encryption keys – If you want to manage your own
-// encryption keys, provide all the following headers in the request.
-//
-// *
-// x-amz-server-side-encryption-customer-algorithm
-//
-// *
-// x-amz-server-side-encryption-customer-key
-//
-// *
-// x-amz-server-side-encryption-customer-key-MD5
-//
-// For more information about
-// server-side encryption with KMS keys (SSE-KMS), see Protecting Data Using
-// Server-Side Encryption with KMS keys
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
-//
-// Access-Control-List
-// (ACL)-Specific Request Headers You also can use the following access
-// control–related headers with this operation. By default, all objects are
-// private. Only the owner has full access control. When adding a new object, you
-// can grant permissions to individual Amazon Web Services accounts or to
-// predefined groups defined by Amazon S3. These permissions are then added to the
-// access control list (ACL) on the object. For more information, see Using ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). With
-// this operation, you can grant access permissions using one of the following two
-// methods:
-//
-// * Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of
-// predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of
-// grantees and permissions. For more information, see Canned ACL
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// *
-// Specify access permissions explicitly — To explicitly grant access permissions
-// to specific Amazon Web Services accounts or groups, use the following headers.
-// Each header maps to specific permissions that Amazon S3 supports in an ACL. For
-// more information, see Access Control List (ACL) Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). In the
-// header, you specify a list of grantees who get the specific permission. To grant
-// permissions explicitly, use:
-//
-// * x-amz-grant-read
-//
-// * x-amz-grant-write
-//
-// *
-// x-amz-grant-read-acp
-//
-// * x-amz-grant-write-acp
-//
-// * x-amz-grant-full-control
-//
-// You
-// specify each grantee as a type=value pair, where the type is one of the
-// following:
-//
-// * id – if the value specified is the canonical user ID of an Amazon
-// Web Services account
-//
-// * uri – if you are granting permissions to a predefined
-// group
-//
-// * emailAddress – if the value specified is the email address of an Amazon
-// Web Services account Using email addresses to specify a grantee is only
-// supported in the following Amazon Web Services Regions:
-//
-// * US East (N.
-// Virginia)
-//
-// * US West (N. California)
-//
-// * US West (Oregon)
-//
-// * Asia Pacific
-// (Singapore)
-//
-// * Asia Pacific (Sydney)
-//
-// * Asia Pacific (Tokyo)
-//
-// * Europe
-// (Ireland)
-//
-// * South America (São Paulo)
-//
-// For a list of all the Amazon S3
-// supported Regions and endpoints, see Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
-// Amazon Web Services General Reference.
-//
-// For example, the following
-// x-amz-grant-read header grants the Amazon Web Services accounts identified by
-// account IDs permissions to read object data and its metadata: x-amz-grant-read:
-// id="11112222333", id="444455556666"
-//
-// The following operations are related to
-// CreateMultipartUpload:
-//
-// * UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// *
-// CompleteMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// *
-// AbortMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// *
-// ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// *
-// ListMultipartUploads
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+// see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
+// .
+// - Directory buckets - S3 Lifecycle is not supported by directory buckets.
+// - Directory buckets - For directory buckets, you must make requests for this
+// API operation to the Zonal endpoint. These endpoints support
+// virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information, see Regional and
+// Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide.
+//
+// Request signing For request signing, multipart upload is just a series of
+// regular requests. You initiate a multipart upload, send one or more requests to
+// upload parts, and then complete the multipart upload process. You sign each
+// request individually. There is nothing special about signing multipart upload
+// requests. For more information about signing, see Authenticating Requests
+// (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - For information about the permissions
+// required to use the multipart upload API, see Multipart upload and permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon S3 User Guide. To perform a multipart upload with encryption by
+// using an Amazon Web Services KMS key, the requester must have permission to the
+// kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are
+// required because Amazon S3 must decrypt and read data from the encrypted file
+// parts before it completes the multipart upload. For more information, see
+// Multipart upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
+// and Protecting data using server-side encryption with Amazon Web Services KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
+//
+// Encryption
+// - General purpose buckets - Server-side encryption is for data encryption at
+// rest. Amazon S3 encrypts your data as it writes it to disks in its data centers
+// and decrypts it when you access it. Amazon S3 automatically encrypts all new
+// objects that are uploaded to an S3 bucket. When doing a multipart upload, if you
+// don't specify encryption information in your request, the encryption setting of
+// the uploaded parts is set to the default encryption configuration of the
+// destination bucket. By default, all buckets have a base level of encryption
+// configuration that uses server-side encryption with Amazon S3 managed keys
+// (SSE-S3). If the destination bucket has a default encryption configuration that
+// uses server-side encryption with an Key Management Service (KMS) key (SSE-KMS),
+// or a customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding
+// KMS key, or a customer-provided key to encrypt the uploaded parts. When you
+// perform a CreateMultipartUpload operation, if you want to use a different type
+// of encryption setting for the uploaded parts, you can request that Amazon S3
+// encrypts the object with a different encryption key (such as an Amazon S3
+// managed key, a KMS key, or a customer-provided key). When the encryption setting
+// in your request is different from the default encryption configuration of the
+// destination bucket, the encryption setting in your request takes precedence. If
+// you choose to provide your own encryption key, the request headers you provide
+// in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
+// requests must match the headers you used in the CreateMultipartUpload request.
+// - Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key (
+// aws/s3 ) and KMS customer managed keys stored in Key Management Service (KMS)
+// – If you want Amazon Web Services to manage the keys used to encrypt data,
+// specify the following headers in the request.
+// - x-amz-server-side-encryption
+// - x-amz-server-side-encryption-aws-kms-key-id
+// - x-amz-server-side-encryption-context
+// - If you specify x-amz-server-side-encryption:aws:kms , but don't provide
+// x-amz-server-side-encryption-aws-kms-key-id , Amazon S3 uses the Amazon Web
+// Services managed key ( aws/s3 key) in KMS to protect the data.
+// - To perform a multipart upload with encryption by using an Amazon Web
+// Services KMS key, the requester must have permission to the kms:Decrypt and
+// kms:GenerateDataKey* actions on the key. These permissions are required
+// because Amazon S3 must decrypt and read data from the encrypted file parts
+// before it completes the multipart upload. For more information, see Multipart
+// upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
+// and Protecting data using server-side encryption with Amazon Web Services KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
+// in the Amazon S3 User Guide.
+// - If your Identity and Access Management (IAM) user or role is in the same
+// Amazon Web Services account as the KMS key, then you must have these permissions
+// on the key policy. If your IAM user or role is in a different account from the
+// key, then you must have the permissions on both the key policy and your IAM user
+// or role.
+// - All GET and PUT requests for an object protected by KMS fail if you don't
+// make them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS),
+// or Signature Version 4. For information about configuring any of the officially
+// supported Amazon Web Services SDKs and Amazon Web Services CLI, see
+// Specifying the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
+// in the Amazon S3 User Guide. For more information about server-side
+// encryption with KMS keys (SSE-KMS), see Protecting Data Using Server-Side
+// Encryption with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
+// in the Amazon S3 User Guide.
+// - Use customer-provided encryption keys (SSE-C) – If you want to manage your
+// own encryption keys, provide all the following headers in the request.
+// - x-amz-server-side-encryption-customer-algorithm
+// - x-amz-server-side-encryption-customer-key
+// - x-amz-server-side-encryption-customer-key-MD5 For more information about
+// server-side encryption with customer-provided encryption keys (SSE-C), see
+// Protecting data using server-side encryption with customer-provided encryption
+// keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html)
+// in the Amazon S3 User Guide.
+// - Directory buckets -For directory buckets, only server-side encryption with
+// Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
+//
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to CreateMultipartUpload :
+// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultipartUploadInput, optFns ...func(*Options)) (*CreateMultipartUploadOutput, error) {
if params == nil {
params = &CreateMultipartUploadInput{}
@@ -250,23 +163,31 @@ func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultip
type CreateMultipartUploadInput struct {
- // The name of the bucket to which to initiate the upload When using this action
- // with an access point, you must direct requests to the access point hostname. The
- // access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The name of the bucket where the multipart upload is initiated and where the
+ // object is uploaded. Directory buckets - When you use this operation with a
+ // directory bucket, you must use virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -276,23 +197,33 @@ type CreateMultipartUploadInput struct {
// This member is required.
Key *string
- // The canned ACL to apply to the object. This action is not supported by Amazon S3
- // on Outposts.
+ // The canned ACL to apply to the object. Amazon S3 supports a set of predefined
+ // ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and
+ // permissions. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL)
+ // in the Amazon S3 User Guide. By default, all objects are private. Only the owner
+ // has full access control. When uploading an object, you can grant access
+ // permissions to individual Amazon Web Services accounts or to predefined groups
+ // defined by Amazon S3. These permissions are then added to the access control
+ // list (ACL) on the new object. For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
+ // . One way to grant the permissions using the request headers is to specify a
+ // canned ACL with the x-amz-acl request header.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
ACL types.ObjectCannedACL
// Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header to true
- // causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
- // Specifying this header with an object action doesn’t affect bucket-level
- // settings for S3 Bucket Key.
- BucketKeyEnabled bool
+ // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS).
+ // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object
+ // encryption with SSE-KMS. Specifying this header with an object action doesn’t
+ // affect bucket-level settings for S3 Bucket Key. This functionality is not
+ // supported for directory buckets.
+ BucketKeyEnabled *bool
// Specifies caching behavior along the request/reply chain.
CacheControl *string
- // Indicates the algorithm you want Amazon S3 to use to create the checksum for the
- // object. For more information, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm that you want Amazon S3 to use to create the checksum
+ // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -301,155 +232,265 @@ type CreateMultipartUploadInput struct {
// Specifies what content encodings have been applied to the object and thus what
// decoding mechanisms must be applied to obtain the media-type referenced by the
- // Content-Type header field.
+ // Content-Type header field. For directory buckets, only the aws-chunked value is
+ // supported in this header field.
ContentEncoding *string
- // The language the content is in.
+ // The language that the content is in.
ContentLanguage *string
// A standard MIME type describing the format of the object data.
ContentType *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// The date and time at which the object is no longer cacheable.
Expires *time.Time
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
- // action is not supported by Amazon S3 on Outposts.
+ // Specify access permissions explicitly to give the grantee READ, READ_ACP, and
+ // WRITE_ACP permissions on the object. By default, all objects are private. Only
+ // the owner has full access control. When uploading an object, you can use this
+ // header to explicitly grant access permissions to specific Amazon Web Services
+ // accounts or groups. This header maps to specific permissions that Amazon S3
+ // supports in an ACL. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+ // in the Amazon S3 User Guide. You specify each grantee as a type=value pair,
+ // where the type is one of the following:
+ // - id – if the value specified is the canonical user ID of an Amazon Web
+ // Services account
+ // - uri – if you are granting permissions to a predefined group
+ // - emailAddress – if the value specified is the email address of an Amazon Web
+ // Services account Using email addresses to specify a grantee is only supported in
+ // the following Amazon Web Services Regions:
+ // - US East (N. Virginia)
+ // - US West (N. California)
+ // - US West (Oregon)
+ // - Asia Pacific (Singapore)
+ // - Asia Pacific (Sydney)
+ // - Asia Pacific (Tokyo)
+ // - Europe (Ireland)
+ // - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+ // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+ // in the Amazon Web Services General Reference.
+ // For example, the following x-amz-grant-read header grants the Amazon Web
+ // Services accounts identified by account IDs permissions to read object data and
+ // its metadata: x-amz-grant-read: id="11112222333", id="444455556666"
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantFullControl *string
- // Allows grantee to read the object data and its metadata. This action is not
- // supported by Amazon S3 on Outposts.
+ // Specify access permissions explicitly to allow grantee to read the object data
+ // and its metadata. By default, all objects are private. Only the owner has full
+ // access control. When uploading an object, you can use this header to explicitly
+ // grant access permissions to specific Amazon Web Services accounts or groups.
+ // This header maps to specific permissions that Amazon S3 supports in an ACL. For
+ // more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+ // in the Amazon S3 User Guide. You specify each grantee as a type=value pair,
+ // where the type is one of the following:
+ // - id – if the value specified is the canonical user ID of an Amazon Web
+ // Services account
+ // - uri – if you are granting permissions to a predefined group
+ // - emailAddress – if the value specified is the email address of an Amazon Web
+ // Services account Using email addresses to specify a grantee is only supported in
+ // the following Amazon Web Services Regions:
+ // - US East (N. Virginia)
+ // - US West (N. California)
+ // - US West (Oregon)
+ // - Asia Pacific (Singapore)
+ // - Asia Pacific (Sydney)
+ // - Asia Pacific (Tokyo)
+ // - Europe (Ireland)
+ // - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+ // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+ // in the Amazon Web Services General Reference.
+ // For example, the following x-amz-grant-read header grants the Amazon Web
+ // Services accounts identified by account IDs permissions to read object data and
+ // its metadata: x-amz-grant-read: id="11112222333", id="444455556666"
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantRead *string
- // Allows grantee to read the object ACL. This action is not supported by Amazon S3
- // on Outposts.
+ // Specify access permissions explicitly to allows grantee to read the object ACL.
+ // By default, all objects are private. Only the owner has full access control.
+ // When uploading an object, you can use this header to explicitly grant access
+ // permissions to specific Amazon Web Services accounts or groups. This header maps
+ // to specific permissions that Amazon S3 supports in an ACL. For more information,
+ // see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+ // in the Amazon S3 User Guide. You specify each grantee as a type=value pair,
+ // where the type is one of the following:
+ // - id – if the value specified is the canonical user ID of an Amazon Web
+ // Services account
+ // - uri – if you are granting permissions to a predefined group
+ // - emailAddress – if the value specified is the email address of an Amazon Web
+ // Services account Using email addresses to specify a grantee is only supported in
+ // the following Amazon Web Services Regions:
+ // - US East (N. Virginia)
+ // - US West (N. California)
+ // - US West (Oregon)
+ // - Asia Pacific (Singapore)
+ // - Asia Pacific (Sydney)
+ // - Asia Pacific (Tokyo)
+ // - Europe (Ireland)
+ // - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+ // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+ // in the Amazon Web Services General Reference.
+ // For example, the following x-amz-grant-read header grants the Amazon Web
+ // Services accounts identified by account IDs permissions to read object data and
+ // its metadata: x-amz-grant-read: id="11112222333", id="444455556666"
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantReadACP *string
- // Allows grantee to write the ACL for the applicable object. This action is not
- // supported by Amazon S3 on Outposts.
+ // Specify access permissions explicitly to allows grantee to allow grantee to
+ // write the ACL for the applicable object. By default, all objects are private.
+ // Only the owner has full access control. When uploading an object, you can use
+ // this header to explicitly grant access permissions to specific Amazon Web
+ // Services accounts or groups. This header maps to specific permissions that
+ // Amazon S3 supports in an ACL. For more information, see Access Control List
+ // (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+ // in the Amazon S3 User Guide. You specify each grantee as a type=value pair,
+ // where the type is one of the following:
+ // - id – if the value specified is the canonical user ID of an Amazon Web
+ // Services account
+ // - uri – if you are granting permissions to a predefined group
+ // - emailAddress – if the value specified is the email address of an Amazon Web
+ // Services account Using email addresses to specify a grantee is only supported in
+ // the following Amazon Web Services Regions:
+ // - US East (N. Virginia)
+ // - US West (N. California)
+ // - US West (Oregon)
+ // - Asia Pacific (Singapore)
+ // - Asia Pacific (Sydney)
+ // - Asia Pacific (Tokyo)
+ // - Europe (Ireland)
+ // - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+ // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+ // in the Amazon Web Services General Reference.
+ // For example, the following x-amz-grant-read header grants the Amazon Web
+ // Services accounts identified by account IDs permissions to read object data and
+ // its metadata: x-amz-grant-read: id="11112222333", id="444455556666"
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantWriteACP *string
// A map of metadata to store with the object in S3.
Metadata map[string]string
- // Specifies whether you want to apply a legal hold to the uploaded object.
+ // Specifies whether you want to apply a legal hold to the uploaded object. This
+ // functionality is not supported for directory buckets.
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
// Specifies the Object Lock mode that you want to apply to the uploaded object.
+ // This functionality is not supported for directory buckets.
ObjectLockMode types.ObjectLockMode
- // Specifies the date and time when you want the Object Lock to expire.
+ // Specifies the date and time when you want the Object Lock to expire. This
+ // functionality is not supported for directory buckets.
ObjectLockRetainUntilDate *time.Time
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
+ // Specifies the algorithm to use when encrypting the object (for example,
+ // AES256). This functionality is not supported for directory buckets.
SSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use in
// encrypting data. This value is used to store the object and then it is
// discarded; Amazon S3 does not store the encryption key. The key must be
// appropriate for use with the algorithm specified in the
- // x-amz-server-side-encryption-customer-algorithm header.
+ // x-amz-server-side-encryption-customer-algorithm header. This functionality is
+ // not supported for directory buckets.
SSECustomerKey *string
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // Specifies the 128-bit MD5 digest of the customer-provided encryption key
+ // according to RFC 1321. Amazon S3 uses this header for a message integrity check
+ // to ensure that the encryption key was transmitted without error. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
// Specifies the Amazon Web Services KMS Encryption Context to use for object
// encryption. The value of this header is a base64-encoded UTF-8 string holding
- // JSON with the encryption context key-value pairs.
+ // JSON with the encryption context key-value pairs. This functionality is not
+ // supported for directory buckets.
SSEKMSEncryptionContext *string
- // Specifies the ID of the symmetric customer managed key to use for object
- // encryption. All GET and PUT requests for an object protected by Amazon Web
- // Services KMS will fail if not made via SSL or using SigV4. For information about
- // configuring using any of the officially supported Amazon Web Services SDKs and
- // Amazon Web Services CLI, see Specifying the Signature Version in Request
- // Authentication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
- // in the Amazon S3 User Guide.
+ // Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption
+ // customer managed key to use for object encryption. This functionality is not
+ // supported for directory buckets.
SSEKMSKeyId *string
- // The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms ). For directory buckets, only server-side
+ // encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
ServerSideEncryption types.ServerSideEncryption
// By default, Amazon S3 uses the STANDARD Storage Class to store newly created
// objects. The STANDARD storage class provides high durability and high
// availability. Depending on performance needs, you can specify a different
- // Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
- // more information, see Storage Classes
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
- // the Amazon S3 User Guide.
+ // Storage Class. For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+ // in the Amazon S3 User Guide.
+ // - For directory buckets, only the S3 Express One Zone storage class is
+ // supported to store newly created objects.
+ // - Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
StorageClass types.StorageClass
- // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
+ // The tag-set for the object. The tag-set must be encoded as URL Query
+ // parameters. This functionality is not supported for directory buckets.
Tagging *string
// If the bucket is configured as a website, redirects requests for this object to
// another object in the same bucket or to an external URL. Amazon S3 stores the
- // value of this header in the object metadata.
+ // value of this header in the object metadata. This functionality is not supported
+ // for directory buckets.
WebsiteRedirectLocation *string
noSmithyDocumentSerde
}
+func (in *CreateMultipartUploadInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type CreateMultipartUploadOutput struct {
- // If the bucket has a lifecycle rule configured with an action to abort incomplete
- // multipart uploads and the prefix in the lifecycle rule matches the object name
- // in the request, the response includes this header. The header indicates when the
- // initiated multipart upload becomes eligible for an abort operation. For more
- // information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle
- // Policy
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
- // The response also includes the x-amz-abort-rule-id header that provides the ID
- // of the lifecycle configuration rule that defines this action.
+ // If the bucket has a lifecycle rule configured with an action to abort
+ // incomplete multipart uploads and the prefix in the lifecycle rule matches the
+ // object name in the request, the response includes this header. The header
+ // indicates when the initiated multipart upload becomes eligible for an abort
+ // operation. For more information, see Aborting Incomplete Multipart Uploads
+ // Using a Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
+ // in the Amazon S3 User Guide. The response also includes the x-amz-abort-rule-id
+ // header that provides the ID of the lifecycle configuration rule that defines the
+ // abort action. This functionality is not supported for directory buckets.
AbortDate *time.Time
// This header is returned along with the x-amz-abort-date header. It identifies
// the applicable lifecycle configuration rule that defines the action to abort
- // incomplete multipart uploads.
+ // incomplete multipart uploads. This functionality is not supported for directory
+ // buckets.
AbortRuleId *string
// The name of the bucket to which the multipart upload was initiated. Does not
- // return the access point ARN or access point alias if used. When using this
- // action with an access point, you must direct requests to the access point
- // hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // return the access point ARN or access point alias if used. Access points are not
+ // supported by directory buckets.
Bucket *string
// Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // encryption with Key Management Service (KMS) keys (SSE-KMS). This functionality
+ // is not supported for directory buckets.
+ BucketKeyEnabled *bool
// The algorithm that was used to create a checksum of the object.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -458,30 +499,35 @@ type CreateMultipartUploadOutput struct {
Key *string
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm used.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to confirm the encryption
+ // algorithm that's used. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to provide the round-trip
+ // message integrity verification of the customer-provided encryption key. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
- // If present, specifies the Amazon Web Services KMS Encryption Context to use for
+ // If present, indicates the Amazon Web Services KMS Encryption Context to use for
// object encryption. The value of this header is a base64-encoded UTF-8 string
- // holding JSON with the encryption context key-value pairs.
+ // holding JSON with the encryption context key-value pairs. This functionality is
+ // not supported for directory buckets.
SSEKMSEncryptionContext *string
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for the
- // object.
+ // If present, indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms ). For directory buckets, only server-side
+ // encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
ServerSideEncryption types.ServerSideEncryption
// ID for the initiated multipart upload.
@@ -494,6 +540,9 @@ type CreateMultipartUploadOutput struct {
}
func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpCreateMultipartUpload{}, middleware.After)
if err != nil {
return err
@@ -502,34 +551,38 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMultipartUpload"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -538,7 +591,10 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpCreateMultipartUploadValidationMiddleware(stack); err != nil {
@@ -550,6 +606,9 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addCreateMultipartUploadUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -565,14 +624,29 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSetCreateMPUChecksumAlgorithm(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *CreateMultipartUploadInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opCreateMultipartUpload(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "CreateMultipartUpload",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go
new file mode 100644
index 00000000..e2d5a007
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go
@@ -0,0 +1,260 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a session that establishes temporary security credentials to support
+// fast authentication and authorization for the Zonal endpoint APIs on directory
+// buckets. For more information about Zonal endpoint APIs that include the
+// Availability Zone in the request endpoint, see S3 Express One Zone APIs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-APIs.html)
+// in the Amazon S3 User Guide. To make Zonal endpoint API requests on a directory
+// bucket, use the CreateSession API operation. Specifically, you grant
+// s3express:CreateSession permission to a bucket in a bucket policy or an IAM
+// identity-based policy. Then, you use IAM credentials to make the CreateSession
+// API request on the bucket, which returns temporary security credentials that
+// include the access key ID, secret access key, session token, and expiration.
+// These credentials have associated permissions to access the Zonal endpoint APIs.
+// After the session is created, you don’t need to use other policies to grant
+// permissions to each Zonal endpoint API individually. Instead, in your Zonal
+// endpoint API requests, you sign your requests by applying the temporary security
+// credentials of the session to the request headers and following the SigV4
+// protocol for authentication. You also apply the session token to the
+// x-amz-s3session-token request header for authorization. Temporary security
+// credentials are scoped to the bucket and expire after 5 minutes. After the
+// expiration time, any calls that you make with those credentials will fail. You
+// must use IAM credentials again to make a CreateSession API request that
+// generates a new set of temporary credentials for use. Temporary credentials
+// cannot be extended or refreshed beyond the original specified interval. If you
+// use Amazon Web Services SDKs, SDKs handle the session token refreshes
+// automatically to avoid service interruptions when a session expires. We
+// recommend that you use the Amazon Web Services SDKs to initiate and manage
+// requests to the CreateSession API. For more information, see Performance
+// guidelines and design patterns (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-optimizing-performance-guidelines-design-patterns.html#s3-express-optimizing-performance-session-authentication)
+// in the Amazon S3 User Guide.
+// - You must make requests for this API operation to the Zonal endpoint. These
+// endpoints support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests
+// are not supported. For more information, see Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide.
+// - CopyObject API operation - Unlike other Zonal endpoint APIs, the CopyObject
+// API operation doesn't use the temporary security credentials returned from the
+// CreateSession API operation for authentication and authorization. For
+// information about authentication and authorization of the CopyObject API
+// operation on directory buckets, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
+// .
+// - HeadBucket API operation - Unlike other Zonal endpoint APIs, the HeadBucket
+// API operation doesn't use the temporary security credentials returned from the
+// CreateSession API operation for authentication and authorization. For
+// information about authentication and authorization of the HeadBucket API
+// operation on directory buckets, see HeadBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html)
+// .
+//
+// Permissions To obtain temporary security credentials, you must create a bucket
+// policy or an IAM identity-based policy that grants s3express:CreateSession
+// permission to the bucket. In a policy, you can have the s3express:SessionMode
+// condition key to control who can create a ReadWrite or ReadOnly session. For
+// more information about ReadWrite or ReadOnly sessions, see
+// x-amz-create-session-mode (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters)
+// . For example policies, see Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
+// and Amazon Web Services Identity and Access Management (IAM) identity-based
+// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html)
+// in the Amazon S3 User Guide. To grant cross-account access to Zonal endpoint
+// APIs, the bucket policy should also grant both accounts the
+// s3express:CreateSession permission. HTTP Host header syntax Directory buckets -
+// The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com .
+func (c *Client) CreateSession(ctx context.Context, params *CreateSessionInput, optFns ...func(*Options)) (*CreateSessionOutput, error) {
+ if params == nil {
+ params = &CreateSessionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateSession", params, optFns, c.addOperationCreateSessionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateSessionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateSessionInput struct {
+
+ // The name of the bucket that you create a session for.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Specifies the mode of the session that will be created, either ReadWrite or
+ // ReadOnly . By default, a ReadWrite session is created. A ReadWrite session is
+ // capable of executing all the Zonal endpoint APIs on a directory bucket. A
+ // ReadOnly session is constrained to execute the following Zonal endpoint APIs:
+ // GetObject , HeadObject , ListObjectsV2 , GetObjectAttributes , ListParts , and
+ // ListMultipartUploads .
+ SessionMode types.SessionMode
+
+ noSmithyDocumentSerde
+}
+
+func (in *CreateSessionInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.DisableS3ExpressSessionAuth = ptr.Bool(true)
+}
+
+type CreateSessionOutput struct {
+
+ // The established temporary security credentials for the created session..
+ //
+ // This member is required.
+ Credentials *types.SessionCredentials
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestxml_serializeOpCreateSession{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateSession{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSession"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpCreateSessionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSession(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addCreateSessionUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (v *CreateSessionInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
+func newServiceMetadataMiddleware_opCreateSession(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateSession",
+ }
+}
+
+// getCreateSessionBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getCreateSessionBucketMember(input interface{}) (*string, bool) {
+ in := input.(*CreateSessionInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addCreateSessionUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getCreateSessionBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
index 44823c6a..30e1381b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
@@ -4,23 +4,44 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes the S3 bucket. All objects (including all object versions and delete
// markers) in the bucket must be deleted before the bucket itself can be deleted.
-// Related Resources
+// - Directory buckets - If multipart uploads in a directory bucket are in
+// progress, you can't delete the bucket until all the in-progress multipart
+// uploads are aborted or completed.
+// - Directory buckets - For directory buckets, you must make requests for this
+// API operation to the Regional endpoint. These endpoints support path-style
+// requests in the format
+// https://s3express-control.region_code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information, see
+// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide.
//
-// * CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// Permissions
+// - General purpose bucket permissions - You must have the s3:DeleteBucket
+// permission on the specified bucket in a policy.
+// - Directory bucket permissions - You must have the s3express:DeleteBucket
+// permission in an IAM identity-based policy instead of a bucket policy.
+// Cross-account access to this API operation isn't supported. This operation can
+// only be performed by the Amazon Web Services account that owns the resource. For
+// more information about directory bucket policies and permissions, see Amazon
+// Web Services Identity and Access Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
+// in the Amazon S3 User Guide.
//
-// *
-// DeleteObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// s3express-control.region.amazonaws.com . The following operations are related to
+// DeleteBucket :
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, optFns ...func(*Options)) (*DeleteBucketOutput, error) {
if params == nil {
params = &DeleteBucketInput{}
@@ -38,19 +59,34 @@ func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, op
type DeleteBucketInput struct {
- // Specifies the bucket being deleted.
+ // Specifies the bucket being deleted. Directory buckets - When you use this
+ // operation with a directory bucket, you must use path-style requests in the
+ // format https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // Virtual-hosted-style requests aren't supported. Directory bucket names must be
+ // unique in the chosen Availability Zone. Bucket names must also follow the format
+ // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied). For directory buckets, this header
+ // is not supported in this API operation. If you specify this header, the request
+ // fails with the HTTP status code 501 Not Implemented .
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -59,6 +95,9 @@ type DeleteBucketOutput struct {
}
func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucket{}, middleware.After)
if err != nil {
return err
@@ -67,34 +106,38 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucket"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -103,7 +146,10 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketValidationMiddleware(stack); err != nil {
@@ -115,6 +161,9 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -130,14 +179,26 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucket(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucket",
}
}
@@ -167,3 +228,34 @@ func addDeleteBucketUpdateEndpoint(stack *middleware.Stack, options Options) err
DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
})
}
+
+// PresignDeleteBucket is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignDeleteBucket(ctx context.Context, params *DeleteBucketInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &DeleteBucketInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "DeleteBucket", params, clientOptFns,
+ c.client.addOperationDeleteBucketMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ addDeleteBucketPayloadAsUnsigned,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
+
+func addDeleteBucketPayloadAsUnsigned(stack *middleware.Stack, options Options) error {
+ v4.RemoveContentSHA256HeaderMiddleware(stack)
+ v4.RemoveComputePayloadSHA256Middleware(stack)
+ return v4.AddUnsignedPayloadMiddleware(stack)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
index e016d976..0033825a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
@@ -4,38 +4,29 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes an analytics configuration for the bucket (specified by the analytics
-// configuration ID). To use this operation, you must have permissions to perform
-// the s3:PutAnalyticsConfiguration action. The bucket owner has this permission by
+// This operation is not supported by directory buckets. Deletes an analytics
+// configuration for the bucket (specified by the analytics configuration ID). To
+// use this operation, you must have permissions to perform the
+// s3:PutAnalyticsConfiguration action. The bucket owner has this permission by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about the Amazon S3 analytics feature, see Amazon S3 Analytics –
-// Storage Class Analysis
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
-// The following operations are related to DeleteBucketAnalyticsConfiguration:
-//
-// *
-// GetBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// *
-// ListBucketAnalyticsConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// *
-// PutBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about the Amazon S3 analytics feature, see Amazon S3
+// Analytics – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
+// . The following operations are related to DeleteBucketAnalyticsConfiguration :
+// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
+// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
+// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
func (c *Client) DeleteBucketAnalyticsConfiguration(ctx context.Context, params *DeleteBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*DeleteBucketAnalyticsConfigurationOutput, error) {
if params == nil {
params = &DeleteBucketAnalyticsConfigurationInput{}
@@ -63,14 +54,19 @@ type DeleteBucketAnalyticsConfigurationInput struct {
// This member is required.
Id *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketAnalyticsConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -79,6 +75,9 @@ type DeleteBucketAnalyticsConfigurationOutput struct {
}
func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration{}, middleware.After)
if err != nil {
return err
@@ -87,34 +86,38 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketAnalyticsConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -123,7 +126,10 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
@@ -135,6 +141,9 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -150,14 +159,26 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketAnalyticsConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketAnalyticsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketAnalyticsConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
index 79045abe..d465826f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
@@ -4,26 +4,23 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the cors configuration information set for the bucket. To use this
-// operation, you must have permission to perform the s3:PutBucketCORS action. The
-// bucket owner has this permission by default and can grant this permission to
-// others. For information about cors, see Enabling Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3
-// User Guide. Related Resources:
-//
-// * PutBucketCors
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-//
-// *
-// RESTOPTIONSobject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
+// This operation is not supported by directory buckets. Deletes the cors
+// configuration information set for the bucket. To use this operation, you must
+// have permission to perform the s3:PutBucketCORS action. The bucket owner has
+// this permission by default and can grant this permission to others. For
+// information about cors , see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
+// in the Amazon S3 User Guide. Related Resources
+// - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
+// - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
func (c *Client) DeleteBucketCors(ctx context.Context, params *DeleteBucketCorsInput, optFns ...func(*Options)) (*DeleteBucketCorsOutput, error) {
if params == nil {
params = &DeleteBucketCorsInput{}
@@ -46,14 +43,19 @@ type DeleteBucketCorsInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketCorsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketCorsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -62,6 +64,9 @@ type DeleteBucketCorsOutput struct {
}
func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketCors{}, middleware.After)
if err != nil {
return err
@@ -70,34 +75,38 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketCors"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -106,7 +115,10 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketCorsValidationMiddleware(stack); err != nil {
@@ -118,6 +130,9 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketCorsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -133,14 +148,26 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketCorsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketCors(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketCors",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
index 9c3201f6..7be8c475 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
@@ -4,33 +4,29 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This implementation of the DELETE action removes default encryption from the
-// bucket. For information about the Amazon S3 default encryption feature, see
-// Amazon S3 Default Bucket Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) in the
-// Amazon S3 User Guide. To use this operation, you must have permissions to
+// This operation is not supported by directory buckets. This implementation of
+// the DELETE action resets the default encryption for the bucket as server-side
+// encryption with Amazon S3 managed keys (SSE-S3). For information about the
+// bucket default encryption feature, see Amazon S3 Bucket Default Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
+// in the Amazon S3 User Guide. To use this operation, you must have permissions to
// perform the s3:PutEncryptionConfiguration action. The bucket owner has this
// permission by default. The bucket owner can grant this permission to others. For
// more information about permissions, see Permissions Related to Bucket
-// Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide. Related Resources
-//
-// * PutBucketEncryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
-//
-// *
-// GetBucketEncryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
+// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide. The following operations are related to
+// DeleteBucketEncryption :
+// - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
+// - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
func (c *Client) DeleteBucketEncryption(ctx context.Context, params *DeleteBucketEncryptionInput, optFns ...func(*Options)) (*DeleteBucketEncryptionOutput, error) {
if params == nil {
params = &DeleteBucketEncryptionInput{}
@@ -54,14 +50,19 @@ type DeleteBucketEncryptionInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketEncryptionOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -70,6 +71,9 @@ type DeleteBucketEncryptionOutput struct {
}
func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketEncryption{}, middleware.After)
if err != nil {
return err
@@ -78,34 +82,38 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketEncryption"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -114,7 +122,10 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketEncryptionValidationMiddleware(stack); err != nil {
@@ -126,6 +137,9 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketEncryptionUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -141,14 +155,26 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketEncryptionInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketEncryption(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketEncryption",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
index 139dd78a..734d23b0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
@@ -4,15 +4,18 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the S3 Intelligent-Tiering configuration from the specified bucket. The
-// S3 Intelligent-Tiering storage class is designed to optimize storage costs by
+// This operation is not supported by directory buckets. Deletes the S3
+// Intelligent-Tiering configuration from the specified bucket. The S3
+// Intelligent-Tiering storage class is designed to optimize storage costs by
// automatically moving data to the most cost-effective storage access tier,
// without performance impact or operational overhead. S3 Intelligent-Tiering
// delivers automatic cost savings in three low latency and high throughput access
@@ -24,21 +27,11 @@ import (
// monitored and not eligible for auto-tiering. Smaller objects can be stored, but
// they are always charged at the Frequent Access tier rates in the S3
// Intelligent-Tiering storage class. For more information, see Storage class for
-// automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-// Operations related to DeleteBucketIntelligentTieringConfiguration include:
-//
-// *
-// GetBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// *
-// PutBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// *
-// ListBucketIntelligentTieringConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
+// automatically optimizing frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
+// . Operations related to DeleteBucketIntelligentTieringConfiguration include:
+// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
+// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
+// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
func (c *Client) DeleteBucketIntelligentTieringConfiguration(ctx context.Context, params *DeleteBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
if params == nil {
params = &DeleteBucketIntelligentTieringConfigurationInput{}
@@ -70,6 +63,11 @@ type DeleteBucketIntelligentTieringConfigurationInput struct {
noSmithyDocumentSerde
}
+func (in *DeleteBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketIntelligentTieringConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -78,6 +76,9 @@ type DeleteBucketIntelligentTieringConfigurationOutput struct {
}
func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration{}, middleware.After)
if err != nil {
return err
@@ -86,34 +87,38 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketIntelligentTieringConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -122,7 +127,10 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
@@ -134,6 +142,9 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -149,14 +160,26 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketIntelligentTieringConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketIntelligentTieringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketIntelligentTieringConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
index 32fe81f1..3b8d81a4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
@@ -4,37 +4,27 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes an inventory configuration (identified by the inventory ID) from the
-// bucket. To use this operation, you must have permissions to perform the
-// s3:PutInventoryConfiguration action. The bucket owner has this permission by
-// default. The bucket owner can grant this permission to others. For more
-// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
-// Operations related to DeleteBucketInventoryConfiguration include:
-//
-// *
-// GetBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// *
-// PutBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
-//
-// *
-// ListBucketInventoryConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
+// This operation is not supported by directory buckets. Deletes an inventory
+// configuration (identified by the inventory ID) from the bucket. To use this
+// operation, you must have permissions to perform the s3:PutInventoryConfiguration
+// action. The bucket owner has this permission by default. The bucket owner can
+// grant this permission to others. For more information about permissions, see
+// Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about the Amazon S3 inventory feature, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
+// . Operations related to DeleteBucketInventoryConfiguration include:
+// - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
+// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
+// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
func (c *Client) DeleteBucketInventoryConfiguration(ctx context.Context, params *DeleteBucketInventoryConfigurationInput, optFns ...func(*Options)) (*DeleteBucketInventoryConfigurationOutput, error) {
if params == nil {
params = &DeleteBucketInventoryConfigurationInput{}
@@ -62,14 +52,19 @@ type DeleteBucketInventoryConfigurationInput struct {
// This member is required.
Id *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketInventoryConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -78,6 +73,9 @@ type DeleteBucketInventoryConfigurationOutput struct {
}
func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketInventoryConfiguration{}, middleware.After)
if err != nil {
return err
@@ -86,34 +84,38 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketInventoryConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -122,7 +124,10 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
@@ -134,6 +139,9 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -149,14 +157,26 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketInventoryConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketInventoryConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketInventoryConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
index c110bfb4..88928b28 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
@@ -4,32 +4,29 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes
-// all the lifecycle configuration rules in the lifecycle subresource associated
-// with the bucket. Your objects never expire, and Amazon S3 no longer
-// automatically deletes any objects on the basis of rules contained in the deleted
-// lifecycle configuration. To use this operation, you must have permission to
-// perform the s3:PutLifecycleConfiguration action. By default, the bucket owner
-// has this permission and the bucket owner can grant this permission to others.
-// There is usually some time lag before lifecycle configuration deletion is fully
+// This operation is not supported by directory buckets. Deletes the lifecycle
+// configuration from the specified bucket. Amazon S3 removes all the lifecycle
+// configuration rules in the lifecycle subresource associated with the bucket.
+// Your objects never expire, and Amazon S3 no longer automatically deletes any
+// objects on the basis of rules contained in the deleted lifecycle configuration.
+// To use this operation, you must have permission to perform the
+// s3:PutLifecycleConfiguration action. By default, the bucket owner has this
+// permission and the bucket owner can grant this permission to others. There is
+// usually some time lag before lifecycle configuration deletion is fully
// propagated to all the Amazon S3 systems. For more information about the object
-// expiration, see Elements to Describe Lifecycle Actions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions).
-// Related actions include:
-//
-// * PutBucketLifecycleConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-//
-// *
-// GetBucketLifecycleConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
+// expiration, see Elements to Describe Lifecycle Actions (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions)
+// . Related actions include:
+// - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
func (c *Client) DeleteBucketLifecycle(ctx context.Context, params *DeleteBucketLifecycleInput, optFns ...func(*Options)) (*DeleteBucketLifecycleOutput, error) {
if params == nil {
params = &DeleteBucketLifecycleInput{}
@@ -52,14 +49,19 @@ type DeleteBucketLifecycleInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketLifecycleInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketLifecycleOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -68,6 +70,9 @@ type DeleteBucketLifecycleOutput struct {
}
func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketLifecycle{}, middleware.After)
if err != nil {
return err
@@ -76,34 +81,38 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketLifecycle"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -112,7 +121,10 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketLifecycleValidationMiddleware(stack); err != nil {
@@ -124,6 +136,9 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketLifecycleUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -139,14 +154,26 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketLifecycleInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketLifecycle(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketLifecycle",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
index cc08f04b..21384351 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
@@ -4,43 +4,31 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes a metrics configuration for the Amazon CloudWatch request metrics
-// (specified by the metrics configuration ID) from the bucket. Note that this
-// doesn't include the daily storage metrics. To use this operation, you must have
-// permissions to perform the s3:PutMetricsConfiguration action. The bucket owner
-// has this permission by default. The bucket owner can grant this permission to
-// others. For more information about permissions, see Permissions Related to
-// Bucket Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about CloudWatch request metrics for Amazon S3, see Monitoring
-// Metrics with Amazon CloudWatch
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-// The following operations are related to DeleteBucketMetricsConfiguration:
-//
-// *
-// GetBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// *
-// PutBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// *
-// ListBucketMetricsConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// *
-// Monitoring Metrics with Amazon CloudWatch
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+// This operation is not supported by directory buckets. Deletes a metrics
+// configuration for the Amazon CloudWatch request metrics (specified by the
+// metrics configuration ID) from the bucket. Note that this doesn't include the
+// daily storage metrics. To use this operation, you must have permissions to
+// perform the s3:PutMetricsConfiguration action. The bucket owner has this
+// permission by default. The bucket owner can grant this permission to others. For
+// more information about permissions, see Permissions Related to Bucket
+// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about CloudWatch request metrics for Amazon S3, see
+// Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+// . The following operations are related to DeleteBucketMetricsConfiguration :
+// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
+// - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
+// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
+// - Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
func (c *Client) DeleteBucketMetricsConfiguration(ctx context.Context, params *DeleteBucketMetricsConfigurationInput, optFns ...func(*Options)) (*DeleteBucketMetricsConfigurationOutput, error) {
if params == nil {
params = &DeleteBucketMetricsConfigurationInput{}
@@ -63,19 +51,25 @@ type DeleteBucketMetricsConfigurationInput struct {
// This member is required.
Bucket *string
- // The ID used to identify the metrics configuration.
+ // The ID used to identify the metrics configuration. The ID has a 64 character
+ // limit and can only contain letters, numbers, periods, dashes, and underscores.
//
// This member is required.
Id *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketMetricsConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -84,6 +78,9 @@ type DeleteBucketMetricsConfigurationOutput struct {
}
func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketMetricsConfiguration{}, middleware.After)
if err != nil {
return err
@@ -92,34 +89,38 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketMetricsConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -128,7 +129,10 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
@@ -140,6 +144,9 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -155,14 +162,26 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketMetricsConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketMetricsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketMetricsConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
index 6186db5e..4beac6b0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
@@ -4,25 +4,23 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you
-// must have the s3:PutBucketOwnershipControls permission. For more information
-// about Amazon S3 permissions, see Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-// For information about Amazon S3 Object Ownership, see Using Object Ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
-// The following operations are related to DeleteBucketOwnershipControls:
-//
-// *
-// GetBucketOwnershipControls
-//
-// * PutBucketOwnershipControls
+// This operation is not supported by directory buckets. Removes OwnershipControls
+// for an Amazon S3 bucket. To use this operation, you must have the
+// s3:PutBucketOwnershipControls permission. For more information about Amazon S3
+// permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// . For information about Amazon S3 Object Ownership, see Using Object Ownership (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html)
+// . The following operations are related to DeleteBucketOwnershipControls :
+// - GetBucketOwnershipControls
+// - PutBucketOwnershipControls
func (c *Client) DeleteBucketOwnershipControls(ctx context.Context, params *DeleteBucketOwnershipControlsInput, optFns ...func(*Options)) (*DeleteBucketOwnershipControlsOutput, error) {
if params == nil {
params = &DeleteBucketOwnershipControlsInput{}
@@ -45,14 +43,19 @@ type DeleteBucketOwnershipControlsInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketOwnershipControlsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -61,6 +64,9 @@ type DeleteBucketOwnershipControlsOutput struct {
}
func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketOwnershipControls{}, middleware.After)
if err != nil {
return err
@@ -69,34 +75,38 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketOwnershipControls"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -105,7 +115,10 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketOwnershipControlsValidationMiddleware(stack); err != nil {
@@ -117,6 +130,9 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketOwnershipControlsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -132,14 +148,26 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketOwnershipControlsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketOwnershipControls(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketOwnershipControls",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
index 618d9bed..b8e1f56a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
@@ -4,35 +4,53 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This implementation of the DELETE action uses the policy subresource to delete
-// the policy of a specified bucket. If you are using an identity other than the
-// root user of the Amazon Web Services account that owns the bucket, the calling
-// identity must have the DeleteBucketPolicy permissions on the specified bucket
-// and belong to the bucket owner's account to use this operation. If you don't
-// have DeleteBucketPolicy permissions, Amazon S3 returns a 403 Access Denied
-// error. If you have the correct permissions, but you're not using an identity
-// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not
-// Allowed error. As a security precaution, the root user of the Amazon Web
-// Services account that owns a bucket can always use this operation, even if the
-// policy explicitly denies the root user the ability to perform this action. For
-// more information about bucket policies, see Using Bucket Policies and
-// UserPolicies
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). The
-// following operations are related to DeleteBucketPolicy
+// Deletes the policy of a specified bucket. Directory buckets - For directory
+// buckets, you must make requests for this API operation to the Regional endpoint.
+// These endpoints support path-style requests in the format
+// https://s3express-control.region_code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information, see
+// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions If you are using an identity other than
+// the root user of the Amazon Web Services account that owns the bucket, the
+// calling identity must both have the DeleteBucketPolicy permissions on the
+// specified bucket and belong to the bucket owner's account in order to use this
+// operation. If you don't have DeleteBucketPolicy permissions, Amazon S3 returns
+// a 403 Access Denied error. If you have the correct permissions, but you're not
+// using an identity that belongs to the bucket owner's account, Amazon S3 returns
+// a 405 Method Not Allowed error. To ensure that bucket owners don't
+// inadvertently lock themselves out of their own buckets, the root principal in a
+// bucket owner's Amazon Web Services account can perform the GetBucketPolicy ,
+// PutBucketPolicy , and DeleteBucketPolicy API actions, even if their bucket
+// policy explicitly denies the root principal's access. Bucket owner root
+// principals can only be blocked from performing these API actions by VPC endpoint
+// policies and Amazon Web Services Organizations policies.
+// - General purpose bucket permissions - The s3:DeleteBucketPolicy permission is
+// required in a policy. For more information about general purpose buckets bucket
+// policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation, you
+// must have the s3express:DeleteBucketPolicy permission in an IAM identity-based
+// policy instead of a bucket policy. Cross-account access to this API operation
+// isn't supported. This operation can only be performed by the Amazon Web Services
+// account that owns the resource. For more information about directory bucket
+// policies and permissions, see Amazon Web Services Identity and Access
+// Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
+// in the Amazon S3 User Guide.
//
-// * CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// DeleteObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// s3express-control.region.amazonaws.com . The following operations are related to
+// DeleteBucketPolicy
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPolicyInput, optFns ...func(*Options)) (*DeleteBucketPolicyOutput, error) {
if params == nil {
params = &DeleteBucketPolicyInput{}
@@ -50,19 +68,34 @@ func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPol
type DeleteBucketPolicyInput struct {
- // The bucket name.
+ // The bucket name. Directory buckets - When you use this operation with a
+ // directory bucket, you must use path-style requests in the format
+ // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // Virtual-hosted-style requests aren't supported. Directory bucket names must be
+ // unique in the chosen Availability Zone. Bucket names must also follow the format
+ // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied). For directory buckets, this header
+ // is not supported in this API operation. If you specify this header, the request
+ // fails with the HTTP status code 501 Not Implemented .
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketPolicyInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketPolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -71,6 +104,9 @@ type DeleteBucketPolicyOutput struct {
}
func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketPolicy{}, middleware.After)
if err != nil {
return err
@@ -79,34 +115,38 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketPolicy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -115,7 +155,10 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketPolicyValidationMiddleware(stack); err != nil {
@@ -127,6 +170,9 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketPolicyUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -142,14 +188,26 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketPolicyInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketPolicy",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
index ad2d772d..9fdc6bcf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
@@ -4,33 +4,27 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the replication configuration from the bucket. To use this operation,
-// you must have permissions to perform the s3:PutReplicationConfiguration action.
-// The bucket owner has these permissions by default and can grant it to others.
-// For more information about permissions, see Permissions Related to Bucket
-// Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// It can take a while for the deletion of a replication configuration to fully
-// propagate. For information about replication configuration, see Replication
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon
-// S3 User Guide. The following operations are related to
-// DeleteBucketReplication:
-//
-// * PutBucketReplication
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
-//
-// *
-// GetBucketReplication
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
+// This operation is not supported by directory buckets. Deletes the replication
+// configuration from the bucket. To use this operation, you must have permissions
+// to perform the s3:PutReplicationConfiguration action. The bucket owner has
+// these permissions by default and can grant it to others. For more information
+// about permissions, see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . It can take a while for the deletion of a replication configuration to fully
+// propagate. For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
+// in the Amazon S3 User Guide. The following operations are related to
+// DeleteBucketReplication :
+// - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
+// - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
func (c *Client) DeleteBucketReplication(ctx context.Context, params *DeleteBucketReplicationInput, optFns ...func(*Options)) (*DeleteBucketReplicationOutput, error) {
if params == nil {
params = &DeleteBucketReplicationInput{}
@@ -53,14 +47,19 @@ type DeleteBucketReplicationInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketReplicationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketReplicationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -69,6 +68,9 @@ type DeleteBucketReplicationOutput struct {
}
func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketReplication{}, middleware.After)
if err != nil {
return err
@@ -77,34 +79,38 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketReplication"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -113,7 +119,10 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketReplicationValidationMiddleware(stack); err != nil {
@@ -125,6 +134,9 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketReplicationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -140,14 +152,26 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketReplicationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketReplication(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketReplication",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
index 063f0bc5..ae737d40 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
@@ -4,24 +4,22 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the tags from the bucket. To use this operation, you must have
-// permission to perform the s3:PutBucketTagging action. By default, the bucket
-// owner has this permission and can grant this permission to others. The following
-// operations are related to DeleteBucketTagging:
-//
-// * GetBucketTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
-//
-// *
-// PutBucketTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
+// This operation is not supported by directory buckets. Deletes the tags from the
+// bucket. To use this operation, you must have permission to perform the
+// s3:PutBucketTagging action. By default, the bucket owner has this permission and
+// can grant this permission to others. The following operations are related to
+// DeleteBucketTagging :
+// - GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
+// - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
func (c *Client) DeleteBucketTagging(ctx context.Context, params *DeleteBucketTaggingInput, optFns ...func(*Options)) (*DeleteBucketTaggingOutput, error) {
if params == nil {
params = &DeleteBucketTaggingInput{}
@@ -44,14 +42,19 @@ type DeleteBucketTaggingInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketTaggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketTaggingOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -60,6 +63,9 @@ type DeleteBucketTaggingOutput struct {
}
func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketTagging{}, middleware.After)
if err != nil {
return err
@@ -68,34 +74,38 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketTagging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -104,7 +114,10 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketTaggingValidationMiddleware(stack); err != nil {
@@ -116,6 +129,9 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketTaggingUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -131,14 +147,26 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketTaggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketTagging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketTagging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
index 7eb72b86..425936df 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
@@ -4,33 +4,29 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This action removes the website configuration for a bucket. Amazon S3 returns a
-// 200 OK response upon successfully deleting a website configuration on the
-// specified bucket. You will get a 200 OK response if the website configuration
-// you are trying to delete does not exist on the bucket. Amazon S3 returns a 404
-// response if the bucket specified in the request does not exist. This DELETE
-// action requires the S3:DeleteBucketWebsite permission. By default, only the
-// bucket owner can delete the website configuration attached to a bucket. However,
-// bucket owners can grant other users permission to delete the website
-// configuration by writing a bucket policy granting them the
-// S3:DeleteBucketWebsite permission. For more information about hosting websites,
-// see Hosting Websites on Amazon S3
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). The
-// following operations are related to DeleteBucketWebsite:
-//
-// * GetBucketWebsite
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
-//
-// *
-// PutBucketWebsite
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
+// This operation is not supported by directory buckets. This action removes the
+// website configuration for a bucket. Amazon S3 returns a 200 OK response upon
+// successfully deleting a website configuration on the specified bucket. You will
+// get a 200 OK response if the website configuration you are trying to delete
+// does not exist on the bucket. Amazon S3 returns a 404 response if the bucket
+// specified in the request does not exist. This DELETE action requires the
+// S3:DeleteBucketWebsite permission. By default, only the bucket owner can delete
+// the website configuration attached to a bucket. However, bucket owners can grant
+// other users permission to delete the website configuration by writing a bucket
+// policy granting them the S3:DeleteBucketWebsite permission. For more
+// information about hosting websites, see Hosting Websites on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
+// . The following operations are related to DeleteBucketWebsite :
+// - GetBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
+// - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
func (c *Client) DeleteBucketWebsite(ctx context.Context, params *DeleteBucketWebsiteInput, optFns ...func(*Options)) (*DeleteBucketWebsiteOutput, error) {
if params == nil {
params = &DeleteBucketWebsiteInput{}
@@ -53,14 +49,19 @@ type DeleteBucketWebsiteInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeleteBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeleteBucketWebsiteOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -69,6 +70,9 @@ type DeleteBucketWebsiteOutput struct {
}
func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketWebsite{}, middleware.After)
if err != nil {
return err
@@ -77,34 +81,38 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketWebsite"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -113,7 +121,10 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteBucketWebsiteValidationMiddleware(stack); err != nil {
@@ -125,6 +136,9 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteBucketWebsiteUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -140,14 +154,26 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteBucketWebsiteInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteBucketWebsite(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteBucketWebsite",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
index 82e6687f..c1e5ff73 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,30 +13,83 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Removes the null version (if there is one) of an object and inserts a delete
-// marker, which becomes the latest version of the object. If there isn't a null
-// version, Amazon S3 does not remove any objects but will still respond that the
-// command was successful. To remove a specific version, you must be the bucket
-// owner and you must use the version Id subresource. Using this subresource
-// permanently deletes the version. If the object deleted is a delete marker,
-// Amazon S3 sets the response header, x-amz-delete-marker, to true. If the object
-// you want to delete is in a bucket where the bucket versioning configuration is
-// MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE
-// versionId request. Requests that include x-amz-mfa must use HTTPS. For more
-// information about MFA Delete, see Using MFA Delete
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html). To see
-// sample requests that use versioning, see Sample Request
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete).
-// You can delete objects by explicitly calling DELETE Object or configure its
-// lifecycle (PutBucketLifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html))
-// to enable Amazon S3 to remove them for you. If you want to block users or
+// Removes an object from a bucket. The behavior depends on the bucket's
+// versioning state:
+//
+// - If bucket versioning is not enabled, the operation permanently deletes the
+// object.
+//
+// - If bucket versioning is enabled, the operation inserts a delete marker,
+// which becomes the current version of the object. To permanently delete an object
+// in a versioned bucket, you must include the object’s versionId in the request.
+// For more information about versioning-enabled buckets, see Deleting object
+// versions from a versioning-enabled bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html)
+// .
+//
+// - If bucket versioning is suspended, the operation removes the object that
+// has a null versionId , if there is one, and inserts a delete marker that
+// becomes the current version of the object. If there isn't an object with a null
+// versionId , and all versions of the object have a versionId , Amazon S3 does
+// not remove the object and only inserts a delete marker. To permanently delete an
+// object that has a versionId , you must include the object’s versionId in the
+// request. For more information about versioning-suspended buckets, see
+// Deleting objects from versioning-suspended buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html)
+// .
+//
+// - Directory buckets - S3 Versioning isn't enabled and supported for directory
+// buckets. For this API operation, only the null value of the version ID is
+// supported by directory buckets. You can only specify null to the versionId
+// query parameter in the request.
+//
+// - Directory buckets - For directory buckets, you must make requests for this
+// API operation to the Zonal endpoint. These endpoints support
+// virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information, see Regional and
+// Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide.
+//
+// To remove a specific version, you must use the versionId query parameter. Using
+// this query parameter permanently deletes the version. If the object deleted is a
+// delete marker, Amazon S3 sets the response header x-amz-delete-marker to true.
+// If the object you want to delete is in a bucket where the bucket versioning
+// configuration is MFA Delete enabled, you must include the x-amz-mfa request
+// header in the DELETE versionId request. Requests that include x-amz-mfa must
+// use HTTPS. For more information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html)
+// in the Amazon S3 User Guide. To see sample requests that use versioning, see
+// Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete)
+// . Directory buckets - MFA delete is not supported by directory buckets. You can
+// delete objects by explicitly calling DELETE Object or calling (
+// PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
+// ) to enable Amazon S3 to remove them for you. If you want to block users or
// accounts from removing or deleting objects from your bucket, you must deny them
-// the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration
-// actions. The following action is related to DeleteObject:
+// the s3:DeleteObject , s3:DeleteObjectVersion , and s3:PutLifeCycleConfiguration
+// actions. Directory buckets - S3 Lifecycle is not supported by directory buckets.
+// Permissions
+// - General purpose bucket permissions - The following permissions are required
+// in your policies when your DeleteObjects request includes specific headers.
+// - s3:DeleteObject - To delete an object from a bucket, you must always have
+// the s3:DeleteObject permission.
+// - s3:DeleteObjectVersion - To delete a specific version of an object from a
+// versioning-enabled bucket, you must have the s3:DeleteObjectVersion
+// permission.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// * PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following action is
+// related to DeleteObject :
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*Options)) (*DeleteObjectOutput, error) {
if params == nil {
params = &DeleteObjectInput{}
@@ -53,23 +107,31 @@ func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, op
type DeleteObjectInput struct {
- // The bucket name of the bucket containing the object. When using this action with
- // an access point, you must direct requests to the access point hostname. The
- // access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The bucket name of the bucket containing the object. Directory buckets - When
+ // you use this operation with a directory bucket, you must use
+ // virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -81,45 +143,60 @@ type DeleteObjectInput struct {
// Indicates whether S3 Object Lock should bypass Governance-mode restrictions to
// process this operation. To use this header, you must have the
- // s3:BypassGovernanceRetention permission.
- BypassGovernanceRetention bool
+ // s3:BypassGovernanceRetention permission. This functionality is not supported for
+ // directory buckets.
+ BypassGovernanceRetention *bool
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
- // The concatenation of the authentication device's serial number, a space, and the
- // value that is displayed on your authentication device. Required to permanently
- // delete a versioned object if versioning is configured with MFA delete enabled.
+ // The concatenation of the authentication device's serial number, a space, and
+ // the value that is displayed on your authentication device. Required to
+ // permanently delete a versioned object if versioning is configured with MFA
+ // delete enabled. This functionality is not supported for directory buckets.
MFA *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // VersionId used to reference a specific version of the object.
+ // Version ID used to reference a specific version of the object. For directory
+ // buckets in this API operation, only the null value of the version ID is
+ // supported.
VersionId *string
noSmithyDocumentSerde
}
+func (in *DeleteObjectInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type DeleteObjectOutput struct {
- // Specifies whether the versioned object that was permanently deleted was (true)
- // or was not (false) a delete marker.
- DeleteMarker bool
+ // Indicates whether the specified object version that was permanently deleted was
+ // (true) or was not (false) a delete marker before deletion. In a simple DELETE,
+ // this header indicates whether (true) or not (false) the current version of the
+ // object is a delete marker. This functionality is not supported for directory
+ // buckets.
+ DeleteMarker *bool
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Returns the version ID of the delete marker created as a result of the DELETE
- // operation.
+ // operation. This functionality is not supported for directory buckets.
VersionId *string
// Metadata pertaining to the operation's result.
@@ -129,6 +206,9 @@ type DeleteObjectOutput struct {
}
func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteObject{}, middleware.After)
if err != nil {
return err
@@ -137,34 +217,38 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteObject"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -173,7 +257,10 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteObjectValidationMiddleware(stack); err != nil {
@@ -185,6 +272,9 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteObjectUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -200,14 +290,26 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteObjectInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteObject(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteObject",
}
}
@@ -237,3 +339,34 @@ func addDeleteObjectUpdateEndpoint(stack *middleware.Stack, options Options) err
DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
})
}
+
+// PresignDeleteObject is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignDeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &DeleteObjectInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "DeleteObject", params, clientOptFns,
+ c.client.addOperationDeleteObjectMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ addDeleteObjectPayloadAsUnsigned,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
+
+func addDeleteObjectPayloadAsUnsigned(stack *middleware.Stack, options Options) error {
+ v4.RemoveContentSHA256HeaderMiddleware(stack)
+ v4.RemoveComputePayloadSHA256Middleware(stack)
+ return v4.AddUnsignedPayloadMiddleware(stack)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
index 0d1bb739..c5f31dec 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -11,21 +12,16 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Removes the entire tag set from the specified object. For more information about
-// managing object tags, see Object Tagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). To use
-// this operation, you must have permission to perform the s3:DeleteObjectTagging
-// action. To delete tags of a specific object version, add the versionId query
-// parameter in the request. You will need permission for the
+// This operation is not supported by directory buckets. Removes the entire tag
+// set from the specified object. For more information about managing object tags,
+// see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html)
+// . To use this operation, you must have permission to perform the
+// s3:DeleteObjectTagging action. To delete tags of a specific object version, add
+// the versionId query parameter in the request. You will need permission for the
// s3:DeleteObjectVersionTagging action. The following operations are related to
-// DeleteBucketMetricsConfiguration:
-//
-// * PutObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
-//
-// *
-// GetObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
+// DeleteObjectTagging :
+// - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
+// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTaggingInput, optFns ...func(*Options)) (*DeleteObjectTaggingOutput, error) {
if params == nil {
params = &DeleteObjectTaggingInput{}
@@ -43,23 +39,23 @@ func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTa
type DeleteObjectTaggingInput struct {
- // The bucket name containing the objects from which to remove the tags. When using
- // this action with an access point, you must direct requests to the access point
- // hostname. The access point hostname takes the form
+ // The bucket name containing the objects from which to remove the tags. Access
+ // points - When you use this action with an access point, you must provide the
+ // alias of the access point in place of the bucket name or specify the access
+ // point ARN. When using the access point ARN, you must direct requests to the
+ // access point hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. S3 on Outposts - When you use this action with
+ // Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname.
+ // The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -69,9 +65,9 @@ type DeleteObjectTaggingInput struct {
// This member is required.
Key *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// The versionId of the object that the tag-set will be removed from.
@@ -80,6 +76,11 @@ type DeleteObjectTaggingInput struct {
noSmithyDocumentSerde
}
+func (in *DeleteObjectTaggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type DeleteObjectTaggingOutput struct {
// The versionId of the object the tag-set was removed from.
@@ -92,6 +93,9 @@ type DeleteObjectTaggingOutput struct {
}
func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteObjectTagging{}, middleware.After)
if err != nil {
return err
@@ -100,34 +104,38 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteObjectTagging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -136,7 +144,10 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteObjectTaggingValidationMiddleware(stack); err != nil {
@@ -148,6 +159,9 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteObjectTaggingUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -163,14 +177,26 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteObjectTaggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteObjectTagging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteObjectTagging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
index 50078da5..05f82cf7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -13,51 +14,77 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This action enables you to delete multiple objects from a bucket using a single
-// HTTP request. If you know the object keys that you want to delete, then this
-// action provides a suitable alternative to sending individual delete requests,
-// reducing per-request overhead. The request contains a list of up to 1000 keys
-// that you want to delete. In the XML, you provide the object key names, and
-// optionally, version IDs if you want to delete a specific version of the object
-// from a versioning-enabled bucket. For each key, Amazon S3 performs a delete
-// action and returns the result of that delete, success, or failure, in the
-// response. Note that if the object specified in the request is not found, Amazon
-// S3 returns the result as deleted. The action supports two modes for the
-// response: verbose and quiet. By default, the action uses verbose mode in which
-// the response includes the result of deletion of each key in your request. In
-// quiet mode the response includes only keys where the delete action encountered
-// an error. For a successful deletion, the action does not return any information
-// about the delete in the response body. When performing this action on an MFA
-// Delete enabled bucket, that attempts to delete any versioned objects, you must
-// include an MFA token. If you do not provide one, the entire request will fail,
-// even if there are non-versioned objects you are trying to delete. If you provide
-// an invalid token, whether there are versioned keys in the request or not, the
-// entire Multi-Object Delete request will fail. For information about MFA Delete,
-// see MFA Delete
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete).
-// Finally, the Content-MD5 header is required for all Multi-Object Delete
-// requests. Amazon S3 uses the header value to ensure that your request body has
-// not been altered in transit. The following operations are related to
-// DeleteObjects:
+// This operation enables you to delete multiple objects from a bucket using a
+// single HTTP request. If you know the object keys that you want to delete, then
+// this operation provides a suitable alternative to sending individual delete
+// requests, reducing per-request overhead. The request can contain a list of up to
+// 1000 keys that you want to delete. In the XML, you provide the object key names,
+// and optionally, version IDs if you want to delete a specific version of the
+// object from a versioning-enabled bucket. For each key, Amazon S3 performs a
+// delete operation and returns the result of that delete, success or failure, in
+// the response. Note that if the object specified in the request is not found,
+// Amazon S3 returns the result as deleted.
+// - Directory buckets - S3 Versioning isn't enabled and supported for directory
+// buckets.
+// - Directory buckets - For directory buckets, you must make requests for this
+// API operation to the Zonal endpoint. These endpoints support
+// virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information, see Regional and
+// Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide.
//
-// * CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// The operation supports two modes for the response: verbose and quiet. By
+// default, the operation uses verbose mode in which the response includes the
+// result of deletion of each key in your request. In quiet mode the response
+// includes only keys where the delete operation encountered an error. For a
+// successful deletion in a quiet mode, the operation does not return any
+// information about the delete in the response body. When performing this action
+// on an MFA Delete enabled bucket, that attempts to delete any versioned objects,
+// you must include an MFA token. If you do not provide one, the entire request
+// will fail, even if there are non-versioned objects you are trying to delete. If
+// you provide an invalid token, whether there are versioned keys in the request or
+// not, the entire Multi-Object Delete request will fail. For information about MFA
+// Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete)
+// in the Amazon S3 User Guide. Directory buckets - MFA delete is not supported by
+// directory buckets. Permissions
+// - General purpose bucket permissions - The following permissions are required
+// in your policies when your DeleteObjects request includes specific headers.
+// - s3:DeleteObject - To delete an object from a bucket, you must always specify
+// the s3:DeleteObject permission.
+// - s3:DeleteObjectVersion - To delete a specific version of an object from a
+// versiong-enabled bucket, you must specify the s3:DeleteObjectVersion
+// permission.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// *
-// UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// Content-MD5 request header
+// - General purpose bucket - The Content-MD5 request header is required for all
+// Multi-Object Delete requests. Amazon S3 uses the header value to ensure that
+// your request body has not been altered in transit.
+// - Directory bucket - The Content-MD5 request header or a additional checksum
+// request header (including x-amz-checksum-crc32 , x-amz-checksum-crc32c ,
+// x-amz-checksum-sha1 , or x-amz-checksum-sha256 ) is required for all
+// Multi-Object Delete requests.
//
-// *
-// CompleteMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// *
-// ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// *
-// AbortMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to DeleteObjects :
+// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput, optFns ...func(*Options)) (*DeleteObjectsOutput, error) {
if params == nil {
params = &DeleteObjectsInput{}
@@ -75,23 +102,31 @@ func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput,
type DeleteObjectsInput struct {
- // The bucket name containing the objects to delete. When using this action with an
- // access point, you must direct requests to the access point hostname. The access
- // point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The bucket name containing the objects to delete. Directory buckets - When you
+ // use this operation with a directory bucket, you must use virtual-hosted-style
+ // requests in the format Bucket_name.s3express-az_id.region.amazonaws.com .
+ // Path-style requests are not supported. Directory bucket names must be unique in
+ // the chosen Availability Zone. Bucket names must follow the format
+ // bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -103,43 +138,67 @@ type DeleteObjectsInput struct {
// Specifies whether you want to delete this object even if it has a
// Governance-type Object Lock in place. To use this header, you must have the
- // s3:BypassGovernanceRetention permission.
- BypassGovernanceRetention bool
+ // s3:BypassGovernanceRetention permission. This functionality is not supported for
+ // directory buckets.
+ BypassGovernanceRetention *bool
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
- // ignores any provided ChecksumAlgorithm parameter. This checksum algorithm must
- // be the same for all parts and it match the checksum value supplied in the
- // CreateMultipartUpload request.
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3
+ // fails the request with the HTTP status code 400 Bad Request . For the
+ // x-amz-checksum-algorithm header, replace algorithm with the supported
+ // algorithm from the following list:
+ // - CRC32
+ // - CRC32C
+ // - SHA1
+ // - SHA256
+ // For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // in the Amazon S3 User Guide. If the individual checksum value you provide
+ // through x-amz-checksum-algorithm doesn't match the checksum algorithm you set
+ // through x-amz-sdk-checksum-algorithm , Amazon S3 ignores any provided
+ // ChecksumAlgorithm parameter and uses the checksum algorithm that matches the
+ // provided value in x-amz-checksum-algorithm . If you provide an individual
+ // checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
- // The concatenation of the authentication device's serial number, a space, and the
- // value that is displayed on your authentication device. Required to permanently
- // delete a versioned object if versioning is configured with MFA delete enabled.
+ // The concatenation of the authentication device's serial number, a space, and
+ // the value that is displayed on your authentication device. Required to
+ // permanently delete a versioned object if versioning is configured with MFA
+ // delete enabled. When performing the DeleteObjects operation on an MFA delete
+ // enabled bucket, which attempts to delete the specified versioned objects, you
+ // must include an MFA token. If you don't provide an MFA token, the entire request
+ // will fail, even if there are non-versioned objects that you are trying to
+ // delete. If you provide an invalid token, whether there are versioned object keys
+ // in the request or not, the entire Multi-Object Delete request will fail. For
+ // information about MFA Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
MFA *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
noSmithyDocumentSerde
}
+func (in *DeleteObjectsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type DeleteObjectsOutput struct {
// Container element for a successful delete. It identifies the object that was
@@ -151,7 +210,7 @@ type DeleteObjectsOutput struct {
Errors []types.Error
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -161,6 +220,9 @@ type DeleteObjectsOutput struct {
}
func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteObjects{}, middleware.After)
if err != nil {
return err
@@ -169,34 +231,38 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteObjects"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -205,7 +271,10 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteObjectsValidationMiddleware(stack); err != nil {
@@ -217,6 +286,9 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeleteObjectsInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -235,20 +307,35 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *DeleteObjectsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeleteObjects(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeleteObjects",
}
}
-// getDeleteObjectsRequestAlgorithmMember gets the request checksum algorithm value
-// provided as input.
+// getDeleteObjectsRequestAlgorithmMember gets the request checksum algorithm
+// value provided as input.
func getDeleteObjectsRequestAlgorithmMember(input interface{}) (string, bool) {
in := input.(*DeleteObjectsInput)
if len(in.ChecksumAlgorithm) == 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
index 3defd538..43969e2b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
@@ -4,37 +4,26 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this
-// operation, you must have the s3:PutBucketPublicAccessBlock permission. For more
+// This operation is not supported by directory buckets. Removes the
+// PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation,
+// you must have the s3:PutBucketPublicAccessBlock permission. For more
// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// The following operations are related to DeletePublicAccessBlock:
-//
-// * Using Amazon
-// S3 Block Public Access
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-//
-// *
-// GetPublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// *
-// PutPublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// *
-// GetBucketPolicyStatus
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . The following operations are related to DeletePublicAccessBlock :
+// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
+// - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
func (c *Client) DeletePublicAccessBlock(ctx context.Context, params *DeletePublicAccessBlockInput, optFns ...func(*Options)) (*DeletePublicAccessBlockOutput, error) {
if params == nil {
params = &DeletePublicAccessBlockInput{}
@@ -57,14 +46,19 @@ type DeletePublicAccessBlockInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *DeletePublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type DeletePublicAccessBlockOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -73,6 +67,9 @@ type DeletePublicAccessBlockOutput struct {
}
func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpDeletePublicAccessBlock{}, middleware.After)
if err != nil {
return err
@@ -81,34 +78,38 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePublicAccessBlock"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -117,7 +118,10 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpDeletePublicAccessBlockValidationMiddleware(stack); err != nil {
@@ -129,6 +133,9 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addDeletePublicAccessBlockUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -144,14 +151,26 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *DeletePublicAccessBlockInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opDeletePublicAccessBlock(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "DeletePublicAccessBlock",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
index d1690f3e..4bb1ff71 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
@@ -4,38 +4,36 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This implementation of the GET action uses the accelerate subresource to return
-// the Transfer Acceleration state of a bucket, which is either Enabled or
-// Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that
-// enables you to perform faster data transfers to and from Amazon S3. To use this
-// operation, you must have permission to perform the s3:GetAccelerateConfiguration
-// action. The bucket owner has this permission by default. The bucket owner can
-// grant this permission to others. For more information about permissions, see
-// Permissions Related to Bucket Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// This operation is not supported by directory buckets. This implementation of
+// the GET action uses the accelerate subresource to return the Transfer
+// Acceleration state of a bucket, which is either Enabled or Suspended . Amazon S3
+// Transfer Acceleration is a bucket-level feature that enables you to perform
+// faster data transfers to and from Amazon S3. To use this operation, you must
+// have permission to perform the s3:GetAccelerateConfiguration action. The bucket
+// owner has this permission by default. The bucket owner can grant this permission
+// to others. For more information about permissions, see Permissions Related to
+// Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
// in the Amazon S3 User Guide. You set the Transfer Acceleration state of an
// existing bucket to Enabled or Suspended by using the
-// PutBucketAccelerateConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
+// PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
// operation. A GET accelerate request does not return a state value for a bucket
// that has no transfer acceleration state. A bucket has no Transfer Acceleration
// state if a state has never been set on the bucket. For more information about
-// transfer acceleration, see Transfer Acceleration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) in
-// the Amazon S3 User Guide. Related Resources
-//
-// * PutBucketAccelerateConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
+// transfer acceleration, see Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
+// in the Amazon S3 User Guide. The following operations are related to
+// GetBucketAccelerateConfiguration :
+// - PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
func (c *Client) GetBucketAccelerateConfiguration(ctx context.Context, params *GetBucketAccelerateConfigurationInput, optFns ...func(*Options)) (*GetBucketAccelerateConfigurationOutput, error) {
if params == nil {
params = &GetBucketAccelerateConfigurationInput{}
@@ -58,16 +56,35 @@ type GetBucketAccelerateConfigurationInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
+ RequestPayer types.RequestPayer
+
noSmithyDocumentSerde
}
+func (in *GetBucketAccelerateConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketAccelerateConfigurationOutput struct {
+ // If present, indicates that the requester was successfully charged for the
+ // request. This functionality is not supported for directory buckets.
+ RequestCharged types.RequestCharged
+
// The accelerate configuration of the bucket.
Status types.BucketAccelerateStatus
@@ -78,6 +95,9 @@ type GetBucketAccelerateConfigurationOutput struct {
}
func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketAccelerateConfiguration{}, middleware.After)
if err != nil {
return err
@@ -86,34 +106,38 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketAccelerateConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -122,7 +146,10 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
@@ -134,6 +161,9 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketAccelerateConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -149,14 +179,26 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketAccelerateConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketAccelerateConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketAccelerateConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
index 61076288..bc7c4ea1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
@@ -4,28 +4,36 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This implementation of the GET action uses the acl subresource to return the
-// access control list (ACL) of a bucket. To use GET to return the ACL of the
-// bucket, you must have READ_ACP access to the bucket. If READ_ACP permission is
-// granted to the anonymous user, you can return the ACL of the bucket without
-// using an authorization header. If your bucket uses the bucket owner enforced
-// setting for S3 Object Ownership, requests to read ACLs are still supported and
-// return the bucket-owner-full-control ACL with the owner being the account that
-// created the bucket. For more information, see Controlling object ownership and
-// disabling ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide. Related Resources
-//
-// * ListObjects
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
+// This operation is not supported by directory buckets. This implementation of
+// the GET action uses the acl subresource to return the access control list (ACL)
+// of a bucket. To use GET to return the ACL of the bucket, you must have the
+// READ_ACP access to the bucket. If READ_ACP permission is granted to the
+// anonymous user, you can return the ACL of the bucket without using an
+// authorization header. When you use this API operation with an access point,
+// provide the alias of the access point in place of the bucket name. When you use
+// this API operation with an Object Lambda access point, provide the alias of the
+// Object Lambda access point in place of the bucket name. If the Object Lambda
+// access point alias in a request is not valid, the error code
+// InvalidAccessPointAliasError is returned. For more information about
+// InvalidAccessPointAliasError , see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+// . If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
+// requests to read ACLs are still supported and return the
+// bucket-owner-full-control ACL with the owner being the account that created the
+// bucket. For more information, see Controlling object ownership and disabling
+// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+// in the Amazon S3 User Guide. The following operations are related to
+// GetBucketAcl :
+// - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, optFns ...func(*Options)) (*GetBucketAclOutput, error) {
if params == nil {
params = &GetBucketAclInput{}
@@ -43,19 +51,31 @@ func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, op
type GetBucketAclInput struct {
- // Specifies the S3 bucket whose ACL is being requested.
+ // Specifies the S3 bucket whose ACL is being requested. When you use this API
+ // operation with an access point, provide the alias of the access point in place
+ // of the bucket name. When you use this API operation with an Object Lambda access
+ // point, provide the alias of the Object Lambda access point in place of the
+ // bucket name. If the Object Lambda access point alias in a request is not valid,
+ // the error code InvalidAccessPointAliasError is returned. For more information
+ // about InvalidAccessPointAliasError , see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+ // .
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketAclInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketAclOutput struct {
// A list of grants.
@@ -71,6 +91,9 @@ type GetBucketAclOutput struct {
}
func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketAcl{}, middleware.After)
if err != nil {
return err
@@ -79,34 +102,38 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketAcl"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -115,7 +142,10 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketAclValidationMiddleware(stack); err != nil {
@@ -127,6 +157,9 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketAclUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -142,14 +175,26 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketAclInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketAcl(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketAcl",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
index bf2c3be6..64e41d40 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
@@ -4,39 +4,31 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This implementation of the GET action returns an analytics configuration
-// (identified by the analytics configuration ID) from the bucket. To use this
-// operation, you must have permissions to perform the s3:GetAnalyticsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner can
-// grant this permission to others. For more information about permissions, see
-// Permissions Related to Bucket Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// This operation is not supported by directory buckets. This implementation of
+// the GET action returns an analytics configuration (identified by the analytics
+// configuration ID) from the bucket. To use this operation, you must have
+// permissions to perform the s3:GetAnalyticsConfiguration action. The bucket
+// owner has this permission by default. The bucket owner can grant this permission
+// to others. For more information about permissions, see Permissions Related to
+// Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
// in the Amazon S3 User Guide. For information about Amazon S3 analytics feature,
-// see Amazon S3 Analytics – Storage Class Analysis
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
-// in the Amazon S3 User Guide. Related Resources
-//
-// *
-// DeleteBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// *
-// ListBucketAnalyticsConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// *
-// PutBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
+// see Amazon S3 Analytics – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
+// in the Amazon S3 User Guide. The following operations are related to
+// GetBucketAnalyticsConfiguration :
+// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
+// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
+// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
func (c *Client) GetBucketAnalyticsConfiguration(ctx context.Context, params *GetBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*GetBucketAnalyticsConfigurationOutput, error) {
if params == nil {
params = &GetBucketAnalyticsConfigurationInput{}
@@ -64,14 +56,19 @@ type GetBucketAnalyticsConfigurationInput struct {
// This member is required.
Id *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketAnalyticsConfigurationOutput struct {
// The configuration and any analyses for the analytics filter.
@@ -84,6 +81,9 @@ type GetBucketAnalyticsConfigurationOutput struct {
}
func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketAnalyticsConfiguration{}, middleware.After)
if err != nil {
return err
@@ -92,34 +92,38 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketAnalyticsConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -128,7 +132,10 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
@@ -140,6 +147,9 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -155,14 +165,26 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketAnalyticsConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketAnalyticsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketAnalyticsConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
index 0ed61273..0997225e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
@@ -4,28 +4,31 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the Cross-Origin Resource Sharing (CORS) configuration information set
-// for the bucket. To use this operation, you must have permission to perform the
-// s3:GetBucketCORS action. By default, the bucket owner has this permission and
-// can grant it to others. For more information about CORS, see Enabling
-// Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html). The following
-// operations are related to GetBucketCors:
-//
-// * PutBucketCors
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-//
-// *
-// DeleteBucketCors
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
+// This operation is not supported by directory buckets. Returns the Cross-Origin
+// Resource Sharing (CORS) configuration information set for the bucket. To use
+// this operation, you must have permission to perform the s3:GetBucketCORS
+// action. By default, the bucket owner has this permission and can grant it to
+// others. When you use this API operation with an access point, provide the alias
+// of the access point in place of the bucket name. When you use this API operation
+// with an Object Lambda access point, provide the alias of the Object Lambda
+// access point in place of the bucket name. If the Object Lambda access point
+// alias in a request is not valid, the error code InvalidAccessPointAliasError is
+// returned. For more information about InvalidAccessPointAliasError , see List of
+// Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+// . For more information about CORS, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
+// . The following operations are related to GetBucketCors :
+// - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
+// - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
func (c *Client) GetBucketCors(ctx context.Context, params *GetBucketCorsInput, optFns ...func(*Options)) (*GetBucketCorsOutput, error) {
if params == nil {
params = &GetBucketCorsInput{}
@@ -43,19 +46,31 @@ func (c *Client) GetBucketCors(ctx context.Context, params *GetBucketCorsInput,
type GetBucketCorsInput struct {
- // The bucket name for which to get the cors configuration.
+ // The bucket name for which to get the cors configuration. When you use this API
+ // operation with an access point, provide the alias of the access point in place
+ // of the bucket name. When you use this API operation with an Object Lambda access
+ // point, provide the alias of the Object Lambda access point in place of the
+ // bucket name. If the Object Lambda access point alias in a request is not valid,
+ // the error code InvalidAccessPointAliasError is returned. For more information
+ // about InvalidAccessPointAliasError , see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+ // .
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketCorsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketCorsOutput struct {
// A set of origins and methods (cross-origin access that you want to allow). You
@@ -69,6 +84,9 @@ type GetBucketCorsOutput struct {
}
func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketCors{}, middleware.After)
if err != nil {
return err
@@ -77,34 +95,38 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketCors"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -113,7 +135,10 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketCorsValidationMiddleware(stack); err != nil {
@@ -125,6 +150,9 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketCorsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -140,14 +168,26 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketCorsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketCors(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketCors",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
index 7fa92fc5..22c1f9bb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
@@ -4,37 +4,30 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the default encryption configuration for an Amazon S3 bucket. If the
-// bucket does not have a default encryption configuration, GetBucketEncryption
-// returns ServerSideEncryptionConfigurationNotFoundError. For information about
-// the Amazon S3 default encryption feature, see Amazon S3 Default Bucket
-// Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html). To use
-// this operation, you must have permission to perform the
-// s3:GetEncryptionConfiguration action. The bucket owner has this permission by
-// default. The bucket owner can grant this permission to others. For more
-// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// The following operations are related to GetBucketEncryption:
-//
-// *
-// PutBucketEncryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
-//
-// *
-// DeleteBucketEncryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
+// This operation is not supported by directory buckets. Returns the default
+// encryption configuration for an Amazon S3 bucket. By default, all buckets have a
+// default encryption configuration that uses server-side encryption with Amazon S3
+// managed keys (SSE-S3). For information about the bucket default encryption
+// feature, see Amazon S3 Bucket Default Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
+// in the Amazon S3 User Guide. To use this operation, you must have permission to
+// perform the s3:GetEncryptionConfiguration action. The bucket owner has this
+// permission by default. The bucket owner can grant this permission to others. For
+// more information about permissions, see Permissions Related to Bucket
+// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . The following operations are related to GetBucketEncryption :
+// - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
+// - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
func (c *Client) GetBucketEncryption(ctx context.Context, params *GetBucketEncryptionInput, optFns ...func(*Options)) (*GetBucketEncryptionOutput, error) {
if params == nil {
params = &GetBucketEncryptionInput{}
@@ -58,14 +51,19 @@ type GetBucketEncryptionInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketEncryptionOutput struct {
// Specifies the default server-side-encryption configuration.
@@ -78,6 +76,9 @@ type GetBucketEncryptionOutput struct {
}
func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketEncryption{}, middleware.After)
if err != nil {
return err
@@ -86,34 +87,38 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketEncryption"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -122,7 +127,10 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketEncryptionValidationMiddleware(stack); err != nil {
@@ -134,6 +142,9 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketEncryptionUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -149,14 +160,26 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketEncryptionInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketEncryption(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketEncryption",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
index 70bbb9df..f3ae88a9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
@@ -4,15 +4,18 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Gets the S3 Intelligent-Tiering configuration from the specified bucket. The S3
+// This operation is not supported by directory buckets. Gets the S3
+// Intelligent-Tiering configuration from the specified bucket. The S3
// Intelligent-Tiering storage class is designed to optimize storage costs by
// automatically moving data to the most cost-effective storage access tier,
// without performance impact or operational overhead. S3 Intelligent-Tiering
@@ -25,21 +28,11 @@ import (
// monitored and not eligible for auto-tiering. Smaller objects can be stored, but
// they are always charged at the Frequent Access tier rates in the S3
// Intelligent-Tiering storage class. For more information, see Storage class for
-// automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-// Operations related to GetBucketIntelligentTieringConfiguration include:
-//
-// *
-// DeleteBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// *
-// PutBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// *
-// ListBucketIntelligentTieringConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
+// automatically optimizing frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
+// . Operations related to GetBucketIntelligentTieringConfiguration include:
+// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
+// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
+// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
func (c *Client) GetBucketIntelligentTieringConfiguration(ctx context.Context, params *GetBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*GetBucketIntelligentTieringConfigurationOutput, error) {
if params == nil {
params = &GetBucketIntelligentTieringConfigurationInput{}
@@ -71,6 +64,11 @@ type GetBucketIntelligentTieringConfigurationInput struct {
noSmithyDocumentSerde
}
+func (in *GetBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketIntelligentTieringConfigurationOutput struct {
// Container for S3 Intelligent-Tiering configuration.
@@ -83,6 +81,9 @@ type GetBucketIntelligentTieringConfigurationOutput struct {
}
func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration{}, middleware.After)
if err != nil {
return err
@@ -91,34 +92,38 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketIntelligentTieringConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -127,7 +132,10 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
@@ -139,6 +147,9 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -154,14 +165,26 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketIntelligentTieringConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketIntelligentTieringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketIntelligentTieringConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
index f35a4606..123218e9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
@@ -4,37 +4,28 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns an inventory configuration (identified by the inventory configuration
-// ID) from the bucket. To use this operation, you must have permissions to perform
-// the s3:GetInventoryConfiguration action. The bucket owner has this permission by
+// This operation is not supported by directory buckets. Returns an inventory
+// configuration (identified by the inventory configuration ID) from the bucket. To
+// use this operation, you must have permissions to perform the
+// s3:GetInventoryConfiguration action. The bucket owner has this permission by
// default and can grant this permission to others. For more information about
-// permissions, see Permissions Related to Bucket Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html). The
-// following operations are related to GetBucketInventoryConfiguration:
-//
-// *
-// DeleteBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// *
-// ListBucketInventoryConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
-//
-// *
-// PutBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
+// permissions, see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about the Amazon S3 inventory feature, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
+// . The following operations are related to GetBucketInventoryConfiguration :
+// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
+// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
+// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
func (c *Client) GetBucketInventoryConfiguration(ctx context.Context, params *GetBucketInventoryConfigurationInput, optFns ...func(*Options)) (*GetBucketInventoryConfigurationOutput, error) {
if params == nil {
params = &GetBucketInventoryConfigurationInput{}
@@ -62,14 +53,19 @@ type GetBucketInventoryConfigurationInput struct {
// This member is required.
Id *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketInventoryConfigurationOutput struct {
// Specifies the inventory configuration.
@@ -82,6 +78,9 @@ type GetBucketInventoryConfigurationOutput struct {
}
func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketInventoryConfiguration{}, middleware.After)
if err != nil {
return err
@@ -90,34 +89,38 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketInventoryConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -126,7 +129,10 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
@@ -138,6 +144,9 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -153,14 +162,26 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketInventoryConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketInventoryConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketInventoryConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
index 5d72d2eb..ddcbbe09 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
@@ -4,59 +4,45 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Bucket lifecycle configuration now supports specifying a lifecycle rule using an
-// object key name prefix, one or more object tags, or a combination of both.
-// Accordingly, this section describes the latest API. The response describes the
+// This operation is not supported by directory buckets. Bucket lifecycle
+// configuration now supports specifying a lifecycle rule using an object key name
+// prefix, one or more object tags, object size, or any combination of these.
+// Accordingly, this section describes the latest API. The previous version of the
+// API supported filtering based only on an object key name prefix, which is
+// supported for backward compatibility. For the related API description, see
+// GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
+// . Accordingly, this section describes the latest API. The response describes the
// new filter element that you can use to specify a filter to select a subset of
// objects to which the rule applies. If you are using a previous version of the
-// lifecycle configuration, it still works. For the earlier action, see
-// GetBucketLifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html).
-// Returns the lifecycle configuration information set on the bucket. For
-// information about lifecycle configuration, see Object Lifecycle Management
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html). To
-// use this operation, you must have permission to perform the
+// lifecycle configuration, it still works. For the earlier action, Returns the
+// lifecycle configuration information set on the bucket. For information about
+// lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
+// . To use this operation, you must have permission to perform the
// s3:GetLifecycleConfiguration action. The bucket owner has this permission, by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// GetBucketLifecycleConfiguration has the following special error:
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . GetBucketLifecycleConfiguration has the following special error:
+// - Error code: NoSuchLifecycleConfiguration
+// - Description: The lifecycle configuration does not exist.
+// - HTTP Status Code: 404 Not Found
+// - SOAP Fault Code Prefix: Client
//
-// * Error code:
-// NoSuchLifecycleConfiguration
-//
-// * Description: The lifecycle configuration does
-// not exist.
-//
-// * HTTP Status Code: 404 Not Found
-//
-// * SOAP Fault Code Prefix:
-// Client
-//
-// The following operations are related to
-// GetBucketLifecycleConfiguration:
-//
-// * GetBucketLifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
-//
-// *
-// PutBucketLifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
-//
-// *
-// DeleteBucketLifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
+// The following operations are related to GetBucketLifecycleConfiguration :
+// - GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
+// - PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
+// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
func (c *Client) GetBucketLifecycleConfiguration(ctx context.Context, params *GetBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*GetBucketLifecycleConfigurationOutput, error) {
if params == nil {
params = &GetBucketLifecycleConfigurationInput{}
@@ -79,14 +65,19 @@ type GetBucketLifecycleConfigurationInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketLifecycleConfigurationOutput struct {
// Container for a lifecycle rule.
@@ -99,6 +90,9 @@ type GetBucketLifecycleConfigurationOutput struct {
}
func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketLifecycleConfiguration{}, middleware.After)
if err != nil {
return err
@@ -107,34 +101,38 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketLifecycleConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -143,7 +141,10 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketLifecycleConfigurationValidationMiddleware(stack); err != nil {
@@ -155,6 +156,9 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketLifecycleConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -170,14 +174,26 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketLifecycleConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketLifecycleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketLifecycleConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
index fb8ff30f..aff5f3cd 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
@@ -15,25 +15,28 @@ import (
smithyxml "github.com/aws/smithy-go/encoding/xml"
smithyio "github.com/aws/smithy-go/io"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
"io"
)
-// Returns the Region the bucket resides in. You set the bucket's Region using the
-// LocationConstraint request parameter in a CreateBucket request. For more
-// information, see CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html). To use
-// this implementation of the operation, you must be the bucket owner. To use this
-// API against an access point, provide the alias of the access point in place of
-// the bucket name. The following operations are related to GetBucketLocation:
-//
-// *
-// GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// This operation is not supported by directory buckets. Returns the Region the
+// bucket resides in. You set the bucket's Region using the LocationConstraint
+// request parameter in a CreateBucket request. For more information, see
+// CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// . When you use this API operation with an access point, provide the alias of the
+// access point in place of the bucket name. When you use this API operation with
+// an Object Lambda access point, provide the alias of the Object Lambda access
+// point in place of the bucket name. If the Object Lambda access point alias in a
+// request is not valid, the error code InvalidAccessPointAliasError is returned.
+// For more information about InvalidAccessPointAliasError , see List of Error
+// Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+// . We recommend that you use HeadBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html)
+// to return the Region that a bucket resides in. For backward compatibility,
+// Amazon S3 continues to support GetBucketLocation. The following operations are
+// related to GetBucketLocation :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocationInput, optFns ...func(*Options)) (*GetBucketLocationOutput, error) {
if params == nil {
params = &GetBucketLocationInput{}
@@ -51,25 +54,36 @@ func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocatio
type GetBucketLocationInput struct {
- // The name of the bucket for which to get the location.
+ // The name of the bucket for which to get the location. When you use this API
+ // operation with an access point, provide the alias of the access point in place
+ // of the bucket name. When you use this API operation with an Object Lambda access
+ // point, provide the alias of the Object Lambda access point in place of the
+ // bucket name. If the Object Lambda access point alias in a request is not valid,
+ // the error code InvalidAccessPointAliasError is returned. For more information
+ // about InvalidAccessPointAliasError , see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+ // .
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketLocationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketLocationOutput struct {
// Specifies the Region where the bucket resides. For a list of all the Amazon S3
- // supported location constraints by Region, see Regions and Endpoints
- // (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region). Buckets in
- // Region us-east-1 have a LocationConstraint of null.
+ // supported location constraints by Region, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+ // . Buckets in Region us-east-1 have a LocationConstraint of null .
LocationConstraint types.BucketLocationConstraint
// Metadata pertaining to the operation's result.
@@ -79,6 +93,9 @@ type GetBucketLocationOutput struct {
}
func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketLocation{}, middleware.After)
if err != nil {
return err
@@ -87,34 +104,38 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketLocation"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -126,7 +147,10 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
if err = swapDeserializerHelper(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketLocationValidationMiddleware(stack); err != nil {
@@ -138,6 +162,9 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketLocationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -153,6 +180,12 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -212,18 +245,24 @@ func swapDeserializerHelper(stack *middleware.Stack) error {
return nil
}
+func (v *GetBucketLocationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketLocation(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketLocation",
}
}
-// getGetBucketLocationBucketMember returns a pointer to string denoting a provided
-// bucket member valueand a boolean indicating if the input has a modeled bucket
-// name,
+// getGetBucketLocationBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
func getGetBucketLocationBucketMember(input interface{}) (*string, bool) {
in := input.(*GetBucketLocationInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
index ca115886..d1c4f8fb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
@@ -4,24 +4,21 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the logging status of a bucket and the permissions users have to view
-// and modify that status. To use GET, you must be the bucket owner. The following
-// operations are related to GetBucketLogging:
-//
-// * CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// PutBucketLogging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html)
+// This operation is not supported by directory buckets. Returns the logging
+// status of a bucket and the permissions users have to view and modify that
+// status. The following operations are related to GetBucketLogging :
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - PutBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html)
func (c *Client) GetBucketLogging(ctx context.Context, params *GetBucketLoggingInput, optFns ...func(*Options)) (*GetBucketLoggingOutput, error) {
if params == nil {
params = &GetBucketLoggingInput{}
@@ -44,20 +41,24 @@ type GetBucketLoggingInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketLoggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketLoggingOutput struct {
- // Describes where logs are stored and the prefix that Amazon S3 assigns to all log
- // object keys for a bucket. For more information, see PUT Bucket logging
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in
- // the Amazon S3 API Reference.
+ // Describes where logs are stored and the prefix that Amazon S3 assigns to all
+ // log object keys for a bucket. For more information, see PUT Bucket logging (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
+ // in the Amazon S3 API Reference.
LoggingEnabled *types.LoggingEnabled
// Metadata pertaining to the operation's result.
@@ -67,6 +68,9 @@ type GetBucketLoggingOutput struct {
}
func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketLogging{}, middleware.After)
if err != nil {
return err
@@ -75,34 +79,38 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketLogging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -111,7 +119,10 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketLoggingValidationMiddleware(stack); err != nil {
@@ -123,6 +134,9 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketLoggingUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -138,14 +152,26 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketLoggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketLogging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketLogging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
index 22cf389c..d7499c68 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
@@ -4,44 +4,31 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Gets a metrics configuration (specified by the metrics configuration ID) from
-// the bucket. Note that this doesn't include the daily storage metrics. To use
-// this operation, you must have permissions to perform the
-// s3:GetMetricsConfiguration action. The bucket owner has this permission by
-// default. The bucket owner can grant this permission to others. For more
-// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about CloudWatch request metrics for Amazon S3, see Monitoring
-// Metrics with Amazon CloudWatch
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-// The following operations are related to GetBucketMetricsConfiguration:
-//
-// *
-// PutBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// *
-// DeleteBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// *
-// ListBucketMetricsConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// *
-// Monitoring Metrics with Amazon CloudWatch
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+// This operation is not supported by directory buckets. Gets a metrics
+// configuration (specified by the metrics configuration ID) from the bucket. Note
+// that this doesn't include the daily storage metrics. To use this operation, you
+// must have permissions to perform the s3:GetMetricsConfiguration action. The
+// bucket owner has this permission by default. The bucket owner can grant this
+// permission to others. For more information about permissions, see Permissions
+// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about CloudWatch request metrics for Amazon S3, see
+// Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+// . The following operations are related to GetBucketMetricsConfiguration :
+// - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
+// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
+// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
+// - Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
func (c *Client) GetBucketMetricsConfiguration(ctx context.Context, params *GetBucketMetricsConfigurationInput, optFns ...func(*Options)) (*GetBucketMetricsConfigurationOutput, error) {
if params == nil {
params = &GetBucketMetricsConfigurationInput{}
@@ -64,19 +51,25 @@ type GetBucketMetricsConfigurationInput struct {
// This member is required.
Bucket *string
- // The ID used to identify the metrics configuration.
+ // The ID used to identify the metrics configuration. The ID has a 64 character
+ // limit and can only contain letters, numbers, periods, dashes, and underscores.
//
// This member is required.
Id *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketMetricsConfigurationOutput struct {
// Specifies the metrics configuration.
@@ -89,6 +82,9 @@ type GetBucketMetricsConfigurationOutput struct {
}
func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketMetricsConfiguration{}, middleware.After)
if err != nil {
return err
@@ -97,34 +93,38 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketMetricsConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -133,7 +133,10 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
@@ -145,6 +148,9 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -160,14 +166,26 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketMetricsConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketMetricsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketMetricsConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
index cbf103a7..73155110 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
@@ -4,29 +4,34 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the notification configuration of a bucket. If notifications are not
-// enabled on the bucket, the action returns an empty NotificationConfiguration
-// element. By default, you must be the bucket owner to read the notification
-// configuration of a bucket. However, the bucket owner can use a bucket policy to
-// grant permission to other users to read this configuration with the
-// s3:GetBucketNotification permission. For more information about setting and
-// reading the notification configuration on a bucket, see Setting Up Notification
-// of Bucket Events
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). For
-// more information about bucket policies, see Using Bucket Policies
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). The
-// following action is related to GetBucketNotification:
-//
-// * PutBucketNotification
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html)
+// This operation is not supported by directory buckets. Returns the notification
+// configuration of a bucket. If notifications are not enabled on the bucket, the
+// action returns an empty NotificationConfiguration element. By default, you must
+// be the bucket owner to read the notification configuration of a bucket. However,
+// the bucket owner can use a bucket policy to grant permission to other users to
+// read this configuration with the s3:GetBucketNotification permission. When you
+// use this API operation with an access point, provide the alias of the access
+// point in place of the bucket name. When you use this API operation with an
+// Object Lambda access point, provide the alias of the Object Lambda access point
+// in place of the bucket name. If the Object Lambda access point alias in a
+// request is not valid, the error code InvalidAccessPointAliasError is returned.
+// For more information about InvalidAccessPointAliasError , see List of Error
+// Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+// . For more information about setting and reading the notification configuration
+// on a bucket, see Setting Up Notification of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+// . For more information about bucket policies, see Using Bucket Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
+// . The following action is related to GetBucketNotification :
+// - PutBucketNotification (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html)
func (c *Client) GetBucketNotificationConfiguration(ctx context.Context, params *GetBucketNotificationConfigurationInput, optFns ...func(*Options)) (*GetBucketNotificationConfigurationOutput, error) {
if params == nil {
params = &GetBucketNotificationConfigurationInput{}
@@ -44,21 +49,34 @@ func (c *Client) GetBucketNotificationConfiguration(ctx context.Context, params
type GetBucketNotificationConfigurationInput struct {
- // The name of the bucket for which to get the notification configuration.
+ // The name of the bucket for which to get the notification configuration. When
+ // you use this API operation with an access point, provide the alias of the access
+ // point in place of the bucket name. When you use this API operation with an
+ // Object Lambda access point, provide the alias of the Object Lambda access point
+ // in place of the bucket name. If the Object Lambda access point alias in a
+ // request is not valid, the error code InvalidAccessPointAliasError is returned.
+ // For more information about InvalidAccessPointAliasError , see List of Error
+ // Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+ // .
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
-// A container for specifying the notification configuration of the bucket. If this
-// element is empty, notifications are turned off for the bucket.
+func (in *GetBucketNotificationConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
+// A container for specifying the notification configuration of the bucket. If
+// this element is empty, notifications are turned off for the bucket.
type GetBucketNotificationConfigurationOutput struct {
// Enables delivery of events to Amazon EventBridge.
@@ -68,12 +86,12 @@ type GetBucketNotificationConfigurationOutput struct {
// them.
LambdaFunctionConfigurations []types.LambdaFunctionConfiguration
- // The Amazon Simple Queue Service queues to publish messages to and the events for
- // which to publish messages.
+ // The Amazon Simple Queue Service queues to publish messages to and the events
+ // for which to publish messages.
QueueConfigurations []types.QueueConfiguration
- // The topic to which notifications are sent and the events for which notifications
- // are generated.
+ // The topic to which notifications are sent and the events for which
+ // notifications are generated.
TopicConfigurations []types.TopicConfiguration
// Metadata pertaining to the operation's result.
@@ -83,6 +101,9 @@ type GetBucketNotificationConfigurationOutput struct {
}
func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketNotificationConfiguration{}, middleware.After)
if err != nil {
return err
@@ -91,34 +112,38 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketNotificationConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -127,7 +152,10 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketNotificationConfigurationValidationMiddleware(stack); err != nil {
@@ -139,6 +167,9 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketNotificationConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -154,14 +185,26 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketNotificationConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketNotificationConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
index 571c9566..cea15142 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
@@ -4,26 +4,24 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you
-// must have the s3:GetBucketOwnershipControls permission. For more information
-// about Amazon S3 permissions, see Specifying permissions in a policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html).
-// For information about Amazon S3 Object Ownership, see Using Object Ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html).
-// The following operations are related to GetBucketOwnershipControls:
-//
-// *
-// PutBucketOwnershipControls
-//
-// * DeleteBucketOwnershipControls
+// This operation is not supported by directory buckets. Retrieves
+// OwnershipControls for an Amazon S3 bucket. To use this operation, you must have
+// the s3:GetBucketOwnershipControls permission. For more information about Amazon
+// S3 permissions, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html)
+// . For information about Amazon S3 Object Ownership, see Using Object Ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+// . The following operations are related to GetBucketOwnershipControls :
+// - PutBucketOwnershipControls
+// - DeleteBucketOwnershipControls
func (c *Client) GetBucketOwnershipControls(ctx context.Context, params *GetBucketOwnershipControlsInput, optFns ...func(*Options)) (*GetBucketOwnershipControlsOutput, error) {
if params == nil {
params = &GetBucketOwnershipControlsInput{}
@@ -46,14 +44,19 @@ type GetBucketOwnershipControlsInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketOwnershipControlsOutput struct {
// The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or
@@ -67,6 +70,9 @@ type GetBucketOwnershipControlsOutput struct {
}
func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketOwnershipControls{}, middleware.After)
if err != nil {
return err
@@ -75,34 +81,38 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketOwnershipControls"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -111,7 +121,10 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketOwnershipControlsValidationMiddleware(stack); err != nil {
@@ -123,6 +136,9 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketOwnershipControlsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -138,21 +154,33 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketOwnershipControlsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketOwnershipControls(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketOwnershipControls",
}
}
-// getGetBucketOwnershipControlsBucketMember returns a pointer to string denoting a
-// provided bucket member valueand a boolean indicating if the input has a modeled
-// bucket name,
+// getGetBucketOwnershipControlsBucketMember returns a pointer to string denoting
+// a provided bucket member valueand a boolean indicating if the input has a
+// modeled bucket name,
func getGetBucketOwnershipControlsBucketMember(input interface{}) (*string, bool) {
in := input.(*GetBucketOwnershipControlsInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
index f16c84cd..c2f98f93 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
@@ -4,30 +4,56 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the policy of a specified bucket. If you are using an identity other
-// than the root user of the Amazon Web Services account that owns the bucket, the
-// calling identity must have the GetBucketPolicy permissions on the specified
-// bucket and belong to the bucket owner's account in order to use this operation.
-// If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access
-// Denied error. If you have the correct permissions, but you're not using an
-// identity that belongs to the bucket owner's account, Amazon S3 returns a 405
-// Method Not Allowed error. As a security precaution, the root user of the Amazon
-// Web Services account that owns a bucket can always use this operation, even if
-// the policy explicitly denies the root user the ability to perform this action.
-// For more information about bucket policies, see Using Bucket Policies and User
-// Policies
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). The
-// following action is related to GetBucketPolicy:
+// Returns the policy of a specified bucket. Directory buckets - For directory
+// buckets, you must make requests for this API operation to the Regional endpoint.
+// These endpoints support path-style requests in the format
+// https://s3express-control.region_code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information, see
+// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions If you are using an identity other than
+// the root user of the Amazon Web Services account that owns the bucket, the
+// calling identity must both have the GetBucketPolicy permissions on the
+// specified bucket and belong to the bucket owner's account in order to use this
+// operation. If you don't have GetBucketPolicy permissions, Amazon S3 returns a
+// 403 Access Denied error. If you have the correct permissions, but you're not
+// using an identity that belongs to the bucket owner's account, Amazon S3 returns
+// a 405 Method Not Allowed error. To ensure that bucket owners don't
+// inadvertently lock themselves out of their own buckets, the root principal in a
+// bucket owner's Amazon Web Services account can perform the GetBucketPolicy ,
+// PutBucketPolicy , and DeleteBucketPolicy API actions, even if their bucket
+// policy explicitly denies the root principal's access. Bucket owner root
+// principals can only be blocked from performing these API actions by VPC endpoint
+// policies and Amazon Web Services Organizations policies.
+// - General purpose bucket permissions - The s3:GetBucketPolicy permission is
+// required in a policy. For more information about general purpose buckets bucket
+// policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation, you
+// must have the s3express:GetBucketPolicy permission in an IAM identity-based
+// policy instead of a bucket policy. Cross-account access to this API operation
+// isn't supported. This operation can only be performed by the Amazon Web Services
+// account that owns the resource. For more information about directory bucket
+// policies and permissions, see Amazon Web Services Identity and Access
+// Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
+// in the Amazon S3 User Guide.
//
-// * GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// Example bucket policies General purpose buckets example bucket policies - See
+// Bucket policy examples (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html)
+// in the Amazon S3 User Guide. Directory bucket example bucket policies - See
+// Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
+// in the Amazon S3 User Guide. HTTP Host header syntax Directory buckets - The
+// HTTP Host header syntax is s3express-control.region.amazonaws.com . The
+// following action is related to GetBucketPolicy :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInput, optFns ...func(*Options)) (*GetBucketPolicyOutput, error) {
if params == nil {
params = &GetBucketPolicyInput{}
@@ -45,19 +71,43 @@ func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInp
type GetBucketPolicyInput struct {
- // The bucket name for which to get the bucket policy.
+ // The bucket name to get the bucket policy for. Directory buckets - When you use
+ // this operation with a directory bucket, you must use path-style requests in the
+ // format https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // Virtual-hosted-style requests aren't supported. Directory bucket names must be
+ // unique in the chosen Availability Zone. Bucket names must also follow the format
+ // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide Access points - When you use this API operation with
+ // an access point, provide the alias of the access point in place of the bucket
+ // name. Object Lambda access points - When you use this API operation with an
+ // Object Lambda access point, provide the alias of the Object Lambda access point
+ // in place of the bucket name. If the Object Lambda access point alias in a
+ // request is not valid, the error code InvalidAccessPointAliasError is returned.
+ // For more information about InvalidAccessPointAliasError , see List of Error
+ // Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+ // . Access points and Object Lambda access points are not supported by directory
+ // buckets.
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied). For directory buckets, this header
+ // is not supported in this API operation. If you specify this header, the request
+ // fails with the HTTP status code 501 Not Implemented .
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketPolicyInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketPolicyOutput struct {
// The bucket policy as a JSON document.
@@ -70,6 +120,9 @@ type GetBucketPolicyOutput struct {
}
func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketPolicy{}, middleware.After)
if err != nil {
return err
@@ -78,34 +131,38 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketPolicy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -114,7 +171,10 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketPolicyValidationMiddleware(stack); err != nil {
@@ -126,6 +186,9 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketPolicyUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -141,14 +204,26 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketPolicyInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketPolicy",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
index 570f60fa..cb36ac50 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
@@ -4,39 +4,28 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Retrieves the policy status for an Amazon S3 bucket, indicating whether the
-// bucket is public. In order to use this operation, you must have the
-// s3:GetBucketPolicyStatus permission. For more information about Amazon S3
-// permissions, see Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-// For more information about when Amazon S3 considers a bucket public, see The
-// Meaning of "Public"
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
-// The following operations are related to GetBucketPolicyStatus:
-//
-// * Using Amazon
-// S3 Block Public Access
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-//
-// *
-// GetPublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// *
-// PutPublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// *
-// DeletePublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
+// This operation is not supported by directory buckets. Retrieves the policy
+// status for an Amazon S3 bucket, indicating whether the bucket is public. In
+// order to use this operation, you must have the s3:GetBucketPolicyStatus
+// permission. For more information about Amazon S3 permissions, see Specifying
+// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// . For more information about when Amazon S3 considers a bucket public, see The
+// Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
+// . The following operations are related to GetBucketPolicyStatus :
+// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
+// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
func (c *Client) GetBucketPolicyStatus(ctx context.Context, params *GetBucketPolicyStatusInput, optFns ...func(*Options)) (*GetBucketPolicyStatusOutput, error) {
if params == nil {
params = &GetBucketPolicyStatusInput{}
@@ -59,14 +48,19 @@ type GetBucketPolicyStatusInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketPolicyStatusInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketPolicyStatusOutput struct {
// The policy status for the specified bucket.
@@ -79,6 +73,9 @@ type GetBucketPolicyStatusOutput struct {
}
func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketPolicyStatus{}, middleware.After)
if err != nil {
return err
@@ -87,34 +84,38 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketPolicyStatus"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -123,7 +124,10 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketPolicyStatusValidationMiddleware(stack); err != nil {
@@ -135,6 +139,9 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketPolicyStatusUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -150,14 +157,26 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketPolicyStatusInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketPolicyStatus(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketPolicyStatus",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
index 5d7f3115..7e44d38e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
@@ -4,37 +4,31 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the replication configuration of a bucket. It can take a while to
-// propagate the put or delete a replication configuration to all Amazon S3
-// systems. Therefore, a get request soon after put or delete can return a wrong
-// result. For information about replication configuration, see Replication
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon
-// S3 User Guide. This action requires permissions for the
+// This operation is not supported by directory buckets. Returns the replication
+// configuration of a bucket. It can take a while to propagate the put or delete a
+// replication configuration to all Amazon S3 systems. Therefore, a get request
+// soon after put or delete can return a wrong result. For information about
+// replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
+// in the Amazon S3 User Guide. This action requires permissions for the
// s3:GetReplicationConfiguration action. For more information about permissions,
-// see Using Bucket Policies and User Policies
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). If
-// you include the Filter element in a replication configuration, you must also
-// include the DeleteMarkerReplication and Priority elements. The response also
-// returns those elements. For information about GetBucketReplication errors, see
-// List of replication-related error codes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
-// The following operations are related to GetBucketReplication:
-//
-// *
-// PutBucketReplication
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
-//
-// *
-// DeleteBucketReplication
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
+// see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
+// . If you include the Filter element in a replication configuration, you must
+// also include the DeleteMarkerReplication and Priority elements. The response
+// also returns those elements. For information about GetBucketReplication errors,
+// see List of replication-related error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
+// The following operations are related to GetBucketReplication :
+// - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
+// - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
func (c *Client) GetBucketReplication(ctx context.Context, params *GetBucketReplicationInput, optFns ...func(*Options)) (*GetBucketReplicationOutput, error) {
if params == nil {
params = &GetBucketReplicationInput{}
@@ -57,14 +51,19 @@ type GetBucketReplicationInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketReplicationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketReplicationOutput struct {
// A container for replication rules. You can add up to 1,000 rules. The maximum
@@ -78,6 +77,9 @@ type GetBucketReplicationOutput struct {
}
func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketReplication{}, middleware.After)
if err != nil {
return err
@@ -86,34 +88,38 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketReplication"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -122,7 +128,10 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketReplicationValidationMiddleware(stack); err != nil {
@@ -134,6 +143,9 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketReplicationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -149,14 +161,26 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketReplicationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketReplication(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketReplication",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
index 45f985b9..16cc5282 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
@@ -4,22 +4,21 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the request payment configuration of a bucket. To use this version of
-// the operation, you must be the bucket owner. For more information, see Requester
-// Pays Buckets
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html). The
-// following operations are related to GetBucketRequestPayment:
-//
-// * ListObjects
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
+// This operation is not supported by directory buckets. Returns the request
+// payment configuration of a bucket. To use this version of the operation, you
+// must be the bucket owner. For more information, see Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
+// . The following operations are related to GetBucketRequestPayment :
+// - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
func (c *Client) GetBucketRequestPayment(ctx context.Context, params *GetBucketRequestPaymentInput, optFns ...func(*Options)) (*GetBucketRequestPaymentOutput, error) {
if params == nil {
params = &GetBucketRequestPaymentInput{}
@@ -42,14 +41,19 @@ type GetBucketRequestPaymentInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketRequestPaymentInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketRequestPaymentOutput struct {
// Specifies who pays for the download and request fees.
@@ -62,6 +66,9 @@ type GetBucketRequestPaymentOutput struct {
}
func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketRequestPayment{}, middleware.After)
if err != nil {
return err
@@ -70,34 +77,38 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketRequestPayment"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -106,7 +117,10 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketRequestPaymentValidationMiddleware(stack); err != nil {
@@ -118,6 +132,9 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketRequestPaymentUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -133,14 +150,26 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketRequestPaymentInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketRequestPayment(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketRequestPayment",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
index 816d1b3e..69a6e490 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
@@ -4,33 +4,27 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the tag set associated with the bucket. To use this operation, you must
-// have permission to perform the s3:GetBucketTagging action. By default, the
-// bucket owner has this permission and can grant this permission to others.
-// GetBucketTagging has the following special error:
+// This operation is not supported by directory buckets. Returns the tag set
+// associated with the bucket. To use this operation, you must have permission to
+// perform the s3:GetBucketTagging action. By default, the bucket owner has this
+// permission and can grant this permission to others. GetBucketTagging has the
+// following special error:
+// - Error code: NoSuchTagSet
+// - Description: There is no tag set associated with the bucket.
//
-// * Error code: NoSuchTagSet
-//
-// *
-// Description: There is no tag set associated with the bucket.
-//
-// The following
-// operations are related to GetBucketTagging:
-//
-// * PutBucketTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
-//
-// *
-// DeleteBucketTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
+// The following operations are related to GetBucketTagging :
+// - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
+// - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
func (c *Client) GetBucketTagging(ctx context.Context, params *GetBucketTaggingInput, optFns ...func(*Options)) (*GetBucketTaggingOutput, error) {
if params == nil {
params = &GetBucketTaggingInput{}
@@ -53,14 +47,19 @@ type GetBucketTaggingInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketTaggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketTaggingOutput struct {
// Contains the tag set.
@@ -75,6 +74,9 @@ type GetBucketTaggingOutput struct {
}
func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketTagging{}, middleware.After)
if err != nil {
return err
@@ -83,34 +85,38 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketTagging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -119,7 +125,10 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketTaggingValidationMiddleware(stack); err != nil {
@@ -131,6 +140,9 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketTaggingUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -146,14 +158,26 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketTaggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketTagging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketTagging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
index 3657bd1c..10540b13 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
@@ -4,31 +4,25 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the versioning state of a bucket. To retrieve the versioning state of a
-// bucket, you must be the bucket owner. This implementation also returns the MFA
-// Delete status of the versioning state. If the MFA Delete status is enabled, the
-// bucket owner must use an authentication device to change the versioning state of
-// the bucket. The following operations are related to GetBucketVersioning:
-//
-// *
-// GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// *
-// DeleteObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+// This operation is not supported by directory buckets. Returns the versioning
+// state of a bucket. To retrieve the versioning state of a bucket, you must be the
+// bucket owner. This implementation also returns the MFA Delete status of the
+// versioning state. If the MFA Delete status is enabled , the bucket owner must
+// use an authentication device to change the versioning state of the bucket. The
+// following operations are related to GetBucketVersioning :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
func (c *Client) GetBucketVersioning(ctx context.Context, params *GetBucketVersioningInput, optFns ...func(*Options)) (*GetBucketVersioningOutput, error) {
if params == nil {
params = &GetBucketVersioningInput{}
@@ -51,14 +45,19 @@ type GetBucketVersioningInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketVersioningInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketVersioningOutput struct {
// Specifies whether MFA delete is enabled in the bucket versioning configuration.
@@ -76,6 +75,9 @@ type GetBucketVersioningOutput struct {
}
func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketVersioning{}, middleware.After)
if err != nil {
return err
@@ -84,34 +86,38 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketVersioning"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -120,7 +126,10 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketVersioningValidationMiddleware(stack); err != nil {
@@ -132,6 +141,9 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketVersioningUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -147,14 +159,26 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketVersioningInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketVersioning(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketVersioning",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
index aa866b30..c87f6ff1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
@@ -4,30 +4,27 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the website configuration for a bucket. To host website on Amazon S3,
-// you can configure a bucket as website by adding a website configuration. For
-// more information about hosting websites, see Hosting Websites on Amazon S3
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). This GET
-// action requires the S3:GetBucketWebsite permission. By default, only the bucket
-// owner can read the bucket website configuration. However, bucket owners can
-// allow other users to read the website configuration by writing a bucket policy
-// granting them the S3:GetBucketWebsite permission. The following operations are
-// related to DeleteBucketWebsite:
-//
-// * DeleteBucketWebsite
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html)
-//
-// *
-// PutBucketWebsite
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
+// This operation is not supported by directory buckets. Returns the website
+// configuration for a bucket. To host website on Amazon S3, you can configure a
+// bucket as website by adding a website configuration. For more information about
+// hosting websites, see Hosting Websites on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
+// . This GET action requires the S3:GetBucketWebsite permission. By default, only
+// the bucket owner can read the bucket website configuration. However, bucket
+// owners can allow other users to read the website configuration by writing a
+// bucket policy granting them the S3:GetBucketWebsite permission. The following
+// operations are related to GetBucketWebsite :
+// - DeleteBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html)
+// - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
func (c *Client) GetBucketWebsite(ctx context.Context, params *GetBucketWebsiteInput, optFns ...func(*Options)) (*GetBucketWebsiteOutput, error) {
if params == nil {
params = &GetBucketWebsiteInput{}
@@ -50,20 +47,25 @@ type GetBucketWebsiteInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetBucketWebsiteOutput struct {
// The object key name of the website error document to use for 4XX class errors.
ErrorDocument *types.ErrorDocument
- // The name of the index document for the website (for example index.html).
+ // The name of the index document for the website (for example index.html ).
IndexDocument *types.IndexDocument
// Specifies the redirect behavior of all requests to a website endpoint of an
@@ -80,6 +82,9 @@ type GetBucketWebsiteOutput struct {
}
func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketWebsite{}, middleware.After)
if err != nil {
return err
@@ -88,34 +93,38 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketWebsite"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -124,7 +133,10 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetBucketWebsiteValidationMiddleware(stack); err != nil {
@@ -136,6 +148,9 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetBucketWebsiteUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -151,14 +166,26 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetBucketWebsiteInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetBucketWebsite(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetBucketWebsite",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
index 92c38bed..a64f5964 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -15,131 +16,100 @@ import (
"time"
)
-// Retrieves objects from Amazon S3. To use GET, you must have READ access to the
-// object. If you grant READ access to the anonymous user, you can return the
-// object without using an authorization header. An Amazon S3 bucket has no
-// directory hierarchy such as you would find in a typical computer file system.
-// You can, however, create a logical hierarchy by using object key names that
-// imply a folder structure. For example, instead of naming an object sample.jpg,
-// you can name it photos/2006/February/sample.jpg. To get an object from such a
-// logical hierarchy, specify the full key name for the object in the GET
-// operation. For a virtual hosted-style request example, if you have the object
-// photos/2006/February/sample.jpg, specify the resource as
-// /photos/2006/February/sample.jpg. For a path-style request example, if you have
-// the object photos/2006/February/sample.jpg in the bucket named examplebucket,
-// specify the resource as /examplebucket/photos/2006/February/sample.jpg. For more
-// information about request types, see HTTP Host Header Bucket Specification
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket).
-// For more information about returning the ACL of an object, see GetObjectAcl
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html). If the
-// object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive
-// storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep
-// Archive tiers, before you can retrieve the object you must first restore a copy
-// using RestoreObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
-// Otherwise, this action returns an InvalidObjectStateError error. For information
-// about restoring archived objects, see Restoring Archived Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html).
-// Encryption request headers, like x-amz-server-side-encryption, should not be
-// sent for GET requests if your object uses server-side encryption with KMS keys
-// (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys
-// (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400
-// BadRequest error. If you encrypt an object by using server-side encryption with
-// customer-provided encryption keys (SSE-C) when you store the object in Amazon
-// S3, then when you GET the object, you must use the following headers:
+// Retrieves an object from Amazon S3. In the GetObject request, specify the full
+// key name for the object. General purpose buckets - Both the virtual-hosted-style
+// requests and the path-style requests are supported. For a virtual hosted-style
+// request example, if you have the object photos/2006/February/sample.jpg ,
+// specify the object key name as /photos/2006/February/sample.jpg . For a
+// path-style request example, if you have the object
+// photos/2006/February/sample.jpg in the bucket named examplebucket , specify the
+// object key name as /examplebucket/photos/2006/February/sample.jpg . For more
+// information about request types, see HTTP Host Header Bucket Specification (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket)
+// in the Amazon S3 User Guide. Directory buckets - Only virtual-hosted-style
+// requests are supported. For a virtual hosted-style request example, if you have
+// the object photos/2006/February/sample.jpg in the bucket named
+// examplebucket--use1-az5--x-s3 , specify the object key name as
+// /photos/2006/February/sample.jpg . Also, when you make requests to this API
+// operation, your requests are sent to the Zonal endpoint. These endpoints support
+// virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - You must have the required permissions
+// in a policy. To use GetObject , you must have the READ access to the object
+// (or version). If you grant READ access to the anonymous user, the GetObject
+// operation returns the object without using an authorization header. For more
+// information, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// in the Amazon S3 User Guide. If you include a versionId in your request
+// header, you must have the s3:GetObjectVersion permission to access a specific
+// version of an object. The s3:GetObject permission is not required in this
+// scenario. If you request the current version of an object without a specific
+// versionId in the request header, only the s3:GetObject permission is required.
+// The s3:GetObjectVersion permission is not required in this scenario. If the
+// object that you request doesn’t exist, the error that Amazon S3 returns depends
+// on whether you also have the s3:ListBucket permission.
+// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
+// HTTP status code 404 Not Found error.
+// - If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP
+// status code 403 Access Denied error.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// *
-// x-amz-server-side-encryption-customer-algorithm
+// Storage classes If the object you are retrieving is stored in the S3 Glacier
+// Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the
+// S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep
+// Archive Access tier, before you can retrieve the object you must first restore a
+// copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
+// . Otherwise, this operation returns an InvalidObjectState error. For
+// information about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html)
+// in the Amazon S3 User Guide. Directory buckets - For directory buckets, only the
+// S3 Express One Zone storage class is supported to store newly created objects.
+// Unsupported storage class values won't write a destination object and will
+// respond with the HTTP status code 400 Bad Request . Encryption Encryption
+// request headers, like x-amz-server-side-encryption , should not be sent for the
+// GetObject requests, if your object uses server-side encryption with Amazon S3
+// managed encryption keys (SSE-S3), server-side encryption with Key Management
+// Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon
+// Web Services KMS keys (DSSE-KMS). If you include the header in your GetObject
+// requests for the object that uses these types of keys, you’ll get an HTTP 400
+// Bad Request error. Overriding response header values through the request There
+// are times when you want to override certain response header values of a
+// GetObject response. For example, you might override the Content-Disposition
+// response header value through your GetObject request. You can override values
+// for a set of response headers. These modified response header values are
+// included only in a successful response, that is, when the HTTP status code 200
+// OK is returned. The headers you can override using the following query
+// parameters in the request are a subset of the headers that Amazon S3 accepts
+// when you create an object. The response headers that you can override for the
+// GetObject response are Cache-Control , Content-Disposition , Content-Encoding ,
+// Content-Language , Content-Type , and Expires . To override values for a set of
+// response headers in the GetObject response, you can use the following query
+// parameters in the request.
+// - response-cache-control
+// - response-content-disposition
+// - response-content-encoding
+// - response-content-language
+// - response-content-type
+// - response-expires
//
-// *
-// x-amz-server-side-encryption-customer-key
-//
-// *
-// x-amz-server-side-encryption-customer-key-MD5
-//
-// For more information about SSE-C,
-// see Server-Side Encryption (Using Customer-Provided Encryption Keys)
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
-// Assuming you have the relevant permission to read object tags, the response also
-// returns the x-amz-tagging-count header that provides the count of number of tags
-// associated with the object. You can use GetObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) to
-// retrieve the tag set associated with an object. Permissions You need the
-// relevant read object (or version) permission for this operation. For more
-// information, see Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). If
-// the object you request does not exist, the error Amazon S3 returns depends on
-// whether you also have the s3:ListBucket permission.
-//
-// * If you have the
-// s3:ListBucket permission on the bucket, Amazon S3 will return an HTTP status
-// code 404 ("no such key") error.
-//
-// * If you don’t have the s3:ListBucket
-// permission, Amazon S3 will return an HTTP status code 403 ("access denied")
-// error.
-//
-// Versioning By default, the GET action returns the current version of an
-// object. To return a different version, use the versionId subresource.
-//
-// * If you
-// supply a versionId, you need the s3:GetObjectVersion permission to access a
-// specific version of an object. If you request a specific version, you do not
-// need to have the s3:GetObject permission.
-//
-// * If the current version of the
-// object is a delete marker, Amazon S3 behaves as if the object was deleted and
-// includes x-amz-delete-marker: true in the response.
-//
-// For more information about
-// versioning, see PutBucketVersioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html).
-// Overriding Response Header Values There are times when you want to override
-// certain response header values in a GET response. For example, you might
-// override the Content-Disposition response header value in your GET request. You
-// can override values for a set of response headers using the following query
-// parameters. These response header values are sent only on a successful request,
-// that is, when status code 200 OK is returned. The set of headers you can
-// override using these parameters is a subset of the headers that Amazon S3
-// accepts when you create an object. The response headers that you can override
-// for the GET response are Content-Type, Content-Language, Expires, Cache-Control,
-// Content-Disposition, and Content-Encoding. To override these header values in
-// the GET response, you use the following request parameters. You must sign the
-// request, either using an Authorization header or a presigned URL, when using
-// these parameters. They cannot be used with an unsigned (anonymous) request.
-//
-// *
-// response-content-type
-//
-// * response-content-language
-//
-// * response-expires
-//
-// *
-// response-cache-control
-//
-// * response-content-disposition
-//
-// *
-// response-content-encoding
-//
-// Additional Considerations about Request Headers If
-// both of the If-Match and If-Unmodified-Since headers are present in the request
-// as follows: If-Match condition evaluates to true, and; If-Unmodified-Since
-// condition evaluates to false; then, S3 returns 200 OK and the data requested. If
-// both of the If-None-Match and If-Modified-Since headers are present in the
-// request as follows: If-None-Match condition evaluates to false, and;
-// If-Modified-Since condition evaluates to true; then, S3 returns 304 Not Modified
-// response code. For more information about conditional requests, see RFC 7232
-// (https://tools.ietf.org/html/rfc7232). The following operations are related to
-// GetObject:
-//
-// * ListBuckets
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
-//
-// *
-// GetObjectAcl
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
+// When you use these parameters, you must sign the request by using either an
+// Authorization header or a presigned URL. These parameters cannot be used with an
+// unsigned (anonymous) request. HTTP Host header syntax Directory buckets - The
+// HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com .
+// The following operations are related to GetObject :
+// - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
+// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns ...func(*Options)) (*GetObjectOutput, error) {
if params == nil {
params = &GetObjectInput{}
@@ -157,25 +127,35 @@ func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns .
type GetObjectInput struct {
- // The bucket name containing the object. When using this action with an access
- // point, you must direct requests to the access point hostname. The access point
- // hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using an Object Lambda access point the
+ // The bucket name containing the object. Directory buckets - When you use this
+ // operation with a directory bucket, you must use virtual-hosted-style requests in
+ // the format Bucket_name.s3express-az_id.region.amazonaws.com . Path-style
+ // requests are not supported. Directory bucket names must be unique in the chosen
+ // Availability Zone. Bucket names must follow the format
+ // bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Object Lambda access points - When you use this
+ // action with an Object Lambda access point, you must direct requests to the
+ // Object Lambda access point hostname. The Object Lambda access point hostname
+ // takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.
+ // Access points and Object Lambda access points are not supported by directory
+ // buckets. S3 on Outposts - When you use this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
// hostname takes the form
- // AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com. When using this
- // action with Amazon S3 on Outposts, you must direct requests to the S3 on
- // Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -188,51 +168,69 @@ type GetObjectInput struct {
// To retrieve the checksum, this mode must be enabled.
ChecksumMode types.ChecksumMode
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Return the object only if its entity tag (ETag) is the same as the one
- // specified; otherwise, return a 412 (precondition failed) error.
+ // specified in this header; otherwise, return a 412 Precondition Failed error. If
+ // both of the If-Match and If-Unmodified-Since headers are present in the request
+ // as follows: If-Match condition evaluates to true , and; If-Unmodified-Since
+ // condition evaluates to false ; then, S3 returns 200 OK and the data requested.
+ // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
+ // .
IfMatch *string
// Return the object only if it has been modified since the specified time;
- // otherwise, return a 304 (not modified) error.
+ // otherwise, return a 304 Not Modified error. If both of the If-None-Match and
+ // If-Modified-Since headers are present in the request as follows: If-None-Match
+ // condition evaluates to false , and; If-Modified-Since condition evaluates to
+ // true ; then, S3 returns 304 Not Modified status code. For more information
+ // about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
IfModifiedSince *time.Time
// Return the object only if its entity tag (ETag) is different from the one
- // specified; otherwise, return a 304 (not modified) error.
+ // specified in this header; otherwise, return a 304 Not Modified error. If both
+ // of the If-None-Match and If-Modified-Since headers are present in the request
+ // as follows: If-None-Match condition evaluates to false , and; If-Modified-Since
+ // condition evaluates to true ; then, S3 returns 304 Not Modified HTTP status
+ // code. For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
+ // .
IfNoneMatch *string
// Return the object only if it has not been modified since the specified time;
- // otherwise, return a 412 (precondition failed) error.
+ // otherwise, return a 412 Precondition Failed error. If both of the If-Match and
+ // If-Unmodified-Since headers are present in the request as follows: If-Match
+ // condition evaluates to true , and; If-Unmodified-Since condition evaluates to
+ // false ; then, S3 returns 200 OK and the data requested. For more information
+ // about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
IfUnmodifiedSince *time.Time
// Part number of the object being read. This is a positive integer between 1 and
// 10,000. Effectively performs a 'ranged' GET request for the part specified.
// Useful for downloading just a part of an object.
- PartNumber int32
+ PartNumber *int32
- // Downloads the specified range bytes of an object. For more information about the
- // HTTP Range header, see
- // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
- // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35). Amazon S3
- // doesn't support retrieving multiple ranges of data per GET request.
+ // Downloads the specified byte range of an object. For more information about the
+ // HTTP Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range (https://www.rfc-editor.org/rfc/rfc9110.html#name-range)
+ // . Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
Range *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// Sets the Cache-Control header of the response.
ResponseCacheControl *string
- // Sets the Content-Disposition header of the response
+ // Sets the Content-Disposition header of the response.
ResponseContentDisposition *string
// Sets the Content-Encoding header of the response.
@@ -247,79 +245,121 @@ type GetObjectInput struct {
// Sets the Expires header of the response.
ResponseExpires *time.Time
- // Specifies the algorithm to use to when decrypting the object (for example,
- // AES256).
+ // Specifies the algorithm to use when decrypting the object (for example, AES256
+ // ). If you encrypt an object by using server-side encryption with
+ // customer-provided encryption keys (SSE-C) when you store the object in Amazon
+ // S3, then when you GET the object, you must use the following headers:
+ // - x-amz-server-side-encryption-customer-algorithm
+ // - x-amz-server-side-encryption-customer-key
+ // - x-amz-server-side-encryption-customer-key-MD5
+ // For more information about SSE-C, see Server-Side Encryption (Using
+ // Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // Specifies the customer-provided encryption key for Amazon S3 used to encrypt the
- // data. This value is used to decrypt the object when recovering it and must match
- // the one used when storing the data. The key must be appropriate for use with the
- // algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header.
+ // Specifies the customer-provided encryption key that you originally provided for
+ // Amazon S3 to encrypt the data before storing it. This value is used to decrypt
+ // the object when recovering it and must match the one used when storing the data.
+ // The key must be appropriate for use with the algorithm specified in the
+ // x-amz-server-side-encryption-customer-algorithm header. If you encrypt an object
+ // by using server-side encryption with customer-provided encryption keys (SSE-C)
+ // when you store the object in Amazon S3, then when you GET the object, you must
+ // use the following headers:
+ // - x-amz-server-side-encryption-customer-algorithm
+ // - x-amz-server-side-encryption-customer-key
+ // - x-amz-server-side-encryption-customer-key-MD5
+ // For more information about SSE-C, see Server-Side Encryption (Using
+ // Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerKey *string
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // Specifies the 128-bit MD5 digest of the customer-provided encryption key
+ // according to RFC 1321. Amazon S3 uses this header for a message integrity check
+ // to ensure that the encryption key was transmitted without error. If you encrypt
+ // an object by using server-side encryption with customer-provided encryption keys
+ // (SSE-C) when you store the object in Amazon S3, then when you GET the object,
+ // you must use the following headers:
+ // - x-amz-server-side-encryption-customer-algorithm
+ // - x-amz-server-side-encryption-customer-key
+ // - x-amz-server-side-encryption-customer-key-MD5
+ // For more information about SSE-C, see Server-Side Encryption (Using
+ // Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerKeyMD5 *string
- // VersionId used to reference a specific version of the object.
+ // Version ID used to reference a specific version of the object. By default, the
+ // GetObject operation returns the current version of an object. To return a
+ // different version, use the versionId subresource.
+ // - If you include a versionId in your request header, you must have the
+ // s3:GetObjectVersion permission to access a specific version of an object. The
+ // s3:GetObject permission is not required in this scenario.
+ // - If you request the current version of an object without a specific versionId
+ // in the request header, only the s3:GetObject permission is required. The
+ // s3:GetObjectVersion permission is not required in this scenario.
+ // - Directory buckets - S3 Versioning isn't enabled and supported for directory
+ // buckets. For this API operation, only the null value of the version ID is
+ // supported by directory buckets. You can only specify null to the versionId
+ // query parameter in the request.
+ // For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html)
+ // .
VersionId *string
noSmithyDocumentSerde
}
+func (in *GetObjectInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type GetObjectOutput struct {
- // Indicates that a range of bytes was specified.
+ // Indicates that a range of bytes was specified in the request.
AcceptRanges *string
// Object data.
Body io.ReadCloser
// Indicates whether the object uses an S3 Bucket Key for server-side encryption
- // with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // with Key Management Service (KMS) keys (SSE-KMS). This functionality is not
+ // supported for directory buckets.
+ BucketKeyEnabled *bool
// Specifies caching behavior along the request/reply chain.
CacheControl *string
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
// Specifies presentational information for the object.
ContentDisposition *string
- // Specifies what content encodings have been applied to the object and thus what
+ // Indicates what content encodings have been applied to the object and thus what
// decoding mechanisms must be applied to obtain the media-type referenced by the
// Content-Type header field.
ContentEncoding *string
@@ -328,7 +368,7 @@ type GetObjectOutput struct {
ContentLanguage *string
// Size of the body in bytes.
- ContentLength int64
+ ContentLength *int64
// The portion of the object returned in the response.
ContentRange *string
@@ -336,24 +376,34 @@ type GetObjectOutput struct {
// A standard MIME type describing the format of the object data.
ContentType *string
- // Specifies whether the object retrieved was (true) or was not (false) a Delete
+ // Indicates whether the object retrieved was (true) or was not (false) a Delete
// Marker. If false, this response header does not appear in the response.
- DeleteMarker bool
+ // - If the current version of the object is a delete marker, Amazon S3 behaves
+ // as if the object was deleted and includes x-amz-delete-marker: true in the
+ // response.
+ // - If the specified version in the request is a delete marker, the response
+ // returns a 405 Method Not Allowed error and the Last-Modified: timestamp
+ // response header.
+ DeleteMarker *bool
// An entity tag (ETag) is an opaque identifier assigned by a web server to a
// specific version of a resource found at a URL.
ETag *string
- // If the object expiration is configured (see PUT Bucket lifecycle), the response
- // includes this header. It includes the expiry-date and rule-id key-value pairs
- // providing object expiration information. The value of the rule-id is
- // URL-encoded.
+ // If the object expiration is configured (see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+ // ), the response includes this header. It includes the expiry-date and rule-id
+ // key-value pairs providing object expiration information. The value of the
+ // rule-id is URL-encoded. This functionality is not supported for directory
+ // buckets.
Expiration *string
// The date and time at which the object is no longer cacheable.
Expires *time.Time
- // Creation date of the object.
+ // Date and time when the object was last modified. General purpose buckets - When
+ // you specify a versionId of the object in your request, if the specified version
+ // in the request is a delete marker, the response returns a 405 Method Not Allowed
+ // error and the Last-Modified: timestamp response header.
LastModified *time.Time
// A map of metadata to store with the object in S3.
@@ -361,69 +411,88 @@ type GetObjectOutput struct {
// Map keys will be normalized to lower-case.
Metadata map[string]string
- // This is set to the number of metadata entries not returned in x-amz-meta
- // headers. This can happen if you create metadata using an API like SOAP that
- // supports more flexible metadata than the REST API. For example, using SOAP, you
- // can create metadata whose values are not legal HTTP headers.
- MissingMeta int32
+ // This is set to the number of metadata entries not returned in the headers that
+ // are prefixed with x-amz-meta- . This can happen if you create metadata using an
+ // API like SOAP that supports more flexible metadata than the REST API. For
+ // example, using SOAP, you can create metadata whose values are not legal HTTP
+ // headers. This functionality is not supported for directory buckets.
+ MissingMeta *int32
// Indicates whether this object has an active legal hold. This field is only
- // returned if you have permission to view an object's legal hold status.
+ // returned if you have permission to view an object's legal hold status. This
+ // functionality is not supported for directory buckets.
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
- // The Object Lock mode currently in place for this object.
+ // The Object Lock mode that's currently in place for this object. This
+ // functionality is not supported for directory buckets.
ObjectLockMode types.ObjectLockMode
- // The date and time when this object's Object Lock will expire.
+ // The date and time when this object's Object Lock will expire. This
+ // functionality is not supported for directory buckets.
ObjectLockRetainUntilDate *time.Time
// The count of parts this object has. This value is only returned if you specify
// partNumber in your request and the object was uploaded as a multipart upload.
- PartsCount int32
+ PartsCount *int32
// Amazon S3 can return this if your request involves a bucket that is either a
- // source or destination in a replication rule.
+ // source or destination in a replication rule. This functionality is not supported
+ // for directory buckets.
ReplicationStatus types.ReplicationStatus
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Provides information about object restoration action and expiration time of the
- // restored object copy.
+ // restored object copy. This functionality is not supported for directory buckets.
+ // Only the S3 Express One Zone storage class is supported by directory buckets to
+ // store objects.
Restore *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm used.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to confirm the encryption
+ // algorithm that's used. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to provide the round-trip
+ // message integrity verification of the customer-provided encryption key. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for the
- // object.
+ // If present, indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). For directory buckets, only
+ // server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is
+ // supported.
ServerSideEncryption types.ServerSideEncryption
// Provides storage class information of the object. Amazon S3 returns this header
- // for all objects except for S3 Standard storage class objects.
+ // for all objects except for S3 Standard storage class objects. Directory buckets
+ // - Only the S3 Express One Zone storage class is supported by directory buckets
+ // to store objects.
StorageClass types.StorageClass
- // The number of tags, if any, on the object.
- TagCount int32
+ // The number of tags, if any, on the object, when you have the relevant
+ // permission to read object tags. You can use GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
+ // to retrieve the tag set associated with an object. This functionality is not
+ // supported for directory buckets.
+ TagCount *int32
- // Version of the object.
+ // Version ID of the object. This functionality is not supported for directory
+ // buckets.
VersionId *string
// If the bucket is configured as a website, redirects requests for this object to
// another object in the same bucket or to an external URL. Amazon S3 stores the
- // value of this header in the object metadata.
+ // value of this header in the object metadata. This functionality is not supported
+ // for directory buckets.
WebsiteRedirectLocation *string
// Metadata pertaining to the operation's result.
@@ -433,6 +502,9 @@ type GetObjectOutput struct {
}
func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObject{}, middleware.After)
if err != nil {
return err
@@ -441,40 +513,47 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObject"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectValidationMiddleware(stack); err != nil {
@@ -486,6 +565,9 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectOutputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -504,14 +586,26 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObject(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObject",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
index 709e62ff..fc903cb3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,35 +13,24 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the access control list (ACL) of an object. To use this operation, you
-// must have s3:GetObjectAcl permissions or READ_ACP access to the object. For more
-// information, see Mapping of ACL permissions and access policy permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#acl-access-policy-permission-mapping)
-// in the Amazon S3 User Guide This action is not supported by Amazon S3 on
-// Outposts. Versioning By default, GET returns ACL information about the current
-// version of an object. To return ACL information about a different version, use
-// the versionId subresource. If your bucket uses the bucket owner enforced setting
-// for S3 Object Ownership, requests to read ACLs are still supported and return
-// the bucket-owner-full-control ACL with the owner being the account that created
-// the bucket. For more information, see Controlling object ownership and
-// disabling ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+// This operation is not supported by directory buckets. Returns the access
+// control list (ACL) of an object. To use this operation, you must have
+// s3:GetObjectAcl permissions or READ_ACP access to the object. For more
+// information, see Mapping of ACL permissions and access policy permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#acl-access-policy-permission-mapping)
+// in the Amazon S3 User Guide This functionality is not supported for Amazon S3 on
+// Outposts. By default, GET returns ACL information about the current version of
+// an object. To return ACL information about a different version, use the
+// versionId subresource. If your bucket uses the bucket owner enforced setting for
+// S3 Object Ownership, requests to read ACLs are still supported and return the
+// bucket-owner-full-control ACL with the owner being the account that created the
+// bucket. For more information, see Controlling object ownership and disabling
+// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
// in the Amazon S3 User Guide. The following operations are related to
-// GetObjectAcl:
-//
-// * GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// GetObjectAttributes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// *
-// DeleteObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// *
-// PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// GetObjectAcl :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
+// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
func (c *Client) GetObjectAcl(ctx context.Context, params *GetObjectAclInput, optFns ...func(*Options)) (*GetObjectAclOutput, error) {
if params == nil {
params = &GetObjectAclInput{}
@@ -59,13 +49,14 @@ func (c *Client) GetObjectAcl(ctx context.Context, params *GetObjectAclInput, op
type GetObjectAclInput struct {
// The bucket name that contains the object for which to get the ACL information.
- // When using this action with an access point, you must direct requests to the
+ // Access points - When you use this action with an access point, you must provide
+ // the alias of the access point in place of the bucket name or specify the access
+ // point ARN. When using the access point ARN, you must direct requests to the
// access point hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
// in the Amazon S3 User Guide.
//
// This member is required.
@@ -76,25 +67,34 @@ type GetObjectAclInput struct {
// This member is required.
Key *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // VersionId used to reference a specific version of the object.
+ // Version ID used to reference a specific version of the object. This
+ // functionality is not supported for directory buckets.
VersionId *string
noSmithyDocumentSerde
}
+func (in *GetObjectAclInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type GetObjectAclOutput struct {
// A list of grants.
@@ -104,7 +104,7 @@ type GetObjectAclOutput struct {
Owner *types.Owner
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -114,6 +114,9 @@ type GetObjectAclOutput struct {
}
func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectAcl{}, middleware.After)
if err != nil {
return err
@@ -122,34 +125,38 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObjectAcl"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -158,7 +165,10 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectAclValidationMiddleware(stack); err != nil {
@@ -170,6 +180,9 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectAclUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -185,14 +198,26 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectAclInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObjectAcl(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObjectAcl",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go
index fb1683e7..dd1b9257 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -14,113 +15,95 @@ import (
)
// Retrieves all the metadata from an object without returning the object itself.
-// This action is useful if you're interested only in an object's metadata. To use
-// GetObjectAttributes, you must have READ access to the object.
-// GetObjectAttributes combines the functionality of GetObjectAcl,
-// GetObjectLegalHold, GetObjectLockConfiguration, GetObjectRetention,
-// GetObjectTagging, HeadObject, and ListParts. All of the data returned with each
-// of those individual calls can be returned with a single call to
-// GetObjectAttributes. If you encrypt an object by using server-side encryption
+// This operation is useful if you're interested only in an object's metadata.
+// GetObjectAttributes combines the functionality of HeadObject and ListParts . All
+// of the data returned with each of those individual calls can be returned with a
+// single call to GetObjectAttributes . Directory buckets - For directory buckets,
+// you must make requests for this API operation to the Zonal endpoint. These
+// endpoints support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - To use GetObjectAttributes , you must
+// have READ access to the object. The permissions that you need to use this
+// operation with depend on whether the bucket is versioned. If the bucket is
+// versioned, you need both the s3:GetObjectVersion and
+// s3:GetObjectVersionAttributes permissions for this operation. If the bucket is
+// not versioned, you need the s3:GetObject and s3:GetObjectAttributes
+// permissions. For more information, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// in the Amazon S3 User Guide. If the object that you request does not exist, the
+// error Amazon S3 returns depends on whether you also have the s3:ListBucket
+// permission.
+// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
+// HTTP status code 404 Not Found ("no such key") error.
+// - If you don't have the s3:ListBucket permission, Amazon S3 returns an HTTP
+// status code 403 Forbidden ("access denied") error.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
+//
+// Encryption Encryption request headers, like x-amz-server-side-encryption ,
+// should not be sent for HEAD requests if your object uses server-side encryption
+// with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side
+// encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side
+// encryption with Amazon S3 managed encryption keys (SSE-S3). The
+// x-amz-server-side-encryption header is used when you PUT an object to S3 and
+// want to specify the encryption method. If you include this header in a GET
+// request for an object that uses these types of keys, you’ll get an HTTP 400 Bad
+// Request error. It's because the encryption method can't be changed when you
+// retrieve the object. If you encrypt an object by using server-side encryption
// with customer-provided encryption keys (SSE-C) when you store the object in
// Amazon S3, then when you retrieve the metadata from the object, you must use the
-// following headers:
-//
-// * x-amz-server-side-encryption-customer-algorithm
-//
-// *
-// x-amz-server-side-encryption-customer-key
-//
-// *
-// x-amz-server-side-encryption-customer-key-MD5
-//
-// For more information about SSE-C,
-// see Server-Side Encryption (Using Customer-Provided Encryption Keys)
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
-// in the Amazon S3 User Guide.
-//
-// * Encryption request headers, such as
-// x-amz-server-side-encryption, should not be sent for GET requests if your object
-// uses server-side encryption with Amazon Web Services KMS keys stored in Amazon
-// Web Services Key Management Service (SSE-KMS) or server-side encryption with
-// Amazon S3 managed encryption keys (SSE-S3). If your object does use these types
-// of keys, you'll get an HTTP 400 Bad Request error.
-//
-// * The last modified property
-// in this case is the creation date of the object.
-//
-// Consider the following when
-// using request headers:
-//
-// * If both of the If-Match and If-Unmodified-Since
-// headers are present in the request as follows, then Amazon S3 returns the HTTP
-// status code 200 OK and the data requested:
-//
-// * If-Match condition evaluates to
-// true.
-//
-// * If-Unmodified-Since condition evaluates to false.
-//
-// * If both of the
-// If-None-Match and If-Modified-Since headers are present in the request as
-// follows, then Amazon S3 returns the HTTP status code 304 Not Modified:
-//
-// *
-// If-None-Match condition evaluates to false.
+// following headers to provide the encryption key for the server to be able to
+// retrieve the object's metadata. The headers are:
+// - x-amz-server-side-encryption-customer-algorithm
+// - x-amz-server-side-encryption-customer-key
+// - x-amz-server-side-encryption-customer-key-MD5
//
-// * If-Modified-Since condition
-// evaluates to true.
+// For more information about SSE-C, see Server-Side Encryption (Using
+// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+// in the Amazon S3 User Guide. Directory bucket permissions - For directory
+// buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (
+// AES256 ) is supported. Versioning Directory buckets - S3 Versioning isn't
+// enabled and supported for directory buckets. For this API operation, only the
+// null value of the version ID is supported by directory buckets. You can only
+// specify null to the versionId query parameter in the request. Conditional
+// request headers Consider the following when using request headers:
+// - If both of the If-Match and If-Unmodified-Since headers are present in the
+// request as follows, then Amazon S3 returns the HTTP status code 200 OK and the
+// data requested:
+// - If-Match condition evaluates to true .
+// - If-Unmodified-Since condition evaluates to false . For more information
+// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
+// .
+// - If both of the If-None-Match and If-Modified-Since headers are present in
+// the request as follows, then Amazon S3 returns the HTTP status code 304 Not
+// Modified :
+// - If-None-Match condition evaluates to false .
+// - If-Modified-Since condition evaluates to true . For more information about
+// conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
//
-// For more information about conditional requests, see RFC
-// 7232 (https://tools.ietf.org/html/rfc7232). Permissions The permissions that you
-// need to use this operation depend on whether the bucket is versioned. If the
-// bucket is versioned, you need both the s3:GetObjectVersion and
-// s3:GetObjectVersionAttributes permissions for this operation. If the bucket is
-// not versioned, you need the s3:GetObject and s3:GetObjectAttributes permissions.
-// For more information, see Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) in
-// the Amazon S3 User Guide. If the object that you request does not exist, the
-// error Amazon S3 returns depends on whether you also have the s3:ListBucket
-// permission.
-//
-// * If you have the s3:ListBucket permission on the bucket, Amazon S3
-// returns an HTTP status code 404 Not Found ("no such key") error.
-//
-// * If you don't
-// have the s3:ListBucket permission, Amazon S3 returns an HTTP status code 403
-// Forbidden ("access denied") error.
-//
-// The following actions are related to
-// GetObjectAttributes:
-//
-// * GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// GetObjectAcl
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
-//
-// *
-// GetObjectLegalHold
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html)
-//
-// *
-// GetObjectLockConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html)
-//
-// *
-// GetObjectRetention
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html)
-//
-// *
-// GetObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-//
-// *
-// HeadObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html)
-//
-// *
-// ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following actions are
+// related to GetObjectAttributes :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
+// - GetObjectLegalHold (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html)
+// - GetObjectLockConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html)
+// - GetObjectRetention (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html)
+// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
+// - HeadObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
func (c *Client) GetObjectAttributes(ctx context.Context, params *GetObjectAttributesInput, optFns ...func(*Options)) (*GetObjectAttributesOutput, error) {
if params == nil {
params = &GetObjectAttributesInput{}
@@ -138,23 +121,31 @@ func (c *Client) GetObjectAttributes(ctx context.Context, params *GetObjectAttri
type GetObjectAttributesInput struct {
- // The name of the bucket that contains the object. When using this action with an
- // access point, you must direct requests to the access point hostname. The access
- // point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The name of the bucket that contains the object. Directory buckets - When you
+ // use this operation with a directory bucket, you must use virtual-hosted-style
+ // requests in the format Bucket_name.s3express-az_id.region.amazonaws.com .
+ // Path-style requests are not supported. Directory bucket names must be unique in
+ // the chosen Availability Zone. Bucket names must follow the format
+ // bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -164,61 +155,76 @@ type GetObjectAttributesInput struct {
// This member is required.
Key *string
- // An XML header that specifies the fields at the root level that you want returned
- // in the response. Fields that you do not specify are not returned.
+ // Specifies the fields at the root level that you want returned in the response.
+ // Fields that you do not specify are not returned.
//
// This member is required.
ObjectAttributes []types.ObjectAttributes
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Sets the maximum number of parts to return.
- MaxParts int32
+ MaxParts *int32
- // Specifies the part after which listing should begin. Only parts with higher part
- // numbers will be listed.
+ // Specifies the part after which listing should begin. Only parts with higher
+ // part numbers will be listed.
PartNumberMarker *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // Specifies the algorithm to use when encrypting the object (for example, AES256).
+ // Specifies the algorithm to use when encrypting the object (for example,
+ // AES256). This functionality is not supported for directory buckets.
SSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use in
// encrypting data. This value is used to store the object and then it is
// discarded; Amazon S3 does not store the encryption key. The key must be
// appropriate for use with the algorithm specified in the
- // x-amz-server-side-encryption-customer-algorithm header.
+ // x-amz-server-side-encryption-customer-algorithm header. This functionality is
+ // not supported for directory buckets.
SSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. This functionality is not
+ // supported for directory buckets.
SSECustomerKeyMD5 *string
- // The version ID used to reference a specific version of the object.
+ // The version ID used to reference a specific version of the object. S3
+ // Versioning isn't enabled and supported for directory buckets. For this API
+ // operation, only the null value of the version ID is supported by directory
+ // buckets. You can only specify null to the versionId query parameter in the
+ // request.
VersionId *string
noSmithyDocumentSerde
}
+func (in *GetObjectAttributesInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type GetObjectAttributesOutput struct {
// The checksum or digest of the object.
Checksum *types.Checksum
- // Specifies whether the object retrieved was (true) or was not (false) a delete
- // marker. If false, this response header does not appear in the response.
- DeleteMarker bool
+ // Specifies whether the object retrieved was ( true ) or was not ( false ) a
+ // delete marker. If false , this response header does not appear in the response.
+ // This functionality is not supported for directory buckets.
+ DeleteMarker *bool
// An ETag is an opaque identifier assigned by a web server to a specific version
// of a resource found at a URL.
@@ -231,19 +237,21 @@ type GetObjectAttributesOutput struct {
ObjectParts *types.GetObjectAttributesParts
// The size of the object in bytes.
- ObjectSize int64
+ ObjectSize *int64
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Provides the storage class information of the object. Amazon S3 returns this
// header for all objects except for S3 Standard storage class objects. For more
- // information, see Storage Classes
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
+ // information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+ // . Directory buckets - Only the S3 Express One Zone storage class is supported by
+ // directory buckets to store objects.
StorageClass types.StorageClass
- // The version ID of the object.
+ // The version ID of the object. This functionality is not supported for directory
+ // buckets.
VersionId *string
// Metadata pertaining to the operation's result.
@@ -253,6 +261,9 @@ type GetObjectAttributesOutput struct {
}
func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectAttributes{}, middleware.After)
if err != nil {
return err
@@ -261,34 +272,38 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObjectAttributes"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -297,7 +312,10 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectAttributesValidationMiddleware(stack); err != nil {
@@ -309,6 +327,9 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectAttributesUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -324,14 +345,26 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectAttributesInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObjectAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObjectAttributes",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
index a2446ac3..548f5e1c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,13 +13,11 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Gets an object's current legal hold status. For more information, see Locking
-// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). This
-// action is not supported by Amazon S3 on Outposts. The following action is
-// related to GetObjectLegalHold:
-//
-// * GetObjectAttributes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
+// This operation is not supported by directory buckets. Gets an object's current
+// legal hold status. For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+// . This functionality is not supported for Amazon S3 on Outposts. The following
+// action is related to GetObjectLegalHold :
+// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
func (c *Client) GetObjectLegalHold(ctx context.Context, params *GetObjectLegalHoldInput, optFns ...func(*Options)) (*GetObjectLegalHoldOutput, error) {
if params == nil {
params = &GetObjectLegalHoldInput{}
@@ -37,13 +36,14 @@ func (c *Client) GetObjectLegalHold(ctx context.Context, params *GetObjectLegalH
type GetObjectLegalHoldInput struct {
// The bucket name containing the object whose legal hold status you want to
- // retrieve. When using this action with an access point, you must direct requests
- // to the access point hostname. The access point hostname takes the form
+ // retrieve. Access points - When you use this action with an access point, you
+ // must provide the alias of the access point in place of the bucket name or
+ // specify the access point ARN. When using the access point ARN, you must direct
+ // requests to the access point hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
// in the Amazon S3 User Guide.
//
// This member is required.
@@ -54,17 +54,19 @@ type GetObjectLegalHoldInput struct {
// This member is required.
Key *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The version ID of the object whose legal hold status you want to retrieve.
@@ -73,6 +75,11 @@ type GetObjectLegalHoldInput struct {
noSmithyDocumentSerde
}
+func (in *GetObjectLegalHoldInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type GetObjectLegalHoldOutput struct {
// The current legal hold status for the specified object.
@@ -85,6 +92,9 @@ type GetObjectLegalHoldOutput struct {
}
func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectLegalHold{}, middleware.After)
if err != nil {
return err
@@ -93,34 +103,38 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObjectLegalHold"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -129,7 +143,10 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectLegalHoldValidationMiddleware(stack); err != nil {
@@ -141,6 +158,9 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectLegalHoldUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -156,14 +176,26 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectLegalHoldInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObjectLegalHold(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObjectLegalHold",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
index 91793c13..e8e2fbd9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,15 +13,12 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Gets the Object Lock configuration for a bucket. The rule specified in the
-// Object Lock configuration will be applied by default to every new object placed
-// in the specified bucket. For more information, see Locking Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). The
-// following action is related to GetObjectLockConfiguration:
-//
-// *
-// GetObjectAttributes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
+// This operation is not supported by directory buckets. Gets the Object Lock
+// configuration for a bucket. The rule specified in the Object Lock configuration
+// will be applied by default to every new object placed in the specified bucket.
+// For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+// . The following action is related to GetObjectLockConfiguration :
+// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
func (c *Client) GetObjectLockConfiguration(ctx context.Context, params *GetObjectLockConfigurationInput, optFns ...func(*Options)) (*GetObjectLockConfigurationOutput, error) {
if params == nil {
params = &GetObjectLockConfigurationInput{}
@@ -38,27 +36,33 @@ func (c *Client) GetObjectLockConfiguration(ctx context.Context, params *GetObje
type GetObjectLockConfigurationInput struct {
- // The bucket whose Object Lock configuration you want to retrieve. When using this
- // action with an access point, you must direct requests to the access point
+ // The bucket whose Object Lock configuration you want to retrieve. Access points
+ // - When you use this action with an access point, you must provide the alias of
+ // the access point in place of the bucket name or specify the access point ARN.
+ // When using the access point ARN, you must direct requests to the access point
// hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
// in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetObjectLockConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type GetObjectLockConfigurationOutput struct {
// The specified bucket's Object Lock configuration.
@@ -71,6 +75,9 @@ type GetObjectLockConfigurationOutput struct {
}
func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectLockConfiguration{}, middleware.After)
if err != nil {
return err
@@ -79,34 +86,38 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObjectLockConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -115,7 +126,10 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectLockConfigurationValidationMiddleware(stack); err != nil {
@@ -127,6 +141,9 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectLockConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -142,21 +159,33 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectLockConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObjectLockConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObjectLockConfiguration",
}
}
-// getGetObjectLockConfigurationBucketMember returns a pointer to string denoting a
-// provided bucket member valueand a boolean indicating if the input has a modeled
-// bucket name,
+// getGetObjectLockConfigurationBucketMember returns a pointer to string denoting
+// a provided bucket member valueand a boolean indicating if the input has a
+// modeled bucket name,
func getGetObjectLockConfigurationBucketMember(input interface{}) (*string, bool) {
in := input.(*GetObjectLockConfigurationInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
index 33fc0489..b4daabf1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,13 +13,11 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Retrieves an object's retention settings. For more information, see Locking
-// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). This
-// action is not supported by Amazon S3 on Outposts. The following action is
-// related to GetObjectRetention:
-//
-// * GetObjectAttributes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
+// This operation is not supported by directory buckets. Retrieves an object's
+// retention settings. For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+// . This functionality is not supported for Amazon S3 on Outposts. The following
+// action is related to GetObjectRetention :
+// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
func (c *Client) GetObjectRetention(ctx context.Context, params *GetObjectRetentionInput, optFns ...func(*Options)) (*GetObjectRetentionOutput, error) {
if params == nil {
params = &GetObjectRetentionInput{}
@@ -37,13 +36,14 @@ func (c *Client) GetObjectRetention(ctx context.Context, params *GetObjectRetent
type GetObjectRetentionInput struct {
// The bucket name containing the object whose retention settings you want to
- // retrieve. When using this action with an access point, you must direct requests
- // to the access point hostname. The access point hostname takes the form
+ // retrieve. Access points - When you use this action with an access point, you
+ // must provide the alias of the access point in place of the bucket name or
+ // specify the access point ARN. When using the access point ARN, you must direct
+ // requests to the access point hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
// in the Amazon S3 User Guide.
//
// This member is required.
@@ -54,17 +54,19 @@ type GetObjectRetentionInput struct {
// This member is required.
Key *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The version ID for the object whose retention settings you want to retrieve.
@@ -73,6 +75,11 @@ type GetObjectRetentionInput struct {
noSmithyDocumentSerde
}
+func (in *GetObjectRetentionInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type GetObjectRetentionOutput struct {
// The container element for an object's retention settings.
@@ -85,6 +92,9 @@ type GetObjectRetentionOutput struct {
}
func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectRetention{}, middleware.After)
if err != nil {
return err
@@ -93,34 +103,38 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObjectRetention"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -129,7 +143,10 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectRetentionValidationMiddleware(stack); err != nil {
@@ -141,6 +158,9 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectRetentionUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -156,14 +176,26 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectRetentionInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObjectRetention(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObjectRetention",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
index cec5210c..dc15914a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,28 +13,20 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the tag-set of an object. You send the GET request against the tagging
-// subresource associated with the object. To use this operation, you must have
-// permission to perform the s3:GetObjectTagging action. By default, the GET action
-// returns information about current version of an object. For a versioned bucket,
-// you can have multiple versions of an object in your bucket. To retrieve tags of
-// any other version, use the versionId query parameter. You also need permission
-// for the s3:GetObjectVersionTagging action. By default, the bucket owner has this
+// This operation is not supported by directory buckets. Returns the tag-set of an
+// object. You send the GET request against the tagging subresource associated with
+// the object. To use this operation, you must have permission to perform the
+// s3:GetObjectTagging action. By default, the GET action returns information about
+// current version of an object. For a versioned bucket, you can have multiple
+// versions of an object in your bucket. To retrieve tags of any other version, use
+// the versionId query parameter. You also need permission for the
+// s3:GetObjectVersionTagging action. By default, the bucket owner has this
// permission and can grant this permission to others. For information about the
-// Amazon S3 object tagging feature, see Object Tagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). The
-// following actions are related to GetObjectTagging:
-//
-// * DeleteObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
-//
-// *
-// GetObjectAttributes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// *
-// PutObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
+// Amazon S3 object tagging feature, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html)
+// . The following actions are related to GetObjectTagging :
+// - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
+// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
+// - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
func (c *Client) GetObjectTagging(ctx context.Context, params *GetObjectTaggingInput, optFns ...func(*Options)) (*GetObjectTaggingOutput, error) {
if params == nil {
params = &GetObjectTaggingInput{}
@@ -52,22 +45,22 @@ func (c *Client) GetObjectTagging(ctx context.Context, params *GetObjectTaggingI
type GetObjectTaggingInput struct {
// The bucket name containing the object for which to get the tagging information.
- // When using this action with an access point, you must direct requests to the
+ // Access points - When you use this action with an access point, you must provide
+ // the alias of the access point in place of the bucket name or specify the access
+ // point ARN. When using the access point ARN, you must direct requests to the
// access point hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. S3 on Outposts - When you use this action with
+ // Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname.
+ // The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -77,17 +70,19 @@ type GetObjectTaggingInput struct {
// This member is required.
Key *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The versionId of the object for which to get the tagging information.
@@ -96,6 +91,11 @@ type GetObjectTaggingInput struct {
noSmithyDocumentSerde
}
+func (in *GetObjectTaggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type GetObjectTaggingOutput struct {
// Contains the tag set.
@@ -113,6 +113,9 @@ type GetObjectTaggingOutput struct {
}
func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectTagging{}, middleware.After)
if err != nil {
return err
@@ -121,34 +124,38 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObjectTagging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -157,7 +164,10 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectTaggingValidationMiddleware(stack); err != nil {
@@ -169,6 +179,9 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectTaggingUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -184,14 +197,26 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectTaggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObjectTagging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObjectTagging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
index fa71442c..9fc83178 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -13,18 +14,14 @@ import (
"io"
)
-// Returns torrent files from a bucket. BitTorrent can save you bandwidth when
-// you're distributing large files. For more information about BitTorrent, see
-// Using BitTorrent with Amazon S3
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html). You can get
-// torrent only for objects that are less than 5 GB in size, and that are not
-// encrypted using server-side encryption with a customer-provided encryption key.
-// To use GET, you must have READ access to the object. This action is not
-// supported by Amazon S3 on Outposts. The following action is related to
-// GetObjectTorrent:
-//
-// * GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// This operation is not supported by directory buckets. Returns torrent files
+// from a bucket. BitTorrent can save you bandwidth when you're distributing large
+// files. You can get torrent only for objects that are less than 5 GB in size, and
+// that are not encrypted using server-side encryption with a customer-provided
+// encryption key. To use GET, you must have READ access to the object. This
+// functionality is not supported for Amazon S3 on Outposts. The following action
+// is related to GetObjectTorrent :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
func (c *Client) GetObjectTorrent(ctx context.Context, params *GetObjectTorrentInput, optFns ...func(*Options)) (*GetObjectTorrentOutput, error) {
if params == nil {
params = &GetObjectTorrentInput{}
@@ -52,29 +49,36 @@ type GetObjectTorrentInput struct {
// This member is required.
Key *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
noSmithyDocumentSerde
}
+func (in *GetObjectTorrentInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type GetObjectTorrentOutput struct {
// A Bencoded dictionary as defined by the BitTorrent specification
Body io.ReadCloser
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -84,6 +88,9 @@ type GetObjectTorrentOutput struct {
}
func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectTorrent{}, middleware.After)
if err != nil {
return err
@@ -92,40 +99,47 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetObjectTorrent"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetObjectTorrentValidationMiddleware(stack); err != nil {
@@ -137,6 +151,9 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetObjectTorrentUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -152,14 +169,26 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetObjectTorrentInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetObjectTorrent(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetObjectTorrent",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
index eb42c7d2..3689a4e1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
@@ -4,44 +4,32 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use
-// this operation, you must have the s3:GetBucketPublicAccessBlock permission. For
-// more information about Amazon S3 permissions, see Specifying Permissions in a
-// Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or an
-// object, it checks the PublicAccessBlock configuration for both the bucket (or
-// the bucket that contains the object) and the bucket owner's account. If the
+// This operation is not supported by directory buckets. Retrieves the
+// PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation,
+// you must have the s3:GetBucketPublicAccessBlock permission. For more
+// information about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// . When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or
+// an object, it checks the PublicAccessBlock configuration for both the bucket
+// (or the bucket that contains the object) and the bucket owner's account. If the
// PublicAccessBlock settings are different between the bucket and the account,
// Amazon S3 uses the most restrictive combination of the bucket-level and
// account-level settings. For more information about when Amazon S3 considers a
-// bucket or an object public, see The Meaning of "Public"
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
-// The following operations are related to GetPublicAccessBlock:
-//
-// * Using Amazon S3
-// Block Public Access
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-//
-// *
-// PutPublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// *
-// GetPublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// *
-// DeletePublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
+// bucket or an object public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
+// . The following operations are related to GetPublicAccessBlock :
+// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
+// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
func (c *Client) GetPublicAccessBlock(ctx context.Context, params *GetPublicAccessBlockInput, optFns ...func(*Options)) (*GetPublicAccessBlockOutput, error) {
if params == nil {
params = &GetPublicAccessBlockInput{}
@@ -65,14 +53,19 @@ type GetPublicAccessBlockInput struct {
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *GetPublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type GetPublicAccessBlockOutput struct {
// The PublicAccessBlock configuration currently in effect for this Amazon S3
@@ -86,6 +79,9 @@ type GetPublicAccessBlockOutput struct {
}
func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpGetPublicAccessBlock{}, middleware.After)
if err != nil {
return err
@@ -94,34 +90,38 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetPublicAccessBlock"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -130,7 +130,10 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpGetPublicAccessBlockValidationMiddleware(stack); err != nil {
@@ -142,6 +145,9 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addGetPublicAccessBlockUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -157,14 +163,26 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *GetPublicAccessBlockInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opGetPublicAccessBlock(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "GetPublicAccessBlock",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
index 7344f202..5f595891 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
@@ -17,27 +17,44 @@ import (
"time"
)
-// This action is useful to determine if a bucket exists and you have permission to
-// access it. The action returns a 200 OK if the bucket exists and you have
-// permission to access it. If the bucket does not exist or you do not have
-// permission to access it, the HEAD request returns a generic 404 Not Found or 403
-// Forbidden code. A message body is not included, so you cannot determine the
-// exception beyond these error codes. To use this operation, you must have
-// permissions to perform the s3:ListBucket action. The bucket owner has this
-// permission by default and can grant this permission to others. For more
-// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// To use this API against an access point, you must provide the alias of the
-// access point in place of the bucket name or specify the access point ARN. When
-// using the access point ARN, you must direct requests to the access point
-// hostname. The access point hostname takes the form
-// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using the
-// Amazon Web Services SDKs, you provide the ARN in place of the bucket name. For
-// more information see, Using access points
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html).
+// You can use this operation to determine if a bucket exists and if you have
+// permission to access it. The action returns a 200 OK if the bucket exists and
+// you have permission to access it. If the bucket does not exist or you do not
+// have permission to access it, the HEAD request returns a generic 400 Bad Request
+// , 403 Forbidden or 404 Not Found code. A message body is not included, so you
+// cannot determine the exception beyond these HTTP response codes. Directory
+// buckets - You must make requests for this API operation to the Zonal endpoint.
+// These endpoints support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests
+// are not supported. For more information, see Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Authentication and authorization All HeadBucket
+// requests must be authenticated and signed by using IAM credentials (access key
+// ID and secret access key for the IAM identities). All headers with the x-amz-
+// prefix, including x-amz-copy-source , must be signed. For more information, see
+// REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+// . Directory bucket - You must use IAM credentials to authenticate and authorize
+// your access to the HeadBucket API operation, instead of using the temporary
+// security credentials through the CreateSession API operation. Amazon Web
+// Services CLI or SDKs handles authentication and authorization on your behalf.
+// Permissions
+// - General purpose bucket permissions - To use this operation, you must have
+// permissions to perform the s3:ListBucket action. The bucket owner has this
+// permission by default and can grant this permission to others. For more
+// information about permissions, see Managing access permissions to your Amazon
+// S3 resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - You must have the s3express:CreateSession
+// permission in the Action element of a policy. By default, the session is in
+// the ReadWrite mode. If you want to restrict the access, you can explicitly set
+// the s3express:SessionMode condition key to ReadOnly on the bucket. For more
+// information about example bucket policies, see Example bucket policies for S3
+// Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
+// and Amazon Web Services Identity and Access Management (IAM) identity-based
+// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html)
+// in the Amazon S3 User Guide.
+//
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com .
func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns ...func(*Options)) (*HeadBucketOutput, error) {
if params == nil {
params = &HeadBucketInput{}
@@ -55,35 +72,73 @@ func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns
type HeadBucketInput struct {
- // The bucket name. When using this action with an access point, you must direct
- // requests to the access point hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // The bucket name. Directory buckets - When you use this operation with a
+ // directory bucket, you must use virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Object Lambda access points - When you use this API
+ // operation with an Object Lambda access point, provide the alias of the Object
+ // Lambda access point in place of the bucket name. If the Object Lambda access
+ // point alias in a request is not valid, the error code
+ // InvalidAccessPointAliasError is returned. For more information about
+ // InvalidAccessPointAliasError , see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
+ // . Access points and Object Lambda access points are not supported by directory
+ // buckets. S3 on Outposts - When you use this action with Amazon S3 on Outposts,
// you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
// hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *HeadBucketInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type HeadBucketOutput struct {
+
+ // Indicates whether the bucket name used in the request is an access point alias.
+ // This functionality is not supported for directory buckets.
+ AccessPointAlias *bool
+
+ // The name of the location where the bucket will be created. For directory
+ // buckets, the AZ ID of the Availability Zone where the bucket is created. An
+ // example AZ ID value is usw2-az1 . This functionality is only supported by
+ // directory buckets.
+ BucketLocationName *string
+
+ // The type of location where the bucket is created. This functionality is only
+ // supported by directory buckets.
+ BucketLocationType types.LocationType
+
+ // The Region that the bucket is located. This functionality is not supported for
+ // directory buckets.
+ BucketRegion *string
+
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -91,6 +146,9 @@ type HeadBucketOutput struct {
}
func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpHeadBucket{}, middleware.After)
if err != nil {
return err
@@ -99,34 +157,38 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "HeadBucket"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -135,7 +197,10 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpHeadBucketValidationMiddleware(stack); err != nil {
@@ -147,6 +212,9 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addHeadBucketUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -162,9 +230,22 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *HeadBucketInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
// HeadBucketAPIClient is a client that implements the HeadBucket operation.
type HeadBucketAPIClient interface {
HeadBucket(context.Context, *HeadBucketInput, ...func(*Options)) (*HeadBucketOutput, error)
@@ -178,16 +259,25 @@ type BucketExistsWaiterOptions struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
APIOptions []func(*middleware.Stack) error
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
// MinDelay is the minimum amount of time to delay between retries. If unset,
// BucketExistsWaiter will use default minimum delay of 5 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
- // MaxDelay is the maximum amount of time to delay between retries. If unset or set
- // to zero, BucketExistsWaiter will use default max delay of 120 seconds. Note that
- // MaxDelay must resolve to value greater than or equal to the MinDelay.
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, BucketExistsWaiter will use default max delay of 120 seconds. Note
+ // that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
@@ -277,6 +367,9 @@ func (w *BucketExistsWaiter) WaitForOutput(ctx context.Context, params *HeadBuck
out, err := w.client.HeadBucket(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
})
retryable, err := options.Retryable(ctx, params, out, err)
@@ -331,16 +424,25 @@ type BucketNotExistsWaiterOptions struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
APIOptions []func(*middleware.Stack) error
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
// MinDelay is the minimum amount of time to delay between retries. If unset,
// BucketNotExistsWaiter will use default minimum delay of 5 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
- // MaxDelay is the maximum amount of time to delay between retries. If unset or set
- // to zero, BucketNotExistsWaiter will use default max delay of 120 seconds. Note
- // that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, BucketNotExistsWaiter will use default max delay of 120 seconds.
+ // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
@@ -380,9 +482,9 @@ func NewBucketNotExistsWaiter(client HeadBucketAPIClient, optFns ...func(*Bucket
}
}
-// Wait calls the waiter function for BucketNotExists waiter. The maxWaitDur is the
-// maximum wait duration the waiter will wait. The maxWaitDur is required and must
-// be greater than zero.
+// Wait calls the waiter function for BucketNotExists waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
func (w *BucketNotExistsWaiter) Wait(ctx context.Context, params *HeadBucketInput, maxWaitDur time.Duration, optFns ...func(*BucketNotExistsWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
@@ -431,6 +533,9 @@ func (w *BucketNotExistsWaiter) WaitForOutput(ctx context.Context, params *HeadB
out, err := w.client.HeadBucket(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
})
retryable, err := options.Retryable(ctx, params, out, err)
@@ -479,13 +584,13 @@ func newServiceMetadataMiddleware_opHeadBucket(region string) *awsmiddleware.Reg
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "HeadBucket",
}
}
-// getHeadBucketBucketMember returns a pointer to string denoting a provided bucket
-// member valueand a boolean indicating if the input has a modeled bucket name,
+// getHeadBucketBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
func getHeadBucketBucketMember(input interface{}) (*string, bool) {
in := input.(*HeadBucketInput)
if in.Bucket == nil {
@@ -508,3 +613,34 @@ func addHeadBucketUpdateEndpoint(stack *middleware.Stack, options Options) error
DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
})
}
+
+// PresignHeadBucket is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignHeadBucket(ctx context.Context, params *HeadBucketInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &HeadBucketInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "HeadBucket", params, clientOptFns,
+ c.client.addOperationHeadBucketMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ addHeadBucketPayloadAsUnsigned,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
+
+func addHeadBucketPayloadAsUnsigned(stack *middleware.Stack, options Options) error {
+ v4.RemoveContentSHA256HeaderMiddleware(stack)
+ v4.RemoveComputePayloadSHA256Middleware(stack)
+ return v4.AddUnsignedPayloadMiddleware(stack)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
index 1e745a7e..5b7e9b6c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
@@ -10,7 +10,6 @@ import (
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
- smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
@@ -18,93 +17,89 @@ import (
"time"
)
-// The HEAD action retrieves metadata from an object without returning the object
-// itself. This action is useful if you're only interested in an object's metadata.
-// To use HEAD, you must have READ access to the object. A HEAD request has the
-// same options as a GET action on an object. The response is identical to the GET
-// response except that there is no response body. Because of this, if the HEAD
-// request generates an error, it returns a generic 404 Not Found or 403 Forbidden
-// code. It is not possible to retrieve the exact exception beyond these error
-// codes. If you encrypt an object by using server-side encryption with
-// customer-provided encryption keys (SSE-C) when you store the object in Amazon
-// S3, then when you retrieve the metadata from the object, you must use the
-// following headers:
+// The HEAD operation retrieves metadata from an object without returning the
+// object itself. This operation is useful if you're interested only in an object's
+// metadata. A HEAD request has the same options as a GET operation on an object.
+// The response is identical to the GET response except that there is no response
+// body. Because of this, if the HEAD request generates an error, it returns a
+// generic code, such as 400 Bad Request , 403 Forbidden , 404 Not Found , 405
+// Method Not Allowed , 412 Precondition Failed , or 304 Not Modified . It's not
+// possible to retrieve the exact exception of these error codes. Request headers
+// are limited to 8 KB in size. For more information, see Common Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html)
+// . Directory buckets - For directory buckets, you must make requests for this API
+// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
+// requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - To use HEAD , you must have the
+// s3:GetObject permission. You need the relevant read object (or version)
+// permission for this operation. For more information, see Actions, resources,
+// and condition keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html)
+// in the Amazon S3 User Guide. If the object you request doesn't exist, the error
+// that Amazon S3 returns depends on whether you also have the s3:ListBucket
+// permission.
+// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
+// HTTP status code 404 Not Found error.
+// - If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP
+// status code 403 Forbidden error.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// * x-amz-server-side-encryption-customer-algorithm
+// Encryption Encryption request headers, like x-amz-server-side-encryption ,
+// should not be sent for HEAD requests if your object uses server-side encryption
+// with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side
+// encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side
+// encryption with Amazon S3 managed encryption keys (SSE-S3). The
+// x-amz-server-side-encryption header is used when you PUT an object to S3 and
+// want to specify the encryption method. If you include this header in a HEAD
+// request for an object that uses these types of keys, you’ll get an HTTP 400 Bad
+// Request error. It's because the encryption method can't be changed when you
+// retrieve the object. If you encrypt an object by using server-side encryption
+// with customer-provided encryption keys (SSE-C) when you store the object in
+// Amazon S3, then when you retrieve the metadata from the object, you must use the
+// following headers to provide the encryption key for the server to be able to
+// retrieve the object's metadata. The headers are:
+// - x-amz-server-side-encryption-customer-algorithm
+// - x-amz-server-side-encryption-customer-key
+// - x-amz-server-side-encryption-customer-key-MD5
//
-// *
-// x-amz-server-side-encryption-customer-key
+// For more information about SSE-C, see Server-Side Encryption (Using
+// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+// in the Amazon S3 User Guide. Directory bucket permissions - For directory
+// buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (
+// AES256 ) is supported. Versioning
//
-// *
-// x-amz-server-side-encryption-customer-key-MD5
+// - If the current version of the object is a delete marker, Amazon S3 behaves
+// as if the object was deleted and includes x-amz-delete-marker: true in the
+// response.
//
-// For more information about SSE-C,
-// see Server-Side Encryption (Using Customer-Provided Encryption Keys)
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
+// - If the specified version is a delete marker, the response returns a 405
+// Method Not Allowed error and the Last-Modified: timestamp response header.
//
-// *
-// Encryption request headers, like x-amz-server-side-encryption, should not be
-// sent for GET requests if your object uses server-side encryption with KMS keys
-// (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys
-// (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400
-// BadRequest error.
+// - Directory buckets - Delete marker is not supported by directory buckets.
//
-// * The last modified property in this case is the creation
-// date of the object.
+// - Directory buckets - S3 Versioning isn't enabled and supported for directory
+// buckets. For this API operation, only the null value of the version ID is
+// supported by directory buckets. You can only specify null to the versionId
+// query parameter in the request.
//
-// Request headers are limited to 8 KB in size. For more
-// information, see Common Request Headers
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html).
-// Consider the following when using request headers:
-//
-// * Consideration 1 – If both
-// of the If-Match and If-Unmodified-Since headers are present in the request as
-// follows:
-//
-// * If-Match condition evaluates to true, and;
-//
-// * If-Unmodified-Since
-// condition evaluates to false;
-//
-// Then Amazon S3 returns 200 OK and the data
-// requested.
-//
-// * Consideration 2 – If both of the If-None-Match and
-// If-Modified-Since headers are present in the request as follows:
-//
-// *
-// If-None-Match condition evaluates to false, and;
-//
-// * If-Modified-Since condition
-// evaluates to true;
-//
-// Then Amazon S3 returns the 304 Not Modified response
-// code.
-//
-// For more information about conditional requests, see RFC 7232
-// (https://tools.ietf.org/html/rfc7232). Permissions You need the relevant read
-// object (or version) permission for this operation. For more information, see
-// Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). If
-// the object you request does not exist, the error Amazon S3 returns depends on
-// whether you also have the s3:ListBucket permission.
-//
-// * If you have the
-// s3:ListBucket permission on the bucket, Amazon S3 returns an HTTP status code
-// 404 ("no such key") error.
-//
-// * If you don’t have the s3:ListBucket permission,
-// Amazon S3 returns an HTTP status code 403 ("access denied") error.
-//
-// The
-// following actions are related to HeadObject:
-//
-// * GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// GetObjectAttributes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following actions are
+// related to HeadObject :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns ...func(*Options)) (*HeadObjectOutput, error) {
if params == nil {
params = &HeadObjectInput{}
@@ -122,23 +117,31 @@ func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns
type HeadObjectInput struct {
- // The name of the bucket containing the object. When using this action with an
- // access point, you must direct requests to the access point hostname. The access
- // point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The name of the bucket that contains the object. Directory buckets - When you
+ // use this operation with a directory bucket, you must use virtual-hosted-style
+ // requests in the format Bucket_name.s3express-az_id.region.amazonaws.com .
+ // Path-style requests are not supported. Directory bucket names must be unique in
+ // the chosen Availability Zone. Bucket names must follow the format
+ // bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -154,118 +157,158 @@ type HeadObjectInput struct {
// the kms:Decrypt action for the request to succeed.
ChecksumMode types.ChecksumMode
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Return the object only if its entity tag (ETag) is the same as the one
- // specified; otherwise, return a 412 (precondition failed) error.
+ // specified; otherwise, return a 412 (precondition failed) error. If both of the
+ // If-Match and If-Unmodified-Since headers are present in the request as follows:
+ // - If-Match condition evaluates to true , and;
+ // - If-Unmodified-Since condition evaluates to false ;
+ // Then Amazon S3 returns 200 OK and the data requested. For more information
+ // about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
IfMatch *string
// Return the object only if it has been modified since the specified time;
- // otherwise, return a 304 (not modified) error.
+ // otherwise, return a 304 (not modified) error. If both of the If-None-Match and
+ // If-Modified-Since headers are present in the request as follows:
+ // - If-None-Match condition evaluates to false , and;
+ // - If-Modified-Since condition evaluates to true ;
+ // Then Amazon S3 returns the 304 Not Modified response code. For more information
+ // about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
IfModifiedSince *time.Time
// Return the object only if its entity tag (ETag) is different from the one
- // specified; otherwise, return a 304 (not modified) error.
+ // specified; otherwise, return a 304 (not modified) error. If both of the
+ // If-None-Match and If-Modified-Since headers are present in the request as
+ // follows:
+ // - If-None-Match condition evaluates to false , and;
+ // - If-Modified-Since condition evaluates to true ;
+ // Then Amazon S3 returns the 304 Not Modified response code. For more information
+ // about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
IfNoneMatch *string
// Return the object only if it has not been modified since the specified time;
- // otherwise, return a 412 (precondition failed) error.
+ // otherwise, return a 412 (precondition failed) error. If both of the If-Match
+ // and If-Unmodified-Since headers are present in the request as follows:
+ // - If-Match condition evaluates to true , and;
+ // - If-Unmodified-Since condition evaluates to false ;
+ // Then Amazon S3 returns 200 OK and the data requested. For more information
+ // about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
IfUnmodifiedSince *time.Time
// Part number of the object being read. This is a positive integer between 1 and
// 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
// Useful querying about the size of the part and the number of parts in this
// object.
- PartNumber int32
+ PartNumber *int32
- // Because HeadObject returns only the metadata for an object, this parameter has
- // no effect.
+ // HeadObject returns only the metadata for an object. If the Range is
+ // satisfiable, only the ContentLength is affected in the response. If the Range
+ // is not satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.
Range *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
+ // Specifies the algorithm to use when encrypting the object (for example,
+ // AES256). This functionality is not supported for directory buckets.
SSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use in
// encrypting data. This value is used to store the object and then it is
// discarded; Amazon S3 does not store the encryption key. The key must be
// appropriate for use with the algorithm specified in the
- // x-amz-server-side-encryption-customer-algorithm header.
+ // x-amz-server-side-encryption-customer-algorithm header. This functionality is
+ // not supported for directory buckets.
SSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. This functionality is not
+ // supported for directory buckets.
SSECustomerKeyMD5 *string
- // VersionId used to reference a specific version of the object.
+ // Version ID used to reference a specific version of the object. For directory
+ // buckets in this API operation, only the null value of the version ID is
+ // supported.
VersionId *string
noSmithyDocumentSerde
}
+func (in *HeadObjectInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type HeadObjectOutput struct {
// Indicates that a range of bytes was specified.
AcceptRanges *string
- // The archive state of the head object.
+ // The archive state of the head object. This functionality is not supported for
+ // directory buckets.
ArchiveStatus types.ArchiveStatus
// Indicates whether the object uses an S3 Bucket Key for server-side encryption
- // with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // with Key Management Service (KMS) keys (SSE-KMS). This functionality is not
+ // supported for directory buckets.
+ BucketKeyEnabled *bool
// Specifies caching behavior along the request/reply chain.
CacheControl *string
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
// Specifies presentational information for the object.
ContentDisposition *string
- // Specifies what content encodings have been applied to the object and thus what
+ // Indicates what content encodings have been applied to the object and thus what
// decoding mechanisms must be applied to obtain the media-type referenced by the
// Content-Type header field.
ContentEncoding *string
@@ -274,29 +317,31 @@ type HeadObjectOutput struct {
ContentLanguage *string
// Size of the body in bytes.
- ContentLength int64
+ ContentLength *int64
// A standard MIME type describing the format of the object data.
ContentType *string
// Specifies whether the object retrieved was (true) or was not (false) a Delete
- // Marker. If false, this response header does not appear in the response.
- DeleteMarker bool
+ // Marker. If false, this response header does not appear in the response. This
+ // functionality is not supported for directory buckets.
+ DeleteMarker *bool
// An entity tag (ETag) is an opaque identifier assigned by a web server to a
// specific version of a resource found at a URL.
ETag *string
- // If the object expiration is configured (see PUT Bucket lifecycle), the response
- // includes this header. It includes the expiry-date and rule-id key-value pairs
- // providing object expiration information. The value of the rule-id is
- // URL-encoded.
+ // If the object expiration is configured (see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+ // ), the response includes this header. It includes the expiry-date and rule-id
+ // key-value pairs providing object expiration information. The value of the
+ // rule-id is URL-encoded. This functionality is not supported for directory
+ // buckets.
Expiration *string
// The date and time at which the object is no longer cacheable.
Expires *time.Time
- // Creation date of the object.
+ // Date and time when the object was last modified.
LastModified *time.Time
// A map of metadata to store with the object in S3.
@@ -307,114 +352,116 @@ type HeadObjectOutput struct {
// This is set to the number of metadata entries not returned in x-amz-meta
// headers. This can happen if you create metadata using an API like SOAP that
// supports more flexible metadata than the REST API. For example, using SOAP, you
- // can create metadata whose values are not legal HTTP headers.
- MissingMeta int32
-
- // Specifies whether a legal hold is in effect for this object. This header is only
- // returned if the requester has the s3:GetObjectLegalHold permission. This header
- // is not returned if the specified version of this object has never had a legal
- // hold applied. For more information about S3 Object Lock, see Object Lock
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
+ // can create metadata whose values are not legal HTTP headers. This functionality
+ // is not supported for directory buckets.
+ MissingMeta *int32
+
+ // Specifies whether a legal hold is in effect for this object. This header is
+ // only returned if the requester has the s3:GetObjectLegalHold permission. This
+ // header is not returned if the specified version of this object has never had a
+ // legal hold applied. For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+ // . This functionality is not supported for directory buckets.
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
// The Object Lock mode, if any, that's in effect for this object. This header is
// only returned if the requester has the s3:GetObjectRetention permission. For
- // more information about S3 Object Lock, see Object Lock
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
+ // more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+ // . This functionality is not supported for directory buckets.
ObjectLockMode types.ObjectLockMode
// The date and time when the Object Lock retention period expires. This header is
- // only returned if the requester has the s3:GetObjectRetention permission.
+ // only returned if the requester has the s3:GetObjectRetention permission. This
+ // functionality is not supported for directory buckets.
ObjectLockRetainUntilDate *time.Time
// The count of parts this object has. This value is only returned if you specify
// partNumber in your request and the object was uploaded as a multipart upload.
- PartsCount int32
+ PartsCount *int32
// Amazon S3 can return this header if your request involves a bucket that is
// either a source or a destination in a replication rule. In replication, you have
// a source bucket on which you configure replication and destination bucket or
- // buckets where Amazon S3 stores object replicas. When you request an object
- // (GetObject) or object metadata (HeadObject) from these buckets, Amazon S3 will
+ // buckets where Amazon S3 stores object replicas. When you request an object (
+ // GetObject ) or object metadata ( HeadObject ) from these buckets, Amazon S3 will
// return the x-amz-replication-status header in the response as follows:
- //
- // * If
- // requesting an object from the source bucket, Amazon S3 will return the
- // x-amz-replication-status header if the object in your request is eligible for
- // replication. For example, suppose that in your replication configuration, you
- // specify object prefix TaxDocs requesting Amazon S3 to replicate objects with key
- // prefix TaxDocs. Any objects you upload with this key name prefix, for example
- // TaxDocs/document1.pdf, are eligible for replication. For any object request with
- // this key name prefix, Amazon S3 will return the x-amz-replication-status header
- // with value PENDING, COMPLETED or FAILED indicating object replication status.
- //
- // *
- // If requesting an object from a destination bucket, Amazon S3 will return the
- // x-amz-replication-status header with value REPLICA if the object in your request
- // is a replica that Amazon S3 created and there is no replica modification
- // replication in progress.
- //
- // * When replicating objects to multiple destination
- // buckets, the x-amz-replication-status header acts differently. The header of the
- // source object will only return a value of COMPLETED when replication is
- // successful to all destinations. The header will remain at value PENDING until
- // replication has completed for all destinations. If one or more destinations
- // fails replication the header will return FAILED.
- //
- // For more information, see
- // Replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
+ // - If requesting an object from the source bucket, Amazon S3 will return the
+ // x-amz-replication-status header if the object in your request is eligible for
+ // replication. For example, suppose that in your replication configuration, you
+ // specify object prefix TaxDocs requesting Amazon S3 to replicate objects with
+ // key prefix TaxDocs . Any objects you upload with this key name prefix, for
+ // example TaxDocs/document1.pdf , are eligible for replication. For any object
+ // request with this key name prefix, Amazon S3 will return the
+ // x-amz-replication-status header with value PENDING, COMPLETED or FAILED
+ // indicating object replication status.
+ // - If requesting an object from a destination bucket, Amazon S3 will return
+ // the x-amz-replication-status header with value REPLICA if the object in your
+ // request is a replica that Amazon S3 created and there is no replica modification
+ // replication in progress.
+ // - When replicating objects to multiple destination buckets, the
+ // x-amz-replication-status header acts differently. The header of the source
+ // object will only return a value of COMPLETED when replication is successful to
+ // all destinations. The header will remain at value PENDING until replication has
+ // completed for all destinations. If one or more destinations fails replication
+ // the header will return FAILED.
+ // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+ // . This functionality is not supported for directory buckets.
ReplicationStatus types.ReplicationStatus
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// If the object is an archived object (an object whose storage class is GLACIER),
// the response includes this header if either the archive restoration is in
- // progress (see RestoreObject
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html) or an
- // archive copy is already restored. If an archive copy is already restored, the
- // header value indicates when Amazon S3 is scheduled to delete the object copy.
- // For example: x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec
- // 2012 00:00:00 GMT" If the object restoration is in progress, the header returns
- // the value ongoing-request="true". For more information about archiving objects,
- // see Transitioning Objects: General Considerations
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations).
+ // progress (see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
+ // or an archive copy is already restored. If an archive copy is already restored,
+ // the header value indicates when Amazon S3 is scheduled to delete the object
+ // copy. For example: x-amz-restore: ongoing-request="false", expiry-date="Fri, 21
+ // Dec 2012 00:00:00 GMT" If the object restoration is in progress, the header
+ // returns the value ongoing-request="true" . For more information about archiving
+ // objects, see Transitioning Objects: General Considerations (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations)
+ // . This functionality is not supported for directory buckets. Only the S3 Express
+ // One Zone storage class is supported by directory buckets to store objects.
Restore *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm used.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to confirm the encryption
+ // algorithm that's used. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to provide the round-trip
+ // message integrity verification of the customer-provided encryption key. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for the
- // object.
+ // If present, indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // If the object is stored using server-side encryption either with an Amazon Web
- // Services KMS key or an Amazon S3-managed encryption key, the response includes
- // this header with the value of the server-side encryption algorithm used when
- // storing this object in Amazon S3 (for example, AES256, aws:kms).
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). For directory buckets, only
+ // server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is
+ // supported.
ServerSideEncryption types.ServerSideEncryption
// Provides storage class information of the object. Amazon S3 returns this header
// for all objects except for S3 Standard storage class objects. For more
- // information, see Storage Classes
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
+ // information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+ // . Directory buckets - Only the S3 Express One Zone storage class is supported by
+ // directory buckets to store objects.
StorageClass types.StorageClass
- // Version of the object.
+ // Version ID of the object. This functionality is not supported for directory
+ // buckets.
VersionId *string
// If the bucket is configured as a website, redirects requests for this object to
// another object in the same bucket or to an external URL. Amazon S3 stores the
- // value of this header in the object metadata.
+ // value of this header in the object metadata. This functionality is not supported
+ // for directory buckets.
WebsiteRedirectLocation *string
// Metadata pertaining to the operation's result.
@@ -424,6 +471,9 @@ type HeadObjectOutput struct {
}
func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpHeadObject{}, middleware.After)
if err != nil {
return err
@@ -432,34 +482,38 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "HeadObject"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -468,7 +522,10 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpHeadObjectValidationMiddleware(stack); err != nil {
@@ -480,6 +537,9 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addHeadObjectUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -495,9 +555,22 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *HeadObjectInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
// HeadObjectAPIClient is a client that implements the HeadObject operation.
type HeadObjectAPIClient interface {
HeadObject(context.Context, *HeadObjectInput, ...func(*Options)) (*HeadObjectOutput, error)
@@ -511,16 +584,25 @@ type ObjectExistsWaiterOptions struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
APIOptions []func(*middleware.Stack) error
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
// MinDelay is the minimum amount of time to delay between retries. If unset,
// ObjectExistsWaiter will use default minimum delay of 5 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
- // MaxDelay is the maximum amount of time to delay between retries. If unset or set
- // to zero, ObjectExistsWaiter will use default max delay of 120 seconds. Note that
- // MaxDelay must resolve to value greater than or equal to the MinDelay.
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, ObjectExistsWaiter will use default max delay of 120 seconds. Note
+ // that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
@@ -610,6 +692,9 @@ func (w *ObjectExistsWaiter) WaitForOutput(ctx context.Context, params *HeadObje
out, err := w.client.HeadObject(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
})
retryable, err := options.Retryable(ctx, params, out, err)
@@ -649,13 +734,8 @@ func objectExistsStateRetryable(ctx context.Context, input *HeadObjectInput, out
}
if err != nil {
- var apiErr smithy.APIError
- ok := errors.As(err, &apiErr)
- if !ok {
- return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
- }
-
- if "NotFound" == apiErr.ErrorCode() {
+ var errorType *types.NotFound
+ if errors.As(err, &errorType) {
return true, nil
}
}
@@ -669,16 +749,25 @@ type ObjectNotExistsWaiterOptions struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
APIOptions []func(*middleware.Stack) error
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
// MinDelay is the minimum amount of time to delay between retries. If unset,
// ObjectNotExistsWaiter will use default minimum delay of 5 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
- // MaxDelay is the maximum amount of time to delay between retries. If unset or set
- // to zero, ObjectNotExistsWaiter will use default max delay of 120 seconds. Note
- // that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, ObjectNotExistsWaiter will use default max delay of 120 seconds.
+ // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
@@ -718,9 +807,9 @@ func NewObjectNotExistsWaiter(client HeadObjectAPIClient, optFns ...func(*Object
}
}
-// Wait calls the waiter function for ObjectNotExists waiter. The maxWaitDur is the
-// maximum wait duration the waiter will wait. The maxWaitDur is required and must
-// be greater than zero.
+// Wait calls the waiter function for ObjectNotExists waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
func (w *ObjectNotExistsWaiter) Wait(ctx context.Context, params *HeadObjectInput, maxWaitDur time.Duration, optFns ...func(*ObjectNotExistsWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
@@ -769,6 +858,9 @@ func (w *ObjectNotExistsWaiter) WaitForOutput(ctx context.Context, params *HeadO
out, err := w.client.HeadObject(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
})
retryable, err := options.Retryable(ctx, params, out, err)
@@ -804,13 +896,8 @@ func (w *ObjectNotExistsWaiter) WaitForOutput(ctx context.Context, params *HeadO
func objectNotExistsStateRetryable(ctx context.Context, input *HeadObjectInput, output *HeadObjectOutput, err error) (bool, error) {
if err != nil {
- var apiErr smithy.APIError
- ok := errors.As(err, &apiErr)
- if !ok {
- return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
- }
-
- if "NotFound" == apiErr.ErrorCode() {
+ var errorType *types.NotFound
+ if errors.As(err, &errorType) {
return false, nil
}
}
@@ -822,13 +909,13 @@ func newServiceMetadataMiddleware_opHeadObject(region string) *awsmiddleware.Reg
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "HeadObject",
}
}
-// getHeadObjectBucketMember returns a pointer to string denoting a provided bucket
-// member valueand a boolean indicating if the input has a modeled bucket name,
+// getHeadObjectBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
func getHeadObjectBucketMember(input interface{}) (*string, bool) {
in := input.(*HeadObjectInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
index 0a0373f2..67b7571c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
@@ -4,46 +4,37 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Lists the analytics configurations for the bucket. You can have up to 1,000
-// analytics configurations per bucket. This action supports list pagination and
-// does not return more than 100 configurations at a time. You should always check
-// the IsTruncated element in the response. If there are no more configurations to
-// list, IsTruncated is set to false. If there are more configurations to list,
-// IsTruncated is set to true, and there will be a value in NextContinuationToken.
-// You use the NextContinuationToken value to continue the pagination of the list
-// by passing the value in continuation-token in the request to GET the next page.
-// To use this operation, you must have permissions to perform the
+// This operation is not supported by directory buckets. Lists the analytics
+// configurations for the bucket. You can have up to 1,000 analytics configurations
+// per bucket. This action supports list pagination and does not return more than
+// 100 configurations at a time. You should always check the IsTruncated element
+// in the response. If there are no more configurations to list, IsTruncated is
+// set to false. If there are more configurations to list, IsTruncated is set to
+// true, and there will be a value in NextContinuationToken . You use the
+// NextContinuationToken value to continue the pagination of the list by passing
+// the value in continuation-token in the request to GET the next page. To use
+// this operation, you must have permissions to perform the
// s3:GetAnalyticsConfiguration action. The bucket owner has this permission by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about Amazon S3 analytics feature, see Amazon S3 Analytics –
-// Storage Class Analysis
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
-// The following operations are related to ListBucketAnalyticsConfigurations:
-//
-// *
-// GetBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// *
-// DeleteBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// *
-// PutBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about Amazon S3 analytics feature, see Amazon S3 Analytics –
+// Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
+// . The following operations are related to ListBucketAnalyticsConfigurations :
+// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
+// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
+// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
func (c *Client) ListBucketAnalyticsConfigurations(ctx context.Context, params *ListBucketAnalyticsConfigurationsInput, optFns ...func(*Options)) (*ListBucketAnalyticsConfigurationsOutput, error) {
if params == nil {
params = &ListBucketAnalyticsConfigurationsInput{}
@@ -70,14 +61,19 @@ type ListBucketAnalyticsConfigurationsInput struct {
// should begin.
ContinuationToken *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *ListBucketAnalyticsConfigurationsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type ListBucketAnalyticsConfigurationsOutput struct {
// The list of analytics configurations for a bucket.
@@ -90,11 +86,11 @@ type ListBucketAnalyticsConfigurationsOutput struct {
// Indicates whether the returned list of analytics configurations is complete. A
// value of true indicates that the list is not complete and the
// NextContinuationToken will be provided for a subsequent request.
- IsTruncated bool
+ IsTruncated *bool
// NextContinuationToken is sent when isTruncated is true, which indicates that
// there are more analytics configurations to list. The next request must include
- // this NextContinuationToken. The token is obfuscated and is not a usable value.
+ // this NextContinuationToken . The token is obfuscated and is not a usable value.
NextContinuationToken *string
// Metadata pertaining to the operation's result.
@@ -104,6 +100,9 @@ type ListBucketAnalyticsConfigurationsOutput struct {
}
func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketAnalyticsConfigurations{}, middleware.After)
if err != nil {
return err
@@ -112,34 +111,38 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListBucketAnalyticsConfigurations"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -148,7 +151,10 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListBucketAnalyticsConfigurationsValidationMiddleware(stack); err != nil {
@@ -160,6 +166,9 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListBucketAnalyticsConfigurationsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -175,14 +184,26 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListBucketAnalyticsConfigurationsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opListBucketAnalyticsConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListBucketAnalyticsConfigurations",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
index 972a69c9..729f8785 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
@@ -4,15 +4,18 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Lists the S3 Intelligent-Tiering configuration from the specified bucket. The S3
+// This operation is not supported by directory buckets. Lists the S3
+// Intelligent-Tiering configuration from the specified bucket. The S3
// Intelligent-Tiering storage class is designed to optimize storage costs by
// automatically moving data to the most cost-effective storage access tier,
// without performance impact or operational overhead. S3 Intelligent-Tiering
@@ -25,21 +28,11 @@ import (
// monitored and not eligible for auto-tiering. Smaller objects can be stored, but
// they are always charged at the Frequent Access tier rates in the S3
// Intelligent-Tiering storage class. For more information, see Storage class for
-// automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-// Operations related to ListBucketIntelligentTieringConfigurations include:
-//
-// *
-// DeleteBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// *
-// PutBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// *
-// GetBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
+// automatically optimizing frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
+// . Operations related to ListBucketIntelligentTieringConfigurations include:
+// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
+// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
+// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
func (c *Client) ListBucketIntelligentTieringConfigurations(ctx context.Context, params *ListBucketIntelligentTieringConfigurationsInput, optFns ...func(*Options)) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
if params == nil {
params = &ListBucketIntelligentTieringConfigurationsInput{}
@@ -70,6 +63,11 @@ type ListBucketIntelligentTieringConfigurationsInput struct {
noSmithyDocumentSerde
}
+func (in *ListBucketIntelligentTieringConfigurationsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type ListBucketIntelligentTieringConfigurationsOutput struct {
// The ContinuationToken that represents a placeholder from where this request
@@ -82,7 +80,7 @@ type ListBucketIntelligentTieringConfigurationsOutput struct {
// Indicates whether the returned list of analytics configurations is complete. A
// value of true indicates that the list is not complete and the
// NextContinuationToken will be provided for a subsequent request.
- IsTruncated bool
+ IsTruncated *bool
// The marker used to continue this inventory configuration listing. Use the
// NextContinuationToken from this response to continue the listing in a subsequent
@@ -96,6 +94,9 @@ type ListBucketIntelligentTieringConfigurationsOutput struct {
}
func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketIntelligentTieringConfigurations{}, middleware.After)
if err != nil {
return err
@@ -104,34 +105,38 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListBucketIntelligentTieringConfigurations"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -140,7 +145,10 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListBucketIntelligentTieringConfigurationsValidationMiddleware(stack); err != nil {
@@ -152,6 +160,9 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListBucketIntelligentTieringConfigurationsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -167,14 +178,26 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListBucketIntelligentTieringConfigurationsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opListBucketIntelligentTieringConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListBucketIntelligentTieringConfigurations",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
index e6c8c79a..6c879048 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
@@ -4,45 +4,36 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns a list of inventory configurations for the bucket. You can have up to
-// 1,000 analytics configurations per bucket. This action supports list pagination
-// and does not return more than 100 configurations at a time. Always check the
-// IsTruncated element in the response. If there are no more configurations to
-// list, IsTruncated is set to false. If there are more configurations to list,
-// IsTruncated is set to true, and there is a value in NextContinuationToken. You
+// This operation is not supported by directory buckets. Returns a list of
+// inventory configurations for the bucket. You can have up to 1,000 analytics
+// configurations per bucket. This action supports list pagination and does not
+// return more than 100 configurations at a time. Always check the IsTruncated
+// element in the response. If there are no more configurations to list,
+// IsTruncated is set to false. If there are more configurations to list,
+// IsTruncated is set to true, and there is a value in NextContinuationToken . You
// use the NextContinuationToken value to continue the pagination of the list by
// passing the value in continuation-token in the request to GET the next page. To
// use this operation, you must have permissions to perform the
// s3:GetInventoryConfiguration action. The bucket owner has this permission by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) The
-// following operations are related to ListBucketInventoryConfigurations:
-//
-// *
-// GetBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// *
-// DeleteBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// *
-// PutBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about the Amazon S3 inventory feature, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
+// The following operations are related to ListBucketInventoryConfigurations :
+// - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
+// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
+// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
func (c *Client) ListBucketInventoryConfigurations(ctx context.Context, params *ListBucketInventoryConfigurationsInput, optFns ...func(*Options)) (*ListBucketInventoryConfigurationsOutput, error) {
if params == nil {
params = &ListBucketInventoryConfigurationsInput{}
@@ -71,14 +62,19 @@ type ListBucketInventoryConfigurationsInput struct {
// Amazon S3 understands.
ContinuationToken *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *ListBucketInventoryConfigurationsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type ListBucketInventoryConfigurationsOutput struct {
// If sent in the request, the marker that is used as a starting point for this
@@ -88,10 +84,10 @@ type ListBucketInventoryConfigurationsOutput struct {
// The list of inventory configurations for a bucket.
InventoryConfigurationList []types.InventoryConfiguration
- // Tells whether the returned list of inventory configurations is complete. A value
- // of true indicates that the list is not complete and the NextContinuationToken is
- // provided for a subsequent request.
- IsTruncated bool
+ // Tells whether the returned list of inventory configurations is complete. A
+ // value of true indicates that the list is not complete and the
+ // NextContinuationToken is provided for a subsequent request.
+ IsTruncated *bool
// The marker used to continue this inventory configuration listing. Use the
// NextContinuationToken from this response to continue the listing in a subsequent
@@ -105,6 +101,9 @@ type ListBucketInventoryConfigurationsOutput struct {
}
func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketInventoryConfigurations{}, middleware.After)
if err != nil {
return err
@@ -113,34 +112,38 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListBucketInventoryConfigurations"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -149,7 +152,10 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListBucketInventoryConfigurationsValidationMiddleware(stack); err != nil {
@@ -161,6 +167,9 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListBucketInventoryConfigurationsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -176,14 +185,26 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListBucketInventoryConfigurationsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opListBucketInventoryConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListBucketInventoryConfigurations",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
index 50b207af..0b6ca947 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,39 +13,28 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Lists the metrics configurations for the bucket. The metrics configurations are
-// only for the request metrics of the bucket and do not provide information on
-// daily storage metrics. You can have up to 1,000 configurations per bucket. This
-// action supports list pagination and does not return more than 100 configurations
-// at a time. Always check the IsTruncated element in the response. If there are no
+// This operation is not supported by directory buckets. Lists the metrics
+// configurations for the bucket. The metrics configurations are only for the
+// request metrics of the bucket and do not provide information on daily storage
+// metrics. You can have up to 1,000 configurations per bucket. This action
+// supports list pagination and does not return more than 100 configurations at a
+// time. Always check the IsTruncated element in the response. If there are no
// more configurations to list, IsTruncated is set to false. If there are more
// configurations to list, IsTruncated is set to true, and there is a value in
-// NextContinuationToken. You use the NextContinuationToken value to continue the
-// pagination of the list by passing the value in continuation-token in the request
-// to GET the next page. To use this operation, you must have permissions to
-// perform the s3:GetMetricsConfiguration action. The bucket owner has this
+// NextContinuationToken . You use the NextContinuationToken value to continue the
+// pagination of the list by passing the value in continuation-token in the
+// request to GET the next page. To use this operation, you must have permissions
+// to perform the s3:GetMetricsConfiguration action. The bucket owner has this
// permission by default. The bucket owner can grant this permission to others. For
// more information about permissions, see Permissions Related to Bucket
-// Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For more information about metrics configurations and CloudWatch request
-// metrics, see Monitoring Metrics with Amazon CloudWatch
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-// The following operations are related to ListBucketMetricsConfigurations:
-//
-// *
-// PutBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// *
-// GetBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// *
-// DeleteBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
+// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For more information about metrics configurations and CloudWatch request
+// metrics, see Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+// . The following operations are related to ListBucketMetricsConfigurations :
+// - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
+// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
+// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
func (c *Client) ListBucketMetricsConfigurations(ctx context.Context, params *ListBucketMetricsConfigurationsInput, optFns ...func(*Options)) (*ListBucketMetricsConfigurationsOutput, error) {
if params == nil {
params = &ListBucketMetricsConfigurationsInput{}
@@ -73,14 +63,19 @@ type ListBucketMetricsConfigurationsInput struct {
// Amazon S3 understands.
ContinuationToken *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *ListBucketMetricsConfigurationsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type ListBucketMetricsConfigurationsOutput struct {
// The marker that is used as a starting point for this metrics configuration list
@@ -90,7 +85,7 @@ type ListBucketMetricsConfigurationsOutput struct {
// Indicates whether the returned list of metrics configurations is complete. A
// value of true indicates that the list is not complete and the
// NextContinuationToken will be provided for a subsequent request.
- IsTruncated bool
+ IsTruncated *bool
// The list of metrics configurations for a bucket.
MetricsConfigurationList []types.MetricsConfiguration
@@ -108,6 +103,9 @@ type ListBucketMetricsConfigurationsOutput struct {
}
func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketMetricsConfigurations{}, middleware.After)
if err != nil {
return err
@@ -116,34 +114,38 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListBucketMetricsConfigurations"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -152,7 +154,10 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListBucketMetricsConfigurationsValidationMiddleware(stack); err != nil {
@@ -164,6 +169,9 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListBucketMetricsConfigurationsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -179,14 +187,26 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListBucketMetricsConfigurationsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opListBucketMetricsConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListBucketMetricsConfigurations",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
index 7a3de38f..086d9d29 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,8 +13,11 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns a list of all buckets owned by the authenticated sender of the request.
-// To use this operation, you must have the s3:ListAllMyBuckets permission.
+// This operation is not supported by directory buckets. Returns a list of all
+// buckets owned by the authenticated sender of the request. To use this operation,
+// you must have the s3:ListAllMyBuckets permission. For information about Amazon
+// S3 buckets, see Creating, configuring, and working with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)
+// .
func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optFns ...func(*Options)) (*ListBucketsOutput, error) {
if params == nil {
params = &ListBucketsInput{}
@@ -48,6 +52,9 @@ type ListBucketsOutput struct {
}
func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListBuckets{}, middleware.After)
if err != nil {
return err
@@ -56,34 +63,38 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListBuckets"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -92,7 +103,10 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuckets(options.Region), middleware.Before); err != nil {
@@ -101,6 +115,9 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListBucketsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -116,6 +133,12 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -123,7 +146,6 @@ func newServiceMetadataMiddleware_opListBuckets(region string) *awsmiddleware.Re
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListBuckets",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go
new file mode 100644
index 00000000..3ebf78af
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go
@@ -0,0 +1,291 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of all Amazon S3 directory buckets owned by the authenticated
+// sender of the request. For more information about directory buckets, see
+// Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html)
+// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
+// make requests for this API operation to the Regional endpoint. These endpoints
+// support path-style requests in the format
+// https://s3express-control.region_code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information, see
+// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions You must have the
+// s3express:ListAllMyDirectoryBuckets permission in an IAM identity-based policy
+// instead of a bucket policy. Cross-account access to this API operation isn't
+// supported. This operation can only be performed by the Amazon Web Services
+// account that owns the resource. For more information about directory bucket
+// policies and permissions, see Amazon Web Services Identity and Access
+// Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
+// in the Amazon S3 User Guide. HTTP Host header syntax Directory buckets - The
+// HTTP Host header syntax is s3express-control.region.amazonaws.com .
+func (c *Client) ListDirectoryBuckets(ctx context.Context, params *ListDirectoryBucketsInput, optFns ...func(*Options)) (*ListDirectoryBucketsOutput, error) {
+ if params == nil {
+ params = &ListDirectoryBucketsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListDirectoryBuckets", params, optFns, c.addOperationListDirectoryBucketsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListDirectoryBucketsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListDirectoryBucketsInput struct {
+
+ // ContinuationToken indicates to Amazon S3 that the list is being continued on
+ // this bucket with a token. ContinuationToken is obfuscated and is not a real
+ // key. You can use this ContinuationToken for pagination of the list results.
+ ContinuationToken *string
+
+ // Maximum number of buckets to be returned in response. When the number is more
+ // than the count of buckets that are owned by an Amazon Web Services account,
+ // return all the buckets in response.
+ MaxDirectoryBuckets *int32
+
+ noSmithyDocumentSerde
+}
+
+func (in *ListDirectoryBucketsInput) bindEndpointParams(p *EndpointParameters) {
+
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
+type ListDirectoryBucketsOutput struct {
+
+ // The list of buckets owned by the requester.
+ Buckets []types.Bucket
+
+ // If ContinuationToken was sent with the request, it is included in the response.
+ // You can use the returned ContinuationToken for pagination of the list response.
+ ContinuationToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListDirectoryBucketsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListDirectoryBuckets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDirectoryBuckets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListDirectoryBuckets"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDirectoryBuckets(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addListDirectoryBucketsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListDirectoryBucketsAPIClient is a client that implements the
+// ListDirectoryBuckets operation.
+type ListDirectoryBucketsAPIClient interface {
+ ListDirectoryBuckets(context.Context, *ListDirectoryBucketsInput, ...func(*Options)) (*ListDirectoryBucketsOutput, error)
+}
+
+var _ ListDirectoryBucketsAPIClient = (*Client)(nil)
+
+// ListDirectoryBucketsPaginatorOptions is the paginator options for
+// ListDirectoryBuckets
+type ListDirectoryBucketsPaginatorOptions struct {
+ // Maximum number of buckets to be returned in response. When the number is more
+ // than the count of buckets that are owned by an Amazon Web Services account,
+ // return all the buckets in response.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListDirectoryBucketsPaginator is a paginator for ListDirectoryBuckets
+type ListDirectoryBucketsPaginator struct {
+ options ListDirectoryBucketsPaginatorOptions
+ client ListDirectoryBucketsAPIClient
+ params *ListDirectoryBucketsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListDirectoryBucketsPaginator returns a new ListDirectoryBucketsPaginator
+func NewListDirectoryBucketsPaginator(client ListDirectoryBucketsAPIClient, params *ListDirectoryBucketsInput, optFns ...func(*ListDirectoryBucketsPaginatorOptions)) *ListDirectoryBucketsPaginator {
+ if params == nil {
+ params = &ListDirectoryBucketsInput{}
+ }
+
+ options := ListDirectoryBucketsPaginatorOptions{}
+ if params.MaxDirectoryBuckets != nil {
+ options.Limit = *params.MaxDirectoryBuckets
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListDirectoryBucketsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.ContinuationToken,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListDirectoryBucketsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListDirectoryBuckets page.
+func (p *ListDirectoryBucketsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDirectoryBucketsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.ContinuationToken = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxDirectoryBuckets = limit
+
+ result, err := p.client.ListDirectoryBuckets(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.ContinuationToken
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opListDirectoryBuckets(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListDirectoryBuckets",
+ }
+}
+
+func addListDirectoryBucketsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: nopGetBucketAccessor,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
index af281a25..18377365 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,46 +13,71 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This action lists in-progress multipart uploads. An in-progress multipart upload
-// is a multipart upload that has been initiated using the Initiate Multipart
-// Upload request, but has not yet been completed or aborted. This action returns
-// at most 1,000 multipart uploads in the response. 1,000 multipart uploads is the
-// maximum number of uploads a response can include, which is also the default
-// value. You can further limit the number of uploads in a response by specifying
-// the max-uploads parameter in the response. If additional multipart uploads
-// satisfy the list criteria, the response will contain an IsTruncated element with
-// the value true. To list the additional multipart uploads, use the key-marker and
-// upload-id-marker request parameters. In the response, the uploads are sorted by
-// key. If your application has initiated more than one multipart upload using the
-// same object key, then uploads in the response are first sorted by key.
-// Additionally, uploads are sorted in ascending order within each key by the
-// upload initiation time. For more information on multipart uploads, see Uploading
-// Objects Using Multipart Upload
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). For
-// information on permissions required to use the multipart upload API, see
-// Multipart Upload and Permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). The
-// following operations are related to ListMultipartUploads:
+// This operation lists in-progress multipart uploads in a bucket. An in-progress
+// multipart upload is a multipart upload that has been initiated by the
+// CreateMultipartUpload request, but has not yet been completed or aborted.
+// Directory buckets - If multipart uploads in a directory bucket are in progress,
+// you can't delete the bucket until all the in-progress multipart uploads are
+// aborted or completed. The ListMultipartUploads operation returns a maximum of
+// 1,000 multipart uploads in the response. The limit of 1,000 multipart uploads is
+// also the default value. You can further limit the number of uploads in a
+// response by specifying the max-uploads request parameter. If there are more
+// than 1,000 multipart uploads that satisfy your ListMultipartUploads request,
+// the response returns an IsTruncated element with the value of true , a
+// NextKeyMarker element, and a NextUploadIdMarker element. To list the remaining
+// multipart uploads, you need to make subsequent ListMultipartUploads requests.
+// In these requests, include two query parameters: key-marker and upload-id-marker
+// . Set the value of key-marker to the NextKeyMarker value from the previous
+// response. Similarly, set the value of upload-id-marker to the NextUploadIdMarker
+// value from the previous response. Directory buckets - The upload-id-marker
+// element and the NextUploadIdMarker element aren't supported by directory
+// buckets. To list the additional multipart uploads, you only need to set the
+// value of key-marker to the NextKeyMarker value from the previous response. For
+// more information about multipart uploads, see Uploading Objects Using Multipart
+// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
+// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
+// make requests for this API operation to the Zonal endpoint. These endpoints
+// support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - For information about permissions
+// required to use the multipart upload API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// *
-// CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// Sorting of multipart uploads in response
+// - General purpose bucket - In the ListMultipartUploads response, the multipart
+// uploads are sorted based on two criteria:
+// - Key-based sorting - Multipart uploads are initially sorted in ascending
+// order based on their object keys.
+// - Time-based sorting - For uploads that share the same object key, they are
+// further sorted in ascending order based on the upload initiation time. Among
+// uploads with the same key, the one that was initiated first will appear before
+// the ones that were initiated later.
+// - Directory bucket - In the ListMultipartUploads response, the multipart
+// uploads aren't sorted lexicographically based on the object keys.
//
-// *
-// UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// *
-// CompleteMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// *
-// ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// *
-// AbortMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to ListMultipartUploads :
+// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
func (c *Client) ListMultipartUploads(ctx context.Context, params *ListMultipartUploadsInput, optFns ...func(*Options)) (*ListMultipartUploadsOutput, error) {
if params == nil {
params = &ListMultipartUploadsInput{}
@@ -69,124 +95,175 @@ func (c *Client) ListMultipartUploads(ctx context.Context, params *ListMultipart
type ListMultipartUploadsInput struct {
- // The name of the bucket to which the multipart upload was initiated. When using
- // this action with an access point, you must direct requests to the access point
- // hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The name of the bucket to which the multipart upload was initiated. Directory
+ // buckets - When you use this operation with a directory bucket, you must use
+ // virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
// Character you use to group keys. All keys that contain the same string between
// the prefix, if specified, and the first occurrence of the delimiter after the
- // prefix are grouped under a single result element, CommonPrefixes. If you don't
+ // prefix are grouped under a single result element, CommonPrefixes . If you don't
// specify the prefix parameter, then the substring starts at the beginning of the
// key. The keys that are grouped under CommonPrefixes result element are not
- // returned elsewhere in the response.
+ // returned elsewhere in the response. Directory buckets - For directory buckets, /
+ // is the only supported delimiter.
Delimiter *string
// Requests Amazon S3 to encode the object keys in the response and specifies the
- // encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters with an
- // ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you
- // can add this parameter to request that Amazon S3 encode the keys in the
+ // encoding method to use. An object key can contain any Unicode character;
+ // however, the XML 1.0 parser cannot parse some characters, such as characters
+ // with an ASCII value from 0 to 10. For characters that are not supported in XML
+ // 1.0, you can add this parameter to request that Amazon S3 encode the keys in the
// response.
EncodingType types.EncodingType
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
- // Together with upload-id-marker, this parameter specifies the multipart upload
- // after which listing should begin. If upload-id-marker is not specified, only the
- // keys lexicographically greater than the specified key-marker will be included in
- // the list. If upload-id-marker is specified, any multipart uploads for a key
- // equal to the key-marker might also be included, provided those multipart uploads
- // have upload IDs lexicographically greater than the specified upload-id-marker.
+ // Specifies the multipart upload after which listing should begin.
+ // - General purpose buckets - For general purpose buckets, key-marker is an
+ // object key. Together with upload-id-marker , this parameter specifies the
+ // multipart upload after which listing should begin. If upload-id-marker is not
+ // specified, only the keys lexicographically greater than the specified
+ // key-marker will be included in the list. If upload-id-marker is specified, any
+ // multipart uploads for a key equal to the key-marker might also be included,
+ // provided those multipart uploads have upload IDs lexicographically greater than
+ // the specified upload-id-marker .
+ // - Directory buckets - For directory buckets, key-marker is obfuscated and
+ // isn't a real object key. The upload-id-marker parameter isn't supported by
+ // directory buckets. To list the additional multipart uploads, you only need to
+ // set the value of key-marker to the NextKeyMarker value from the previous
+ // response. In the ListMultipartUploads response, the multipart uploads aren't
+ // sorted lexicographically based on the object keys.
KeyMarker *string
// Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the
// response body. 1,000 is the maximum number of uploads that can be returned in a
// response.
- MaxUploads int32
+ MaxUploads *int32
// Lists in-progress uploads only for those keys that begin with the specified
// prefix. You can use prefixes to separate a bucket into different grouping of
- // keys. (You can think of using prefix to make groups in the same way you'd use a
- // folder in a file system.)
+ // keys. (You can think of using prefix to make groups in the same way that you'd
+ // use a folder in a file system.) Directory buckets - For directory buckets, only
+ // prefixes that end in a delimiter ( / ) are supported.
Prefix *string
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
+ RequestPayer types.RequestPayer
+
// Together with key-marker, specifies the multipart upload after which listing
// should begin. If key-marker is not specified, the upload-id-marker parameter is
// ignored. Otherwise, any multipart uploads for a key equal to the key-marker
// might be included in the list only if they have an upload ID lexicographically
- // greater than the specified upload-id-marker.
+ // greater than the specified upload-id-marker . This functionality is not
+ // supported for directory buckets.
UploadIdMarker *string
noSmithyDocumentSerde
}
+func (in *ListMultipartUploadsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Prefix = in.Prefix
+
+}
+
type ListMultipartUploadsOutput struct {
// The name of the bucket to which the multipart upload was initiated. Does not
// return the access point ARN or access point alias if used.
Bucket *string
- // If you specify a delimiter in the request, then the result returns each distinct
- // key prefix containing the delimiter in a CommonPrefixes element. The distinct
- // key prefixes are returned in the Prefix child element.
+ // If you specify a delimiter in the request, then the result returns each
+ // distinct key prefix containing the delimiter in a CommonPrefixes element. The
+ // distinct key prefixes are returned in the Prefix child element. Directory
+ // buckets - For directory buckets, only prefixes that end in a delimiter ( / ) are
+ // supported.
CommonPrefixes []types.CommonPrefix
// Contains the delimiter you specified in the request. If you don't specify a
- // delimiter in your request, this element is absent from the response.
+ // delimiter in your request, this element is absent from the response. Directory
+ // buckets - For directory buckets, / is the only supported delimiter.
Delimiter *string
// Encoding type used by Amazon S3 to encode object keys in the response. If you
- // specify encoding-type request parameter, Amazon S3 includes this element in the
- // response, and returns encoded key name values in the following response
- // elements: Delimiter, KeyMarker, Prefix, NextKeyMarker, Key.
+ // specify the encoding-type request parameter, Amazon S3 includes this element in
+ // the response, and returns encoded key name values in the following response
+ // elements: Delimiter , KeyMarker , Prefix , NextKeyMarker , Key .
EncodingType types.EncodingType
// Indicates whether the returned list of multipart uploads is truncated. A value
// of true indicates that the list was truncated. The list can be truncated if the
// number of multipart uploads exceeds the limit allowed or specified by max
// uploads.
- IsTruncated bool
+ IsTruncated *bool
// The key at or after which the listing began.
KeyMarker *string
// Maximum number of multipart uploads that could have been included in the
// response.
- MaxUploads int32
+ MaxUploads *int32
// When a list is truncated, this element specifies the value that should be used
// for the key-marker request parameter in a subsequent request.
NextKeyMarker *string
// When a list is truncated, this element specifies the value that should be used
- // for the upload-id-marker request parameter in a subsequent request.
+ // for the upload-id-marker request parameter in a subsequent request. This
+ // functionality is not supported for directory buckets.
NextUploadIdMarker *string
// When a prefix is provided in the request, this field contains the specified
// prefix. The result contains only keys starting with the specified prefix.
+ // Directory buckets - For directory buckets, only prefixes that end in a delimiter
+ // ( / ) are supported.
Prefix *string
- // Upload ID after which listing began.
+ // If present, indicates that the requester was successfully charged for the
+ // request. This functionality is not supported for directory buckets.
+ RequestCharged types.RequestCharged
+
+ // Together with key-marker, specifies the multipart upload after which listing
+ // should begin. If key-marker is not specified, the upload-id-marker parameter is
+ // ignored. Otherwise, any multipart uploads for a key equal to the key-marker
+ // might be included in the list only if they have an upload ID lexicographically
+ // greater than the specified upload-id-marker . This functionality is not
+ // supported for directory buckets.
UploadIdMarker *string
// Container for elements related to a particular multipart upload. A response can
@@ -200,6 +277,9 @@ type ListMultipartUploadsOutput struct {
}
func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListMultipartUploads{}, middleware.After)
if err != nil {
return err
@@ -208,34 +288,38 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListMultipartUploads"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -244,7 +328,10 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListMultipartUploadsValidationMiddleware(stack); err != nil {
@@ -256,6 +343,9 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListMultipartUploadsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -271,14 +361,26 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListMultipartUploadsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opListMultipartUploads(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListMultipartUploads",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
index f2d2b9fa..bcb90eb2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,30 +13,19 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns metadata about all versions of the objects in a bucket. You can also use
-// request parameters as selection criteria to return metadata about a subset of
-// all the object versions. To use this operation, you must have permissions to
-// perform the s3:ListBucketVersions action. Be aware of the name difference. A 200
-// OK response can contain valid or invalid XML. Make sure to design your
-// application to parse the contents of the response and handle it appropriately.
-// To use this operation, you must have READ access to the bucket. This action is
-// not supported by Amazon S3 on Outposts. The following operations are related to
-// ListObjectVersions:
-//
-// * ListObjectsV2
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-//
-// *
-// GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// *
-// DeleteObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+// This operation is not supported by directory buckets. Returns metadata about
+// all versions of the objects in a bucket. You can also use request parameters as
+// selection criteria to return metadata about a subset of all the object versions.
+// To use this operation, you must have permission to perform the
+// s3:ListBucketVersions action. Be aware of the name difference. A 200 OK
+// response can contain valid or invalid XML. Make sure to design your application
+// to parse the contents of the response and handle it appropriately. To use this
+// operation, you must have READ access to the bucket. The following operations are
+// related to ListObjectVersions :
+// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
func (c *Client) ListObjectVersions(ctx context.Context, params *ListObjectVersionsInput, optFns ...func(*Options)) (*ListObjectVersionsOutput, error) {
if params == nil {
params = &ListObjectVersionsInput{}
@@ -58,49 +48,69 @@ type ListObjectVersionsInput struct {
// This member is required.
Bucket *string
- // A delimiter is a character that you specify to group keys. All keys that contain
- // the same string between the prefix and the first occurrence of the delimiter are
- // grouped under a single result element in CommonPrefixes. These groups are
- // counted as one result against the max-keys limitation. These keys are not
- // returned elsewhere in the response.
+ // A delimiter is a character that you specify to group keys. All keys that
+ // contain the same string between the prefix and the first occurrence of the
+ // delimiter are grouped under a single result element in CommonPrefixes . These
+ // groups are counted as one result against the max-keys limitation. These keys
+ // are not returned elsewhere in the response.
Delimiter *string
// Requests Amazon S3 to encode the object keys in the response and specifies the
- // encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters with an
- // ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you
- // can add this parameter to request that Amazon S3 encode the keys in the
+ // encoding method to use. An object key can contain any Unicode character;
+ // however, the XML 1.0 parser cannot parse some characters, such as characters
+ // with an ASCII value from 0 to 10. For characters that are not supported in XML
+ // 1.0, you can add this parameter to request that Amazon S3 encode the keys in the
// response.
EncodingType types.EncodingType
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Specifies the key to start with when listing objects in a bucket.
KeyMarker *string
- // Sets the maximum number of keys returned in the response. By default the action
- // returns up to 1,000 key names. The response might contain fewer keys but will
- // never contain more. If additional keys satisfy the search criteria, but were not
- // returned because max-keys was exceeded, the response contains true. To return
- // the additional keys, see key-marker and version-id-marker.
- MaxKeys int32
+ // Sets the maximum number of keys returned in the response. By default, the
+ // action returns up to 1,000 key names. The response might contain fewer keys but
+ // will never contain more. If additional keys satisfy the search criteria, but
+ // were not returned because max-keys was exceeded, the response contains true . To
+ // return the additional keys, see key-marker and version-id-marker .
+ MaxKeys *int32
+
+ // Specifies the optional fields that you want returned in the response. Fields
+ // that you do not specify are not returned.
+ OptionalObjectAttributes []types.OptionalObjectAttributes
// Use this parameter to select only those keys that begin with the specified
// prefix. You can use prefixes to separate a bucket into different groupings of
- // keys. (You can think of using prefix to make groups in the same way you'd use a
- // folder in a file system.) You can use prefix with delimiter to roll up numerous
- // objects into a single result under CommonPrefixes.
+ // keys. (You can think of using prefix to make groups in the same way that you'd
+ // use a folder in a file system.) You can use prefix with delimiter to roll up
+ // numerous objects into a single result under CommonPrefixes .
Prefix *string
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
+ RequestPayer types.RequestPayer
+
// Specifies the object version you want to start listing from.
VersionIdMarker *string
noSmithyDocumentSerde
}
+func (in *ListObjectVersionsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Prefix = in.Prefix
+
+}
+
type ListObjectVersionsOutput struct {
// All of the keys rolled up into a common prefix count as a single return when
@@ -113,38 +123,38 @@ type ListObjectVersionsOutput struct {
// The delimiter grouping the included keys. A delimiter is a character that you
// specify to group keys. All keys that contain the same string between the prefix
// and the first occurrence of the delimiter are grouped under a single result
- // element in CommonPrefixes. These groups are counted as one result against the
+ // element in CommonPrefixes . These groups are counted as one result against the
// max-keys limitation. These keys are not returned elsewhere in the response.
Delimiter *string
// Encoding type used by Amazon S3 to encode object key names in the XML response.
- // If you specify encoding-type request parameter, Amazon S3 includes this element
- // in the response, and returns encoded key name values in the following response
- // elements: KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.
+ // If you specify the encoding-type request parameter, Amazon S3 includes this
+ // element in the response, and returns encoded key name values in the following
+ // response elements: KeyMarker, NextKeyMarker, Prefix, Key , and Delimiter .
EncodingType types.EncodingType
// A flag that indicates whether Amazon S3 returned all of the results that
// satisfied the search criteria. If your results were truncated, you can make a
- // follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
+ // follow-up paginated request by using the NextKeyMarker and NextVersionIdMarker
// response parameters as a starting place in another request to return the rest of
// the results.
- IsTruncated bool
+ IsTruncated *bool
// Marks the last key returned in a truncated response.
KeyMarker *string
// Specifies the maximum number of objects to return.
- MaxKeys int32
+ MaxKeys *int32
// The bucket name.
Name *string
- // When the number of responses exceeds the value of MaxKeys, NextKeyMarker
+ // When the number of responses exceeds the value of MaxKeys , NextKeyMarker
// specifies the first key not returned that satisfies the search criteria. Use
// this value for the key-marker request parameter in a subsequent request.
NextKeyMarker *string
- // When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker
+ // When the number of responses exceeds the value of MaxKeys , NextVersionIdMarker
// specifies the first object version not returned that satisfies the search
// criteria. Use this value for the version-id-marker request parameter in a
// subsequent request.
@@ -153,6 +163,10 @@ type ListObjectVersionsOutput struct {
// Selects objects that start with the value supplied by this parameter.
Prefix *string
+ // If present, indicates that the requester was successfully charged for the
+ // request. This functionality is not supported for directory buckets.
+ RequestCharged types.RequestCharged
+
// Marks the last version of the key returned in a truncated response.
VersionIdMarker *string
@@ -166,6 +180,9 @@ type ListObjectVersionsOutput struct {
}
func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListObjectVersions{}, middleware.After)
if err != nil {
return err
@@ -174,34 +191,38 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListObjectVersions"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -210,7 +231,10 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListObjectVersionsValidationMiddleware(stack); err != nil {
@@ -222,6 +246,9 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListObjectVersionsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -237,14 +264,26 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListObjectVersionsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opListObjectVersions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListObjectVersions",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
index b2d83ff7..9a3bf3e0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
@@ -12,35 +13,19 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns some or all (up to 1,000) of the objects in a bucket. You can use the
-// request parameters as selection criteria to return a subset of the objects in a
-// bucket. A 200 OK response can contain valid or invalid XML. Be sure to design
-// your application to parse the contents of the response and handle it
-// appropriately. This action has been revised. We recommend that you use the newer
-// version, ListObjectsV2
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html), when
-// developing applications. For backward compatibility, Amazon S3 continues to
-// support ListObjects. The following operations are related to ListObjects:
-//
-// *
-// ListObjectsV2
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-//
-// *
-// GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// *
-// CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// ListBuckets
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
+// This operation is not supported by directory buckets. Returns some or all (up
+// to 1,000) of the objects in a bucket. You can use the request parameters as
+// selection criteria to return a subset of the objects in a bucket. A 200 OK
+// response can contain valid or invalid XML. Be sure to design your application to
+// parse the contents of the response and handle it appropriately. This action has
+// been revised. We recommend that you use the newer version, ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
+// , when developing applications. For backward compatibility, Amazon S3 continues
+// to support ListObjects . The following operations are related to ListObjects :
+// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
func (c *Client) ListObjects(ctx context.Context, params *ListObjectsInput, optFns ...func(*Options)) (*ListObjectsOutput, error) {
if params == nil {
params = &ListObjectsInput{}
@@ -58,51 +43,63 @@ func (c *Client) ListObjects(ctx context.Context, params *ListObjectsInput, optF
type ListObjectsInput struct {
- // The name of the bucket containing the objects. When using this action with an
- // access point, you must direct requests to the access point hostname. The access
- // point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The name of the bucket containing the objects. Directory buckets - When you use
+ // this operation with a directory bucket, you must use virtual-hosted-style
+ // requests in the format Bucket_name.s3express-az_id.region.amazonaws.com .
+ // Path-style requests are not supported. Directory bucket names must be unique in
+ // the chosen Availability Zone. Bucket names must follow the format
+ // bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
- // A delimiter is a character you use to group keys.
+ // A delimiter is a character that you use to group keys.
Delimiter *string
// Requests Amazon S3 to encode the object keys in the response and specifies the
- // encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters with an
- // ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you
- // can add this parameter to request that Amazon S3 encode the keys in the
+ // encoding method to use. An object key can contain any Unicode character;
+ // however, the XML 1.0 parser cannot parse some characters, such as characters
+ // with an ASCII value from 0 to 10. For characters that are not supported in XML
+ // 1.0, you can add this parameter to request that Amazon S3 encode the keys in the
// response.
EncodingType types.EncodingType
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Marker is where you want Amazon S3 to start listing from. Amazon S3 starts
// listing after this specified key. Marker can be any key in the bucket.
Marker *string
- // Sets the maximum number of keys returned in the response. By default the action
- // returns up to 1,000 key names. The response might contain fewer keys but will
- // never contain more.
- MaxKeys int32
+ // Sets the maximum number of keys returned in the response. By default, the
+ // action returns up to 1,000 key names. The response might contain fewer keys but
+ // will never contain more.
+ MaxKeys *int32
+
+ // Specifies the optional fields that you want returned in the response. Fields
+ // that you do not specify are not returned.
+ OptionalObjectAttributes []types.OptionalObjectAttributes
// Limits the response to keys that begin with the specified prefix.
Prefix *string
@@ -115,6 +112,12 @@ type ListObjectsInput struct {
noSmithyDocumentSerde
}
+func (in *ListObjectsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Prefix = in.Prefix
+
+}
+
type ListObjectsOutput struct {
// All of the keys (up to 1,000) rolled up in a common prefix count as a single
@@ -122,10 +125,10 @@ type ListObjectsOutput struct {
// CommonPrefixes only if you specify a delimiter. CommonPrefixes contains all (if
// there are any) keys between Prefix and the next occurrence of the string
// specified by the delimiter. CommonPrefixes lists keys that act like
- // subdirectories in the directory specified by Prefix. For example, if the prefix
- // is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common
- // prefix is notes/summer/. All of the keys that roll up into a common prefix count
- // as a single return when calculating the number of returns.
+ // subdirectories in the directory specified by Prefix . For example, if the prefix
+ // is notes/ and the delimiter is a slash ( / ), as in notes/summer/july , the
+ // common prefix is notes/summer/ . All of the keys that roll up into a common
+ // prefix count as a single return when calculating the number of returns.
CommonPrefixes []types.CommonPrefix
// Metadata about each object returned.
@@ -138,35 +141,42 @@ type ListObjectsOutput struct {
// MaxKeys value.
Delimiter *string
- // Encoding type used by Amazon S3 to encode object keys in the response.
+ // Encoding type used by Amazon S3 to encode object keys in the response. If using
+ // url , non-ASCII characters used in an object's key name will be URL encoded. For
+ // example, the object test_file(3).png will appear as test_file%283%29.png.
EncodingType types.EncodingType
// A flag that indicates whether Amazon S3 returned all of the results that
// satisfied the search criteria.
- IsTruncated bool
+ IsTruncated *bool
- // Indicates where in the bucket listing begins. Marker is included in the response
- // if it was sent with the request.
+ // Indicates where in the bucket listing begins. Marker is included in the
+ // response if it was sent with the request.
Marker *string
// The maximum number of keys returned in the response body.
- MaxKeys int32
+ MaxKeys *int32
// The bucket name.
Name *string
- // When response is truncated (the IsTruncated element value in the response is
- // true), you can use the key name in this field as marker in the subsequent
- // request to get next set of objects. Amazon S3 lists objects in alphabetical
- // order Note: This element is returned only if you have delimiter request
- // parameter specified. If response does not include the NextMarker and it is
- // truncated, you can use the value of the last Key in the response as the marker
- // in the subsequent request to get the next set of object keys.
+ // When the response is truncated (the IsTruncated element value in the response
+ // is true ), you can use the key name in this field as the marker parameter in
+ // the subsequent request to get the next set of objects. Amazon S3 lists objects
+ // in alphabetical order. This element is returned only if you have the delimiter
+ // request parameter specified. If the response does not include the NextMarker
+ // element and it is truncated, you can use the value of the last Key element in
+ // the response as the marker parameter in the subsequent request to get the next
+ // set of object keys.
NextMarker *string
// Keys that begin with the indicated prefix.
Prefix *string
+ // If present, indicates that the requester was successfully charged for the
+ // request. This functionality is not supported for directory buckets.
+ RequestCharged types.RequestCharged
+
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -174,6 +184,9 @@ type ListObjectsOutput struct {
}
func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListObjects{}, middleware.After)
if err != nil {
return err
@@ -182,34 +195,38 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListObjects"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -218,7 +235,10 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListObjectsValidationMiddleware(stack); err != nil {
@@ -230,6 +250,9 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListObjectsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -245,14 +268,26 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListObjectsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opListObjects(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListObjects",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
index 6214d247..ee09d3cb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
@@ -17,37 +17,51 @@ import (
// You can use the request parameters as selection criteria to return a subset of
// the objects in a bucket. A 200 OK response can contain valid or invalid XML.
// Make sure to design your application to parse the contents of the response and
-// handle it appropriately. Objects are returned sorted in an ascending order of
-// the respective key names in the list. For more information about listing
-// objects, see Listing object keys programmatically
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
-// To use this operation, you must have READ access to the bucket. To use this
-// action in an Identity and Access Management (IAM) policy, you must have
-// permissions to perform the s3:ListBucket action. The bucket owner has this
-// permission by default and can grant this permission to others. For more
-// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// This section describes the latest revision of this action. We recommend that you
-// use this revised API for application development. For backward compatibility,
-// Amazon S3 continues to support the prior version of this API, ListObjects
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html). To get a
-// list of your buckets, see ListBuckets
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html). The
-// following operations are related to ListObjectsV2:
+// handle it appropriately. For more information about listing objects, see
+// Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
+// in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
+// . Directory buckets - For directory buckets, you must make requests for this API
+// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
+// requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - To use this operation, you must have
+// READ access to the bucket. You must have permission to perform the
+// s3:ListBucket action. The bucket owner has this permission by default and can
+// grant this permission to others. For more information about permissions, see
+// Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// * GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// Sorting order of returned objects
+// - General purpose bucket - For general purpose buckets, ListObjectsV2 returns
+// objects in lexicographical order based on their key names.
+// - Directory bucket - For directory buckets, ListObjectsV2 does not return
+// objects in lexicographical order.
//
-// *
-// PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// *
-// CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . This section describes the
+// latest revision of this action. We recommend that you use this revised API
+// operation for application development. For backward compatibility, Amazon S3
+// continues to support the prior version of this API operation, ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
+// . The following operations are related to ListObjectsV2 :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
func (c *Client) ListObjectsV2(ctx context.Context, params *ListObjectsV2Input, optFns ...func(*Options)) (*ListObjectsV2Output, error) {
if params == nil {
params = &ListObjectsV2Input{}
@@ -65,140 +79,176 @@ func (c *Client) ListObjectsV2(ctx context.Context, params *ListObjectsV2Input,
type ListObjectsV2Input struct {
- // Bucket name to list. When using this action with an access point, you must
- // direct requests to the access point hostname. The access point hostname takes
- // the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When
- // using this action with an access point through the Amazon Web Services SDKs, you
- // provide the access point ARN in place of the bucket name. For more information
- // about access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // Directory buckets - When you use this operation with a directory bucket, you
+ // must use virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
- // ContinuationToken indicates Amazon S3 that the list is being continued on this
- // bucket with a token. ContinuationToken is obfuscated and is not a real key.
+ // ContinuationToken indicates to Amazon S3 that the list is being continued on
+ // this bucket with a token. ContinuationToken is obfuscated and is not a real
+ // key. You can use this ContinuationToken for pagination of the list results.
ContinuationToken *string
- // A delimiter is a character you use to group keys.
+ // A delimiter is a character that you use to group keys.
+ // - Directory buckets - For directory buckets, / is the only supported
+ // delimiter.
+ // - Directory buckets - When you query ListObjectsV2 with a delimiter during
+ // in-progress multipart uploads, the CommonPrefixes response parameter contains
+ // the prefixes that are associated with the in-progress multipart uploads. For
+ // more information about multipart uploads, see Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
+ // in the Amazon S3 User Guide.
Delimiter *string
- // Encoding type used by Amazon S3 to encode object keys in the response.
+ // Encoding type used by Amazon S3 to encode object keys in the response. If using
+ // url , non-ASCII characters used in an object's key name will be URL encoded. For
+ // example, the object test_file(3).png will appear as test_file%283%29.png.
EncodingType types.EncodingType
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
- // The owner field is not present in listV2 by default, if you want to return owner
- // field with each key in the result then set the fetch owner field to true.
- FetchOwner bool
-
- // Sets the maximum number of keys returned in the response. By default the action
- // returns up to 1,000 key names. The response might contain fewer keys but will
- // never contain more.
- MaxKeys int32
-
- // Limits the response to keys that begin with the specified prefix.
+ // The owner field is not present in ListObjectsV2 by default. If you want to
+ // return the owner field with each key in the result, then set the FetchOwner
+ // field to true . Directory buckets - For directory buckets, the bucket owner is
+ // returned as the object owner for all objects.
+ FetchOwner *bool
+
+ // Sets the maximum number of keys returned in the response. By default, the
+ // action returns up to 1,000 key names. The response might contain fewer keys but
+ // will never contain more.
+ MaxKeys *int32
+
+ // Specifies the optional fields that you want returned in the response. Fields
+ // that you do not specify are not returned. This functionality is not supported
+ // for directory buckets.
+ OptionalObjectAttributes []types.OptionalObjectAttributes
+
+ // Limits the response to keys that begin with the specified prefix. Directory
+ // buckets - For directory buckets, only prefixes that end in a delimiter ( / ) are
+ // supported.
Prefix *string
// Confirms that the requester knows that she or he will be charged for the list
// objects request in V2 style. Bucket owners need not specify this parameter in
- // their requests.
+ // their requests. This functionality is not supported for directory buckets.
RequestPayer types.RequestPayer
// StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
- // listing after this specified key. StartAfter can be any key in the bucket.
+ // listing after this specified key. StartAfter can be any key in the bucket. This
+ // functionality is not supported for directory buckets.
StartAfter *string
noSmithyDocumentSerde
}
+func (in *ListObjectsV2Input) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Prefix = in.Prefix
+
+}
+
type ListObjectsV2Output struct {
- // All of the keys (up to 1,000) rolled up into a common prefix count as a single
- // return when calculating the number of returns. A response can contain
- // CommonPrefixes only if you specify a delimiter. CommonPrefixes contains all (if
- // there are any) keys between Prefix and the next occurrence of the string
- // specified by a delimiter. CommonPrefixes lists keys that act like subdirectories
- // in the directory specified by Prefix. For example, if the prefix is notes/ and
- // the delimiter is a slash (/) as in notes/summer/july, the common prefix is
- // notes/summer/. All of the keys that roll up into a common prefix count as a
- // single return when calculating the number of returns.
+ // All of the keys (up to 1,000) that share the same prefix are grouped together.
+ // When counting the total numbers of returns by this API operation, this group of
+ // keys is considered as one item. A response can contain CommonPrefixes only if
+ // you specify a delimiter. CommonPrefixes contains all (if there are any) keys
+ // between Prefix and the next occurrence of the string specified by a delimiter.
+ // CommonPrefixes lists keys that act like subdirectories in the directory
+ // specified by Prefix . For example, if the prefix is notes/ and the delimiter is
+ // a slash ( / ) as in notes/summer/july , the common prefix is notes/summer/ . All
+ // of the keys that roll up into a common prefix count as a single return when
+ // calculating the number of returns.
+ // - Directory buckets - For directory buckets, only prefixes that end in a
+ // delimiter ( / ) are supported.
+ // - Directory buckets - When you query ListObjectsV2 with a delimiter during
+ // in-progress multipart uploads, the CommonPrefixes response parameter contains
+ // the prefixes that are associated with the in-progress multipart uploads. For
+ // more information about multipart uploads, see Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
+ // in the Amazon S3 User Guide.
CommonPrefixes []types.CommonPrefix
// Metadata about each object returned.
Contents []types.Object
// If ContinuationToken was sent with the request, it is included in the response.
+ // You can use the returned ContinuationToken for pagination of the list response.
+ // You can use this ContinuationToken for pagination of the list results.
ContinuationToken *string
// Causes keys that contain the same string between the prefix and the first
// occurrence of the delimiter to be rolled up into a single result element in the
// CommonPrefixes collection. These rolled-up keys are not returned elsewhere in
// the response. Each rolled-up result counts as only one return against the
- // MaxKeys value.
+ // MaxKeys value. Directory buckets - For directory buckets, / is the only
+ // supported delimiter.
Delimiter *string
// Encoding type used by Amazon S3 to encode object key names in the XML response.
// If you specify the encoding-type request parameter, Amazon S3 includes this
// element in the response, and returns encoded key name values in the following
- // response elements: Delimiter, Prefix, Key, and StartAfter.
+ // response elements: Delimiter, Prefix, Key, and StartAfter .
EncodingType types.EncodingType
// Set to false if all of the results were returned. Set to true if more keys are
- // available to return. If the number of results exceeds that specified by MaxKeys,
- // all of the results might not be returned.
- IsTruncated bool
+ // available to return. If the number of results exceeds that specified by MaxKeys
+ // , all of the results might not be returned.
+ IsTruncated *bool
// KeyCount is the number of keys returned with this request. KeyCount will always
- // be less than or equals to MaxKeys field. Say you ask for 50 keys, your result
- // will include less than equals 50 keys
- KeyCount int32
-
- // Sets the maximum number of keys returned in the response. By default the action
- // returns up to 1,000 key names. The response might contain fewer keys but will
- // never contain more.
- MaxKeys int32
-
- // The bucket name. When using this action with an access point, you must direct
- // requests to the access point hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // be less than or equal to the MaxKeys field. For example, if you ask for 50
+ // keys, your result will include 50 keys or fewer.
+ KeyCount *int32
+
+ // Sets the maximum number of keys returned in the response. By default, the
+ // action returns up to 1,000 key names. The response might contain fewer keys but
+ // will never contain more.
+ MaxKeys *int32
+
+ // The bucket name.
Name *string
// NextContinuationToken is sent when isTruncated is true, which means there are
// more keys in the bucket that can be listed. The next list requests to Amazon S3
- // can be continued with this NextContinuationToken. NextContinuationToken is
+ // can be continued with this NextContinuationToken . NextContinuationToken is
// obfuscated and is not a real key
NextContinuationToken *string
- // Keys that begin with the indicated prefix.
+ // Keys that begin with the indicated prefix. Directory buckets - For directory
+ // buckets, only prefixes that end in a delimiter ( / ) are supported.
Prefix *string
- // If StartAfter was sent with the request, it is included in the response.
+ // If present, indicates that the requester was successfully charged for the
+ // request. This functionality is not supported for directory buckets.
+ RequestCharged types.RequestCharged
+
+ // If StartAfter was sent with the request, it is included in the response. This
+ // functionality is not supported for directory buckets.
StartAfter *string
// Metadata pertaining to the operation's result.
@@ -208,6 +258,9 @@ type ListObjectsV2Output struct {
}
func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListObjectsV2{}, middleware.After)
if err != nil {
return err
@@ -216,34 +269,38 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListObjectsV2"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -252,7 +309,10 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListObjectsV2ValidationMiddleware(stack); err != nil {
@@ -264,6 +324,9 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListObjectsV2UpdateEndpoint(stack, options); err != nil {
return err
}
@@ -279,9 +342,22 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListObjectsV2Input) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
// ListObjectsV2APIClient is a client that implements the ListObjectsV2 operation.
type ListObjectsV2APIClient interface {
ListObjectsV2(context.Context, *ListObjectsV2Input, ...func(*Options)) (*ListObjectsV2Output, error)
@@ -291,9 +367,9 @@ var _ ListObjectsV2APIClient = (*Client)(nil)
// ListObjectsV2PaginatorOptions is the paginator options for ListObjectsV2
type ListObjectsV2PaginatorOptions struct {
- // Sets the maximum number of keys returned in the response. By default the action
- // returns up to 1,000 key names. The response might contain fewer keys but will
- // never contain more.
+ // Sets the maximum number of keys returned in the response. By default, the
+ // action returns up to 1,000 key names. The response might contain fewer keys but
+ // will never contain more.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
@@ -317,8 +393,8 @@ func NewListObjectsV2Paginator(client ListObjectsV2APIClient, params *ListObject
}
options := ListObjectsV2PaginatorOptions{}
- if params.MaxKeys != 0 {
- options.Limit = params.MaxKeys
+ if params.MaxKeys != nil {
+ options.Limit = *params.MaxKeys
}
for _, fn := range optFns {
@@ -348,7 +424,11 @@ func (p *ListObjectsV2Paginator) NextPage(ctx context.Context, optFns ...func(*O
params := *p.params
params.ContinuationToken = p.nextToken
- params.MaxKeys = p.options.Limit
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxKeys = limit
result, err := p.client.ListObjectsV2(ctx, ¶ms, optFns...)
if err != nil {
@@ -358,7 +438,7 @@ func (p *ListObjectsV2Paginator) NextPage(ctx context.Context, optFns ...func(*O
prevToken := p.nextToken
p.nextToken = nil
- if result.IsTruncated {
+ if result.IsTruncated != nil && *result.IsTruncated {
p.nextToken = result.NextContinuationToken
}
@@ -376,7 +456,6 @@ func newServiceMetadataMiddleware_opListObjectsV2(region string) *awsmiddleware.
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListObjectsV2",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
index 36675dcd..3f3946d9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
@@ -14,48 +14,55 @@ import (
"time"
)
-// Lists the parts that have been uploaded for a specific multipart upload. This
-// operation must include the upload ID, which you obtain by sending the initiate
-// multipart upload request (see CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)).
-// This request returns a maximum of 1,000 uploaded parts. The default number of
-// parts returned is 1,000 parts. You can restrict the number of parts returned by
-// specifying the max-parts request parameter. If your multipart upload consists of
-// more than 1,000 parts, the response returns an IsTruncated field with the value
-// of true, and a NextPartNumberMarker element. In subsequent ListParts requests
-// you can include the part-number-marker query string parameter and set its value
-// to the NextPartNumberMarker field value from the previous response. If the
-// upload was created using a checksum algorithm, you will need to have permission
-// to the kms:Decrypt action for the request to succeed. For more information on
-// multipart uploads, see Uploading Objects Using Multipart Upload
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). For
-// information on permissions required to use the multipart upload API, see
-// Multipart Upload and Permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). The
-// following operations are related to ListParts:
+// Lists the parts that have been uploaded for a specific multipart upload. To use
+// this operation, you must provide the upload ID in the request. You obtain this
+// uploadID by sending the initiate multipart upload request through
+// CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// . The ListParts request returns a maximum of 1,000 uploaded parts. The limit of
+// 1,000 parts is also the default value. You can restrict the number of parts in a
+// response by specifying the max-parts request parameter. If your multipart
+// upload consists of more than 1,000 parts, the response returns an IsTruncated
+// field with the value of true , and a NextPartNumberMarker element. To list
+// remaining uploaded parts, in subsequent ListParts requests, include the
+// part-number-marker query string parameter and set its value to the
+// NextPartNumberMarker field value from the previous response. For more
+// information on multipart uploads, see Uploading Objects Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
+// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
+// make requests for this API operation to the Zonal endpoint. These endpoints
+// support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - For information about permissions
+// required to use the multipart upload API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon S3 User Guide. If the upload was created using server-side
+// encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer
+// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), you must
+// have permission to the kms:Decrypt action for the ListParts request to
+// succeed.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// * CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// *
-// UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// *
-// CompleteMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// *
-// AbortMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// *
-// GetObjectAttributes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// *
-// ListMultipartUploads
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to ListParts :
+// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
+// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
func (c *Client) ListParts(ctx context.Context, params *ListPartsInput, optFns ...func(*Options)) (*ListPartsOutput, error) {
if params == nil {
params = &ListPartsInput{}
@@ -73,23 +80,31 @@ func (c *Client) ListParts(ctx context.Context, params *ListPartsInput, optFns .
type ListPartsInput struct {
- // The name of the bucket to which the parts are being uploaded. When using this
- // action with an access point, you must direct requests to the access point
- // hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The name of the bucket to which the parts are being uploaded. Directory buckets
+ // - When you use this operation with a directory bucket, you must use
+ // virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -104,66 +119,75 @@ type ListPartsInput struct {
// This member is required.
UploadId *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Sets the maximum number of parts to return.
- MaxParts int32
+ MaxParts *int32
- // Specifies the part after which listing should begin. Only parts with higher part
- // numbers will be listed.
+ // Specifies the part after which listing should begin. Only parts with higher
+ // part numbers will be listed.
PartNumberMarker *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The server-side encryption (SSE) algorithm used to encrypt the object. This
// parameter is needed only when the object was created using a checksum algorithm.
- // For more information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
+ // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
// The server-side encryption (SSE) customer managed key. This parameter is needed
// only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
+ // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerKey *string
// The MD5 server-side encryption (SSE) customer managed key. This parameter is
// needed only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
+ // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
SSECustomerKeyMD5 *string
noSmithyDocumentSerde
}
+func (in *ListPartsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type ListPartsOutput struct {
- // If the bucket has a lifecycle rule configured with an action to abort incomplete
- // multipart uploads and the prefix in the lifecycle rule matches the object name
- // in the request, then the response includes this header indicating when the
- // initiated multipart upload will become eligible for abort operation. For more
- // information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle
- // Policy
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
- // The response will also include the x-amz-abort-rule-id header that will provide
- // the ID of the lifecycle configuration rule that defines this action.
+ // If the bucket has a lifecycle rule configured with an action to abort
+ // incomplete multipart uploads and the prefix in the lifecycle rule matches the
+ // object name in the request, then the response includes this header indicating
+ // when the initiated multipart upload will become eligible for abort operation.
+ // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
+ // Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
+ // . The response will also include the x-amz-abort-rule-id header that will
+ // provide the ID of the lifecycle configuration rule that defines this action.
+ // This functionality is not supported for directory buckets.
AbortDate *time.Time
// This header is returned along with the x-amz-abort-date header. It identifies
// applicable lifecycle configuration rule that defines the action to abort
- // incomplete multipart uploads.
+ // incomplete multipart uploads. This functionality is not supported for directory
+ // buckets.
AbortRuleId *string
// The name of the bucket to which the multipart upload was initiated. Does not
@@ -182,39 +206,40 @@ type ListPartsOutput struct {
// Indicates whether the returned list of parts is truncated. A true value
// indicates that the list was truncated. A list can be truncated if the number of
// parts exceeds the limit returned in the MaxParts element.
- IsTruncated bool
+ IsTruncated *bool
// Object key for which the multipart upload was initiated.
Key *string
// Maximum number of parts that were allowed in the response.
- MaxParts int32
+ MaxParts *int32
// When a list is truncated, this element specifies the last part in the list, as
// well as the value to use for the part-number-marker request parameter in a
// subsequent request.
NextPartNumberMarker *string
- // Container element that identifies the object owner, after the object is created.
- // If multipart upload is initiated by an IAM user, this element provides the
- // parent account ID and display name.
+ // Container element that identifies the object owner, after the object is
+ // created. If multipart upload is initiated by an IAM user, this element provides
+ // the parent account ID and display name. Directory buckets - The bucket owner is
+ // returned as the object owner for all the parts.
Owner *types.Owner
- // When a list is truncated, this element specifies the last part in the list, as
- // well as the value to use for the part-number-marker request parameter in a
- // subsequent request.
+ // Specifies the part after which listing should begin. Only parts with higher
+ // part numbers will be listed.
PartNumberMarker *string
- // Container for elements related to a particular part. A response can contain zero
- // or more Part elements.
+ // Container for elements related to a particular part. A response can contain
+ // zero or more Part elements.
Parts []types.Part
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
- // Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded
- // object.
+ // The class of storage used to store the uploaded object. Directory buckets -
+ // Only the S3 Express One Zone storage class is supported by directory buckets to
+ // store objects.
StorageClass types.StorageClass
// Upload ID identifying the multipart upload whose parts are being listed.
@@ -227,6 +252,9 @@ type ListPartsOutput struct {
}
func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpListParts{}, middleware.After)
if err != nil {
return err
@@ -235,34 +263,38 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListParts"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -271,7 +303,10 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpListPartsValidationMiddleware(stack); err != nil {
@@ -283,6 +318,9 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addListPartsUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -298,9 +336,22 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *ListPartsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
// ListPartsAPIClient is a client that implements the ListParts operation.
type ListPartsAPIClient interface {
ListParts(context.Context, *ListPartsInput, ...func(*Options)) (*ListPartsOutput, error)
@@ -334,8 +385,8 @@ func NewListPartsPaginator(client ListPartsAPIClient, params *ListPartsInput, op
}
options := ListPartsPaginatorOptions{}
- if params.MaxParts != 0 {
- options.Limit = params.MaxParts
+ if params.MaxParts != nil {
+ options.Limit = *params.MaxParts
}
for _, fn := range optFns {
@@ -365,7 +416,11 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio
params := *p.params
params.PartNumberMarker = p.nextToken
- params.MaxParts = p.options.Limit
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxParts = limit
result, err := p.client.ListParts(ctx, ¶ms, optFns...)
if err != nil {
@@ -375,7 +430,7 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio
prevToken := p.nextToken
p.nextToken = nil
- if result.IsTruncated {
+ if result.IsTruncated != nil && *result.IsTruncated {
p.nextToken = result.NextPartNumberMarker
}
@@ -393,7 +448,6 @@ func newServiceMetadataMiddleware_opListParts(region string) *awsmiddleware.Regi
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "ListParts",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
index 7875798f..c15d55f1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
@@ -4,52 +4,41 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer
-// Acceleration is a bucket-level feature that enables you to perform faster data
-// transfers to Amazon S3. To use this operation, you must have permission to
-// perform the s3:PutAccelerateConfiguration action. The bucket owner has this
-// permission by default. The bucket owner can grant this permission to others. For
-// more information about permissions, see Permissions Related to Bucket
-// Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// The Transfer Acceleration state of a bucket can be set to one of the following
+// This operation is not supported by directory buckets. Sets the accelerate
+// configuration of an existing bucket. Amazon S3 Transfer Acceleration is a
+// bucket-level feature that enables you to perform faster data transfers to Amazon
+// S3. To use this operation, you must have permission to perform the
+// s3:PutAccelerateConfiguration action. The bucket owner has this permission by
+// default. The bucket owner can grant this permission to others. For more
+// information about permissions, see Permissions Related to Bucket Subresource
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . The Transfer Acceleration state of a bucket can be set to one of the following
// two values:
+// - Enabled – Enables accelerated data transfers to the bucket.
+// - Suspended – Disables accelerated data transfers to the bucket.
//
-// * Enabled – Enables accelerated data transfers to the bucket.
-//
-// *
-// Suspended – Disables accelerated data transfers to the bucket.
-//
-// The
-// GetBucketAccelerateConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
+// The GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
// action returns the transfer acceleration state of a bucket. After setting the
// Transfer Acceleration state of a bucket to Enabled, it might take up to thirty
// minutes before the data transfer rates to the bucket increase. The name of the
// bucket used for Transfer Acceleration must be DNS-compliant and must not contain
// periods ("."). For more information about transfer acceleration, see Transfer
-// Acceleration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
-// The following operations are related to PutBucketAccelerateConfiguration:
-//
-// *
-// GetBucketAccelerateConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
-//
-// *
-// CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
+// . The following operations are related to PutBucketAccelerateConfiguration :
+// - GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
func (c *Client) PutBucketAccelerateConfiguration(ctx context.Context, params *PutBucketAccelerateConfigurationInput, optFns ...func(*Options)) (*PutBucketAccelerateConfigurationOutput, error) {
if params == nil {
params = &PutBucketAccelerateConfigurationInput{}
@@ -77,25 +66,29 @@ type PutBucketAccelerateConfigurationInput struct {
// This member is required.
Bucket *string
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketAccelerateConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketAccelerateConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -104,6 +97,9 @@ type PutBucketAccelerateConfigurationOutput struct {
}
func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketAccelerateConfiguration{}, middleware.After)
if err != nil {
return err
@@ -112,34 +108,38 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketAccelerateConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -148,7 +148,10 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
@@ -160,6 +163,9 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketAccelerateConfigurationInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -178,14 +184,26 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketAccelerateConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketAccelerateConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketAccelerateConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
index 0f669d2a..f88bb4af 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
@@ -4,156 +4,100 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the permissions on an existing bucket using access control lists (ACL). For
-// more information, see Using ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). To set
-// the ACL of a bucket, you must have WRITE_ACP permission. You can use one of the
-// following two ways to set a bucket's permissions:
-//
-// * Specify the ACL in the
-// request body
-//
-// * Specify permissions using request headers
-//
-// You cannot specify
-// access permission using both the body and the request headers. Depending on your
-// application needs, you may choose to set the ACL on a bucket using either the
-// request body or the headers. For example, if you have an existing application
-// that updates a bucket ACL using the request body, then you can continue to use
-// that approach. If your bucket uses the bucket owner enforced setting for S3
-// Object Ownership, ACLs are disabled and no longer affect permissions. You must
-// use policies to grant access to your bucket and the objects in it. Requests to
-// set ACLs or update ACLs fail and return the AccessControlListNotSupported error
-// code. Requests to read ACLs are still supported. For more information, see
-// Controlling object ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide. Access Permissions You can set access permissions
-// using one of the following methods:
-//
-// * Specify a canned ACL with the x-amz-acl
-// request header. Amazon S3 supports a set of predefined ACLs, known as canned
-// ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify
-// the canned ACL name as the value of x-amz-acl. If you use this header, you
-// cannot use other access control-specific headers in your request. For more
-// information, see Canned ACL
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// *
-// Specify access permissions explicitly with the x-amz-grant-read,
-// x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
-// headers. When using these headers, you specify explicit access permissions and
-// grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the
-// permission. If you use these ACL-specific headers, you cannot use the x-amz-acl
-// header to set a canned ACL. These parameters map to the set of permissions that
-// Amazon S3 supports in an ACL. For more information, see Access Control List
-// (ACL) Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). You specify
-// each grantee as a type=value pair, where the type is one of the following:
-//
-// * id
-// – if the value specified is the canonical user ID of an Amazon Web Services
-// account
-//
-// * uri – if you are granting permissions to a predefined group
-//
-// *
-// emailAddress – if the value specified is the email address of an Amazon Web
-// Services account Using email addresses to specify a grantee is only supported in
-// the following Amazon Web Services Regions:
-//
-// * US East (N. Virginia)
-//
-// * US West
-// (N. California)
-//
-// * US West (Oregon)
-//
-// * Asia Pacific (Singapore)
-//
-// * Asia Pacific
-// (Sydney)
-//
-// * Asia Pacific (Tokyo)
-//
-// * Europe (Ireland)
-//
-// * South America (São
-// Paulo)
-//
-// For a list of all the Amazon S3 supported Regions and endpoints, see
-// Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
-// Amazon Web Services General Reference.
-//
-// For example, the following
-// x-amz-grant-write header grants create, overwrite, and delete objects permission
-// to LogDelivery group predefined by Amazon S3 and two Amazon Web Services
-// accounts identified by their email addresses. x-amz-grant-write:
-// uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333",
-// id="555566667777"
-//
-// You can use either a canned ACL or specify access permissions
-// explicitly. You cannot do both. Grantee Values You can specify the person
-// (grantee) to whom you're assigning access rights (using request elements) in the
-// following ways:
-//
-// * By the person's ID: <>ID<><>GranteesEmail<> DisplayName is
-// optional and ignored in the request
-//
-// * By URI:
-// <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
-//
-// * By Email
-// address: <>Grantees@email.com<>lt;/Grantee> The grantee is resolved to the
-// CanonicalUser and, in a response to a GET Object acl request, appears as the
-// CanonicalUser. Using email addresses to specify a grantee is only supported in
-// the following Amazon Web Services Regions:
-//
-// * US East (N. Virginia)
-//
-// * US West
-// (N. California)
-//
-// * US West (Oregon)
-//
-// * Asia Pacific (Singapore)
-//
-// * Asia Pacific
-// (Sydney)
-//
-// * Asia Pacific (Tokyo)
-//
-// * Europe (Ireland)
-//
-// * South America (São
-// Paulo)
-//
-// For a list of all the Amazon S3 supported Regions and endpoints, see
-// Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
-// Amazon Web Services General Reference.
-//
-// Related Resources
-//
-// * CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// DeleteBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// *
-// GetObjectAcl
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
+// This operation is not supported by directory buckets. Sets the permissions on
+// an existing bucket using access control lists (ACL). For more information, see
+// Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
+// . To set the ACL of a bucket, you must have the WRITE_ACP permission. You can
+// use one of the following two ways to set a bucket's permissions:
+// - Specify the ACL in the request body
+// - Specify permissions using request headers
+//
+// You cannot specify access permission using both the body and the request
+// headers. Depending on your application needs, you may choose to set the ACL on a
+// bucket using either the request body or the headers. For example, if you have an
+// existing application that updates a bucket ACL using the request body, then you
+// can continue to use that approach. If your bucket uses the bucket owner enforced
+// setting for S3 Object Ownership, ACLs are disabled and no longer affect
+// permissions. You must use policies to grant access to your bucket and the
+// objects in it. Requests to set ACLs or update ACLs fail and return the
+// AccessControlListNotSupported error code. Requests to read ACLs are still
+// supported. For more information, see Controlling object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+// in the Amazon S3 User Guide. Permissions You can set access permissions by using
+// one of the following methods:
+// - Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports a
+// set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined
+// set of grantees and permissions. Specify the canned ACL name as the value of
+// x-amz-acl . If you use this header, you cannot use other access
+// control-specific headers in your request. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL)
+// .
+// - Specify access permissions explicitly with the x-amz-grant-read ,
+// x-amz-grant-read-acp , x-amz-grant-write-acp , and x-amz-grant-full-control
+// headers. When using these headers, you specify explicit access permissions and
+// grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the
+// permission. If you use these ACL-specific headers, you cannot use the
+// x-amz-acl header to set a canned ACL. These parameters map to the set of
+// permissions that Amazon S3 supports in an ACL. For more information, see
+// Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+// . You specify each grantee as a type=value pair, where the type is one of the
+// following:
+// - id – if the value specified is the canonical user ID of an Amazon Web
+// Services account
+// - uri – if you are granting permissions to a predefined group
+// - emailAddress – if the value specified is the email address of an Amazon Web
+// Services account Using email addresses to specify a grantee is only supported in
+// the following Amazon Web Services Regions:
+// - US East (N. Virginia)
+// - US West (N. California)
+// - US West (Oregon)
+// - Asia Pacific (Singapore)
+// - Asia Pacific (Sydney)
+// - Asia Pacific (Tokyo)
+// - Europe (Ireland)
+// - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+// in the Amazon Web Services General Reference. For example, the following
+// x-amz-grant-write header grants create, overwrite, and delete objects
+// permission to LogDelivery group predefined by Amazon S3 and two Amazon Web
+// Services accounts identified by their email addresses. x-amz-grant-write:
+// uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333",
+// id="555566667777"
+//
+// You can use either a canned ACL or specify access permissions explicitly. You
+// cannot do both. Grantee Values You can specify the person (grantee) to whom
+// you're assigning access rights (using request elements) in the following ways:
+// - By the person's ID: <>ID<><>GranteesEmail<> DisplayName is optional and
+// ignored in the request
+// - By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
+// - By Email address: <>Grantees@email.com<>& The grantee is resolved to the
+// CanonicalUser and, in a response to a GET Object acl request, appears as the
+// CanonicalUser. Using email addresses to specify a grantee is only supported in
+// the following Amazon Web Services Regions:
+// - US East (N. Virginia)
+// - US West (N. California)
+// - US West (Oregon)
+// - Asia Pacific (Singapore)
+// - Asia Pacific (Sydney)
+// - Asia Pacific (Tokyo)
+// - Europe (Ireland)
+// - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+// in the Amazon Web Services General Reference.
+//
+// The following operations are related to PutBucketAcl :
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
func (c *Client) PutBucketAcl(ctx context.Context, params *PutBucketAclInput, optFns ...func(*Options)) (*PutBucketAclOutput, error) {
if params == nil {
params = &PutBucketAclInput{}
@@ -182,28 +126,26 @@ type PutBucketAclInput struct {
// Contains the elements that set the ACL permissions for an object per grantee.
AccessControlPolicy *types.AccessControlPolicy
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. This header must be used as a
- // message integrity check to verify that the request body was not corrupted in
- // transit. For more information, go to RFC 1864.
- // (http://www.ietf.org/rfc/rfc1864.txt) For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // The base64-encoded 128-bit MD5 digest of the data. This header must be used as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, go to RFC 1864. (http://www.ietf.org/rfc/rfc1864.txt)
+ // For requests made using the Amazon Web Services Command Line Interface (CLI) or
+ // Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Allows grantee the read, write, read ACP, and write ACP permissions on the
@@ -227,6 +169,11 @@ type PutBucketAclInput struct {
noSmithyDocumentSerde
}
+func (in *PutBucketAclInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketAclOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -235,6 +182,9 @@ type PutBucketAclOutput struct {
}
func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketAcl{}, middleware.After)
if err != nil {
return err
@@ -243,34 +193,38 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketAcl"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -279,7 +233,10 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketAclValidationMiddleware(stack); err != nil {
@@ -291,6 +248,9 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketAclInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -309,14 +269,29 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketAclInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketAcl(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketAcl",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
index 45cec74e..0604fb93 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
@@ -4,78 +4,55 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets an analytics configuration for the bucket (specified by the analytics
-// configuration ID). You can have up to 1,000 analytics configurations per bucket.
-// You can choose to have storage class analysis export analysis reports sent to a
-// comma-separated values (CSV) flat file. See the DataExport request element.
-// Reports are updated daily and are based on the object filters that you
-// configure. When selecting data export, you specify a destination bucket and an
-// optional destination prefix where the file is written. You can export the data
-// to a destination bucket in a different account. However, the destination bucket
-// must be in the same Region as the bucket that you are making the PUT analytics
-// configuration to. For more information, see Amazon S3 Analytics – Storage Class
-// Analysis
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
-// You must create a bucket policy on the destination bucket where the exported
+// This operation is not supported by directory buckets. Sets an analytics
+// configuration for the bucket (specified by the analytics configuration ID). You
+// can have up to 1,000 analytics configurations per bucket. You can choose to have
+// storage class analysis export analysis reports sent to a comma-separated values
+// (CSV) flat file. See the DataExport request element. Reports are updated daily
+// and are based on the object filters that you configure. When selecting data
+// export, you specify a destination bucket and an optional destination prefix
+// where the file is written. You can export the data to a destination bucket in a
+// different account. However, the destination bucket must be in the same Region as
+// the bucket that you are making the PUT analytics configuration to. For more
+// information, see Amazon S3 Analytics – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
+// . You must create a bucket policy on the destination bucket where the exported
// file is written to grant permissions to Amazon S3 to write objects to the
// bucket. For an example policy, see Granting Permissions for Amazon S3 Inventory
-// and Storage Class Analysis
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
-// To use this operation, you must have permissions to perform the
+// and Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9)
+// . To use this operation, you must have permissions to perform the
// s3:PutAnalyticsConfiguration action. The bucket owner has this permission by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// Special Errors
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . PutBucketAnalyticsConfiguration has the following special errors:
+// - HTTP Error: HTTP 400 Bad Request
+// - Code: InvalidArgument
+// - Cause: Invalid argument.
+// - HTTP Error: HTTP 400 Bad Request
+// - Code: TooManyConfigurations
+// - Cause: You are attempting to create a new configuration but have already
+// reached the 1,000-configuration limit.
+// - HTTP Error: HTTP 403 Forbidden
+// - Code: AccessDenied
+// - Cause: You are not the owner of the specified bucket, or you do not have
+// the s3:PutAnalyticsConfiguration bucket permission to set the configuration on
+// the bucket.
//
-// * HTTP Error: HTTP 400 Bad Request
-//
-// * Code: InvalidArgument
-//
-// *
-// Cause: Invalid argument.
-//
-// * HTTP Error: HTTP 400 Bad Request
-//
-// * Code:
-// TooManyConfigurations
-//
-// * Cause: You are attempting to create a new configuration
-// but have already reached the 1,000-configuration limit.
-//
-// * HTTP Error: HTTP 403
-// Forbidden
-//
-// * Code: AccessDenied
-//
-// * Cause: You are not the owner of the specified
-// bucket, or you do not have the s3:PutAnalyticsConfiguration bucket permission to
-// set the configuration on the bucket.
-//
-// Related Resources
-//
-// *
-// GetBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// *
-// DeleteBucketAnalyticsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// *
-// ListBucketAnalyticsConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
+// The following operations are related to PutBucketAnalyticsConfiguration :
+// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
+// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
+// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
func (c *Client) PutBucketAnalyticsConfiguration(ctx context.Context, params *PutBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*PutBucketAnalyticsConfigurationOutput, error) {
if params == nil {
params = &PutBucketAnalyticsConfigurationInput{}
@@ -108,14 +85,19 @@ type PutBucketAnalyticsConfigurationInput struct {
// This member is required.
Id *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketAnalyticsConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -124,6 +106,9 @@ type PutBucketAnalyticsConfigurationOutput struct {
}
func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketAnalyticsConfiguration{}, middleware.After)
if err != nil {
return err
@@ -132,34 +117,38 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketAnalyticsConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -168,7 +157,10 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
@@ -180,6 +172,9 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -195,14 +190,26 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketAnalyticsConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketAnalyticsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketAnalyticsConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
index 55a67f18..3e6604ef 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
@@ -4,22 +4,25 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the cors configuration for your bucket. If the configuration exists, Amazon
-// S3 replaces it. To use this operation, you must be allowed to perform the
-// s3:PutBucketCORS action. By default, the bucket owner has this permission and
-// can grant it to others. You set this configuration on a bucket so that the
-// bucket can service cross-origin requests. For example, you might want to enable
-// a request whose origin is http://www.example.com to access your Amazon S3 bucket
-// at my.example.bucket.com by using the browser's XMLHttpRequest capability. To
+// This operation is not supported by directory buckets. Sets the cors
+// configuration for your bucket. If the configuration exists, Amazon S3 replaces
+// it. To use this operation, you must be allowed to perform the s3:PutBucketCORS
+// action. By default, the bucket owner has this permission and can grant it to
+// others. You set this configuration on a bucket so that the bucket can service
+// cross-origin requests. For example, you might want to enable a request whose
+// origin is http://www.example.com to access your Amazon S3 bucket at
+// my.example.bucket.com by using the browser's XMLHttpRequest capability. To
// enable cross-origin resource sharing (CORS) on a bucket, you add the cors
// subresource to the bucket. The cors subresource is an XML document in which you
// configure rules that identify origins and the HTTP methods that can be executed
@@ -28,33 +31,19 @@ import (
// bucket, it evaluates the cors configuration on the bucket and uses the first
// CORSRule rule that matches the incoming browser request to enable a cross-origin
// request. For a rule to match, the following conditions must be met:
+// - The request's Origin header must match AllowedOrigin elements.
+// - The request method (for example, GET, PUT, HEAD, and so on) or the
+// Access-Control-Request-Method header in case of a pre-flight OPTIONS request
+// must be one of the AllowedMethod elements.
+// - Every header specified in the Access-Control-Request-Headers request header
+// of a pre-flight request must match an AllowedHeader element.
//
-// * The
-// request's Origin header must match AllowedOrigin elements.
-//
-// * The request method
-// (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method
-// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod
-// elements.
-//
-// * Every header specified in the Access-Control-Request-Headers
-// request header of a pre-flight request must match an AllowedHeader element.
-//
-// For
-// more information about CORS, go to Enabling Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3
-// User Guide. Related Resources
-//
-// * GetBucketCors
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html)
-//
-// *
-// DeleteBucketCors
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
-//
-// *
-// RESTOPTIONSobject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
+// For more information about CORS, go to Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
+// in the Amazon S3 User Guide. The following operations are related to
+// PutBucketCors :
+// - GetBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html)
+// - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
+// - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
func (c *Client) PutBucketCors(ctx context.Context, params *PutBucketCorsInput, optFns ...func(*Options)) (*PutBucketCorsOutput, error) {
if params == nil {
params = &PutBucketCorsInput{}
@@ -72,46 +61,48 @@ func (c *Client) PutBucketCors(ctx context.Context, params *PutBucketCorsInput,
type PutBucketCorsInput struct {
- // Specifies the bucket impacted by the corsconfiguration.
+ // Specifies the bucket impacted by the cors configuration.
//
// This member is required.
Bucket *string
// Describes the cross-origin access configuration for objects in an Amazon S3
- // bucket. For more information, see Enabling Cross-Origin Resource Sharing
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3
- // User Guide.
+ // bucket. For more information, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
CORSConfiguration *types.CORSConfiguration
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. This header must be used as a
- // message integrity check to verify that the request body was not corrupted in
- // transit. For more information, go to RFC 1864.
- // (http://www.ietf.org/rfc/rfc1864.txt) For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // The base64-encoded 128-bit MD5 digest of the data. This header must be used as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, go to RFC 1864. (http://www.ietf.org/rfc/rfc1864.txt)
+ // For requests made using the Amazon Web Services Command Line Interface (CLI) or
+ // Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketCorsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketCorsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -120,6 +111,9 @@ type PutBucketCorsOutput struct {
}
func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketCors{}, middleware.After)
if err != nil {
return err
@@ -128,34 +122,38 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketCors"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -164,7 +162,10 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketCorsValidationMiddleware(stack); err != nil {
@@ -176,6 +177,9 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketCorsInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -194,20 +198,35 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketCorsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketCors(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketCors",
}
}
-// getPutBucketCorsRequestAlgorithmMember gets the request checksum algorithm value
-// provided as input.
+// getPutBucketCorsRequestAlgorithmMember gets the request checksum algorithm
+// value provided as input.
func getPutBucketCorsRequestAlgorithmMember(input interface{}) (string, bool) {
in := input.(*PutBucketCorsInput)
if len(in.ChecksumAlgorithm) == 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
index 184f0cd3..dfc71dc5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
@@ -4,47 +4,41 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This action uses the encryption subresource to configure default encryption and
-// Amazon S3 Bucket Key for an existing bucket. Default encryption for a bucket can
-// use server-side encryption with Amazon S3-managed keys (SSE-S3) or customer
-// managed keys (SSE-KMS). If you specify default encryption using SSE-KMS, you can
-// also configure Amazon S3 Bucket Key. When the default encryption is SSE-KMS, if
-// you upload an object to the bucket and do not specify the KMS key to use for
-// encryption, Amazon S3 uses the default Amazon Web Services managed KMS key for
-// your account. For information about default encryption, see Amazon S3 default
-// bucket encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) in the
-// Amazon S3 User Guide. For more information about S3 Bucket Keys, see Amazon S3
-// Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in
-// the Amazon S3 User Guide. This action requires Amazon Web Services Signature
-// Version 4. For more information, see Authenticating Requests (Amazon Web
-// Services Signature Version 4)
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
-// To use this operation, you must have permissions to perform the
+// This operation is not supported by directory buckets. This action uses the
+// encryption subresource to configure default encryption and Amazon S3 Bucket Keys
+// for an existing bucket. By default, all buckets have a default encryption
+// configuration that uses server-side encryption with Amazon S3 managed keys
+// (SSE-S3). You can optionally configure default encryption for a bucket by using
+// server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or
+// dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS).
+// If you specify default encryption by using SSE-KMS, you can also configure
+// Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
+// . If you use PutBucketEncryption to set your default bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
+// to SSE-KMS, you should verify that your KMS key ID is correct. Amazon S3 does
+// not validate the KMS key ID provided in PutBucketEncryption requests. This
+// action requires Amazon Web Services Signature Version 4. For more information,
+// see Authenticating Requests (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)
+// . To use this operation, you must have permission to perform the
// s3:PutEncryptionConfiguration action. The bucket owner has this permission by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide. Related Resources
-//
-// * GetBucketEncryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
-//
-// *
-// DeleteBucketEncryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
+// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide. The following operations are related to
+// PutBucketEncryption :
+// - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
+// - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncryptionInput, optFns ...func(*Options)) (*PutBucketEncryptionOutput, error) {
if params == nil {
params = &PutBucketEncryptionInput{}
@@ -63,11 +57,13 @@ func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncry
type PutBucketEncryptionInput struct {
// Specifies default encryption for a bucket using server-side encryption with
- // Amazon S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). For
- // information about the Amazon S3 default encryption feature, see Amazon S3
- // Default Bucket Encryption
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) in the
- // Amazon S3 User Guide.
+ // different key options. By default, all buckets have a default encryption
+ // configuration that uses server-side encryption with Amazon S3 managed keys
+ // (SSE-S3). You can optionally configure default encryption for a bucket by using
+ // server-side encryption with an Amazon Web Services KMS key (SSE-KMS) or a
+ // customer-provided key (SSE-C). For information about the bucket default
+ // encryption feature, see Amazon S3 Bucket Default Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -77,13 +73,12 @@ type PutBucketEncryptionInput struct {
// This member is required.
ServerSideEncryptionConfiguration *types.ServerSideEncryptionConfiguration
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -94,14 +89,19 @@ type PutBucketEncryptionInput struct {
// automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketEncryptionOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -110,6 +110,9 @@ type PutBucketEncryptionOutput struct {
}
func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketEncryption{}, middleware.After)
if err != nil {
return err
@@ -118,34 +121,38 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketEncryption"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -154,7 +161,10 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketEncryptionValidationMiddleware(stack); err != nil {
@@ -166,6 +176,9 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketEncryptionInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -184,20 +197,35 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketEncryptionInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketEncryption(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketEncryption",
}
}
-// getPutBucketEncryptionRequestAlgorithmMember gets the request checksum algorithm
-// value provided as input.
+// getPutBucketEncryptionRequestAlgorithmMember gets the request checksum
+// algorithm value provided as input.
func getPutBucketEncryptionRequestAlgorithmMember(input interface{}) (string, bool) {
in := input.(*PutBucketEncryptionInput)
if len(in.ChecksumAlgorithm) == 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
index edf5d178..61d73da5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
@@ -4,16 +4,19 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can
-// have up to 1,000 S3 Intelligent-Tiering configurations per bucket. The S3
+// This operation is not supported by directory buckets. Puts a S3
+// Intelligent-Tiering configuration to the specified bucket. You can have up to
+// 1,000 S3 Intelligent-Tiering configurations per bucket. The S3
// Intelligent-Tiering storage class is designed to optimize storage costs by
// automatically moving data to the most cost-effective storage access tier,
// without performance impact or operational overhead. S3 Intelligent-Tiering
@@ -26,51 +29,22 @@ import (
// monitored and not eligible for auto-tiering. Smaller objects can be stored, but
// they are always charged at the Frequent Access tier rates in the S3
// Intelligent-Tiering storage class. For more information, see Storage class for
-// automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-// Operations related to PutBucketIntelligentTieringConfiguration include:
+// automatically optimizing frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
+// . Operations related to PutBucketIntelligentTieringConfiguration include:
+// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
+// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
+// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
//
-// *
-// DeleteBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// *
-// GetBucketIntelligentTieringConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// *
-// ListBucketIntelligentTieringConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
-//
-// You
-// only need S3 Intelligent-Tiering enabled on a bucket if you want to
+// You only need S3 Intelligent-Tiering enabled on a bucket if you want to
// automatically move objects stored in the S3 Intelligent-Tiering storage class to
-// the Archive Access or Deep Archive Access tier. Special Errors
-//
-// * HTTP 400 Bad
-// Request Error
-//
-// * Code: InvalidArgument
-//
-// * Cause: Invalid Argument
-//
-// * HTTP 400
-// Bad Request Error
-//
-// * Code: TooManyConfigurations
-//
-// * Cause: You are attempting to
-// create a new configuration but have already reached the 1,000-configuration
-// limit.
-//
-// * HTTP 403 Forbidden Error
-//
-// * Code: AccessDenied
-//
-// * Cause: You are not
-// the owner of the specified bucket, or you do not have the
-// s3:PutIntelligentTieringConfiguration bucket permission to set the configuration
-// on the bucket.
+// the Archive Access or Deep Archive Access tier.
+// PutBucketIntelligentTieringConfiguration has the following special errors: HTTP
+// 400 Bad Request Error Code: InvalidArgument Cause: Invalid Argument HTTP 400 Bad
+// Request Error Code: TooManyConfigurations Cause: You are attempting to create a
+// new configuration but have already reached the 1,000-configuration limit. HTTP
+// 403 Forbidden Error Cause: You are not the owner of the specified bucket, or you
+// do not have the s3:PutIntelligentTieringConfiguration bucket permission to set
+// the configuration on the bucket.
func (c *Client) PutBucketIntelligentTieringConfiguration(ctx context.Context, params *PutBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*PutBucketIntelligentTieringConfigurationOutput, error) {
if params == nil {
params = &PutBucketIntelligentTieringConfigurationInput{}
@@ -107,6 +81,11 @@ type PutBucketIntelligentTieringConfigurationInput struct {
noSmithyDocumentSerde
}
+func (in *PutBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketIntelligentTieringConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -115,6 +94,9 @@ type PutBucketIntelligentTieringConfigurationOutput struct {
}
func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration{}, middleware.After)
if err != nil {
return err
@@ -123,34 +105,38 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketIntelligentTieringConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -159,7 +145,10 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
@@ -171,6 +160,9 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -186,14 +178,26 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketIntelligentTieringConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketIntelligentTieringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketIntelligentTieringConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
index afca60b9..03d79a0d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
@@ -4,79 +4,58 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This implementation of the PUT action adds an inventory configuration
-// (identified by the inventory ID) to the bucket. You can have up to 1,000
-// inventory configurations per bucket. Amazon S3 inventory generates inventories
-// of the objects in the bucket on a daily or weekly basis, and the results are
-// published to a flat file. The bucket that is inventoried is called the source
-// bucket, and the bucket where the inventory flat file is stored is called the
-// destination bucket. The destination bucket must be in the same Amazon Web
-// Services Region as the source bucket. When you configure an inventory for a
-// source bucket, you specify the destination bucket where you want the inventory
-// to be stored, and whether to generate the inventory daily or weekly. You can
-// also configure what object metadata to include and whether to inventory all
-// object versions or only current versions. For more information, see Amazon S3
-// Inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) in the
-// Amazon S3 User Guide. You must create a bucket policy on the destination bucket
-// to grant permissions to Amazon S3 to write objects to the bucket in the defined
-// location. For an example policy, see Granting Permissions for Amazon S3
-// Inventory and Storage Class Analysis
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
-// To use this operation, you must have permissions to perform the
+// This operation is not supported by directory buckets. This implementation of
+// the PUT action adds an inventory configuration (identified by the inventory ID)
+// to the bucket. You can have up to 1,000 inventory configurations per bucket.
+// Amazon S3 inventory generates inventories of the objects in the bucket on a
+// daily or weekly basis, and the results are published to a flat file. The bucket
+// that is inventoried is called the source bucket, and the bucket where the
+// inventory flat file is stored is called the destination bucket. The destination
+// bucket must be in the same Amazon Web Services Region as the source bucket. When
+// you configure an inventory for a source bucket, you specify the destination
+// bucket where you want the inventory to be stored, and whether to generate the
+// inventory daily or weekly. You can also configure what object metadata to
+// include and whether to inventory all object versions or only current versions.
+// For more information, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
+// in the Amazon S3 User Guide. You must create a bucket policy on the destination
+// bucket to grant permissions to Amazon S3 to write objects to the bucket in the
+// defined location. For an example policy, see Granting Permissions for Amazon S3
+// Inventory and Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9)
+// . Permissions To use this operation, you must have permission to perform the
// s3:PutInventoryConfiguration action. The bucket owner has this permission by
-// default and can grant this permission to others. For more information about
-// permissions, see Permissions Related to Bucket Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide. Special Errors
-//
-// * HTTP 400 Bad Request Error
-//
-// *
-// Code: InvalidArgument
-//
-// * Cause: Invalid Argument
-//
-// * HTTP 400 Bad Request
-// Error
-//
-// * Code: TooManyConfigurations
-//
-// * Cause: You are attempting to create a
-// new configuration but have already reached the 1,000-configuration limit.
-//
-// *
-// HTTP 403 Forbidden Error
-//
-// * Code: AccessDenied
-//
-// * Cause: You are not the owner
+// default and can grant this permission to others. The
+// s3:PutInventoryConfiguration permission allows a user to create an S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html)
+// report that includes all object metadata fields available and to specify the
+// destination bucket to store the inventory. A user with read access to objects in
+// the destination bucket can also access all object metadata fields that are
+// available in the inventory report. To restrict access to an inventory report,
+// see Restricting access to an Amazon S3 Inventory report (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html#example-bucket-policies-use-case-10)
+// in the Amazon S3 User Guide. For more information about the metadata fields
+// available in S3 Inventory, see Amazon S3 Inventory lists (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html#storage-inventory-contents)
+// in the Amazon S3 User Guide. For more information about permissions, see
+// Permissions related to bucket subresource operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Identity and access management in Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide. PutBucketInventoryConfiguration has the following
+// special errors: HTTP 400 Bad Request Error Code: InvalidArgument Cause: Invalid
+// Argument HTTP 400 Bad Request Error Code: TooManyConfigurations Cause: You are
+// attempting to create a new configuration but have already reached the
+// 1,000-configuration limit. HTTP 403 Forbidden Error Cause: You are not the owner
// of the specified bucket, or you do not have the s3:PutInventoryConfiguration
-// bucket permission to set the configuration on the bucket.
-//
-// Related Resources
-//
-// *
-// GetBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// *
-// DeleteBucketInventoryConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// *
-// ListBucketInventoryConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
+// bucket permission to set the configuration on the bucket. The following
+// operations are related to PutBucketInventoryConfiguration :
+// - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
+// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
+// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
func (c *Client) PutBucketInventoryConfiguration(ctx context.Context, params *PutBucketInventoryConfigurationInput, optFns ...func(*Options)) (*PutBucketInventoryConfigurationOutput, error) {
if params == nil {
params = &PutBucketInventoryConfigurationInput{}
@@ -109,14 +88,19 @@ type PutBucketInventoryConfigurationInput struct {
// This member is required.
InventoryConfiguration *types.InventoryConfiguration
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketInventoryConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -125,6 +109,9 @@ type PutBucketInventoryConfigurationOutput struct {
}
func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketInventoryConfiguration{}, middleware.After)
if err != nil {
return err
@@ -133,34 +120,38 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketInventoryConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -169,7 +160,10 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
@@ -181,6 +175,9 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -196,14 +193,26 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketInventoryConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketInventoryConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketInventoryConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
index 414600dc..88096fdd 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
@@ -4,84 +4,66 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Creates a new lifecycle configuration for the bucket or replaces an existing
-// lifecycle configuration. Keep in mind that this will overwrite an existing
-// lifecycle configuration, so if you want to retain any configuration details,
-// they must be included in the new lifecycle configuration. For information about
-// lifecycle configuration, see Managing your storage lifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).
-// Bucket lifecycle configuration now supports specifying a lifecycle rule using an
-// object key name prefix, one or more object tags, or a combination of both.
-// Accordingly, this section describes the latest API. The previous version of the
-// API supported filtering based only on an object key name prefix, which is
-// supported for backward compatibility. For the related API description, see
-// PutBucketLifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html).
-// Rules You specify the lifecycle configuration in your request body. The
-// lifecycle configuration is specified as XML consisting of one or more rules.
-// Each rule consists of the following:
+// This operation is not supported by directory buckets. Creates a new lifecycle
+// configuration for the bucket or replaces an existing lifecycle configuration.
+// Keep in mind that this will overwrite an existing lifecycle configuration, so if
+// you want to retain any configuration details, they must be included in the new
+// lifecycle configuration. For information about lifecycle configuration, see
+// Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html)
+// . Bucket lifecycle configuration now supports specifying a lifecycle rule using
+// an object key name prefix, one or more object tags, object size, or any
+// combination of these. Accordingly, this section describes the latest API. The
+// previous version of the API supported filtering based only on an object key name
+// prefix, which is supported for backward compatibility. For the related API
+// description, see PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
+// . Rules You specify the lifecycle configuration in your request body. The
+// lifecycle configuration is specified as XML consisting of one or more rules. An
+// Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not
+// adjustable. Each rule consists of the following:
+// - A filter identifying a subset of objects to which the rule applies. The
+// filter can be based on a key name prefix, object tags, object size, or any
+// combination of these.
+// - A status indicating whether the rule is in effect.
+// - One or more lifecycle transition and expiration actions that you want
+// Amazon S3 to perform on the objects identified by the filter. If the state of
+// your bucket is versioning-enabled or versioning-suspended, you can have many
+// versions of the same object (one current version and zero or more noncurrent
+// versions). Amazon S3 provides predefined actions that you can specify for
+// current and noncurrent object versions.
//
-// * Filter identifying a subset of objects
-// to which the rule applies. The filter can be based on a key name prefix, object
-// tags, or a combination of both.
-//
-// * Status whether the rule is in effect.
-//
-// * One
-// or more lifecycle transition and expiration actions that you want Amazon S3 to
-// perform on the objects identified by the filter. If the state of your bucket is
-// versioning-enabled or versioning-suspended, you can have many versions of the
-// same object (one current version and zero or more noncurrent versions). Amazon
-// S3 provides predefined actions that you can specify for current and noncurrent
-// object versions.
-//
-// For more information, see Object Lifecycle Management
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) and
-// Lifecycle Configuration Elements
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html).
-// Permissions By default, all Amazon S3 resources are private, including buckets,
-// objects, and related subresources (for example, lifecycle configuration and
-// website configuration). Only the resource owner (that is, the Amazon Web
+// For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
+// and Lifecycle Configuration Elements (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html)
+// . Permissions By default, all Amazon S3 resources are private, including
+// buckets, objects, and related subresources (for example, lifecycle configuration
+// and website configuration). Only the resource owner (that is, the Amazon Web
// Services account that created it) can access the resource. The resource owner
// can optionally grant access permissions to others by writing an access policy.
-// For this operation, a user must get the s3:PutLifecycleConfiguration permission.
-// You can also explicitly deny permissions. Explicit deny also supersedes any
-// other permissions. If you want to block users or accounts from removing or
-// deleting objects from your bucket, you must deny them permissions for the
-// following actions:
-//
-// * s3:DeleteObject
-//
-// * s3:DeleteObjectVersion
-//
-// *
-// s3:PutLifecycleConfiguration
-//
-// For more information about permissions, see
-// Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// The following are related to PutBucketLifecycleConfiguration:
-//
-// * Examples of
-// Lifecycle Configuration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html)
-//
-// *
-// GetBucketLifecycleConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
+// For this operation, a user must get the s3:PutLifecycleConfiguration
+// permission. You can also explicitly deny permissions. An explicit deny also
+// supersedes any other permissions. If you want to block users or accounts from
+// removing or deleting objects from your bucket, you must deny them permissions
+// for the following actions:
+// - s3:DeleteObject
+// - s3:DeleteObjectVersion
+// - s3:PutLifecycleConfiguration
//
-// *
-// DeleteBucketLifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
+// For more information about permissions, see Managing Access Permissions to Your
+// Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . The following operations are related to PutBucketLifecycleConfiguration :
+// - Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html)
+// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
+// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
func (c *Client) PutBucketLifecycleConfiguration(ctx context.Context, params *PutBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*PutBucketLifecycleConfigurationOutput, error) {
if params == nil {
params = &PutBucketLifecycleConfigurationInput{}
@@ -104,20 +86,19 @@ type PutBucketLifecycleConfigurationInput struct {
// This member is required.
Bucket *string
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Container for lifecycle rules. You can add as many as 1,000 rules.
@@ -126,6 +107,11 @@ type PutBucketLifecycleConfigurationInput struct {
noSmithyDocumentSerde
}
+func (in *PutBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketLifecycleConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -134,6 +120,9 @@ type PutBucketLifecycleConfigurationOutput struct {
}
func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketLifecycleConfiguration{}, middleware.After)
if err != nil {
return err
@@ -142,34 +131,38 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketLifecycleConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -178,7 +171,10 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketLifecycleConfigurationValidationMiddleware(stack); err != nil {
@@ -190,6 +186,9 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketLifecycleConfigurationInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -208,14 +207,29 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketLifecycleConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketLifecycleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketLifecycleConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
index 0f3ea6d3..fb80d2ee 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
@@ -4,68 +4,50 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Set the logging parameters for a bucket and to specify permissions for who can
-// view and modify the logging parameters. All logs are saved to buckets in the
-// same Amazon Web Services Region as the source bucket. To set the logging status
-// of a bucket, you must be the bucket owner. The bucket owner is automatically
-// granted FULL_CONTROL to all logs. You use the Grantee request element to grant
-// access to other people. The Permissions request element specifies the kind of
-// access the grantee has to the logs. If the target bucket for log delivery uses
-// the bucket owner enforced setting for S3 Object Ownership, you can't use the
-// Grantee request element to grant access to others. Permissions can only be
-// granted using policies. For more information, see Permissions for server access
-// log delivery
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
+// This operation is not supported by directory buckets. Set the logging
+// parameters for a bucket and to specify permissions for who can view and modify
+// the logging parameters. All logs are saved to buckets in the same Amazon Web
+// Services Region as the source bucket. To set the logging status of a bucket, you
+// must be the bucket owner. The bucket owner is automatically granted FULL_CONTROL
+// to all logs. You use the Grantee request element to grant access to other
+// people. The Permissions request element specifies the kind of access the
+// grantee has to the logs. If the target bucket for log delivery uses the bucket
+// owner enforced setting for S3 Object Ownership, you can't use the Grantee
+// request element to grant access to others. Permissions can only be granted using
+// policies. For more information, see Permissions for server access log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
// in the Amazon S3 User Guide. Grantee Values You can specify the person (grantee)
-// to whom you're assigning access rights (using request elements) in the following
-// ways:
+// to whom you're assigning access rights (by using request elements) in the
+// following ways:
+// - By the person's ID: <>ID<><>GranteesEmail<> DisplayName is optional and
+// ignored in the request.
+// - By Email address: <>Grantees@email.com<> The grantee is resolved to the
+// CanonicalUser and, in a response to a GETObjectAcl request, appears as the
+// CanonicalUser.
+// - By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
//
-// * By the person's ID: <>ID<><>GranteesEmail<> DisplayName is optional
-// and ignored in the request.
-//
-// * By Email address: <>Grantees@email.com<> The
-// grantee is resolved to the CanonicalUser and, in a response to a GET Object acl
-// request, appears as the CanonicalUser.
-//
-// * By URI:
-// <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
-//
-// To enable
-// logging, you use LoggingEnabled and its children request elements. To disable
-// logging, you use an empty BucketLoggingStatus request element: For more
-// information about server access logging, see Server Access Logging
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html) in the
-// Amazon S3 User Guide. For more information about creating a bucket, see
-// CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html). For
-// more information about returning the logging status of a bucket, see
-// GetBucketLogging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html). The
-// following operations are related to PutBucketLogging:
-//
-// * PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// *
-// DeleteBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// *
-// CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// GetBucketLogging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html)
+// To enable logging, you use LoggingEnabled and its children request elements. To
+// disable logging, you use an empty BucketLoggingStatus request element: For
+// more information about server access logging, see Server Access Logging (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html)
+// in the Amazon S3 User Guide. For more information about creating a bucket, see
+// CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// . For more information about returning the logging status of a bucket, see
+// GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html)
+// . The following operations are related to PutBucketLogging :
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html)
func (c *Client) PutBucketLogging(ctx context.Context, params *PutBucketLoggingInput, optFns ...func(*Options)) (*PutBucketLoggingOutput, error) {
if params == nil {
params = &PutBucketLoggingInput{}
@@ -93,13 +75,12 @@ type PutBucketLoggingInput struct {
// This member is required.
BucketLoggingStatus *types.BucketLoggingStatus
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -109,14 +90,19 @@ type PutBucketLoggingInput struct {
// this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketLoggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketLoggingOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -125,6 +111,9 @@ type PutBucketLoggingOutput struct {
}
func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketLogging{}, middleware.After)
if err != nil {
return err
@@ -133,34 +122,38 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketLogging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -169,7 +162,10 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketLoggingValidationMiddleware(stack); err != nil {
@@ -181,6 +177,9 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketLoggingInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -199,14 +198,29 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketLoggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketLogging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketLogging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
index 6f0c6fac..bff1452b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
@@ -4,53 +4,39 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets a metrics configuration (specified by the metrics configuration ID) for the
-// bucket. You can have up to 1,000 metrics configurations per bucket. If you're
-// updating an existing metrics configuration, note that this is a full replacement
-// of the existing metrics configuration. If you don't include the elements you
-// want to keep, they are erased. To use this operation, you must have permissions
-// to perform the s3:PutMetricsConfiguration action. The bucket owner has this
+// This operation is not supported by directory buckets. Sets a metrics
+// configuration (specified by the metrics configuration ID) for the bucket. You
+// can have up to 1,000 metrics configurations per bucket. If you're updating an
+// existing metrics configuration, note that this is a full replacement of the
+// existing metrics configuration. If you don't include the elements you want to
+// keep, they are erased. To use this operation, you must have permissions to
+// perform the s3:PutMetricsConfiguration action. The bucket owner has this
// permission by default. The bucket owner can grant this permission to others. For
// more information about permissions, see Permissions Related to Bucket
-// Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// For information about CloudWatch request metrics for Amazon S3, see Monitoring
-// Metrics with Amazon CloudWatch
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-// The following operations are related to PutBucketMetricsConfiguration:
+// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . For information about CloudWatch request metrics for Amazon S3, see
+// Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+// . The following operations are related to PutBucketMetricsConfiguration :
+// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
+// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
+// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
//
-// *
-// DeleteBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// *
-// GetBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// *
-// ListBucketMetricsConfigurations
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// GetBucketLifecycle
-// has the following special error:
-//
-// * Error code: TooManyConfigurations
-//
-// *
-// Description: You are attempting to create a new configuration but have already
-// reached the 1,000-configuration limit.
-//
-// * HTTP Status Code: HTTP 400 Bad Request
+// PutBucketMetricsConfiguration has the following special error:
+// - Error code: TooManyConfigurations
+// - Description: You are attempting to create a new configuration but have
+// already reached the 1,000-configuration limit.
+// - HTTP Status Code: HTTP 400 Bad Request
func (c *Client) PutBucketMetricsConfiguration(ctx context.Context, params *PutBucketMetricsConfigurationInput, optFns ...func(*Options)) (*PutBucketMetricsConfigurationOutput, error) {
if params == nil {
params = &PutBucketMetricsConfigurationInput{}
@@ -73,7 +59,8 @@ type PutBucketMetricsConfigurationInput struct {
// This member is required.
Bucket *string
- // The ID used to identify the metrics configuration.
+ // The ID used to identify the metrics configuration. The ID has a 64 character
+ // limit and can only contain letters, numbers, periods, dashes, and underscores.
//
// This member is required.
Id *string
@@ -83,14 +70,19 @@ type PutBucketMetricsConfigurationInput struct {
// This member is required.
MetricsConfiguration *types.MetricsConfiguration
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketMetricsConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -99,6 +91,9 @@ type PutBucketMetricsConfigurationOutput struct {
}
func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketMetricsConfiguration{}, middleware.After)
if err != nil {
return err
@@ -107,34 +102,38 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketMetricsConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -143,7 +142,10 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
@@ -155,6 +157,9 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -170,14 +175,26 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketMetricsConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketMetricsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketMetricsConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
index 8e771d6b..e937b5c5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
@@ -4,53 +4,51 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Enables notifications of specified events for a bucket. For more information
-// about event notifications, see Configuring Event Notifications
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). Using
-// this API, you can replace an existing notification configuration. The
+// This operation is not supported by directory buckets. Enables notifications of
+// specified events for a bucket. For more information about event notifications,
+// see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+// . Using this API, you can replace an existing notification configuration. The
// configuration is an XML file that defines the event types that you want Amazon
// S3 to publish and the destination where you want Amazon S3 to publish an event
// notification when it detects an event of the specified type. By default, your
// bucket has no event notifications configured. That is, the notification
-// configuration will be an empty NotificationConfiguration. This action replaces
-// the existing notification configuration with the configuration you include in
-// the request body. After Amazon S3 receives this request, it first verifies that
-// any Amazon Simple Notification Service (Amazon SNS) or Amazon Simple Queue
-// Service (Amazon SQS) destination exists, and that the bucket owner has
-// permission to publish to it by sending a test notification. In the case of
+// configuration will be an empty NotificationConfiguration . This action
+// replaces the existing notification configuration with the configuration you
+// include in the request body. After Amazon S3 receives this request, it first
+// verifies that any Amazon Simple Notification Service (Amazon SNS) or Amazon
+// Simple Queue Service (Amazon SQS) destination exists, and that the bucket owner
+// has permission to publish to it by sending a test notification. In the case of
// Lambda destinations, Amazon S3 verifies that the Lambda function permissions
// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For
-// more information, see Configuring Notifications for Amazon S3 Events
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). You
-// can disable notifications by adding the empty NotificationConfiguration element.
-// For more information about the number of event notification configurations that
-// you can create per bucket, see Amazon S3 service quotas
-// (https://docs.aws.amazon.com/general/latest/gr/s3.html#limits_s3) in Amazon Web
-// Services General Reference. By default, only the bucket owner can configure
-// notifications on a bucket. However, bucket owners can use a bucket policy to
-// grant permission to other users to set this configuration with
-// s3:PutBucketNotification permission. The PUT notification is an atomic
+// more information, see Configuring Notifications for Amazon S3 Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+// . You can disable notifications by adding the empty NotificationConfiguration
+// element. For more information about the number of event notification
+// configurations that you can create per bucket, see Amazon S3 service quotas (https://docs.aws.amazon.com/general/latest/gr/s3.html#limits_s3)
+// in Amazon Web Services General Reference. By default, only the bucket owner can
+// configure notifications on a bucket. However, bucket owners can use a bucket
+// policy to grant permission to other users to set this configuration with the
+// required s3:PutBucketNotification permission. The PUT notification is an atomic
// operation. For example, suppose your notification configuration includes SNS
// topic, SQS queue, and Lambda function configurations. When you send a PUT
// request with this configuration, Amazon S3 sends test messages to your SNS
// topic. If the message fails, the entire PUT action will fail, and Amazon S3 will
-// not add the configuration to your bucket. Responses If the configuration in the
-// request body includes only one TopicConfiguration specifying only the
+// not add the configuration to your bucket. If the configuration in the request
+// body includes only one TopicConfiguration specifying only the
// s3:ReducedRedundancyLostObject event type, the response will also include the
// x-amz-sns-test-message-id header containing the message ID of the test
// notification sent to the topic. The following action is related to
-// PutBucketNotificationConfiguration:
-//
-// * GetBucketNotificationConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
+// PutBucketNotificationConfiguration :
+// - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
func (c *Client) PutBucketNotificationConfiguration(ctx context.Context, params *PutBucketNotificationConfigurationInput, optFns ...func(*Options)) (*PutBucketNotificationConfigurationOutput, error) {
if params == nil {
params = &PutBucketNotificationConfigurationInput{}
@@ -73,24 +71,29 @@ type PutBucketNotificationConfigurationInput struct {
// This member is required.
Bucket *string
- // A container for specifying the notification configuration of the bucket. If this
- // element is empty, notifications are turned off for the bucket.
+ // A container for specifying the notification configuration of the bucket. If
+ // this element is empty, notifications are turned off for the bucket.
//
// This member is required.
NotificationConfiguration *types.NotificationConfiguration
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations. True or
// false value.
- SkipDestinationValidation bool
+ SkipDestinationValidation *bool
noSmithyDocumentSerde
}
+func (in *PutBucketNotificationConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketNotificationConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -99,6 +102,9 @@ type PutBucketNotificationConfigurationOutput struct {
}
func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketNotificationConfiguration{}, middleware.After)
if err != nil {
return err
@@ -107,34 +113,38 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketNotificationConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -143,7 +153,10 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketNotificationConfigurationValidationMiddleware(stack); err != nil {
@@ -155,6 +168,9 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketNotificationConfigurationUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -170,14 +186,26 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketNotificationConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketNotificationConfiguration",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
index 83210cac..94875b75 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
@@ -4,27 +4,25 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this
-// operation, you must have the s3:PutBucketOwnershipControls permission. For more
-// information about Amazon S3 permissions, see Specifying permissions in a policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/using-with-s3-actions.html).
-// For information about Amazon S3 Object Ownership, see Using object ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/about-object-ownership.html).
-// The following operations are related to PutBucketOwnershipControls:
-//
-// *
-// GetBucketOwnershipControls
-//
-// * DeleteBucketOwnershipControls
+// This operation is not supported by directory buckets. Creates or modifies
+// OwnershipControls for an Amazon S3 bucket. To use this operation, you must have
+// the s3:PutBucketOwnershipControls permission. For more information about Amazon
+// S3 permissions, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/using-with-s3-actions.html)
+// . For information about Amazon S3 Object Ownership, see Using object ownership (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/about-object-ownership.html)
+// . The following operations are related to PutBucketOwnershipControls :
+// - GetBucketOwnershipControls
+// - DeleteBucketOwnershipControls
func (c *Client) PutBucketOwnershipControls(ctx context.Context, params *PutBucketOwnershipControlsInput, optFns ...func(*Options)) (*PutBucketOwnershipControlsOutput, error) {
if params == nil {
params = &PutBucketOwnershipControlsInput{}
@@ -58,14 +56,19 @@ type PutBucketOwnershipControlsInput struct {
// this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketOwnershipControlsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -74,6 +77,9 @@ type PutBucketOwnershipControlsOutput struct {
}
func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketOwnershipControls{}, middleware.After)
if err != nil {
return err
@@ -82,34 +88,38 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketOwnershipControls"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -118,7 +128,10 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketOwnershipControlsValidationMiddleware(stack); err != nil {
@@ -130,6 +143,9 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketOwnershipControlsInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -148,14 +164,29 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketOwnershipControlsInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketOwnershipControls(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketOwnershipControls",
}
}
@@ -170,9 +201,9 @@ func addPutBucketOwnershipControlsInputChecksumMiddlewares(stack *middleware.Sta
})
}
-// getPutBucketOwnershipControlsBucketMember returns a pointer to string denoting a
-// provided bucket member valueand a boolean indicating if the input has a modeled
-// bucket name,
+// getPutBucketOwnershipControlsBucketMember returns a pointer to string denoting
+// a provided bucket member valueand a boolean indicating if the input has a
+// modeled bucket name,
func getPutBucketOwnershipControlsBucketMember(input interface{}) (*string, bool) {
in := input.(*PutBucketOwnershipControlsInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
index 8860d3b5..88e3f263 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
@@ -4,35 +4,59 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an
-// identity other than the root user of the Amazon Web Services account that owns
-// the bucket, the calling identity must have the PutBucketPolicy permissions on
-// the specified bucket and belong to the bucket owner's account in order to use
-// this operation. If you don't have PutBucketPolicy permissions, Amazon S3 returns
-// a 403 Access Denied error. If you have the correct permissions, but you're not
+// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. Directory buckets -
+// For directory buckets, you must make requests for this API operation to the
+// Regional endpoint. These endpoints support path-style requests in the format
+// https://s3express-control.region_code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information, see
+// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions If you are using an identity other than
+// the root user of the Amazon Web Services account that owns the bucket, the
+// calling identity must both have the PutBucketPolicy permissions on the
+// specified bucket and belong to the bucket owner's account in order to use this
+// operation. If you don't have PutBucketPolicy permissions, Amazon S3 returns a
+// 403 Access Denied error. If you have the correct permissions, but you're not
// using an identity that belongs to the bucket owner's account, Amazon S3 returns
-// a 405 Method Not Allowed error. As a security precaution, the root user of the
-// Amazon Web Services account that owns a bucket can always use this operation,
-// even if the policy explicitly denies the root user the ability to perform this
-// action. For more information, see Bucket policy examples
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html).
-// The following operations are related to PutBucketPolicy:
+// a 405 Method Not Allowed error. To ensure that bucket owners don't
+// inadvertently lock themselves out of their own buckets, the root principal in a
+// bucket owner's Amazon Web Services account can perform the GetBucketPolicy ,
+// PutBucketPolicy , and DeleteBucketPolicy API actions, even if their bucket
+// policy explicitly denies the root principal's access. Bucket owner root
+// principals can only be blocked from performing these API actions by VPC endpoint
+// policies and Amazon Web Services Organizations policies.
+// - General purpose bucket permissions - The s3:PutBucketPolicy permission is
+// required in a policy. For more information about general purpose buckets bucket
+// policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation, you
+// must have the s3express:PutBucketPolicy permission in an IAM identity-based
+// policy instead of a bucket policy. Cross-account access to this API operation
+// isn't supported. This operation can only be performed by the Amazon Web Services
+// account that owns the resource. For more information about directory bucket
+// policies and permissions, see Amazon Web Services Identity and Access
+// Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
+// in the Amazon S3 User Guide.
//
-// * CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// DeleteBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+// Example bucket policies General purpose buckets example bucket policies - See
+// Bucket policy examples (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html)
+// in the Amazon S3 User Guide. Directory bucket example bucket policies - See
+// Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
+// in the Amazon S3 User Guide. HTTP Host header syntax Directory buckets - The
+// HTTP Host header syntax is s3express-control.region.amazonaws.com . The
+// following operations are related to PutBucketPolicy :
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
func (c *Client) PutBucketPolicy(ctx context.Context, params *PutBucketPolicyInput, optFns ...func(*Options)) (*PutBucketPolicyOutput, error) {
if params == nil {
params = &PutBucketPolicyInput{}
@@ -50,44 +74,72 @@ func (c *Client) PutBucketPolicy(ctx context.Context, params *PutBucketPolicyInp
type PutBucketPolicyInput struct {
- // The name of the bucket.
+ // The name of the bucket. Directory buckets - When you use this operation with a
+ // directory bucket, you must use path-style requests in the format
+ // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // Virtual-hosted-style requests aren't supported. Directory bucket names must be
+ // unique in the chosen Availability Zone. Bucket names must also follow the format
+ // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
+ // ). For information about bucket naming restrictions, see Directory bucket
+ // naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide
//
// This member is required.
Bucket *string
- // The bucket policy as a JSON document.
+ // The bucket policy as a JSON document. For directory buckets, the only IAM
+ // action supported in the bucket policy is s3express:CreateSession .
//
// This member is required.
Policy *string
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
- // ignores any provided ChecksumAlgorithm parameter.
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3
+ // fails the request with the HTTP status code 400 Bad Request . For the
+ // x-amz-checksum-algorithm header, replace algorithm with the supported
+ // algorithm from the following list:
+ // - CRC32
+ // - CRC32C
+ // - SHA1
+ // - SHA256
+ // For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // in the Amazon S3 User Guide. If the individual checksum value you provide
+ // through x-amz-checksum-algorithm doesn't match the checksum algorithm you set
+ // through x-amz-sdk-checksum-algorithm , Amazon S3 ignores any provided
+ // ChecksumAlgorithm parameter and uses the checksum algorithm that matches the
+ // provided value in x-amz-checksum-algorithm . For directory buckets, when you
+ // use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's
+ // used for performance.
ChecksumAlgorithm types.ChecksumAlgorithm
// Set this parameter to true to confirm that you want to remove your permissions
- // to change this bucket policy in the future.
- ConfirmRemoveSelfBucketAccess bool
+ // to change this bucket policy in the future. This functionality is not supported
+ // for directory buckets.
+ ConfirmRemoveSelfBucketAccess *bool
// The MD5 hash of the request body. For requests made using the Amazon Web
// Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // calculated automatically. This functionality is not supported for directory
+ // buckets.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied). For directory buckets, this header
+ // is not supported in this API operation. If you specify this header, the request
+ // fails with the HTTP status code 501 Not Implemented .
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketPolicyInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketPolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -96,6 +148,9 @@ type PutBucketPolicyOutput struct {
}
func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketPolicy{}, middleware.After)
if err != nil {
return err
@@ -104,34 +159,38 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack,
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketPolicy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -140,7 +199,10 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack,
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketPolicyValidationMiddleware(stack); err != nil {
@@ -152,6 +214,9 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack,
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketPolicyInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -170,14 +235,29 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack,
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketPolicyInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketPolicy",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
index 2213373f..bf59164c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
@@ -4,67 +4,58 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Creates a replication configuration or replaces an existing one. For more
-// information, see Replication
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon
-// S3 User Guide. Specify the replication configuration in the request body. In the
-// replication configuration, you provide the name of the destination bucket or
-// buckets where you want Amazon S3 to replicate objects, the IAM role that Amazon
-// S3 can assume to replicate objects on your behalf, and other relevant
-// information. A replication configuration must include at least one rule, and can
-// contain a maximum of 1,000. Each rule identifies a subset of objects to
+// This operation is not supported by directory buckets. Creates a replication
+// configuration or replaces an existing one. For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
+// in the Amazon S3 User Guide. Specify the replication configuration in the
+// request body. In the replication configuration, you provide the name of the
+// destination bucket or buckets where you want Amazon S3 to replicate objects, the
+// IAM role that Amazon S3 can assume to replicate objects on your behalf, and
+// other relevant information. You can invoke this request for a specific Amazon
+// Web Services Region by using the aws:RequestedRegion (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requestedregion)
+// condition key. A replication configuration must include at least one rule, and
+// can contain a maximum of 1,000. Each rule identifies a subset of objects to
// replicate by filtering the objects in the source bucket. To choose additional
// subsets of objects to replicate, add a rule for each subset. To specify a subset
// of the objects in the source bucket to apply a replication rule to, add the
// Filter element as a child of the Rule element. You can filter objects based on
// an object key prefix, one or more object tags, or both. When you add the Filter
// element in the configuration, you must also add the following elements:
-// DeleteMarkerReplication, Status, and Priority. If you are using an earlier
+// DeleteMarkerReplication , Status , and Priority . If you are using an earlier
// version of the replication configuration, Amazon S3 handles replication of
-// delete markers differently. For more information, see Backward Compatibility
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
-// For information about enabling versioning on a bucket, see Using Versioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html). Handling
-// Replication of Encrypted Objects By default, Amazon S3 doesn't replicate objects
-// that are stored at rest using server-side encryption with KMS keys. To replicate
-// Amazon Web Services KMS-encrypted objects, add the following:
-// SourceSelectionCriteria, SseKmsEncryptedObjects, Status,
-// EncryptionConfiguration, and ReplicaKmsKeyID. For information about replication
-// configuration, see Replicating Objects Created with SSE Using KMS keys
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html).
-// For information on PutBucketReplication errors, see List of replication-related
-// error codes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
+// delete markers differently. For more information, see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations)
+// . For information about enabling versioning on a bucket, see Using Versioning (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html)
+// . Handling Replication of Encrypted Objects By default, Amazon S3 doesn't
+// replicate objects that are stored at rest using server-side encryption with KMS
+// keys. To replicate Amazon Web Services KMS-encrypted objects, add the following:
+// SourceSelectionCriteria , SseKmsEncryptedObjects , Status ,
+// EncryptionConfiguration , and ReplicaKmsKeyID . For information about
+// replication configuration, see Replicating Objects Created with SSE Using KMS
+// keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html)
+// . For information on PutBucketReplication errors, see List of
+// replication-related error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
// Permissions To create a PutBucketReplication request, you must have
// s3:PutReplicationConfiguration permissions for the bucket. By default, a
// resource owner, in this case the Amazon Web Services account that created the
// bucket, can perform this operation. The resource owner can also grant others
// permissions to perform the operation. For more information about permissions,
-// see Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) and
-// Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// To perform this operation, the user or role performing the action must have the
-// iam:PassRole
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
-// permission. The following operations are related to PutBucketReplication:
-//
-// *
-// GetBucketReplication
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
-//
-// *
-// DeleteBucketReplication
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
+// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . To perform this operation, the user or role performing the action must have
+// the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
+// permission. The following operations are related to PutBucketReplication :
+// - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
+// - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
func (c *Client) PutBucketReplication(ctx context.Context, params *PutBucketReplicationInput, optFns ...func(*Options)) (*PutBucketReplicationOutput, error) {
if params == nil {
params = &PutBucketReplicationInput{}
@@ -93,28 +84,26 @@ type PutBucketReplicationInput struct {
// This member is required.
ReplicationConfiguration *types.ReplicationConfiguration
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
- // message integrity check to verify that the request body was not corrupted in
- // transit. For more information, see RFC 1864
- // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864 (http://www.ietf.org/rfc/rfc1864.txt)
+ // . For requests made using the Amazon Web Services Command Line Interface (CLI)
+ // or Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// A token to allow Object Lock to be enabled for an existing bucket.
@@ -123,6 +112,11 @@ type PutBucketReplicationInput struct {
noSmithyDocumentSerde
}
+func (in *PutBucketReplicationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketReplicationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -131,6 +125,9 @@ type PutBucketReplicationOutput struct {
}
func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketReplication{}, middleware.After)
if err != nil {
return err
@@ -139,34 +136,38 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketReplication"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -175,7 +176,10 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketReplicationValidationMiddleware(stack); err != nil {
@@ -187,6 +191,9 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketReplicationInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -205,14 +212,29 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketReplicationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketReplication(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketReplication",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
index c89d97be..07e0f163 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
@@ -4,28 +4,25 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the request payment configuration for a bucket. By default, the bucket
-// owner pays for downloads from the bucket. This configuration parameter enables
-// the bucket owner (only) to specify that the person requesting the download will
-// be charged for the download. For more information, see Requester Pays Buckets
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html). The
-// following operations are related to PutBucketRequestPayment:
-//
-// * CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// GetBucketRequestPayment
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html)
+// This operation is not supported by directory buckets. Sets the request payment
+// configuration for a bucket. By default, the bucket owner pays for downloads from
+// the bucket. This configuration parameter enables the bucket owner (only) to
+// specify that the person requesting the download will be charged for the
+// download. For more information, see Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
+// . The following operations are related to PutBucketRequestPayment :
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - GetBucketRequestPayment (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html)
func (c *Client) PutBucketRequestPayment(ctx context.Context, params *PutBucketRequestPaymentInput, optFns ...func(*Options)) (*PutBucketRequestPaymentOutput, error) {
if params == nil {
params = &PutBucketRequestPaymentInput{}
@@ -53,33 +50,36 @@ type PutBucketRequestPaymentInput struct {
// This member is required.
RequestPaymentConfiguration *types.RequestPaymentConfiguration
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
- // message integrity check to verify that the request body was not corrupted in
- // transit. For more information, see RFC 1864
- // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864 (http://www.ietf.org/rfc/rfc1864.txt)
+ // . For requests made using the Amazon Web Services Command Line Interface (CLI)
+ // or Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketRequestPaymentInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketRequestPaymentOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -88,6 +88,9 @@ type PutBucketRequestPaymentOutput struct {
}
func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketRequestPayment{}, middleware.After)
if err != nil {
return err
@@ -96,34 +99,38 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketRequestPayment"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -132,7 +139,10 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketRequestPaymentValidationMiddleware(stack); err != nil {
@@ -144,6 +154,9 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketRequestPaymentInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -162,14 +175,29 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketRequestPaymentInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketRequestPayment(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketRequestPayment",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
index f4101077..0f0a6fd4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
@@ -4,73 +4,50 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the tags for a bucket. Use tags to organize your Amazon Web Services bill
-// to reflect your own cost structure. To do this, sign up to get your Amazon Web
-// Services account bill with tag key values included. Then, to see the cost of
-// combined resources, organize your billing information according to resources
-// with the same tag key values. For example, you can tag several resources with a
-// specific application name, and then organize your billing information to see the
-// total cost of that application across several services. For more information,
-// see Cost Allocation and Tagging
-// (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
-// and Using Cost Allocation in Amazon S3 Bucket Tags
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html). When
-// this operation sets the tags for a bucket, it will overwrite any current tags
-// the bucket already has. You cannot use this operation to add tags to an existing
-// list of tags. To use this operation, you must have permissions to perform the
-// s3:PutBucketTagging action. The bucket owner has this permission by default and
-// can grant this permission to others. For more information about permissions, see
-// Permissions Related to Bucket Subresource Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-// PutBucketTagging has the following special errors:
+// This operation is not supported by directory buckets. Sets the tags for a
+// bucket. Use tags to organize your Amazon Web Services bill to reflect your own
+// cost structure. To do this, sign up to get your Amazon Web Services account bill
+// with tag key values included. Then, to see the cost of combined resources,
+// organize your billing information according to resources with the same tag key
+// values. For example, you can tag several resources with a specific application
+// name, and then organize your billing information to see the total cost of that
+// application across several services. For more information, see Cost Allocation
+// and Tagging (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
+// and Using Cost Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CostAllocTagging.html)
+// . When this operation sets the tags for a bucket, it will overwrite any current
+// tags the bucket already has. You cannot use this operation to add tags to an
+// existing list of tags. To use this operation, you must have permissions to
+// perform the s3:PutBucketTagging action. The bucket owner has this permission by
+// default and can grant this permission to others. For more information about
+// permissions, see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// . PutBucketTagging has the following special errors. For more Amazon S3 errors
+// see, Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
+// .
+// - InvalidTag - The tag provided was not a valid tag. This error can occur if
+// the tag did not pass input validation. For more information, see Using Cost
+// Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CostAllocTagging.html)
+// .
+// - MalformedXML - The XML provided does not match the schema.
+// - OperationAborted - A conflicting conditional action is currently in progress
+// against this resource. Please try again.
+// - InternalError - The service was unable to apply the provided tag to the
+// bucket.
//
-// * Error code:
-// InvalidTagError
-//
-// * Description: The tag provided was not a valid tag. This error
-// can occur if the tag did not pass input validation. For information about tag
-// restrictions, see User-Defined Tag Restrictions
-// (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html)
-// and Amazon Web Services-Generated Cost Allocation Tag Restrictions
-// (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/aws-tag-restrictions.html).
-//
-// *
-// Error code: MalformedXMLError
-//
-// * Description: The XML provided does not match
-// the schema.
-//
-// * Error code: OperationAbortedError
-//
-// * Description: A conflicting
-// conditional action is currently in progress against this resource. Please try
-// again.
-//
-// * Error code: InternalError
-//
-// * Description: The service was unable to
-// apply the provided tag to the bucket.
-//
-// The following operations are related to
-// PutBucketTagging:
-//
-// * GetBucketTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
-//
-// *
-// DeleteBucketTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
+// The following operations are related to PutBucketTagging :
+// - GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
+// - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
func (c *Client) PutBucketTagging(ctx context.Context, params *PutBucketTaggingInput, optFns ...func(*Options)) (*PutBucketTaggingOutput, error) {
if params == nil {
params = &PutBucketTaggingInput{}
@@ -98,33 +75,36 @@ type PutBucketTaggingInput struct {
// This member is required.
Tagging *types.Tagging
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
- // message integrity check to verify that the request body was not corrupted in
- // transit. For more information, see RFC 1864
- // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864 (http://www.ietf.org/rfc/rfc1864.txt)
+ // . For requests made using the Amazon Web Services Command Line Interface (CLI)
+ // or Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketTaggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketTaggingOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -133,6 +113,9 @@ type PutBucketTaggingOutput struct {
}
func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketTagging{}, middleware.After)
if err != nil {
return err
@@ -141,34 +124,38 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketTagging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -177,7 +164,10 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketTaggingValidationMiddleware(stack); err != nil {
@@ -189,6 +179,9 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketTaggingInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -207,14 +200,29 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketTaggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketTagging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketTagging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
index 6d7943e6..495725ce 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
@@ -4,46 +4,39 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the versioning state of an existing bucket. You can set the versioning
-// state with one of the following values: Enabled—Enables versioning for the
-// objects in the bucket. All objects added to the bucket receive a unique version
-// ID. Suspended—Disables versioning for the objects in the bucket. All objects
-// added to the bucket receive the version ID null. If the versioning state has
-// never been set on a bucket, it has no versioning state; a GetBucketVersioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
+// This operation is not supported by directory buckets. Sets the versioning state
+// of an existing bucket. You can set the versioning state with one of the
+// following values: Enabled—Enables versioning for the objects in the bucket. All
+// objects added to the bucket receive a unique version ID. Suspended—Disables
+// versioning for the objects in the bucket. All objects added to the bucket
+// receive the version ID null. If the versioning state has never been set on a
+// bucket, it has no versioning state; a GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
// request does not return a versioning state value. In order to enable MFA Delete,
// you must be the bucket owner. If you are the bucket owner and want to enable MFA
// Delete in the bucket versioning configuration, you must include the x-amz-mfa
-// request header and the Status and the MfaDelete request elements in a request to
-// set the versioning state of the bucket. If you have an object expiration
-// lifecycle policy in your non-versioned bucket and you want to maintain the same
-// permanent delete behavior when you enable versioning, you must add a noncurrent
-// expiration policy. The noncurrent expiration lifecycle policy will manage the
-// deletes of the noncurrent object versions in the version-enabled bucket. (A
-// version-enabled bucket maintains one current and zero or more noncurrent object
-// versions.) For more information, see Lifecycle and Versioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config).
-// Related Resources
-//
-// * CreateBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// *
-// DeleteBucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// *
-// GetBucketVersioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
+// request header and the Status and the MfaDelete request elements in a request
+// to set the versioning state of the bucket. If you have an object expiration
+// lifecycle configuration in your non-versioned bucket and you want to maintain
+// the same permanent delete behavior when you enable versioning, you must add a
+// noncurrent expiration policy. The noncurrent expiration lifecycle configuration
+// will manage the deletes of the noncurrent object versions in the version-enabled
+// bucket. (A version-enabled bucket maintains one current and zero or more
+// noncurrent object versions.) For more information, see Lifecycle and Versioning (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config)
+// . The following operations are related to PutBucketVersioning :
+// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+// - GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
func (c *Client) PutBucketVersioning(ctx context.Context, params *PutBucketVersioningInput, optFns ...func(*Options)) (*PutBucketVersioningOutput, error) {
if params == nil {
params = &PutBucketVersioningInput{}
@@ -71,37 +64,40 @@ type PutBucketVersioningInput struct {
// This member is required.
VersioningConfiguration *types.VersioningConfiguration
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
// >The base64-encoded 128-bit MD5 digest of the data. You must use this header as
// a message integrity check to verify that the request body was not corrupted in
- // transit. For more information, see RFC 1864
- // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // transit. For more information, see RFC 1864 (http://www.ietf.org/rfc/rfc1864.txt)
+ // . For requests made using the Amazon Web Services Command Line Interface (CLI)
+ // or Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
- // The concatenation of the authentication device's serial number, a space, and the
- // value that is displayed on your authentication device.
+ // The concatenation of the authentication device's serial number, a space, and
+ // the value that is displayed on your authentication device.
MFA *string
noSmithyDocumentSerde
}
+func (in *PutBucketVersioningInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketVersioningOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -110,6 +106,9 @@ type PutBucketVersioningOutput struct {
}
func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketVersioning{}, middleware.After)
if err != nil {
return err
@@ -118,34 +117,38 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketVersioning"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -154,7 +157,10 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketVersioningValidationMiddleware(stack); err != nil {
@@ -166,6 +172,9 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketVersioningInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -184,20 +193,35 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketVersioningInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketVersioning(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketVersioning",
}
}
-// getPutBucketVersioningRequestAlgorithmMember gets the request checksum algorithm
-// value provided as input.
+// getPutBucketVersioningRequestAlgorithmMember gets the request checksum
+// algorithm value provided as input.
func getPutBucketVersioningRequestAlgorithmMember(input interface{}) (string, bool) {
in := input.(*PutBucketVersioningInput)
if len(in.ChecksumAlgorithm) == 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
index 11cb4a35..08c8a582 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
@@ -4,86 +4,60 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the configuration of the website that is specified in the website
-// subresource. To configure a bucket as a website, you can add this subresource on
-// the bucket with website configuration information such as the file name of the
-// index document and any redirect rules. For more information, see Hosting
-// Websites on Amazon S3
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). This PUT
-// action requires the S3:PutBucketWebsite permission. By default, only the bucket
-// owner can configure the website attached to a bucket; however, bucket owners can
-// allow other users to set the website configuration by writing a bucket policy
-// that grants them the S3:PutBucketWebsite permission. To redirect all website
-// requests sent to the bucket's website endpoint, you add a website configuration
-// with the following elements. Because all requests are sent to another website,
-// you don't need to provide index document name for the bucket.
+// This operation is not supported by directory buckets. Sets the configuration of
+// the website that is specified in the website subresource. To configure a bucket
+// as a website, you can add this subresource on the bucket with website
+// configuration information such as the file name of the index document and any
+// redirect rules. For more information, see Hosting Websites on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
+// . This PUT action requires the S3:PutBucketWebsite permission. By default, only
+// the bucket owner can configure the website attached to a bucket; however, bucket
+// owners can allow other users to set the website configuration by writing a
+// bucket policy that grants them the S3:PutBucketWebsite permission. To redirect
+// all website requests sent to the bucket's website endpoint, you add a website
+// configuration with the following elements. Because all requests are sent to
+// another website, you don't need to provide index document name for the bucket.
+// - WebsiteConfiguration
+// - RedirectAllRequestsTo
+// - HostName
+// - Protocol
//
-// *
-// WebsiteConfiguration
+// If you want granular control over redirects, you can use the following elements
+// to add routing rules that describe conditions for redirecting requests and
+// information about the redirect destination. In this case, the website
+// configuration must provide an index document for the bucket, because some
+// requests might not be redirected.
+// - WebsiteConfiguration
+// - IndexDocument
+// - Suffix
+// - ErrorDocument
+// - Key
+// - RoutingRules
+// - RoutingRule
+// - Condition
+// - HttpErrorCodeReturnedEquals
+// - KeyPrefixEquals
+// - Redirect
+// - Protocol
+// - HostName
+// - ReplaceKeyPrefixWith
+// - ReplaceKeyWith
+// - HttpRedirectCode
//
-// * RedirectAllRequestsTo
-//
-// * HostName
-//
-// * Protocol
-//
-// If you
-// want granular control over redirects, you can use the following elements to add
-// routing rules that describe conditions for redirecting requests and information
-// about the redirect destination. In this case, the website configuration must
-// provide an index document for the bucket, because some requests might not be
-// redirected.
-//
-// * WebsiteConfiguration
-//
-// * IndexDocument
-//
-// * Suffix
-//
-// *
-// ErrorDocument
-//
-// * Key
-//
-// * RoutingRules
-//
-// * RoutingRule
-//
-// * Condition
-//
-// *
-// HttpErrorCodeReturnedEquals
-//
-// * KeyPrefixEquals
-//
-// * Redirect
-//
-// * Protocol
-//
-// *
-// HostName
-//
-// * ReplaceKeyPrefixWith
-//
-// * ReplaceKeyWith
-//
-// * HttpRedirectCode
-//
-// Amazon
-// S3 has a limitation of 50 routing rules per website configuration. If you
-// require more than 50 routing rules, you can use object redirect. For more
-// information, see Configuring an Object Redirect
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html) in
-// the Amazon S3 User Guide.
+// Amazon S3 has a limitation of 50 routing rules per website configuration. If
+// you require more than 50 routing rules, you can use object redirect. For more
+// information, see Configuring an Object Redirect (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html)
+// in the Amazon S3 User Guide. The maximum request length is limited to 128 KB.
func (c *Client) PutBucketWebsite(ctx context.Context, params *PutBucketWebsiteInput, optFns ...func(*Options)) (*PutBucketWebsiteOutput, error) {
if params == nil {
params = &PutBucketWebsiteInput{}
@@ -111,33 +85,36 @@ type PutBucketWebsiteInput struct {
// This member is required.
WebsiteConfiguration *types.WebsiteConfiguration
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
- // message integrity check to verify that the request body was not corrupted in
- // transit. For more information, see RFC 1864
- // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864 (http://www.ietf.org/rfc/rfc1864.txt)
+ // . For requests made using the Amazon Web Services Command Line Interface (CLI)
+ // or Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutBucketWebsiteOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -146,6 +123,9 @@ type PutBucketWebsiteOutput struct {
}
func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketWebsite{}, middleware.After)
if err != nil {
return err
@@ -154,34 +134,38 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutBucketWebsite"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -190,7 +174,10 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutBucketWebsiteValidationMiddleware(stack); err != nil {
@@ -202,6 +189,9 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutBucketWebsiteInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -220,14 +210,29 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutBucketWebsiteInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutBucketWebsite(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutBucketWebsite",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
index 64336406..d57e0026 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
@@ -16,89 +17,77 @@ import (
"time"
)
-// Adds an object to a bucket. You must have WRITE permissions on a bucket to add
-// an object to it. Amazon S3 never adds partial objects; if you receive a success
-// response, Amazon S3 added the entire object to the bucket. Amazon S3 is a
-// distributed system. If it receives multiple write requests for the same object
-// simultaneously, it overwrites all but the last object written. Amazon S3 does
-// not provide object locking; if you need this, make sure to build it into your
-// application layer or use versioning instead. To ensure that data is not
-// corrupted traversing the network, use the Content-MD5 header. When you use this
-// header, Amazon S3 checks the object against the provided MD5 value and, if they
-// do not match, returns an error. Additionally, you can calculate the MD5 while
-// putting an object to Amazon S3 and compare the returned ETag to the calculated
-// MD5 value.
+// Adds an object to a bucket.
+// - Amazon S3 never adds partial objects; if you receive a success response,
+// Amazon S3 added the entire object to the bucket. You cannot use PutObject to
+// only update a single piece of metadata for an existing object. You must put the
+// entire object with updated metadata if you want to update some values.
+// - If your bucket uses the bucket owner enforced setting for Object Ownership,
+// ACLs are disabled and no longer affect permissions. All objects written to the
+// bucket by any account will be owned by the bucket owner.
+// - Directory buckets - For directory buckets, you must make requests for this
+// API operation to the Zonal endpoint. These endpoints support
+// virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information, see Regional and
+// Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide.
//
-// * To successfully complete the PutObject request, you must have the
-// s3:PutObject in your IAM permissions.
+// Amazon S3 is a distributed system. If it receives multiple write requests for
+// the same object simultaneously, it overwrites all but the last object written.
+// However, Amazon S3 provides features that can modify this behavior:
+// - S3 Object Lock - To prevent objects from being deleted or overwritten, you
+// can use Amazon S3 Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html)
+// in the Amazon S3 User Guide. This functionality is not supported for directory
+// buckets.
+// - S3 Versioning - When you enable versioning for a bucket, if Amazon S3
+// receives multiple write requests for the same object simultaneously, it stores
+// all versions of the objects. For each write request that is made to the same
+// object, Amazon S3 automatically generates a unique version ID of that object
+// being stored in Amazon S3. You can retrieve, replace, or delete any version of
+// the object. For more information about versioning, see Adding Objects to
+// Versioning-Enabled Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html)
+// in the Amazon S3 User Guide. For information about returning the versioning
+// state of a bucket, see GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
+// . This functionality is not supported for directory buckets.
//
-// * To successfully change the objects acl
-// of your PutObject request, you must have the s3:PutObjectAcl in your IAM
-// permissions.
+// Permissions
+// - General purpose bucket permissions - The following permissions are required
+// in your policies when your PutObject request includes specific headers.
+// - s3:PutObject - To successfully complete the PutObject request, you must
+// always have the s3:PutObject permission on a bucket to add an object to it.
+// - s3:PutObjectAcl - To successfully change the objects ACL of your PutObject
+// request, you must have the s3:PutObjectAcl .
+// - s3:PutObjectTagging - To successfully set the tag-set with your PutObject
+// request, you must have the s3:PutObjectTagging .
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
//
-// * The Content-MD5 header is required for any request to upload an
-// object with a retention period configured using Amazon S3 Object Lock. For more
-// information about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html) in
-// the Amazon S3 User Guide.
+// Data integrity with Content-MD5
+// - General purpose bucket - To ensure that data is not corrupted traversing
+// the network, use the Content-MD5 header. When you use this header, Amazon S3
+// checks the object against the provided MD5 value and, if they do not match,
+// Amazon S3 returns an error. Alternatively, when the object's ETag is its MD5
+// digest, you can calculate the MD5 while putting the object to Amazon S3 and
+// compare the returned ETag to the calculated MD5 value.
+// - Directory bucket - This functionality is not supported for directory
+// buckets.
//
-// Server-side Encryption You can optionally request
-// server-side encryption. With server-side encryption, Amazon S3 encrypts your
-// data as it writes it to disks in its data centers and decrypts the data when you
-// access it. You have the option to provide your own encryption key or use Amazon
-// Web Services managed encryption keys (SSE-S3 or SSE-KMS). For more information,
-// see Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html).
-// If you request server-side encryption using Amazon Web Services Key Management
-// Service (SSE-KMS), you can enable an S3 Bucket Key at the object-level. For more
-// information, see Amazon S3 Bucket Keys
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon
-// S3 User Guide. Access Control List (ACL)-Specific Request Headers You can use
-// headers to grant ACL- based permissions. By default, all objects are private.
-// Only the owner has full access control. When adding a new object, you can grant
-// permissions to individual Amazon Web Services accounts or to predefined groups
-// defined by Amazon S3. These permissions are then added to the ACL on the object.
-// For more information, see Access Control List (ACL) Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) and Managing
-// ACLs Using the REST API
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html). If
-// the bucket that you're uploading objects to uses the bucket owner enforced
-// setting for S3 Object Ownership, ACLs are disabled and no longer affect
-// permissions. Buckets that use this setting only accept PUT requests that don't
-// specify an ACL or PUT requests that specify bucket owner full control ACLs, such
-// as the bucket-owner-full-control canned ACL or an equivalent form of this ACL
-// expressed in the XML format. PUT requests that contain other ACLs (for example,
-// custom grants to certain Amazon Web Services accounts) fail and return a 400
-// error with the error code AccessControlListNotSupported. For more information,
-// see Controlling ownership of objects and disabling ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide. If your bucket uses the bucket owner enforced
-// setting for Object Ownership, all objects written to the bucket by any account
-// will be owned by the bucket owner. Storage Class Options By default, Amazon S3
-// uses the STANDARD Storage Class to store newly created objects. The STANDARD
-// storage class provides high durability and high availability. Depending on
-// performance needs, you can specify a different Storage Class. Amazon S3 on
-// Outposts only uses the OUTPOSTS Storage Class. For more information, see Storage
-// Classes
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
-// the Amazon S3 User Guide. Versioning If you enable versioning for a bucket,
-// Amazon S3 automatically generates a unique version ID for the object being
-// stored. Amazon S3 returns this ID in the response. When you enable versioning
-// for a bucket, if Amazon S3 receives multiple write requests for the same object
-// simultaneously, it stores all of the objects. For more information about
-// versioning, see Adding Objects to Versioning Enabled Buckets
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html).
-// For information about returning the versioning state of a bucket, see
-// GetBucketVersioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html).
-// Related Resources
-//
-// * CopyObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-//
-// *
-// DeleteObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . For more information about
+// related Amazon S3 APIs, see the following:
+// - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
+// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns ...func(*Options)) (*PutObjectOutput, error) {
if params == nil {
params = &PutObjectInput{}
@@ -116,23 +105,31 @@ func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns .
type PutObjectInput struct {
- // The bucket name to which the PUT action was initiated. When using this action
- // with an access point, you must direct requests to the access point hostname. The
- // access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The bucket name to which the PUT action was initiated. Directory buckets - When
+ // you use this operation with a directory bucket, you must use
+ // virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -142,79 +139,103 @@ type PutObjectInput struct {
// This member is required.
Key *string
- // The canned ACL to apply to the object. For more information, see Canned ACL
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
- // This action is not supported by Amazon S3 on Outposts.
+ // The canned ACL to apply to the object. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL)
+ // in the Amazon S3 User Guide. When adding a new object, you can use headers to
+ // grant ACL-based permissions to individual Amazon Web Services accounts or to
+ // predefined groups defined by Amazon S3. These permissions are then added to the
+ // ACL on the object. By default, all objects are private. Only the owner has full
+ // access control. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+ // and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html)
+ // in the Amazon S3 User Guide. If the bucket that you're uploading objects to uses
+ // the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and
+ // no longer affect permissions. Buckets that use this setting only accept PUT
+ // requests that don't specify an ACL or PUT requests that specify bucket owner
+ // full control ACLs, such as the bucket-owner-full-control canned ACL or an
+ // equivalent form of this ACL expressed in the XML format. PUT requests that
+ // contain other ACLs (for example, custom grants to certain Amazon Web Services
+ // accounts) fail and return a 400 error with the error code
+ // AccessControlListNotSupported . For more information, see Controlling
+ // ownership of objects and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+ // in the Amazon S3 User Guide.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
ACL types.ObjectCannedACL
// Object data.
Body io.Reader
// Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header to true
- // causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
- // Specifying this header with a PUT action doesn’t affect bucket-level settings
- // for S3 Bucket Key.
- BucketKeyEnabled bool
+ // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS).
+ // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object
+ // encryption with SSE-KMS. Specifying this header with a PUT action doesn’t affect
+ // bucket-level settings for S3 Bucket Key. This functionality is not supported for
+ // directory buckets.
+ BucketKeyEnabled *bool
// Can be used to specify caching behavior along the request/reply chain. For more
- // information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
+ // information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9)
+ // .
CacheControl *string
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
- // ignores any provided ChecksumAlgorithm parameter.
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3
+ // fails the request with the HTTP status code 400 Bad Request . For the
+ // x-amz-checksum-algorithm header, replace algorithm with the supported
+ // algorithm from the following list:
+ // - CRC32
+ // - CRC32C
+ // - SHA1
+ // - SHA256
+ // For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // in the Amazon S3 User Guide. If the individual checksum value you provide
+ // through x-amz-checksum-algorithm doesn't match the checksum algorithm you set
+ // through x-amz-sdk-checksum-algorithm , Amazon S3 ignores any provided
+ // ChecksumAlgorithm parameter and uses the checksum algorithm that matches the
+ // provided value in x-amz-checksum-algorithm . For directory buckets, when you
+ // use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's
+ // used for performance.
ChecksumAlgorithm types.ChecksumAlgorithm
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32 checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32C checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 160-bit SHA-1 digest of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 256-bit SHA-256 digest of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
// Specifies presentational information for the object. For more information, see
- // http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1).
+ // https://www.rfc-editor.org/rfc/rfc6266#section-4 (https://www.rfc-editor.org/rfc/rfc6266#section-4)
+ // .
ContentDisposition *string
// Specifies what content encodings have been applied to the object and thus what
// decoding mechanisms must be applied to obtain the media-type referenced by the
// Content-Type header field. For more information, see
- // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11).
+ // https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding (https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding)
+ // .
ContentEncoding *string
// The language the content is in.
@@ -222,219 +243,283 @@ type PutObjectInput struct {
// Size of the body in bytes. This parameter is useful when the size of the body
// cannot be determined automatically. For more information, see
- // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13).
- ContentLength int64
+ // https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length)
+ // .
+ ContentLength *int64
// The base64-encoded 128-bit MD5 digest of the message (without the headers)
// according to RFC 1864. This header can be used as a message integrity check to
// verify that the data is the same data that was originally sent. Although it is
// optional, we recommend using the Content-MD5 mechanism as an end-to-end
// integrity check. For more information about REST request authentication, see
- // REST Authentication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
+ // REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+ // . The Content-MD5 header is required for any request to upload an object with a
+ // retention period configured using Amazon S3 Object Lock. For more information
+ // about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
ContentMD5 *string
// A standard MIME type describing the format of the contents. For more
- // information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17).
+ // information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type)
+ // .
ContentType *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// The date and time at which the object is no longer cacheable. For more
- // information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21).
+ // information, see https://www.rfc-editor.org/rfc/rfc7234#section-5.3 (https://www.rfc-editor.org/rfc/rfc7234#section-5.3)
+ // .
Expires *time.Time
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
- // action is not supported by Amazon S3 on Outposts.
+ // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantFullControl *string
- // Allows grantee to read the object data and its metadata. This action is not
- // supported by Amazon S3 on Outposts.
+ // Allows grantee to read the object data and its metadata.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantRead *string
- // Allows grantee to read the object ACL. This action is not supported by Amazon S3
- // on Outposts.
+ // Allows grantee to read the object ACL.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantReadACP *string
- // Allows grantee to write the ACL for the applicable object. This action is not
- // supported by Amazon S3 on Outposts.
+ // Allows grantee to write the ACL for the applicable object.
+ // - This functionality is not supported for directory buckets.
+ // - This functionality is not supported for Amazon S3 on Outposts.
GrantWriteACP *string
// A map of metadata to store with the object in S3.
Metadata map[string]string
// Specifies whether a legal hold will be applied to this object. For more
- // information about S3 Object Lock, see Object Lock
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
+ // information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
- // The Object Lock mode that you want to apply to this object.
+ // The Object Lock mode that you want to apply to this object. This functionality
+ // is not supported for directory buckets.
ObjectLockMode types.ObjectLockMode
// The date and time when you want this object's Object Lock to expire. Must be
- // formatted as a timestamp parameter.
+ // formatted as a timestamp parameter. This functionality is not supported for
+ // directory buckets.
ObjectLockRetainUntilDate *time.Time
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
+ // Specifies the algorithm to use when encrypting the object (for example, AES256
+ // ). This functionality is not supported for directory buckets.
SSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use in
// encrypting data. This value is used to store the object and then it is
// discarded; Amazon S3 does not store the encryption key. The key must be
// appropriate for use with the algorithm specified in the
- // x-amz-server-side-encryption-customer-algorithm header.
+ // x-amz-server-side-encryption-customer-algorithm header. This functionality is
+ // not supported for directory buckets.
SSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. This functionality is not
+ // supported for directory buckets.
SSECustomerKeyMD5 *string
// Specifies the Amazon Web Services KMS Encryption Context to use for object
// encryption. The value of this header is a base64-encoded UTF-8 string holding
- // JSON with the encryption context key-value pairs.
+ // JSON with the encryption context key-value pairs. This value is stored as object
+ // metadata and automatically gets passed on to Amazon Web Services KMS for future
+ // GetObject or CopyObject operations on this object. This value must be
+ // explicitly added during CopyObject operations. This functionality is not
+ // supported for directory buckets.
SSEKMSEncryptionContext *string
- // If x-amz-server-side-encryption is present and has the value of aws:kms, this
- // header specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetrical customer managed key that was used for the
- // object. If you specify x-amz-server-side-encryption:aws:kms, but do not provide
- // x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web
- // Services managed key to protect the data. If the KMS key does not exist in the
- // same account issuing the command, you must use the full ARN and not just the ID.
+ // If x-amz-server-side-encryption has a valid value of aws:kms or aws:kms:dsse ,
+ // this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key
+ // Management Service (KMS) symmetric encryption customer managed key that was used
+ // for the object. If you specify x-amz-server-side-encryption:aws:kms or
+ // x-amz-server-side-encryption:aws:kms:dsse , but do not provide
+ // x-amz-server-side-encryption-aws-kms-key-id , Amazon S3 uses the Amazon Web
+ // Services managed key ( aws/s3 ) to protect the data. If the KMS key does not
+ // exist in the same account that's issuing the command, you must use the full ARN
+ // and not just the ID. This functionality is not supported for directory buckets.
SSEKMSKeyId *string
- // The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // The server-side encryption algorithm that was used when you store this object
+ // in Amazon S3 (for example, AES256 , aws:kms , aws:kms:dsse ). General purpose
+ // buckets - You have four mutually exclusive options to protect data using
+ // server-side encryption in Amazon S3, depending on how you choose to manage the
+ // encryption keys. Specifically, the encryption key options are Amazon S3 managed
+ // keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
+ // customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side
+ // encryption by using Amazon S3 managed keys (SSE-S3) by default. You can
+ // optionally tell Amazon S3 to encrypt data at rest by using server-side
+ // encryption with other key options. For more information, see Using Server-Side
+ // Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
+ // in the Amazon S3 User Guide. Directory buckets - For directory buckets, only the
+ // server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) value is
+ // supported.
ServerSideEncryption types.ServerSideEncryption
// By default, Amazon S3 uses the STANDARD Storage Class to store newly created
// objects. The STANDARD storage class provides high durability and high
// availability. Depending on performance needs, you can specify a different
- // Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
- // more information, see Storage Classes
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
- // the Amazon S3 User Guide.
+ // Storage Class. For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+ // in the Amazon S3 User Guide.
+ // - For directory buckets, only the S3 Express One Zone storage class is
+ // supported to store newly created objects.
+ // - Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
StorageClass types.StorageClass
- // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
- // (For example, "Key1=Value1")
+ // The tag-set for the object. The tag-set must be encoded as URL Query
+ // parameters. (For example, "Key1=Value1") This functionality is not supported for
+ // directory buckets.
Tagging *string
// If the bucket is configured as a website, redirects requests for this object to
// another object in the same bucket or to an external URL. Amazon S3 stores the
// value of this header in the object metadata. For information about object
- // metadata, see Object Key and Metadata
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html). In the
- // following example, the request header sets the redirect to an object
- // (anotherPage.html) in the same bucket: x-amz-website-redirect-location:
- // /anotherPage.html In the following example, the request header sets the object
- // redirect to another website: x-amz-website-redirect-location:
- // http://www.example.com/ For more information about website hosting in Amazon S3,
- // see Hosting Websites on Amazon S3
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html) and How to
- // Configure Website Page Redirects
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
+ // metadata, see Object Key and Metadata (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html)
+ // in the Amazon S3 User Guide. In the following example, the request header sets
+ // the redirect to an object (anotherPage.html) in the same bucket:
+ // x-amz-website-redirect-location: /anotherPage.html In the following example, the
+ // request header sets the object redirect to another website:
+ // x-amz-website-redirect-location: http://www.example.com/ For more information
+ // about website hosting in Amazon S3, see Hosting Websites on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
+ // and How to Configure Website Page Redirects (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
WebsiteRedirectLocation *string
noSmithyDocumentSerde
}
+func (in *PutObjectInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type PutObjectOutput struct {
// Indicates whether the uploaded object uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // encryption with Key Management Service (KMS) keys (SSE-KMS). This functionality
+ // is not supported for directory buckets.
+ BucketKeyEnabled *bool
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
- // Entity tag for the uploaded object.
+ // Entity tag for the uploaded object. General purpose buckets - To ensure that
+ // data is not corrupted traversing the network, for objects where the ETag is the
+ // MD5 digest of the object, you can calculate the MD5 while putting an object to
+ // Amazon S3 and compare the returned ETag to the calculated MD5 value. Directory
+ // buckets - The ETag for the object in a directory bucket isn't the MD5 digest of
+ // the object.
ETag *string
// If the expiration is configured for the object (see
- // PutBucketLifecycleConfiguration
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)),
- // the response includes this header. It includes the expiry-date and rule-id
- // key-value pairs that provide information about object expiration. The value of
- // the rule-id is URL-encoded.
+ // PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+ // ) in the Amazon S3 User Guide, the response includes this header. It includes
+ // the expiry-date and rule-id key-value pairs that provide information about
+ // object expiration. The value of the rule-id is URL-encoded. This functionality
+ // is not supported for directory buckets.
Expiration *string
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm used.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to confirm the encryption
+ // algorithm that's used. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to provide the round-trip
+ // message integrity verification of the customer-provided encryption key. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
- // If present, specifies the Amazon Web Services KMS Encryption Context to use for
+ // If present, indicates the Amazon Web Services KMS Encryption Context to use for
// object encryption. The value of this header is a base64-encoded UTF-8 string
- // holding JSON with the encryption context key-value pairs.
+ // holding JSON with the encryption context key-value pairs. This value is stored
+ // as object metadata and automatically gets passed on to Amazon Web Services KMS
+ // for future GetObject or CopyObject operations on this object. This
+ // functionality is not supported for directory buckets.
SSEKMSEncryptionContext *string
- // If x-amz-server-side-encryption is present and has the value of aws:kms, this
- // header specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for the
- // object.
+ // If x-amz-server-side-encryption has a valid value of aws:kms or aws:kms:dsse ,
+ // this header indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // If you specified server-side encryption either with an Amazon Web Services KMS
- // key or Amazon S3-managed encryption key in your PUT request, the response
- // includes this header. It confirms the encryption algorithm that Amazon S3 used
- // to encrypt the object.
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). For directory buckets, only
+ // server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is
+ // supported.
ServerSideEncryption types.ServerSideEncryption
- // Version of the object.
+ // Version ID of the object. If you enable versioning for a bucket, Amazon S3
+ // automatically generates a unique version ID for the object being stored. Amazon
+ // S3 returns this ID in the response. When you enable versioning for a bucket, if
+ // Amazon S3 receives multiple write requests for the same object simultaneously,
+ // it stores all of the objects. For more information about versioning, see Adding
+ // Objects to Versioning-Enabled Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html)
+ // in the Amazon S3 User Guide. For information about returning the versioning
+ // state of a bucket, see GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
+ // . This functionality is not supported for directory buckets.
VersionId *string
// Metadata pertaining to the operation's result.
@@ -444,6 +529,9 @@ type PutObjectOutput struct {
}
func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutObject{}, middleware.After)
if err != nil {
return err
@@ -452,34 +540,38 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutObject"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -488,7 +580,10 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutObjectValidationMiddleware(stack); err != nil {
@@ -500,6 +595,12 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = add100Continue(stack, options); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutObjectInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -521,14 +622,26 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *PutObjectInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutObject(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutObject",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
index 05a377b5..08fea12c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -13,140 +14,87 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Uses the acl subresource to set the access control list (ACL) permissions for a
-// new or existing object in an S3 bucket. You must have WRITE_ACP permission to
-// set the ACL of an object. For more information, see What permissions can I
-// grant?
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions)
-// in the Amazon S3 User Guide. This action is not supported by Amazon S3 on
-// Outposts. Depending on your application needs, you can choose to set the ACL on
-// an object using either the request body or the headers. For example, if you have
-// an existing application that updates a bucket ACL using the request body, you
-// can continue to use that approach. For more information, see Access Control List
-// (ACL) Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) in the
-// Amazon S3 User Guide. If your bucket uses the bucket owner enforced setting for
-// S3 Object Ownership, ACLs are disabled and no longer affect permissions. You
-// must use policies to grant access to your bucket and the objects in it. Requests
-// to set ACLs or update ACLs fail and return the AccessControlListNotSupported
-// error code. Requests to read ACLs are still supported. For more information, see
-// Controlling object ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide. Access Permissions You can set access permissions
-// using one of the following methods:
+// This operation is not supported by directory buckets. Uses the acl subresource
+// to set the access control list (ACL) permissions for a new or existing object in
+// an S3 bucket. You must have the WRITE_ACP permission to set the ACL of an
+// object. For more information, see What permissions can I grant? (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions)
+// in the Amazon S3 User Guide. This functionality is not supported for Amazon S3
+// on Outposts. Depending on your application needs, you can choose to set the ACL
+// on an object using either the request body or the headers. For example, if you
+// have an existing application that updates a bucket ACL using the request body,
+// you can continue to use that approach. For more information, see Access Control
+// List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+// in the Amazon S3 User Guide. If your bucket uses the bucket owner enforced
+// setting for S3 Object Ownership, ACLs are disabled and no longer affect
+// permissions. You must use policies to grant access to your bucket and the
+// objects in it. Requests to set ACLs or update ACLs fail and return the
+// AccessControlListNotSupported error code. Requests to read ACLs are still
+// supported. For more information, see Controlling object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+// in the Amazon S3 User Guide. Permissions You can set access permissions using
+// one of the following methods:
+// - Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports a
+// set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined
+// set of grantees and permissions. Specify the canned ACL name as the value of
+// x-amz-ac l. If you use this header, you cannot use other access
+// control-specific headers in your request. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL)
+// .
+// - Specify access permissions explicitly with the x-amz-grant-read ,
+// x-amz-grant-read-acp , x-amz-grant-write-acp , and x-amz-grant-full-control
+// headers. When using these headers, you specify explicit access permissions and
+// grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the
+// permission. If you use these ACL-specific headers, you cannot use x-amz-acl
+// header to set a canned ACL. These parameters map to the set of permissions that
+// Amazon S3 supports in an ACL. For more information, see Access Control List
+// (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+// . You specify each grantee as a type=value pair, where the type is one of the
+// following:
+// - id – if the value specified is the canonical user ID of an Amazon Web
+// Services account
+// - uri – if you are granting permissions to a predefined group
+// - emailAddress – if the value specified is the email address of an Amazon Web
+// Services account Using email addresses to specify a grantee is only supported in
+// the following Amazon Web Services Regions:
+// - US East (N. Virginia)
+// - US West (N. California)
+// - US West (Oregon)
+// - Asia Pacific (Singapore)
+// - Asia Pacific (Sydney)
+// - Asia Pacific (Tokyo)
+// - Europe (Ireland)
+// - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+// in the Amazon Web Services General Reference. For example, the following
+// x-amz-grant-read header grants list objects permission to the two Amazon Web
+// Services accounts identified by their email addresses. x-amz-grant-read:
+// emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com"
//
-// * Specify a canned ACL with the x-amz-acl
-// request header. Amazon S3 supports a set of predefined ACLs, known as canned
-// ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify
-// the canned ACL name as the value of x-amz-acl. If you use this header, you
-// cannot use other access control-specific headers in your request. For more
-// information, see Canned ACL
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+// You can use either a canned ACL or specify access permissions explicitly. You
+// cannot do both. Grantee Values You can specify the person (grantee) to whom
+// you're assigning access rights (using request elements) in the following ways:
+// - By the person's ID: <>ID<><>GranteesEmail<> DisplayName is optional and
+// ignored in the request.
+// - By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
+// - By Email address: <>Grantees@email.com<>lt;/Grantee> The grantee is resolved
+// to the CanonicalUser and, in a response to a GET Object acl request, appears as
+// the CanonicalUser. Using email addresses to specify a grantee is only supported
+// in the following Amazon Web Services Regions:
+// - US East (N. Virginia)
+// - US West (N. California)
+// - US West (Oregon)
+// - Asia Pacific (Singapore)
+// - Asia Pacific (Sydney)
+// - Asia Pacific (Tokyo)
+// - Europe (Ireland)
+// - South America (São Paulo) For a list of all the Amazon S3 supported Regions
+// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+// in the Amazon Web Services General Reference.
//
-// *
-// Specify access permissions explicitly with the x-amz-grant-read,
-// x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
-// headers. When using these headers, you specify explicit access permissions and
-// grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the
-// permission. If you use these ACL-specific headers, you cannot use x-amz-acl
-// header to set a canned ACL. These parameters map to the set of permissions that
-// Amazon S3 supports in an ACL. For more information, see Access Control List
-// (ACL) Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). You specify
-// each grantee as a type=value pair, where the type is one of the following:
-//
-// * id
-// – if the value specified is the canonical user ID of an Amazon Web Services
-// account
-//
-// * uri – if you are granting permissions to a predefined group
-//
-// *
-// emailAddress – if the value specified is the email address of an Amazon Web
-// Services account Using email addresses to specify a grantee is only supported in
-// the following Amazon Web Services Regions:
-//
-// * US East (N. Virginia)
-//
-// * US West
-// (N. California)
-//
-// * US West (Oregon)
-//
-// * Asia Pacific (Singapore)
-//
-// * Asia Pacific
-// (Sydney)
-//
-// * Asia Pacific (Tokyo)
-//
-// * Europe (Ireland)
-//
-// * South America (São
-// Paulo)
-//
-// For a list of all the Amazon S3 supported Regions and endpoints, see
-// Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
-// Amazon Web Services General Reference.
-//
-// For example, the following
-// x-amz-grant-read header grants list objects permission to the two Amazon Web
-// Services accounts identified by their email addresses. x-amz-grant-read:
-// emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com"
-//
-// You can use either
-// a canned ACL or specify access permissions explicitly. You cannot do both.
-// Grantee Values You can specify the person (grantee) to whom you're assigning
-// access rights (using request elements) in the following ways:
-//
-// * By the person's
-// ID: <>ID<><>GranteesEmail<> DisplayName is optional and ignored in the
-// request.
-//
-// * By URI:
-// <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
-//
-// * By Email
-// address: <>Grantees@email.com<>lt;/Grantee> The grantee is resolved to the
-// CanonicalUser and, in a response to a GET Object acl request, appears as the
-// CanonicalUser. Using email addresses to specify a grantee is only supported in
-// the following Amazon Web Services Regions:
-//
-// * US East (N. Virginia)
-//
-// * US West
-// (N. California)
-//
-// * US West (Oregon)
-//
-// * Asia Pacific (Singapore)
-//
-// * Asia Pacific
-// (Sydney)
-//
-// * Asia Pacific (Tokyo)
-//
-// * Europe (Ireland)
-//
-// * South America (São
-// Paulo)
-//
-// For a list of all the Amazon S3 supported Regions and endpoints, see
-// Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
-// Amazon Web Services General Reference.
-//
-// Versioning The ACL of an object is set
-// at the object version level. By default, PUT sets the ACL of the current version
-// of an object. To set the ACL of a different version, use the versionId
-// subresource. Related Resources
-//
-// * CopyObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-//
-// *
-// GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// Versioning The ACL of an object is set at the object version level. By default,
+// PUT sets the ACL of the current version of an object. To set the ACL of a
+// different version, use the versionId subresource. The following operations are
+// related to PutObjectAcl :
+// - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
func (c *Client) PutObjectAcl(ctx context.Context, params *PutObjectAclInput, optFns ...func(*Options)) (*PutObjectAclOutput, error) {
if params == nil {
params = &PutObjectAclInput{}
@@ -165,80 +113,70 @@ func (c *Client) PutObjectAcl(ctx context.Context, params *PutObjectAclInput, op
type PutObjectAclInput struct {
// The bucket name that contains the object to which you want to attach the ACL.
- // When using this action with an access point, you must direct requests to the
+ // Access points - When you use this action with an access point, you must provide
+ // the alias of the access point in place of the bucket name or specify the access
+ // point ARN. When using the access point ARN, you must direct requests to the
// access point hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. S3 on Outposts - When you use this action with
+ // Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname.
+ // The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
// in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
- // Key for which the PUT action was initiated. When using this action with an
- // access point, you must direct requests to the access point hostname. The access
- // point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // Key for which the PUT action was initiated.
//
// This member is required.
Key *string
- // The canned ACL to apply to the object. For more information, see Canned ACL
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+ // The canned ACL to apply to the object. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL)
+ // .
ACL types.ObjectCannedACL
// Contains the elements that set the ACL permissions for an object per grantee.
AccessControlPolicy *types.AccessControlPolicy
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. This header must be used as a
- // message integrity check to verify that the request body was not corrupted in
- // transit. For more information, go to RFC 1864.>
- // (http://www.ietf.org/rfc/rfc1864.txt) For requests made using the Amazon Web
- // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
- // calculated automatically.
+ // The base64-encoded 128-bit MD5 digest of the data. This header must be used as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, go to RFC 1864.> (http://www.ietf.org/rfc/rfc1864.txt)
+ // For requests made using the Amazon Web Services Command Line Interface (CLI) or
+ // Amazon Web Services SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Allows grantee the read, write, read ACP, and write ACP permissions on the
- // bucket. This action is not supported by Amazon S3 on Outposts.
+ // bucket. This functionality is not supported for Amazon S3 on Outposts.
GrantFullControl *string
- // Allows grantee to list the objects in the bucket. This action is not supported
- // by Amazon S3 on Outposts.
+ // Allows grantee to list the objects in the bucket. This functionality is not
+ // supported for Amazon S3 on Outposts.
GrantRead *string
- // Allows grantee to read the bucket ACL. This action is not supported by Amazon S3
- // on Outposts.
+ // Allows grantee to read the bucket ACL. This functionality is not supported for
+ // Amazon S3 on Outposts.
GrantReadACP *string
// Allows grantee to create new objects in the bucket. For the bucket and object
@@ -246,28 +184,37 @@ type PutObjectAclInput struct {
// objects.
GrantWrite *string
- // Allows grantee to write the ACL for the applicable bucket. This action is not
- // supported by Amazon S3 on Outposts.
+ // Allows grantee to write the ACL for the applicable bucket. This functionality
+ // is not supported for Amazon S3 on Outposts.
GrantWriteACP *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // VersionId used to reference a specific version of the object.
+ // Version ID used to reference a specific version of the object. This
+ // functionality is not supported for directory buckets.
VersionId *string
noSmithyDocumentSerde
}
+func (in *PutObjectAclInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type PutObjectAclOutput struct {
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -277,6 +224,9 @@ type PutObjectAclOutput struct {
}
func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectAcl{}, middleware.After)
if err != nil {
return err
@@ -285,34 +235,38 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutObjectAcl"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -321,7 +275,10 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutObjectAclValidationMiddleware(stack); err != nil {
@@ -333,6 +290,9 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutObjectAclInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -351,14 +311,29 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutObjectAclInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutObjectAcl(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutObjectAcl",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
index b8004b59..cc23509f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -13,10 +14,9 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Applies a legal hold configuration to the specified object. For more
-// information, see Locking Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). This action
-// is not supported by Amazon S3 on Outposts.
+// This operation is not supported by directory buckets. Applies a legal hold
+// configuration to the specified object. For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+// . This functionality is not supported for Amazon S3 on Outposts.
func (c *Client) PutObjectLegalHold(ctx context.Context, params *PutObjectLegalHoldInput, optFns ...func(*Options)) (*PutObjectLegalHoldOutput, error) {
if params == nil {
params = &PutObjectLegalHoldInput{}
@@ -35,13 +35,14 @@ func (c *Client) PutObjectLegalHold(ctx context.Context, params *PutObjectLegalH
type PutObjectLegalHoldInput struct {
// The bucket name containing the object that you want to place a legal hold on.
- // When using this action with an access point, you must direct requests to the
+ // Access points - When you use this action with an access point, you must provide
+ // the alias of the access point in place of the bucket name or specify the access
+ // point ARN. When using the access point ARN, you must direct requests to the
// access point hostname. The access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
// in the Amazon S3 User Guide.
//
// This member is required.
@@ -52,13 +53,12 @@ type PutObjectLegalHoldInput struct {
// This member is required.
Key *string
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -68,9 +68,9 @@ type PutObjectLegalHoldInput struct {
// calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Container element for the legal hold configuration you want to apply to the
@@ -78,11 +78,13 @@ type PutObjectLegalHoldInput struct {
LegalHold *types.ObjectLockLegalHold
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The version ID of the object that you want to place a legal hold on.
@@ -91,10 +93,15 @@ type PutObjectLegalHoldInput struct {
noSmithyDocumentSerde
}
+func (in *PutObjectLegalHoldInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type PutObjectLegalHoldOutput struct {
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -104,6 +111,9 @@ type PutObjectLegalHoldOutput struct {
}
func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectLegalHold{}, middleware.After)
if err != nil {
return err
@@ -112,34 +122,38 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutObjectLegalHold"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -148,7 +162,10 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutObjectLegalHoldValidationMiddleware(stack); err != nil {
@@ -160,6 +177,9 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutObjectLegalHoldInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -178,14 +198,29 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutObjectLegalHoldInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutObjectLegalHold(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutObjectLegalHold",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
index 9740967a..358ececc 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -13,21 +14,17 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Places an Object Lock configuration on the specified bucket. The rule specified
-// in the Object Lock configuration will be applied by default to every new object
-// placed in the specified bucket. For more information, see Locking Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// * The
-// DefaultRetention settings require both a mode and a period.
-//
-// * The
-// DefaultRetention period can be either Days or Years but you must select one. You
-// cannot specify Days and Years at the same time.
-//
-// * You can only enable Object
-// Lock for new buckets. If you want to turn on Object Lock for an existing bucket,
-// contact Amazon Web Services Support.
+// This operation is not supported by directory buckets. Places an Object Lock
+// configuration on the specified bucket. The rule specified in the Object Lock
+// configuration will be applied by default to every new object placed in the
+// specified bucket. For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+// .
+// - The DefaultRetention settings require both a mode and a period.
+// - The DefaultRetention period can be either Days or Years but you must select
+// one. You cannot specify Days and Years at the same time.
+// - You can enable Object Lock for new or existing buckets. For more
+// information, see Configuring Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.html)
+// .
func (c *Client) PutObjectLockConfiguration(ctx context.Context, params *PutObjectLockConfigurationInput, optFns ...func(*Options)) (*PutObjectLockConfigurationOutput, error) {
if params == nil {
params = &PutObjectLockConfigurationInput{}
@@ -50,13 +47,12 @@ type PutObjectLockConfigurationInput struct {
// This member is required.
Bucket *string
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -66,20 +62,22 @@ type PutObjectLockConfigurationInput struct {
// calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// The Object Lock configuration that you want to apply to the specified bucket.
ObjectLockConfiguration *types.ObjectLockConfiguration
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// A token to allow Object Lock to be enabled for an existing bucket.
@@ -88,10 +86,15 @@ type PutObjectLockConfigurationInput struct {
noSmithyDocumentSerde
}
+func (in *PutObjectLockConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type PutObjectLockConfigurationOutput struct {
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -101,6 +104,9 @@ type PutObjectLockConfigurationOutput struct {
}
func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectLockConfiguration{}, middleware.After)
if err != nil {
return err
@@ -109,34 +115,38 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutObjectLockConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -145,7 +155,10 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutObjectLockConfigurationValidationMiddleware(stack); err != nil {
@@ -157,6 +170,9 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutObjectLockConfigurationInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -175,14 +191,29 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutObjectLockConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutObjectLockConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutObjectLockConfiguration",
}
}
@@ -207,9 +238,9 @@ func addPutObjectLockConfigurationInputChecksumMiddlewares(stack *middleware.Sta
})
}
-// getPutObjectLockConfigurationBucketMember returns a pointer to string denoting a
-// provided bucket member valueand a boolean indicating if the input has a modeled
-// bucket name,
+// getPutObjectLockConfigurationBucketMember returns a pointer to string denoting
+// a provided bucket member valueand a boolean indicating if the input has a
+// modeled bucket name,
func getPutObjectLockConfigurationBucketMember(input interface{}) (*string, bool) {
in := input.(*PutObjectLockConfigurationInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
index c4918f3c..eb787de4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -13,13 +14,12 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Places an Object Retention configuration on an object. For more information, see
-// Locking Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). Users or
-// accounts require the s3:PutObjectRetention permission in order to place an
-// Object Retention configuration on objects. Bypassing a Governance Retention
-// configuration requires the s3:BypassGovernanceRetention permission. This action
-// is not supported by Amazon S3 on Outposts.
+// This operation is not supported by directory buckets. Places an Object
+// Retention configuration on an object. For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
+// . Users or accounts require the s3:PutObjectRetention permission in order to
+// place an Object Retention configuration on objects. Bypassing a Governance
+// Retention configuration requires the s3:BypassGovernanceRetention permission.
+// This functionality is not supported for Amazon S3 on Outposts.
func (c *Client) PutObjectRetention(ctx context.Context, params *PutObjectRetentionInput, optFns ...func(*Options)) (*PutObjectRetentionOutput, error) {
if params == nil {
params = &PutObjectRetentionInput{}
@@ -37,14 +37,15 @@ func (c *Client) PutObjectRetention(ctx context.Context, params *PutObjectRetent
type PutObjectRetentionInput struct {
- // The bucket name that contains the object you want to apply this Object Retention
- // configuration to. When using this action with an access point, you must direct
- // requests to the access point hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // The bucket name that contains the object you want to apply this Object
+ // Retention configuration to. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
// in the Amazon S3 User Guide.
//
// This member is required.
@@ -57,15 +58,14 @@ type PutObjectRetentionInput struct {
Key *string
// Indicates whether this action should bypass Governance-mode restrictions.
- BypassGovernanceRetention bool
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ BypassGovernanceRetention *bool
+
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -75,17 +75,19 @@ type PutObjectRetentionInput struct {
// calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The container element for the Object Retention configuration.
@@ -98,10 +100,15 @@ type PutObjectRetentionInput struct {
noSmithyDocumentSerde
}
+func (in *PutObjectRetentionInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type PutObjectRetentionOutput struct {
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Metadata pertaining to the operation's result.
@@ -111,6 +118,9 @@ type PutObjectRetentionOutput struct {
}
func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectRetention{}, middleware.After)
if err != nil {
return err
@@ -119,34 +129,38 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutObjectRetention"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -155,7 +169,10 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutObjectRetentionValidationMiddleware(stack); err != nil {
@@ -167,6 +184,9 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutObjectRetentionInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -185,14 +205,29 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutObjectRetentionInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutObjectRetention(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutObjectRetention",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
index 43effb9e..2768db50 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -13,56 +14,35 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Sets the supplied tag-set to an object that already exists in a bucket. A tag is
-// a key-value pair. You can associate tags with an object by sending a PUT request
-// against the tagging subresource that is associated with the object. You can
-// retrieve tags by sending a GET request. For more information, see
-// GetObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html). For
-// tagging-related restrictions related to characters and encodings, see Tag
-// Restrictions
-// (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html).
-// Note that Amazon S3 limits the maximum number of tags to 10 tags per object. To
-// use this operation, you must have permission to perform the s3:PutObjectTagging
-// action. By default, the bucket owner has this permission and can grant this
-// permission to others. To put tags of any other version, use the versionId query
-// parameter. You also need permission for the s3:PutObjectVersionTagging action.
-// For information about the Amazon S3 object tagging feature, see Object Tagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). Special
-// Errors
+// This operation is not supported by directory buckets. Sets the supplied tag-set
+// to an object that already exists in a bucket. A tag is a key-value pair. For
+// more information, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html)
+// . You can associate tags with an object by sending a PUT request against the
+// tagging subresource that is associated with the object. You can retrieve tags by
+// sending a GET request. For more information, see GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
+// . For tagging-related restrictions related to characters and encodings, see Tag
+// Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html)
+// . Note that Amazon S3 limits the maximum number of tags to 10 tags per object.
+// To use this operation, you must have permission to perform the
+// s3:PutObjectTagging action. By default, the bucket owner has this permission and
+// can grant this permission to others. To put tags of any other version, use the
+// versionId query parameter. You also need permission for the
+// s3:PutObjectVersionTagging action. PutObjectTagging has the following special
+// errors. For more Amazon S3 errors see, Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
+// .
+// - InvalidTag - The tag provided was not a valid tag. This error can occur if
+// the tag did not pass input validation. For more information, see Object
+// Tagging (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html)
+// .
+// - MalformedXML - The XML provided does not match the schema.
+// - OperationAborted - A conflicting conditional action is currently in progress
+// against this resource. Please try again.
+// - InternalError - The service was unable to apply the provided tag to the
+// object.
//
-// * Code: InvalidTagError
-//
-// * Cause: The tag provided was not a valid tag.
-// This error can occur if the tag did not pass input validation. For more
-// information, see Object Tagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
-//
-// * Code:
-// MalformedXMLError
-//
-// * Cause: The XML provided does not match the schema.
-//
-// * Code:
-// OperationAbortedError
-//
-// * Cause: A conflicting conditional action is currently in
-// progress against this resource. Please try again.
-//
-// * Code: InternalError
-//
-// *
-// Cause: The service was unable to apply the provided tag to the object.
-//
-// Related
-// Resources
-//
-// * GetObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-//
-// *
-// DeleteObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
+// The following operations are related to PutObjectTagging :
+// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
+// - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
func (c *Client) PutObjectTagging(ctx context.Context, params *PutObjectTaggingInput, optFns ...func(*Options)) (*PutObjectTaggingOutput, error) {
if params == nil {
params = &PutObjectTaggingInput{}
@@ -80,23 +60,23 @@ func (c *Client) PutObjectTagging(ctx context.Context, params *PutObjectTaggingI
type PutObjectTaggingInput struct {
- // The bucket name containing the object. When using this action with an access
- // point, you must direct requests to the access point hostname. The access point
+ // The bucket name containing the object. Access points - When you use this action
+ // with an access point, you must provide the alias of the access point in place of
+ // the bucket name or specify the access point ARN. When using the access point
+ // ARN, you must direct requests to the access point hostname. The access point
// hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. S3 on Outposts - When you use this action with
+ // Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname.
+ // The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -111,13 +91,12 @@ type PutObjectTaggingInput struct {
// This member is required.
Tagging *types.Tagging
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -127,17 +106,19 @@ type PutObjectTaggingInput struct {
// calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// The versionId of the object that the tag-set will be added to.
@@ -146,6 +127,11 @@ type PutObjectTaggingInput struct {
noSmithyDocumentSerde
}
+func (in *PutObjectTaggingInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type PutObjectTaggingOutput struct {
// The versionId of the object the tag-set was added to.
@@ -158,6 +144,9 @@ type PutObjectTaggingOutput struct {
}
func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectTagging{}, middleware.After)
if err != nil {
return err
@@ -166,34 +155,38 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutObjectTagging"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -202,7 +195,10 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutObjectTaggingValidationMiddleware(stack); err != nil {
@@ -214,6 +210,9 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutObjectTaggingInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -232,14 +231,29 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutObjectTaggingInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutObjectTagging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutObjectTagging",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
index 922102b5..7e6d0788 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
@@ -4,44 +4,33 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket.
-// To use this operation, you must have the s3:PutBucketPublicAccessBlock
-// permission. For more information about Amazon S3 permissions, see Specifying
-// Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or an
-// object, it checks the PublicAccessBlock configuration for both the bucket (or
-// the bucket that contains the object) and the bucket owner's account. If the
+// This operation is not supported by directory buckets. Creates or modifies the
+// PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation,
+// you must have the s3:PutBucketPublicAccessBlock permission. For more
+// information about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// . When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or
+// an object, it checks the PublicAccessBlock configuration for both the bucket
+// (or the bucket that contains the object) and the bucket owner's account. If the
// PublicAccessBlock configurations are different between the bucket and the
// account, Amazon S3 uses the most restrictive combination of the bucket-level and
// account-level settings. For more information about when Amazon S3 considers a
-// bucket or an object public, see The Meaning of "Public"
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
-// Related Resources
-//
-// * GetPublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// *
-// DeletePublicAccessBlock
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-//
-// *
-// GetBucketPolicyStatus
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
-//
-// *
-// Using Amazon S3 Block Public Access
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+// bucket or an object public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
+// . The following operations are related to PutPublicAccessBlock :
+// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
+// - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
+// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
func (c *Client) PutPublicAccessBlock(ctx context.Context, params *PutPublicAccessBlockInput, optFns ...func(*Options)) (*PutPublicAccessBlockOutput, error) {
if params == nil {
params = &PutPublicAccessBlockInput{}
@@ -68,20 +57,18 @@ type PutPublicAccessBlockInput struct {
// The PublicAccessBlock configuration that you want to apply to this Amazon S3
// bucket. You can enable the configuration options in any combination. For more
// information about when Amazon S3 considers a bucket or object public, see The
- // Meaning of "Public"
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
+ // Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
// in the Amazon S3 User Guide.
//
// This member is required.
PublicAccessBlockConfiguration *types.PublicAccessBlockConfiguration
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
@@ -91,14 +78,19 @@ type PutPublicAccessBlockInput struct {
// SDKs, this field is calculated automatically.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
noSmithyDocumentSerde
}
+func (in *PutPublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
type PutPublicAccessBlockOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -107,6 +99,9 @@ type PutPublicAccessBlockOutput struct {
}
func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpPutPublicAccessBlock{}, middleware.After)
if err != nil {
return err
@@ -115,34 +110,38 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutPublicAccessBlock"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -151,7 +150,10 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpPutPublicAccessBlockValidationMiddleware(stack); err != nil {
@@ -163,6 +165,9 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addPutPublicAccessBlockInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -181,14 +186,29 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
return nil
}
+func (v *PutPublicAccessBlockInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opPutPublicAccessBlock(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "PutPublicAccessBlock",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
index 01319757..3b6aad85 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
@@ -13,224 +14,122 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Restores an archived copy of an object back into Amazon S3 This action is not
-// supported by Amazon S3 on Outposts. This action performs the following types of
-// requests:
+// This operation is not supported by directory buckets. Restores an archived copy
+// of an object back into Amazon S3 This functionality is not supported for Amazon
+// S3 on Outposts. This action performs the following types of requests:
+// - restore an archive - Restore an archived object
//
-// * select - Perform a select query on an archived object
-//
-// * restore an
-// archive - Restore an archived object
-//
-// To use this operation, you must have
-// permissions to perform the s3:RestoreObject action. The bucket owner has this
-// permission by default and can grant this permission to others. For more
-// information about permissions, see Permissions Related to Bucket Subresource
-// Operations
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide. Querying Archives with Select Requests You use a
-// select type of request to perform SQL queries on archived objects. The archived
-// objects that are being queried by the select request must be formatted as
-// uncompressed comma-separated values (CSV) files. You can run queries and custom
-// analytics on your archived data without having to restore your data to a hotter
-// Amazon S3 tier. For an overview about select requests, see Querying Archived
-// Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
-// in the Amazon S3 User Guide. When making a select request, do the following:
-//
-// *
-// Define an output location for the select query's output. This must be an Amazon
-// S3 bucket in the same Amazon Web Services Region as the bucket that contains the
-// archive object that is being queried. The Amazon Web Services account that
-// initiates the job must have permissions to write to the S3 bucket. You can
-// specify the storage class and encryption for the output objects stored in the
-// bucket. For more information about output, see Querying Archived Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
-// in the Amazon S3 User Guide. For more information about the S3 structure in the
-// request body, see the following:
-//
-// * PutObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * Managing
-// Access with ACLs
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) in the
-// Amazon S3 User Guide
-//
-// * Protecting Data Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) in
-// the Amazon S3 User Guide
-//
-// * Define the SQL expression for the SELECT type of
-// restoration for your query in the request body's SelectParameters structure. You
-// can use expressions like the following examples.
-//
-// * The following expression
-// returns all records from the specified object. SELECT * FROM Object
-//
-// * Assuming
-// that you are not using any headers for data stored in the object, you can
-// specify columns with positional headers. SELECT s._1, s._2 FROM Object s WHERE
-// s._3 > 100
-//
-// * If you have headers and you set the fileHeaderInfo in the CSV
-// structure in the request body to USE, you can specify headers in the query. (If
-// you set the fileHeaderInfo field to IGNORE, the first row is skipped for the
-// query.) You cannot mix ordinal positions with header column names. SELECT s.Id,
-// s.FirstName, s.SSN FROM S3Object s
-//
-// For more information about using SQL with S3
-// Glacier Select restore, see SQL Reference for Amazon S3 Select and S3 Glacier
-// Select
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
-// in the Amazon S3 User Guide. When making a select request, you can also do the
+// For more information about the S3 structure in the request body, see the
// following:
-//
-// * To expedite your queries, specify the Expedited tier. For more
-// information about tiers, see "Restoring Archives," later in this topic.
-//
-// *
-// Specify details about the data serialization format of both the input object
-// that is being queried and the serialization of the CSV-encoded query
-// results.
-//
-// The following are additional important facts about the select
-// feature:
-//
-// * The output results are new Amazon S3 objects. Unlike archive
-// retrievals, they are stored until explicitly deleted-manually or through a
-// lifecycle policy.
-//
-// * You can issue more than one select request on the same
-// Amazon S3 object. Amazon S3 doesn't deduplicate requests, so avoid issuing
-// duplicate requests.
-//
-// * Amazon S3 accepts a select request even if the object has
-// already been restored. A select request doesn’t return error response
-// 409.
-//
-// Restoring objects Objects that you archive to the S3 Glacier or S3 Glacier
-// Deep Archive storage class, and S3 Intelligent-Tiering Archive or S3
-// Intelligent-Tiering Deep Archive tiers are not accessible in real time. For
-// objects in Archive Access or Deep Archive Access tiers you must first initiate a
+// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+// - Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
+// in the Amazon S3 User Guide
+// - Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
+// in the Amazon S3 User Guide
+//
+// Permissions To use this operation, you must have permissions to perform the
+// s3:RestoreObject action. The bucket owner has this permission by default and can
+// grant this permission to others. For more information about permissions, see
+// Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide. Restoring objects Objects that you archive to the
+// S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive
+// storage class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep
+// Archive tiers, are not accessible in real time. For objects in the S3 Glacier
+// Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive storage
+// classes, you must first initiate a restore request, and then wait until a
+// temporary copy of the object is available. If you want a permanent copy of the
+// object, create a copy of it in the Amazon S3 Standard storage class in your S3
+// bucket. To access an archived object, you must restore the object for the
+// duration (number of days) that you specify. For objects in the Archive Access or
+// Deep Archive Access tiers of S3 Intelligent-Tiering, you must first initiate a
// restore request, and then wait until the object is moved into the Frequent
-// Access tier. For objects in S3 Glacier or S3 Glacier Deep Archive storage
-// classes you must first initiate a restore request, and then wait until a
-// temporary copy of the object is available. To access an archived object, you
-// must restore the object for the duration (number of days) that you specify. To
-// restore a specific object version, you can provide a version ID. If you don't
-// provide a version ID, Amazon S3 restores the current version. When restoring an
-// archived object (or using a select request), you can specify one of the
-// following data access tier options in the Tier element of the request body:
-//
-// *
-// Expedited - Expedited retrievals allow you to quickly access your data stored in
-// the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier when
-// occasional urgent requests for a subset of archives are required. For all but
-// the largest archived objects (250 MB+), data accessed using Expedited retrievals
-// is typically made available within 1–5 minutes. Provisioned capacity ensures
-// that retrieval capacity for Expedited retrievals is available when you need it.
-// Expedited retrievals and provisioned capacity are not available for objects
-// stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering
-// Deep Archive tier.
-//
-// * Standard - Standard retrievals allow you to access any of
-// your archived objects within several hours. This is the default option for
-// retrieval requests that do not specify the retrieval option. Standard retrievals
-// typically finish within 3–5 hours for objects stored in the S3 Glacier storage
-// class or S3 Intelligent-Tiering Archive tier. They typically finish within 12
-// hours for objects stored in the S3 Glacier Deep Archive storage class or S3
-// Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects
-// stored in S3 Intelligent-Tiering.
-//
-// * Bulk - Bulk retrievals are the lowest-cost
-// retrieval option in S3 Glacier, enabling you to retrieve large amounts, even
-// petabytes, of data inexpensively. Bulk retrievals typically finish within 5–12
-// hours for objects stored in the S3 Glacier storage class or S3
-// Intelligent-Tiering Archive tier. They typically finish within 48 hours for
-// objects stored in the S3 Glacier Deep Archive storage class or S3
-// Intelligent-Tiering Deep Archive tier. Bulk retrievals are free for objects
-// stored in S3 Intelligent-Tiering.
-//
-// For more information about archive retrieval
-// options and provisioned capacity for Expedited data access, see Restoring
-// Archived Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) in the
-// Amazon S3 User Guide. You can use Amazon S3 restore speed upgrade to change the
-// restore speed to a faster speed while it is in progress. For more information,
-// see Upgrading the speed of an in-progress restore
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html)
+// Access tier. To restore a specific object version, you can provide a version ID.
+// If you don't provide a version ID, Amazon S3 restores the current version. When
+// restoring an archived object, you can specify one of the following data access
+// tier options in the Tier element of the request body:
+// - Expedited - Expedited retrievals allow you to quickly access your data
+// stored in the S3 Glacier Flexible Retrieval Flexible Retrieval storage class or
+// S3 Intelligent-Tiering Archive tier when occasional urgent requests for
+// restoring archives are required. For all but the largest archived objects (250
+// MB+), data accessed using Expedited retrievals is typically made available
+// within 1–5 minutes. Provisioned capacity ensures that retrieval capacity for
+// Expedited retrievals is available when you need it. Expedited retrievals and
+// provisioned capacity are not available for objects stored in the S3 Glacier Deep
+// Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
+// - Standard - Standard retrievals allow you to access any of your archived
+// objects within several hours. This is the default option for retrieval requests
+// that do not specify the retrieval option. Standard retrievals typically finish
+// within 3–5 hours for objects stored in the S3 Glacier Flexible Retrieval
+// Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier. They
+// typically finish within 12 hours for objects stored in the S3 Glacier Deep
+// Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Standard
+// retrievals are free for objects stored in S3 Intelligent-Tiering.
+// - Bulk - Bulk retrievals free for objects stored in the S3 Glacier Flexible
+// Retrieval and S3 Intelligent-Tiering storage classes, enabling you to retrieve
+// large amounts, even petabytes, of data at no cost. Bulk retrievals typically
+// finish within 5–12 hours for objects stored in the S3 Glacier Flexible Retrieval
+// Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier. Bulk
+// retrievals are also the lowest-cost retrieval option when restoring objects from
+// S3 Glacier Deep Archive. They typically finish within 48 hours for objects
+// stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering
+// Deep Archive tier.
+//
+// For more information about archive retrieval options and provisioned capacity
+// for Expedited data access, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html)
+// in the Amazon S3 User Guide. You can use Amazon S3 restore speed upgrade to
+// change the restore speed to a faster speed while it is in progress. For more
+// information, see Upgrading the speed of an in-progress restore (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html)
// in the Amazon S3 User Guide. To get the status of object restoration, you can
// send a HEAD request. Operations return the x-amz-restore header, which provides
// information about the restoration status, in the response. You can use Amazon S3
// event notifications to notify you when a restore is initiated or completed. For
-// more information, see Configuring Amazon S3 Event Notifications
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
-// Amazon S3 User Guide. After restoring an archived object, you can update the
-// restoration period by reissuing the request with a new period. Amazon S3 updates
-// the restoration period relative to the current time and charges only for the
-// request-there are no data transfer charges. You cannot update the restoration
-// period when Amazon S3 is actively processing your current restore request for
-// the object. If your bucket has a lifecycle configuration with a rule that
-// includes an expiration action, the object expiration overrides the life span
-// that you specify in a restore request. For example, if you restore an object
-// copy for 10 days, but the object is scheduled to expire in 3 days, Amazon S3
-// deletes the object in 3 days. For more information about lifecycle
-// configuration, see PutBucketLifecycleConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-// and Object Lifecycle Management
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) in
-// Amazon S3 User Guide. Responses A successful action returns either the 200 OK or
-// 202 Accepted status code.
-//
-// * If the object is not previously restored, then
-// Amazon S3 returns 202 Accepted in the response.
-//
-// * If the object is previously
-// restored, Amazon S3 returns 200 OK in the response.
-//
-// Special Errors
+// more information, see Configuring Amazon S3 Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+// in the Amazon S3 User Guide. After restoring an archived object, you can update
+// the restoration period by reissuing the request with a new period. Amazon S3
+// updates the restoration period relative to the current time and charges only for
+// the request-there are no data transfer charges. You cannot update the
+// restoration period when Amazon S3 is actively processing your current restore
+// request for the object. If your bucket has a lifecycle configuration with a rule
+// that includes an expiration action, the object expiration overrides the life
+// span that you specify in a restore request. For example, if you restore an
+// object copy for 10 days, but the object is scheduled to expire in 3 days, Amazon
+// S3 deletes the object in 3 days. For more information about lifecycle
+// configuration, see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+// and Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
+// in Amazon S3 User Guide. Responses A successful action returns either the 200 OK
+// or 202 Accepted status code.
//
-// * Code:
-// RestoreAlreadyInProgress
+// - If the object is not previously restored, then Amazon S3 returns 202
+// Accepted in the response.
//
-// * Cause: Object restore is already in progress. (This
-// error does not apply to SELECT type requests.)
+// - If the object is previously restored, Amazon S3 returns 200 OK in the
+// response.
//
-// * HTTP Status Code: 409
-// Conflict
+// - Special errors:
//
-// * SOAP Fault Code Prefix: Client
+// - Code: RestoreAlreadyInProgress
//
-// * Code:
-// GlacierExpeditedRetrievalNotAvailable
+// - Cause: Object restore is already in progress.
//
-// * Cause: expedited retrievals are
-// currently not available. Try again later. (Returned if there is insufficient
-// capacity to process the Expedited request. This error applies only to Expedited
-// retrievals and not to S3 Standard or Bulk retrievals.)
+// - HTTP Status Code: 409 Conflict
//
-// * HTTP Status Code:
-// 503
+// - SOAP Fault Code Prefix: Client
//
-// * SOAP Fault Code Prefix: N/A
+// - Code: GlacierExpeditedRetrievalNotAvailable
//
-// Related Resources
+// - Cause: expedited retrievals are currently not available. Try again later.
+// (Returned if there is insufficient capacity to process the Expedited request.
+// This error applies only to Expedited retrievals and not to S3 Standard or Bulk
+// retrievals.)
//
-// *
-// PutBucketLifecycleConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+// - HTTP Status Code: 503
//
-// *
-// GetBucketNotificationConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
+// - SOAP Fault Code Prefix: N/A
//
-// *
-// SQL Reference for Amazon S3 Select and S3 Glacier Select
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
-// in the Amazon S3 User Guide
+// The following operations are related to RestoreObject :
+// - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+// - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
func (c *Client) RestoreObject(ctx context.Context, params *RestoreObjectInput, optFns ...func(*Options)) (*RestoreObjectOutput, error) {
if params == nil {
params = &RestoreObjectInput{}
@@ -248,23 +147,23 @@ func (c *Client) RestoreObject(ctx context.Context, params *RestoreObjectInput,
type RestoreObjectInput struct {
- // The bucket name containing the object to restore. When using this action with an
- // access point, you must direct requests to the access point hostname. The access
- // point hostname takes the form
+ // The bucket name containing the object to restore. Access points - When you use
+ // this action with an access point, you must provide the alias of the access point
+ // in place of the bucket name or specify the access point ARN. When using the
+ // access point ARN, you must direct requests to the access point hostname. The
+ // access point hostname takes the form
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
// action with an access point through the Amazon Web Services SDKs, you provide
// the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. S3 on Outposts - When you use this action with
+ // Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname.
+ // The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -274,28 +173,29 @@ type RestoreObjectInput struct {
// This member is required.
Key *string
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter.
ChecksumAlgorithm types.ChecksumAlgorithm
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
// Container for restore job parameters.
@@ -307,10 +207,15 @@ type RestoreObjectInput struct {
noSmithyDocumentSerde
}
+func (in *RestoreObjectInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type RestoreObjectOutput struct {
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Indicates the path in the provided S3 output location where Select results will
@@ -324,6 +229,9 @@ type RestoreObjectOutput struct {
}
func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpRestoreObject{}, middleware.After)
if err != nil {
return err
@@ -332,34 +240,38 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RestoreObject"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -368,7 +280,10 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpRestoreObjectValidationMiddleware(stack); err != nil {
@@ -380,6 +295,9 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRestoreObjectInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -398,20 +316,32 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *RestoreObjectInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opRestoreObject(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "RestoreObject",
}
}
-// getRestoreObjectRequestAlgorithmMember gets the request checksum algorithm value
-// provided as input.
+// getRestoreObjectRequestAlgorithmMember gets the request checksum algorithm
+// value provided as input.
func getRestoreObjectRequestAlgorithmMember(input interface{}) (string, bool) {
in := input.(*RestoreObjectInput)
if len(in.ChecksumAlgorithm) == 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
index 1b9dbc7b..f69db696 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
@@ -4,103 +4,77 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
smithysync "github.com/aws/smithy-go/sync"
- smithyhttp "github.com/aws/smithy-go/transport/http"
"sync"
)
-// This action filters the contents of an Amazon S3 object based on a simple
-// structured query language (SQL) statement. In the request, along with the SQL
-// expression, you must also specify a data serialization format (JSON, CSV, or
-// Apache Parquet) of the object. Amazon S3 uses this format to parse object data
-// into records, and returns only records that match the specified SQL expression.
-// You must also specify the data serialization format for the response. This
-// action is not supported by Amazon S3 on Outposts. For more information about
-// Amazon S3 Select, see Selecting Content from Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html)
-// and SELECT Command
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html)
-// in the Amazon S3 User Guide. For more information about using SQL with Amazon S3
-// Select, see SQL Reference for Amazon S3 Select and S3 Glacier Select
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
-// in the Amazon S3 User Guide. Permissions You must have s3:GetObject permission
-// for this operation. Amazon S3 Select does not support anonymous access. For more
-// information about permissions, see Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) in
-// the Amazon S3 User Guide. Object Data Formats You can use Amazon S3 Select to
+// This operation is not supported by directory buckets. This action filters the
+// contents of an Amazon S3 object based on a simple structured query language
+// (SQL) statement. In the request, along with the SQL expression, you must also
+// specify a data serialization format (JSON, CSV, or Apache Parquet) of the
+// object. Amazon S3 uses this format to parse object data into records, and
+// returns only records that match the specified SQL expression. You must also
+// specify the data serialization format for the response. This functionality is
+// not supported for Amazon S3 on Outposts. For more information about Amazon S3
+// Select, see Selecting Content from Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html)
+// and SELECT Command (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html)
+// in the Amazon S3 User Guide. Permissions You must have the s3:GetObject
+// permission for this operation. Amazon S3 Select does not support anonymous
+// access. For more information about permissions, see Specifying Permissions in a
+// Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// in the Amazon S3 User Guide. Object Data Formats You can use Amazon S3 Select to
// query objects that have the following format properties:
+// - CSV, JSON, and Parquet - Objects must be in CSV, JSON, or Parquet format.
+// - UTF-8 - UTF-8 is the only encoding type Amazon S3 Select supports.
+// - GZIP or BZIP2 - CSV and JSON files can be compressed using GZIP or BZIP2.
+// GZIP and BZIP2 are the only compression formats that Amazon S3 Select supports
+// for CSV and JSON files. Amazon S3 Select supports columnar compression for
+// Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object
+// compression for Parquet objects.
+// - Server-side encryption - Amazon S3 Select supports querying objects that
+// are protected with server-side encryption. For objects that are encrypted with
+// customer-provided encryption keys (SSE-C), you must use HTTPS, and you must use
+// the headers that are documented in the GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// . For more information about SSE-C, see Server-Side Encryption (Using
+// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+// in the Amazon S3 User Guide. For objects that are encrypted with Amazon S3
+// managed keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS), server-side
+// encryption is handled transparently, so you don't need to specify anything. For
+// more information about server-side encryption, including SSE-S3 and SSE-KMS, see
+// Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
+// in the Amazon S3 User Guide.
//
-// * CSV, JSON, and
-// Parquet - Objects must be in CSV, JSON, or Parquet format.
+// Working with the Response Body Given the response size is unknown, Amazon S3
+// Select streams the response as a series of messages and includes a
+// Transfer-Encoding header with chunked as its value in the response. For more
+// information, see Appendix: SelectObjectContent Response (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html)
+// . GetObject Support The SelectObjectContent action does not support the
+// following GetObject functionality. For more information, see GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// .
+// - Range : Although you can specify a scan range for an Amazon S3 Select
+// request (see SelectObjectContentRequest - ScanRange (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange)
+// in the request parameters), you cannot specify the range of bytes of an object
+// to return.
+// - The GLACIER , DEEP_ARCHIVE , and REDUCED_REDUNDANCY storage classes, or the
+// ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access tiers of the INTELLIGENT_TIERING
+// storage class: You cannot query objects in the GLACIER , DEEP_ARCHIVE , or
+// REDUCED_REDUNDANCY storage classes, nor objects in the ARCHIVE_ACCESS or
+// DEEP_ARCHIVE_ACCESS access tiers of the INTELLIGENT_TIERING storage class. For
+// more information about storage classes, see Using Amazon S3 storage classes (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html)
+// in the Amazon S3 User Guide.
//
-// * UTF-8 - UTF-8 is
-// the only encoding type Amazon S3 Select supports.
-//
-// * GZIP or BZIP2 - CSV and
-// JSON files can be compressed using GZIP or BZIP2. GZIP and BZIP2 are the only
-// compression formats that Amazon S3 Select supports for CSV and JSON files.
-// Amazon S3 Select supports columnar compression for Parquet using GZIP or Snappy.
-// Amazon S3 Select does not support whole-object compression for Parquet
-// objects.
-//
-// * Server-side encryption - Amazon S3 Select supports querying objects
-// that are protected with server-side encryption. For objects that are encrypted
-// with customer-provided encryption keys (SSE-C), you must use HTTPS, and you must
-// use the headers that are documented in the GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html). For more
-// information about SSE-C, see Server-Side Encryption (Using Customer-Provided
-// Encryption Keys)
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
-// in the Amazon S3 User Guide. For objects that are encrypted with Amazon S3
-// managed encryption keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS),
-// server-side encryption is handled transparently, so you don't need to specify
-// anything. For more information about server-side encryption, including SSE-S3
-// and SSE-KMS, see Protecting Data Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) in
-// the Amazon S3 User Guide.
-//
-// Working with the Response Body Given the response
-// size is unknown, Amazon S3 Select streams the response as a series of messages
-// and includes a Transfer-Encoding header with chunked as its value in the
-// response. For more information, see Appendix: SelectObjectContent Response
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html).
-// GetObject Support The SelectObjectContent action does not support the following
-// GetObject functionality. For more information, see GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
-//
-// * Range:
-// Although you can specify a scan range for an Amazon S3 Select request (see
-// SelectObjectContentRequest - ScanRange
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange)
-// in the request parameters), you cannot specify the range of bytes of an object
-// to return.
-//
-// * GLACIER, DEEP_ARCHIVE and REDUCED_REDUNDANCY storage classes: You
-// cannot specify the GLACIER, DEEP_ARCHIVE, or REDUCED_REDUNDANCY storage classes.
-// For more information, about storage classes see Storage Classes
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#storage-class-intro)
-// in the Amazon S3 User Guide.
-//
-// Special Errors For a list of special errors for
-// this operation, see List of SELECT Object Content Error Codes
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList)
-// Related Resources
-//
-// * GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// *
-// GetBucketLifecycleConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// *
-// PutBucketLifecycleConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+// Special Errors For a list of special errors for this operation, see List of
+// SELECT Object Content Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList)
+// The following operations are related to SelectObjectContent :
+// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
+// - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
func (c *Client) SelectObjectContent(ctx context.Context, params *SelectObjectContentInput, optFns ...func(*Options)) (*SelectObjectContentOutput, error) {
if params == nil {
params = &SelectObjectContentInput{}
@@ -122,8 +96,8 @@ func (c *Client) SelectObjectContent(ctx context.Context, params *SelectObjectCo
// object. Amazon S3 uses this to parse object data into records. It returns only
// records that match the specified SQL expression. You must also specify the data
// serialization format for the response. For more information, see S3Select API
-// Documentation
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
+// Documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html)
+// .
type SelectObjectContentInput struct {
// The S3 bucket.
@@ -156,9 +130,9 @@ type SelectObjectContentInput struct {
// This member is required.
OutputSerialization *types.OutputSerialization
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Specifies if periodic request progress information should be enabled.
@@ -166,44 +140,41 @@ type SelectObjectContentInput struct {
// The server-side encryption (SSE) algorithm used to encrypt the object. This
// parameter is needed only when the object was created using a checksum algorithm.
- // For more information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
// in the Amazon S3 User Guide.
SSECustomerAlgorithm *string
// The server-side encryption (SSE) customer managed key. This parameter is needed
// only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
// in the Amazon S3 User Guide.
SSECustomerKey *string
// The MD5 server-side encryption (SSE) customer managed key. This parameter is
// needed only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+ // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
// in the Amazon S3 User Guide.
SSECustomerKeyMD5 *string
// Specifies the byte range of the object to get the records from. A record is
// processed when its first byte is contained by the range. This parameter is
// optional, but when specified, it must not be empty. See RFC 2616, Section
- // 14.35.1 about how to specify the start and end of the range. ScanRangemay be
+ // 14.35.1 about how to specify the start and end of the range. ScanRange may be
// used in the following ways:
- //
- // * 50100 - process only the records starting between
- // the bytes 50 and 100 (inclusive, counting from zero)
- //
- // * 50 - process only the
- // records starting after the byte 50
- //
- // * 50 - process only the records within the
- // last 50 bytes of the file.
+ // - 50100 - process only the records starting between the bytes 50 and 100
+ // (inclusive, counting from zero)
+ // - 50 - process only the records starting after the byte 50
+ // - 50 - process only the records within the last 50 bytes of the file.
ScanRange *types.ScanRange
noSmithyDocumentSerde
}
+func (in *SelectObjectContentInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+
+}
+
type SelectObjectContentOutput struct {
eventStream *SelectObjectContentEventStream
@@ -219,6 +190,9 @@ func (o *SelectObjectContentOutput) GetStream() *SelectObjectContentEventStream
}
func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpSelectObjectContent{}, middleware.After)
if err != nil {
return err
@@ -227,40 +201,47 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.St
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "SelectObjectContent"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addEventStreamSelectObjectContentMiddleware(stack, options); err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpSelectObjectContentValidationMiddleware(stack); err != nil {
@@ -272,6 +253,9 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.St
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addSelectObjectContentUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -287,14 +271,26 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.St
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *SelectObjectContentInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opSelectObjectContent(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "SelectObjectContent",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
index fe7a8e81..ff731979 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
@@ -4,6 +4,7 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
@@ -15,102 +16,99 @@ import (
"io"
)
-// Uploads a part in a multipart upload. In this operation, you provide part data
-// in your request. However, you have an option to specify your existing Amazon S3
-// object as a data source for the part you are uploading. To upload a part from an
-// existing object, you use the UploadPartCopy
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
-// operation. You must initiate a multipart upload (see CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html))
-// before you can upload any part. In response to your initiate request, Amazon S3
-// returns an upload ID, a unique identifier, that you must include in your upload
-// part request. Part numbers can be any number from 1 to 10,000, inclusive. A part
-// number uniquely identifies a part and also defines its position within the
-// object being created. If you upload a new part using the same part number that
-// was used with a previous part, the previously uploaded part is overwritten. Each
-// part must be at least 5 MB in size, except the last part. There is no size limit
-// on the last part of your multipart upload. To ensure that data is not corrupted
-// when traversing the network, specify the Content-MD5 header in the upload part
+// Uploads a part in a multipart upload. In this operation, you provide new data
+// as a part of an object in your request. However, you have an option to specify
+// your existing Amazon S3 object as a data source for the part you are uploading.
+// To upload a part from an existing object, you use the UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
+// operation. You must initiate a multipart upload (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// ) before you can upload any part. In response to your initiate request, Amazon
+// S3 returns an upload ID, a unique identifier that you must include in your
+// upload part request. Part numbers can be any number from 1 to 10,000, inclusive.
+// A part number uniquely identifies a part and also defines its position within
+// the object being created. If you upload a new part using the same part number
+// that was used with a previous part, the previously uploaded part is overwritten.
+// For information about maximum and minimum part sizes and other multipart upload
+// specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
+// in the Amazon S3 User Guide. After you initiate multipart upload and upload one
+// or more parts, you must either complete or abort multipart upload in order to
+// stop getting charged for storage of the uploaded parts. Only after you either
+// complete or abort multipart upload, Amazon S3 frees up the parts storage and
+// stops charging you for the parts storage. For more information on multipart
+// uploads, go to Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
+// in the Amazon S3 User Guide . Directory buckets - For directory buckets, you
+// must make requests for this API operation to the Zonal endpoint. These endpoints
+// support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Permissions
+// - General purpose bucket permissions - For information on the permissions
+// required to use the multipart upload API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// API operation for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
+// .
+//
+// Data integrity General purpose bucket - To ensure that data is not corrupted
+// traversing the network, specify the Content-MD5 header in the upload part
// request. Amazon S3 checks the part data against the provided MD5 value. If they
// do not match, Amazon S3 returns an error. If the upload request is signed with
// Signature Version 4, then Amazon Web Services S3 uses the x-amz-content-sha256
-// header as a checksum instead of Content-MD5. For more information see
+// header as a checksum instead of Content-MD5 . For more information see
// Authenticating Requests: Using the Authorization Header (Amazon Web Services
-// Signature Version 4)
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html).
-// Note: After you initiate multipart upload and upload one or more parts, you must
-// either complete or abort multipart upload in order to stop getting charged for
-// storage of the uploaded parts. Only after you either complete or abort multipart
-// upload, Amazon S3 frees up the parts storage and stops charging you for the
-// parts storage. For more information on multipart uploads, go to Multipart Upload
-// Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in
-// the Amazon S3 User Guide . For information on the permissions required to use
-// the multipart upload API, go to Multipart Upload and Permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the
-// Amazon S3 User Guide. You can optionally request server-side encryption where
-// Amazon S3 encrypts your data as it writes it to disks in its data centers and
-// decrypts it for you when you access it. You have the option of providing your
-// own encryption key, or you can use the Amazon Web Services managed encryption
-// keys. If you choose to provide your own encryption key, the request headers you
-// provide in the request must match the headers you used in the request to
-// initiate the upload by using CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
-// For more information, go to Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
-// in the Amazon S3 User Guide. Server-side encryption is supported by the S3
-// Multipart Upload actions. Unless you are using a customer-provided encryption
-// key, you don't need to specify the encryption parameters in each UploadPart
-// request. Instead, you only need to specify the server-side encryption parameters
-// in the initial Initiate Multipart request. For more information, see
-// CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
-// If you requested server-side encryption using a customer-provided encryption key
-// in your initiate multipart upload request, you must provide identical encryption
-// information in each part upload using the following headers.
-//
-// *
-// x-amz-server-side-encryption-customer-algorithm
-//
-// *
-// x-amz-server-side-encryption-customer-key
-//
-// *
-// x-amz-server-side-encryption-customer-key-MD5
-//
-// Special Errors
-//
-// * Code:
-// NoSuchUpload
-//
-// * Cause: The specified multipart upload does not exist. The upload
-// ID might be invalid, or the multipart upload might have been aborted or
-// completed.
-//
-// * HTTP Status Code: 404 Not Found
-//
-// * SOAP Fault Code Prefix:
-// Client
-//
-// Related Resources
+// Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html)
+// . Directory buckets - MD5 is not supported by directory buckets. You can use
+// checksum algorithms to check object integrity. Encryption
+// - General purpose bucket - Server-side encryption is for data encryption at
+// rest. Amazon S3 encrypts your data as it writes it to disks in its data centers
+// and decrypts it when you access it. You have mutually exclusive options to
+// protect data using server-side encryption in Amazon S3, depending on how you
+// choose to manage the encryption keys. Specifically, the encryption key options
+// are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and
+// Customer-Provided Keys (SSE-C). Amazon S3 encrypts data with server-side
+// encryption using Amazon S3 managed keys (SSE-S3) by default. You can optionally
+// tell Amazon S3 to encrypt data at rest using server-side encryption with other
+// key options. The option you use depends on whether you want to use KMS keys
+// (SSE-KMS) or provide your own encryption key (SSE-C). Server-side encryption is
+// supported by the S3 Multipart Upload operations. Unless you are using a
+// customer-provided encryption key (SSE-C), you don't need to specify the
+// encryption parameters in each UploadPart request. Instead, you only need to
+// specify the server-side encryption parameters in the initial Initiate Multipart
+// request. For more information, see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// . If you request server-side encryption using a customer-provided encryption key
+// (SSE-C) in your initiate multipart upload request, you must provide identical
+// encryption information in each part upload using the following request headers.
+// - x-amz-server-side-encryption-customer-algorithm
+// - x-amz-server-side-encryption-customer-key
+// - x-amz-server-side-encryption-customer-key-MD5
+// - Directory bucket - For directory buckets, only server-side encryption with
+// Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
//
-// * CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// For more information, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
+// in the Amazon S3 User Guide. Special errors
+// - Error Code: NoSuchUpload
+// - Description: The specified multipart upload does not exist. The upload ID
+// might be invalid, or the multipart upload might have been aborted or completed.
+// - HTTP Status Code: 404 Not Found
+// - SOAP Fault Code Prefix: Client
//
-// *
-// CompleteMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// *
-// AbortMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// *
-// ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// *
-// ListMultipartUploads
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to UploadPart :
+// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
func (c *Client) UploadPart(ctx context.Context, params *UploadPartInput, optFns ...func(*Options)) (*UploadPartOutput, error) {
if params == nil {
params = &UploadPartInput{}
@@ -128,23 +126,31 @@ func (c *Client) UploadPart(ctx context.Context, params *UploadPartInput, optFns
type UploadPartInput struct {
- // The name of the bucket to which the multipart upload was initiated. When using
- // this action with an access point, you must direct requests to the access point
- // hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The name of the bucket to which the multipart upload was initiated. Directory
+ // buckets - When you use this operation with a directory bucket, you must use
+ // virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
@@ -158,7 +164,7 @@ type UploadPartInput struct {
// 10,000.
//
// This member is required.
- PartNumber int32
+ PartNumber *int32
// Upload ID identifying the multipart upload whose part is being uploaded.
//
@@ -168,13 +174,12 @@ type UploadPartInput struct {
// Object data.
Body io.Reader
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not using
- // the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
- // HTTP status code 400 Bad Request. For more information, see Checking object
- // integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Indicates the algorithm used to create the checksum for the object when you use
+ // the SDK. This header will not provide any additional functionality if you don't
+ // use the SDK. When you send this header, there must be a corresponding
+ // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
+ // request with the HTTP status code 400 Bad Request . For more information, see
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
// ignores any provided ChecksumAlgorithm parameter. This checksum algorithm must
// be the same for all parts and it match the checksum value supplied in the
@@ -184,112 +189,124 @@ type UploadPartInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32 checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32C checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 160-bit SHA-1 digest of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 256-bit SHA-256 digest of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
// Size of the body in bytes. This parameter is useful when the size of the body
// cannot be determined automatically.
- ContentLength int64
+ ContentLength *int64
// The base64-encoded 128-bit MD5 digest of the part data. This parameter is
// auto-populated when using the command from the CLI. This parameter is required
- // if object lock parameters are specified.
+ // if object lock parameters are specified. This functionality is not supported for
+ // directory buckets.
ContentMD5 *string
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
+ // The account ID of the expected bucket owner. If the account ID that you provide
+ // does not match the actual owner of the bucket, the request fails with the HTTP
+ // status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
+ // Specifies the algorithm to use when encrypting the object (for example,
+ // AES256). This functionality is not supported for directory buckets.
SSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use in
// encrypting data. This value is used to store the object and then it is
// discarded; Amazon S3 does not store the encryption key. The key must be
// appropriate for use with the algorithm specified in the
- // x-amz-server-side-encryption-customer-algorithm header. This must be the same
- // encryption key specified in the initiate multipart upload request.
+ // x-amz-server-side-encryption-customer-algorithm header . This must be the same
+ // encryption key specified in the initiate multipart upload request. This
+ // functionality is not supported for directory buckets.
SSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. This functionality is not
+ // supported for directory buckets.
SSECustomerKeyMD5 *string
noSmithyDocumentSerde
}
+func (in *UploadPartInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.Key = in.Key
+
+}
+
type UploadPartOutput struct {
// Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // encryption with Key Management Service (KMS) keys (SSE-KMS). This functionality
+ // is not supported for directory buckets.
+ BucketKeyEnabled *bool
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
@@ -297,25 +314,29 @@ type UploadPartOutput struct {
ETag *string
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm used.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to confirm the encryption
+ // algorithm that's used. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to provide the round-trip
+ // message integrity verification of the customer-provided encryption key. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key was used for the
- // object.
+ // If present, indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms ). For directory buckets, only server-side
+ // encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
ServerSideEncryption types.ServerSideEncryption
// Metadata pertaining to the operation's result.
@@ -325,6 +346,9 @@ type UploadPartOutput struct {
}
func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpUploadPart{}, middleware.After)
if err != nil {
return err
@@ -333,34 +357,38 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UploadPart"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -369,7 +397,10 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpUploadPartValidationMiddleware(stack); err != nil {
@@ -381,6 +412,12 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = add100Continue(stack, options); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addUploadPartInputChecksumMiddlewares(stack, options); err != nil {
return err
}
@@ -402,14 +439,26 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *UploadPartInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opUploadPart(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "UploadPart",
}
}
@@ -434,8 +483,9 @@ func addUploadPartInputChecksumMiddlewares(stack *middleware.Stack, options Opti
})
}
-// getUploadPartBucketMember returns a pointer to string denoting a provided bucket
-// member valueand a boolean indicating if the input has a modeled bucket name,
+// getUploadPartBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
func getUploadPartBucketMember(input interface{}) (*string, bool) {
in := input.(*UploadPartInput)
if in.Bucket == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
index c8a9a55a..d42dc60c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
@@ -4,122 +4,104 @@ package s3
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
-// Uploads a part by copying data from an existing object as data source. You
-// specify the data source by adding the request header x-amz-copy-source in your
-// request and a byte range by adding the request header x-amz-copy-source-range in
-// your request. The minimum allowable part size for a multipart upload is 5 MB.
-// For more information about multipart upload limits, go to Quick Facts
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html) in the Amazon S3
-// User Guide. Instead of using an existing object as part data, you might use the
-// UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-// action and provide data in your request. You must initiate a multipart upload
-// before you can upload any part. In response to your initiate request. Amazon S3
-// returns a unique identifier, the upload ID, that you must include in your upload
-// part request. For more information about using the UploadPartCopy operation, see
-// the following:
+// Uploads a part by copying data from an existing object as data source. To
+// specify the data source, you add the request header x-amz-copy-source in your
+// request. To specify a byte range, you add the request header
+// x-amz-copy-source-range in your request. For information about maximum and
+// minimum part sizes and other multipart upload specifications, see Multipart
+// upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
+// in the Amazon S3 User Guide. Instead of copying data from an existing object as
+// part data, you might use the UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// action to upload new data as a part of an object in your request. You must
+// initiate a multipart upload before you can upload any part. In response to your
+// initiate request, Amazon S3 returns the upload ID, a unique identifier that you
+// must include in your upload part request. For conceptual information about
+// multipart uploads, see Uploading Objects Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
+// in the Amazon S3 User Guide. For information about copying objects using a
+// single atomic action vs. a multipart upload, see Operations on Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html)
+// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
+// make requests for this API operation to the Zonal endpoint. These endpoints
+// support virtual-hosted-style requests in the format
+// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
+// requests are not supported. For more information, see Regional and Zonal
+// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
+// in the Amazon S3 User Guide. Authentication and authorization All UploadPartCopy
+// requests must be authenticated and signed by using IAM credentials (access key
+// ID and secret access key for the IAM identities). All headers with the x-amz-
+// prefix, including x-amz-copy-source , must be signed. For more information, see
+// REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+// . Directory buckets - You must use IAM credentials to authenticate and authorize
+// your access to the UploadPartCopy API operation, instead of using the temporary
+// security credentials through the CreateSession API operation. Amazon Web
+// Services CLI or SDKs handles authentication and authorization on your behalf.
+// Permissions You must have READ access to the source object and WRITE access to
+// the destination bucket.
+// - General purpose bucket permissions - You must have the permissions in a
+// policy based on the bucket types of your source bucket and destination bucket in
+// an UploadPartCopy operation.
+// - If the source object is in a general purpose bucket, you must have the
+// s3:GetObject permission to read the source object that is being copied.
+// - If the destination bucket is a general purpose bucket, you must have the
+// s3:PutObject permission to write the object copy to the destination bucket.
+// For information about permissions required to use the multipart upload API, see
+// Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon S3 User Guide.
+// - Directory bucket permissions - You must have permissions in a bucket policy
+// or an IAM identity-based policy based on the source and destination bucket types
+// in an UploadPartCopy operation.
+// - If the source object that you want to copy is in a directory bucket, you
+// must have the s3express:CreateSession permission in the Action element of a
+// policy to read the object . By default, the session is in the ReadWrite mode.
+// If you want to restrict the access, you can explicitly set the
+// s3express:SessionMode condition key to ReadOnly on the copy source bucket.
+// - If the copy destination is a directory bucket, you must have the
+// s3express:CreateSession permission in the Action element of a policy to write
+// the object to the destination. The s3express:SessionMode condition key cannot
+// be set to ReadOnly on the copy destination. For example policies, see Example
+// bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
+// and Amazon Web Services Identity and Access Management (IAM) identity-based
+// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html)
+// in the Amazon S3 User Guide.
//
-// * For conceptual information about multipart uploads, see
-// Uploading Objects Using Multipart Upload
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) in the
-// Amazon S3 User Guide.
+// Encryption
+// - General purpose buckets - For information about using server-side
+// encryption with customer-provided encryption keys with the UploadPartCopy
+// operation, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
+// and UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// .
+// - Directory buckets - For directory buckets, only server-side encryption with
+// Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
//
-// * For information about permissions required to use the
-// multipart upload API, see Multipart Upload and Permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the
-// Amazon S3 User Guide.
+// Special errors
+// - Error Code: NoSuchUpload
+// - Description: The specified multipart upload does not exist. The upload ID
+// might be invalid, or the multipart upload might have been aborted or completed.
+// - HTTP Status Code: 404 Not Found
+// - Error Code: InvalidRequest
+// - Description: The specified copy source is not supported as a byte-range
+// copy source.
+// - HTTP Status Code: 400 Bad Request
//
-// * For information about copying objects using a single
-// atomic action vs. a multipart upload, see Operations on Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html) in the
-// Amazon S3 User Guide.
-//
-// * For information about using server-side encryption with
-// customer-provided encryption keys with the UploadPartCopy operation, see
-// CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-// and UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html).
-//
-// Note the
-// following additional considerations about the request headers
-// x-amz-copy-source-if-match, x-amz-copy-source-if-none-match,
-// x-amz-copy-source-if-unmodified-since, and
-// x-amz-copy-source-if-modified-since:
-//
-// * Consideration 1 - If both of the
-// x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since headers are
-// present in the request as follows: x-amz-copy-source-if-match condition
-// evaluates to true, and; x-amz-copy-source-if-unmodified-since condition
-// evaluates to false; Amazon S3 returns 200 OK and copies the data.
-//
-// *
-// Consideration 2 - If both of the x-amz-copy-source-if-none-match and
-// x-amz-copy-source-if-modified-since headers are present in the request as
-// follows: x-amz-copy-source-if-none-match condition evaluates to false, and;
-// x-amz-copy-source-if-modified-since condition evaluates to true; Amazon S3
-// returns 412 Precondition Failed response code.
-//
-// Versioning If your bucket has
-// versioning enabled, you could have multiple versions of the same object. By
-// default, x-amz-copy-source identifies the current version of the object to copy.
-// If the current version is a delete marker and you don't specify a versionId in
-// the x-amz-copy-source, Amazon S3 returns a 404 error, because the object does
-// not exist. If you specify versionId in the x-amz-copy-source and the versionId
-// is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not
-// allowed to specify a delete marker as a version for the x-amz-copy-source. You
-// can optionally specify a specific version of the source object to copy by adding
-// the versionId subresource as shown in the following example: x-amz-copy-source:
-// /bucket/object?versionId=version id Special Errors
-//
-// * Code: NoSuchUpload
-//
-// *
-// Cause: The specified multipart upload does not exist. The upload ID might be
-// invalid, or the multipart upload might have been aborted or completed.
-//
-// * HTTP
-// Status Code: 404 Not Found
-//
-// * Code: InvalidRequest
-//
-// * Cause: The specified copy
-// source is not supported as a byte-range copy source.
-//
-// * HTTP Status Code: 400
-// Bad Request
-//
-// Related Resources
-//
-// * CreateMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// *
-// UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// *
-// CompleteMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// *
-// AbortMultipartUpload
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// *
-// ListParts
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// *
-// ListMultipartUploads
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
+// related to UploadPartCopy :
+// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
func (c *Client) UploadPartCopy(ctx context.Context, params *UploadPartCopyInput, optFns ...func(*Options)) (*UploadPartCopyOutput, error) {
if params == nil {
params = &UploadPartCopyInput{}
@@ -137,59 +119,72 @@ func (c *Client) UploadPartCopy(ctx context.Context, params *UploadPartCopyInput
type UploadPartCopyInput struct {
- // The bucket name. When using this action with an access point, you must direct
- // requests to the access point hostname. The access point hostname takes the form
- // AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
- // action with an access point through the Amazon Web Services SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
- // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
- // hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
- // this action with S3 on Outposts through the Amazon Web Services SDKs, you
- // provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
- // Amazon S3 User Guide.
+ // The bucket name. Directory buckets - When you use this operation with a
+ // directory bucket, you must use virtual-hosted-style requests in the format
+ // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
+ // supported. Directory bucket names must be unique in the chosen Availability
+ // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
+ // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
+ // naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html)
+ // in the Amazon S3 User Guide. Access points - When you use this action with an
+ // access point, you must provide the alias of the access point in place of the
+ // bucket name or specify the access point ARN. When using the access point ARN,
+ // you must direct requests to the access point hostname. The access point hostname
+ // takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this action with an access point through the Amazon Web Services
+ // SDKs, you provide the access point ARN in place of the bucket name. For more
+ // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. Access points and Object Lambda access points are
+ // not supported by directory buckets. S3 on Outposts - When you use this action
+ // with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
+ // hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
+ // use this action with S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts access point ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Bucket *string
- // Specifies the source object for the copy operation. You specify the value in one
- // of two formats, depending on whether you want to access the source object
- // through an access point
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
- //
- // *
- // For objects not accessed through an access point, specify the name of the source
- // bucket and key of the source object, separated by a slash (/). For example, to
- // copy the object reports/january.pdf from the bucket awsexamplebucket, use
- // awsexamplebucket/reports/january.pdf. The value must be URL-encoded.
- //
- // * For
- // objects accessed through access points, specify the Amazon Resource Name (ARN)
- // of the object as accessed through the access point, in the format
- // arn:aws:s3:::accesspoint//object/. For example, to copy the object
- // reports/january.pdf through access point my-access-point owned by account
- // 123456789012 in Region us-west-2, use the URL encoding of
- // arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
- // The value must be URL encoded. Amazon S3 supports copy operations using access
- // points only when the source and destination buckets are in the same Amazon Web
- // Services Region. Alternatively, for objects accessed through Amazon S3 on
- // Outposts, specify the ARN of the object as accessed in the format
- // arn:aws:s3-outposts:::outpost//object/. For example, to copy the object
- // reports/january.pdf through outpost my-outpost owned by account 123456789012 in
- // Region us-west-2, use the URL encoding of
- // arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
- // The value must be URL-encoded.
- //
- // To copy a specific version of an object, append
- // ?versionId= to the value (for example,
- // awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
- // If you don't specify a version ID, Amazon S3 copies the latest version of the
- // source object.
+ // Specifies the source object for the copy operation. You specify the value in
+ // one of two formats, depending on whether you want to access the source object
+ // through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html)
+ // :
+ // - For objects not accessed through an access point, specify the name of the
+ // source bucket and key of the source object, separated by a slash (/). For
+ // example, to copy the object reports/january.pdf from the bucket
+ // awsexamplebucket , use awsexamplebucket/reports/january.pdf . The value must
+ // be URL-encoded.
+ // - For objects accessed through access points, specify the Amazon Resource
+ // Name (ARN) of the object as accessed through the access point, in the format
+ // arn:aws:s3:::accesspoint//object/ . For example, to copy the object
+ // reports/january.pdf through access point my-access-point owned by account
+ // 123456789012 in Region us-west-2 , use the URL encoding of
+ // arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf
+ // . The value must be URL encoded.
+ // - Amazon S3 supports copy operations using Access points only when the source
+ // and destination buckets are in the same Amazon Web Services Region.
+ // - Access points are not supported by directory buckets. Alternatively, for
+ // objects accessed through Amazon S3 on Outposts, specify the ARN of the object as
+ // accessed in the format arn:aws:s3-outposts:::outpost//object/ . For example,
+ // to copy the object reports/january.pdf through outpost my-outpost owned by
+ // account 123456789012 in Region us-west-2 , use the URL encoding of
+ // arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf
+ // . The value must be URL-encoded.
+ // If your bucket has versioning enabled, you could have multiple versions of the
+ // same object. By default, x-amz-copy-source identifies the current version of
+ // the source object to copy. To copy a specific version of the source object to
+ // copy, append ?versionId= to the x-amz-copy-source request header (for example,
+ // x-amz-copy-source:
+ // /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893
+ // ). If the current version is a delete marker and you don't specify a versionId
+ // in the x-amz-copy-source request header, Amazon S3 returns a 404 Not Found
+ // error, because the object does not exist. If you specify versionId in the
+ // x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an
+ // HTTP 400 Bad Request error, because you are not allowed to specify a delete
+ // marker as a version for the x-amz-copy-source . Directory buckets - S3
+ // Versioning isn't enabled and supported for directory buckets.
//
// This member is required.
CopySource *string
@@ -203,23 +198,41 @@ type UploadPartCopyInput struct {
// 10,000.
//
// This member is required.
- PartNumber int32
+ PartNumber *int32
// Upload ID identifying the multipart upload whose part is being copied.
//
// This member is required.
UploadId *string
- // Copies the object if its entity tag (ETag) matches the specified tag.
+ // Copies the object if its entity tag (ETag) matches the specified tag. If both
+ // of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
+ // headers are present in the request as follows: x-amz-copy-source-if-match
+ // condition evaluates to true , and; x-amz-copy-source-if-unmodified-since
+ // condition evaluates to false ; Amazon S3 returns 200 OK and copies the data.
CopySourceIfMatch *string
- // Copies the object if it has been modified since the specified time.
+ // Copies the object if it has been modified since the specified time. If both of
+ // the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since
+ // headers are present in the request as follows: x-amz-copy-source-if-none-match
+ // condition evaluates to false , and; x-amz-copy-source-if-modified-since
+ // condition evaluates to true ; Amazon S3 returns 412 Precondition Failed
+ // response code.
CopySourceIfModifiedSince *time.Time
- // Copies the object if its entity tag (ETag) is different than the specified ETag.
+ // Copies the object if its entity tag (ETag) is different than the specified
+ // ETag. If both of the x-amz-copy-source-if-none-match and
+ // x-amz-copy-source-if-modified-since headers are present in the request as
+ // follows: x-amz-copy-source-if-none-match condition evaluates to false , and;
+ // x-amz-copy-source-if-modified-since condition evaluates to true ; Amazon S3
+ // returns 412 Precondition Failed response code.
CopySourceIfNoneMatch *string
- // Copies the object if it hasn't been modified since the specified time.
+ // Copies the object if it hasn't been modified since the specified time. If both
+ // of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
+ // headers are present in the request as follows: x-amz-copy-source-if-match
+ // condition evaluates to true , and; x-amz-copy-source-if-unmodified-since
+ // condition evaluates to false ; Amazon S3 returns 200 OK and copies the data.
CopySourceIfUnmodifiedSince *time.Time
// The range of bytes to copy from the source object. The range value must use the
@@ -230,39 +243,45 @@ type UploadPartCopyInput struct {
CopySourceRange *string
// Specifies the algorithm to use when decrypting the source object (for example,
- // AES256).
+ // AES256 ). This functionality is not supported when the source object is in a
+ // directory bucket.
CopySourceSSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
// the source object. The encryption key provided in this header must be one that
- // was used when the source object was created.
+ // was used when the source object was created. This functionality is not supported
+ // when the source object is in a directory bucket.
CopySourceSSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. This functionality is not
+ // supported when the source object is in a directory bucket.
CopySourceSSECustomerKeyMD5 *string
- // The account ID of the expected destination bucket owner. If the destination
- // bucket is owned by a different account, the request fails with the HTTP status
- // code 403 Forbidden (access denied).
+ // The account ID of the expected destination bucket owner. If the account ID that
+ // you provide does not match the actual owner of the destination bucket, the
+ // request fails with the HTTP status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
- // The account ID of the expected source bucket owner. If the source bucket is
- // owned by a different account, the request fails with the HTTP status code 403
- // Forbidden (access denied).
+ // The account ID of the expected source bucket owner. If the account ID that you
+ // provide does not match the actual owner of the source bucket, the request fails
+ // with the HTTP status code 403 Forbidden (access denied).
ExpectedSourceBucketOwner *string
// Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from Requester Pays buckets, see Downloading Objects
- // in Requester Pays Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
+ // Bucket owners need not specify this parameter in their requests. If either the
+ // source or destination S3 bucket has Requester Pays enabled, the requester will
+ // pay for corresponding charges to copy the object. For information about
+ // downloading objects from Requester Pays buckets, see Downloading Objects in
+ // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets.
RequestPayer types.RequestPayer
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
+ // Specifies the algorithm to use when encrypting the object (for example,
+ // AES256). This functionality is not supported when the destination bucket is a
+ // directory bucket.
SSECustomerAlgorithm *string
// Specifies the customer-provided encryption key for Amazon S3 to use in
@@ -270,50 +289,64 @@ type UploadPartCopyInput struct {
// discarded; Amazon S3 does not store the encryption key. The key must be
// appropriate for use with the algorithm specified in the
// x-amz-server-side-encryption-customer-algorithm header. This must be the same
- // encryption key specified in the initiate multipart upload request.
+ // encryption key specified in the initiate multipart upload request. This
+ // functionality is not supported when the destination bucket is a directory
+ // bucket.
SSECustomerKey *string
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
// Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
+ // encryption key was transmitted without error. This functionality is not
+ // supported when the destination bucket is a directory bucket.
SSECustomerKeyMD5 *string
noSmithyDocumentSerde
}
+func (in *UploadPartCopyInput) bindEndpointParams(p *EndpointParameters) {
+ p.Bucket = in.Bucket
+ p.DisableS3ExpressSessionAuth = ptr.Bool(true)
+}
+
type UploadPartCopyOutput struct {
// Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ // encryption with Key Management Service (KMS) keys (SSE-KMS). This functionality
+ // is not supported for directory buckets.
+ BucketKeyEnabled *bool
// Container for all response elements.
CopyPartResult *types.CopyPartResult
- // The version of the source object that was copied, if you have enabled versioning
- // on the source bucket.
+ // The version of the source object that was copied, if you have enabled
+ // versioning on the source bucket. This functionality is not supported when the
+ // source object is in a directory bucket.
CopySourceVersionId *string
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm used.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to confirm the encryption
+ // algorithm that's used. This functionality is not supported for directory
+ // buckets.
SSECustomerAlgorithm *string
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
+ // If server-side encryption with a customer-provided encryption key was
+ // requested, the response will include this header to provide the round-trip
+ // message integrity verification of the customer-provided encryption key. This
+ // functionality is not supported for directory buckets.
SSECustomerKeyMD5 *string
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for the
- // object.
+ // If present, indicates the ID of the Key Management Service (KMS) symmetric
+ // encryption customer managed key that was used for the object. This functionality
+ // is not supported for directory buckets.
SSEKMSKeyId *string
- // The server-side encryption algorithm used when storing this object in Amazon S3
- // (for example, AES256, aws:kms).
+ // The server-side encryption algorithm used when you store this object in Amazon
+ // S3 (for example, AES256 , aws:kms ). For directory buckets, only server-side
+ // encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
ServerSideEncryption types.ServerSideEncryption
// Metadata pertaining to the operation's result.
@@ -323,6 +356,9 @@ type UploadPartCopyOutput struct {
}
func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpUploadPartCopy{}, middleware.After)
if err != nil {
return err
@@ -331,34 +367,38 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack,
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UploadPartCopy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -367,7 +407,10 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack,
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addOpUploadPartCopyValidationMiddleware(stack); err != nil {
@@ -379,6 +422,9 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack,
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addUploadPartCopyUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -397,14 +443,26 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack,
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
+func (v *UploadPartCopyInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
func newServiceMetadataMiddleware_opUploadPartCopy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "UploadPartCopy",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
index 78eeadd4..e181ab71 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
@@ -11,28 +11,28 @@ import (
"github.com/aws/aws-sdk-go-v2/service/s3/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
"io"
"strings"
"time"
)
-// Passes transformed objects to a GetObject operation when using Object Lambda
-// access points. For information about Object Lambda access points, see
-// Transforming objects with Object Lambda access points
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html)
+// This operation is not supported by directory buckets. Passes transformed
+// objects to a GetObject operation when using Object Lambda access points. For
+// information about Object Lambda access points, see Transforming objects with
+// Object Lambda access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html)
// in the Amazon S3 User Guide. This operation supports metadata that can be
-// returned by GetObject
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html), in
-// addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage.
-// The GetObject response metadata is supported so that the WriteGetObjectResponse
-// caller, typically an Lambda function, can provide the same metadata when it
-// internally invokes GetObject. When WriteGetObjectResponse is called by a
-// customer-owned Lambda function, the metadata returned to the end user GetObject
-// call might differ from what Amazon S3 would normally return. You can include any
-// number of metadata headers. When including a metadata header, it should be
-// prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header:
-// MyCustomValue. The primary use case for this is to forward GetObject metadata.
+// returned by GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+// , in addition to RequestRoute , RequestToken , StatusCode , ErrorCode , and
+// ErrorMessage . The GetObject response metadata is supported so that the
+// WriteGetObjectResponse caller, typically an Lambda function, can provide the
+// same metadata when it internally invokes GetObject . When WriteGetObjectResponse
+// is called by a customer-owned Lambda function, the metadata returned to the end
+// user GetObject call might differ from what Amazon S3 would normally return. You
+// can include any number of metadata headers. When including a metadata header, it
+// should be prefaced with x-amz-meta . For example, x-amz-meta-my-custom-header:
+// MyCustomValue . The primary use case for this is to forward GetObject metadata.
// Amazon Web Services provides some prebuilt Lambda functions that you can use
// with S3 Object Lambda to detect and redact personally identifiable information
// (PII) and decompress S3 objects. These Lambda functions are available in the
@@ -52,9 +52,8 @@ import (
// equipped to decompress objects stored in S3 in one of six compressed file
// formats including bzip2, gzip, snappy, zlib, zstandard and ZIP. For information
// on how to view and use these functions, see Using Amazon Web Services built
-// Lambda functions
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html) in
-// the Amazon S3 User Guide.
+// Lambda functions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html)
+// in the Amazon S3 User Guide.
func (c *Client) WriteGetObjectResponse(ctx context.Context, params *WriteGetObjectResponseInput, optFns ...func(*Options)) (*WriteGetObjectResponseOutput, error) {
if params == nil {
params = &WriteGetObjectResponseInput{}
@@ -91,7 +90,7 @@ type WriteGetObjectResponseInput struct {
// Indicates whether the object stored in Amazon S3 uses an S3 bucket key for
// server-side encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled bool
+ BucketKeyEnabled *bool
// Specifies caching behavior along the request/reply chain.
CacheControl *string
@@ -102,8 +101,7 @@ type WriteGetObjectResponseInput struct {
// Lambda function. This may not match the checksum for the object stored in Amazon
// S3. Amazon S3 will perform validation of the checksum values only when the
// original GetObject request required checksum validation. For more information
- // about checksums, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // about checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. Only one checksum header can be specified at a
// time. If you supply multiple checksum headers, this request will fail.
ChecksumCRC32 *string
@@ -114,8 +112,7 @@ type WriteGetObjectResponseInput struct {
// Lambda function. This may not match the checksum for the object stored in Amazon
// S3. Amazon S3 will perform validation of the checksum values only when the
// original GetObject request required checksum validation. For more information
- // about checksums, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // about checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. Only one checksum header can be specified at a
// time. If you supply multiple checksum headers, this request will fail.
ChecksumCRC32C *string
@@ -126,8 +123,7 @@ type WriteGetObjectResponseInput struct {
// function. This may not match the checksum for the object stored in Amazon S3.
// Amazon S3 will perform validation of the checksum values only when the original
// GetObject request required checksum validation. For more information about
- // checksums, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. Only one checksum header can be specified at a
// time. If you supply multiple checksum headers, this request will fail.
ChecksumSHA1 *string
@@ -138,8 +134,7 @@ type WriteGetObjectResponseInput struct {
// Lambda function. This may not match the checksum for the object stored in Amazon
// S3. Amazon S3 will perform validation of the checksum values only when the
// original GetObject request required checksum validation. For more information
- // about checksums, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // about checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide. Only one checksum header can be specified at a
// time. If you supply multiple checksum headers, this request will fail.
ChecksumSHA256 *string
@@ -156,7 +151,7 @@ type WriteGetObjectResponseInput struct {
ContentLanguage *string
// The size of the content body in bytes.
- ContentLength int64
+ ContentLength *int64
// The portion of the object returned in the response.
ContentRange *string
@@ -164,24 +159,25 @@ type WriteGetObjectResponseInput struct {
// A standard MIME type describing the format of the object data.
ContentType *string
- // Specifies whether an object stored in Amazon S3 is (true) or is not (false) a
- // delete marker.
- DeleteMarker bool
+ // Specifies whether an object stored in Amazon S3 is ( true ) or is not ( false )
+ // a delete marker.
+ DeleteMarker *bool
// An opaque identifier assigned by a web server to a specific version of a
// resource found at a URL.
ETag *string
// A string that uniquely identifies an error condition. Returned in the tag of
- // the error XML response for a corresponding GetObject call. Cannot be used with a
- // successful StatusCode header or when the transformed object is provided in the
- // body. All error codes from S3 are sentence-cased. The regular expression (regex)
- // value is "^[A-Z][a-zA-Z]+$".
+ // the error XML response for a corresponding GetObject call. Cannot be used with
+ // a successful StatusCode header or when the transformed object is provided in
+ // the body. All error codes from S3 are sentence-cased. The regular expression
+ // (regex) value is "^[A-Z][a-zA-Z]+$" .
ErrorCode *string
// Contains a generic description of the error condition. Returned in the tag of
- // the error XML response for a corresponding GetObject call. Cannot be used with a
- // successful StatusCode header or when the transformed object is provided in body.
+ // the error XML response for a corresponding GetObject call. Cannot be used with
+ // a successful StatusCode header or when the transformed object is provided in
+ // body.
ErrorMessage *string
// If the object expiration is configured (see PUT Bucket lifecycle), the response
@@ -203,29 +199,29 @@ type WriteGetObjectResponseInput struct {
// can happen if you create metadata using an API like SOAP that supports more
// flexible metadata than the REST API. For example, using SOAP, you can create
// metadata whose values are not legal HTTP headers.
- MissingMeta int32
+ MissingMeta *int32
// Indicates whether an object stored in Amazon S3 has an active legal hold.
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
// Indicates whether an object stored in Amazon S3 has Object Lock enabled. For
- // more information about S3 Object Lock, see Object Lock
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html).
+ // more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html)
+ // .
ObjectLockMode types.ObjectLockMode
// The date and time when Object Lock is configured to expire.
ObjectLockRetainUntilDate *time.Time
// The count of parts this object has.
- PartsCount int32
+ PartsCount *int32
- // Indicates if request involves bucket that is either a source or destination in a
- // Replication rule. For more information about S3 Replication, see Replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html).
+ // Indicates if request involves bucket that is either a source or destination in
+ // a Replication rule. For more information about S3 Replication, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html)
+ // .
ReplicationStatus types.ReplicationStatus
// If present, indicates that the requester was successfully charged for the
- // request.
+ // request. This functionality is not supported for directory buckets.
RequestCharged types.RequestCharged
// Provides information about object restoration operation and expiration time of
@@ -238,63 +234,45 @@ type WriteGetObjectResponseInput struct {
// 128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to
// encrypt data stored in S3. For more information, see Protecting data using
- // server-side encryption with customer-provided encryption keys (SSE-C)
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html).
+ // server-side encryption with customer-provided encryption keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html)
+ // .
SSECustomerKeyMD5 *string
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // stored in Amazon S3 object.
+ // If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web
+ // Services Key Management Service (Amazon Web Services KMS) symmetric encryption
+ // customer managed key that was used for stored in Amazon S3 object.
SSEKMSKeyId *string
// The server-side encryption algorithm used when storing requested object in
- // Amazon S3 (for example, AES256, aws:kms).
+ // Amazon S3 (for example, AES256, aws:kms ).
ServerSideEncryption types.ServerSideEncryption
// The integer status code for an HTTP response of a corresponding GetObject
- // request. Status Codes
- //
- // * 200 - OK
- //
- // * 206 - Partial Content
- //
- // * 304 - Not
- // Modified
- //
- // * 400 - Bad Request
- //
- // * 401 - Unauthorized
- //
- // * 403 - Forbidden
- //
- // * 404 -
- // Not Found
- //
- // * 405 - Method Not Allowed
- //
- // * 409 - Conflict
- //
- // * 411 - Length
- // Required
- //
- // * 412 - Precondition Failed
- //
- // * 416 - Range Not Satisfiable
- //
- // * 500 -
- // Internal Server Error
- //
- // * 503 - Service Unavailable
- StatusCode int32
+ // request. The following is a list of status codes.
+ // - 200 - OK
+ // - 206 - Partial Content
+ // - 304 - Not Modified
+ // - 400 - Bad Request
+ // - 401 - Unauthorized
+ // - 403 - Forbidden
+ // - 404 - Not Found
+ // - 405 - Method Not Allowed
+ // - 409 - Conflict
+ // - 411 - Length Required
+ // - 412 - Precondition Failed
+ // - 416 - Range Not Satisfiable
+ // - 500 - Internal Server Error
+ // - 503 - Service Unavailable
+ StatusCode *int32
// Provides storage class information of the object. Amazon S3 returns this header
// for all objects except for S3 Standard storage class objects. For more
- // information, see Storage Classes
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
+ // information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+ // .
StorageClass types.StorageClass
// The number of tags, if any, on the object.
- TagCount int32
+ TagCount *int32
// An ID used to reference a specific version of the object.
VersionId *string
@@ -302,6 +280,11 @@ type WriteGetObjectResponseInput struct {
noSmithyDocumentSerde
}
+func (in *WriteGetObjectResponseInput) bindEndpointParams(p *EndpointParameters) {
+
+ p.UseObjectLambdaEndpoint = ptr.Bool(true)
+}
+
type WriteGetObjectResponseOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
@@ -310,6 +293,9 @@ type WriteGetObjectResponseOutput struct {
}
func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestxml_serializeOpWriteGetObjectResponse{}, middleware.After)
if err != nil {
return err
@@ -318,37 +304,41 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "WriteGetObjectResponse"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddUnsignedPayloadMiddleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ if err = addUnsignedPayload(stack); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addContentSHA256Header(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -357,7 +347,10 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
- if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
return err
}
if err = addEndpointPrefix_opWriteGetObjectResponseMiddleware(stack); err != nil {
@@ -372,6 +365,9 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware
if err = addMetadataRetrieverMiddleware(stack); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addWriteGetObjectResponseUpdateEndpoint(stack, options); err != nil {
return err
}
@@ -387,6 +383,12 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -397,11 +399,11 @@ func (*endpointPrefix_opWriteGetObjectResponseMiddleware) ID() string {
return "EndpointHostPrefix"
}
-func (m *endpointPrefix_opWriteGetObjectResponseMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+func (m *endpointPrefix_opWriteGetObjectResponseMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) {
- return next.HandleSerialize(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
req, ok := in.Request.(*smithyhttp.Request)
@@ -409,9 +411,10 @@ func (m *endpointPrefix_opWriteGetObjectResponseMiddleware) HandleSerialize(ctx
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
}
- input, ok := in.Parameters.(*WriteGetObjectResponseInput)
+ opaqueInput := getOperationInput(ctx)
+ input, ok := opaqueInput.(*WriteGetObjectResponseInput)
if !ok {
- return out, metadata, fmt.Errorf("unknown input type %T", in.Parameters)
+ return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput)
}
var prefix strings.Builder
@@ -425,17 +428,16 @@ func (m *endpointPrefix_opWriteGetObjectResponseMiddleware) HandleSerialize(ctx
prefix.WriteString(".")
req.URL.Host = prefix.String() + req.URL.Host
- return next.HandleSerialize(ctx, in)
+ return next.HandleFinalize(ctx, in)
}
func addEndpointPrefix_opWriteGetObjectResponseMiddleware(stack *middleware.Stack) error {
- return stack.Serialize.Insert(&endpointPrefix_opWriteGetObjectResponseMiddleware{}, `OperationSerializer`, middleware.After)
+ return stack.Finalize.Insert(&endpointPrefix_opWriteGetObjectResponseMiddleware{}, "ResolveEndpointV2", middleware.After)
}
func newServiceMetadataMiddleware_opWriteGetObjectResponse(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "s3",
OperationName: "WriteGetObjectResponse",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go
new file mode 100644
index 00000000..6ef631bd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go
@@ -0,0 +1,318 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) {
+ params.Region = options.Region
+}
+
+func bindAuthEndpointParams(params *AuthResolverParameters, input interface{}, options Options) {
+ params.endpointParams = bindEndpointParams(input, options)
+}
+
+type setLegacyContextSigningOptionsMiddleware struct {
+}
+
+func (*setLegacyContextSigningOptionsMiddleware) ID() string {
+ return "setLegacyContextSigningOptions"
+}
+
+func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
+ }
+ }
+
+ if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
+}
+
+type withAnonymous struct {
+ resolver AuthSchemeResolver
+}
+
+var _ AuthSchemeResolver = (*withAnonymous)(nil)
+
+func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ opts = append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ })
+ return opts, nil
+}
+
+func wrapWithAnonymousAuth(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &withAnonymous{
+ resolver: options.AuthSchemeResolver,
+ }
+}
+
+// AuthResolverParameters contains the set of inputs necessary for auth scheme
+// resolution.
+type AuthResolverParameters struct {
+ // The name of the operation being invoked.
+ Operation string
+
+ // The endpoint resolver parameters for this operation. This service's default
+ // resolver delegates to endpoint rules.
+ endpointParams *EndpointParameters
+
+ // The region in which the operation is being invoked.
+ Region string
+}
+
+func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters {
+ params := &AuthResolverParameters{
+ Operation: operation,
+ }
+
+ bindAuthEndpointParams(params, input, options)
+ bindAuthParamsRegion(params, input, options)
+
+ return params
+}
+
+// AuthSchemeResolver returns a set of possible authentication options for an
+// operation.
+type AuthSchemeResolver interface {
+ ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
+}
+
+type defaultAuthSchemeResolver struct{}
+
+var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
+
+func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ if overrides, ok := operationAuthOptions[params.Operation]; ok {
+ return overrides(params), nil
+ }
+ return serviceAuthOptions(params), nil
+}
+
+var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{
+ "WriteGetObjectResponse": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "s3")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ smithyhttp.SetIsUnsignedPayload(&props, true)
+ return props
+ }(),
+ },
+ }
+ },
+}
+
+func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "s3")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ return props
+ }(),
+ },
+
+ {
+ SchemeID: smithyauth.SchemeIDSigV4A,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4ASigningName(&props, "s3")
+ smithyhttp.SetSigV4ASigningRegions(&props, []string{params.Region})
+ return props
+ }(),
+ },
+ }
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options)
+ options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
+ }
+
+ scheme, ok := m.selectScheme(options)
+ if !ok {
+ return out, metadata, fmt.Errorf("could not select an auth scheme")
+ }
+
+ ctx = setResolvedAuthScheme(ctx, scheme)
+ return next.HandleFinalize(ctx, in)
+}
+
+func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
+ for _, option := range options {
+ if option.SchemeID == smithyauth.SchemeIDAnonymous {
+ return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
+ }
+
+ for _, scheme := range m.options.AuthSchemes {
+ if scheme.SchemeID() != option.SchemeID {
+ continue
+ }
+
+ if scheme.IdentityResolver(m.options) != nil {
+ return newResolvedAuthScheme(scheme, option), true
+ }
+ }
+ }
+
+ return nil, false
+}
+
+type resolvedAuthSchemeKey struct{}
+
+type resolvedAuthScheme struct {
+ Scheme smithyhttp.AuthScheme
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
+ return &resolvedAuthScheme{
+ Scheme: scheme,
+ IdentityProperties: option.IdentityProperties,
+ SignerProperties: option.SignerProperties,
+ }
+}
+
+func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
+ return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
+}
+
+func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
+ v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
+ return v
+}
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ resolver := rscheme.Scheme.IdentityResolver(m.options)
+ if resolver == nil {
+ return out, metadata, fmt.Errorf("no identity resolver")
+ }
+
+ identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties)
+ if err != nil {
+ return out, metadata, fmt.Errorf("get identity: %w", err)
+ }
+
+ ctx = setIdentity(ctx, identity)
+ return next.HandleFinalize(ctx, in)
+}
+
+type identityKey struct{}
+
+func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
+ return middleware.WithStackValue(ctx, identityKey{}, identity)
+}
+
+func getIdentity(ctx context.Context) smithyauth.Identity {
+ v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
+ return v
+}
+
+type signRequestMiddleware struct {
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ identity := getIdentity(ctx)
+ if identity == nil {
+ return out, metadata, fmt.Errorf("no identity")
+ }
+
+ signer := rscheme.Scheme.Signer()
+ if signer == nil {
+ return out, metadata, fmt.Errorf("no signer")
+ }
+
+ if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil {
+ return out, metadata, fmt.Errorf("sign request: %w", err)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucket_context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucket_context.go
new file mode 100644
index 00000000..860af056
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucket_context.go
@@ -0,0 +1,47 @@
+package s3
+
+import (
+ "context"
+
+ "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// putBucketContextMiddleware stores the input bucket name within the request context (if
+// present) which is required for a variety of custom S3 behaviors
+type putBucketContextMiddleware struct{}
+
+func (*putBucketContextMiddleware) ID() string {
+ return "putBucketContext"
+}
+
+func (m *putBucketContextMiddleware) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if bucket, ok := m.bucketFromInput(in.Parameters); ok {
+ ctx = customizations.SetBucket(ctx, bucket)
+ }
+ return next.HandleSerialize(ctx, in)
+}
+
+func (m *putBucketContextMiddleware) bucketFromInput(params interface{}) (string, bool) {
+ v, ok := params.(bucketer)
+ if !ok {
+ return "", false
+ }
+
+ return v.bucket()
+}
+
+func addPutBucketContextMiddleware(stack *middleware.Stack) error {
+ // This is essentially a post-Initialize task - only run it once the input
+ // has received all modifications from that phase. Therefore we add it as
+ // an early Serialize step.
+ //
+ // FUTURE: it would be nice to have explicit phases that only we as SDK
+ // authors can hook into (such as between phases like this really should
+ // be)
+ return stack.Serialize.Add(&putBucketContextMiddleware{}, middleware.Before)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go
new file mode 100644
index 00000000..4e7f7e24
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go
@@ -0,0 +1,15 @@
+package s3
+
+// implemented by all S3 input structures
+type bucketer interface {
+ bucket() (string, bool)
+}
+
+func bucketFromInput(params interface{}) (string, bool) {
+ v, ok := params.(bucketer)
+ if !ok {
+ return "", false
+ }
+
+ return v.bucket()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/create_mpu_checksum.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/create_mpu_checksum.go
new file mode 100644
index 00000000..5803b9e4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/create_mpu_checksum.go
@@ -0,0 +1,36 @@
+package s3
+
+import (
+ "context"
+ "fmt"
+
+ internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// backfills checksum algorithm onto the context for CreateMultipart upload so
+// transfer manager can set a checksum header on the request accordingly for
+// s3express requests
+type setCreateMPUChecksumAlgorithm struct{}
+
+func (*setCreateMPUChecksumAlgorithm) ID() string {
+ return "setCreateMPUChecksumAlgorithm"
+}
+
+func (*setCreateMPUChecksumAlgorithm) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateMultipartUploadInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected input type %T", in.Parameters)
+ }
+
+ ctx = internalcontext.SetChecksumInputAlgorithm(ctx, string(input.ChecksumAlgorithm))
+ return next.HandleSerialize(ctx, in)
+}
+
+func addSetCreateMPUChecksumAlgorithm(s *middleware.Stack) error {
+ return s.Serialize.Add(&setCreateMPUChecksumAlgorithm{}, middleware.Before)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
index 995d909c..2be5df30 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
@@ -230,7 +230,7 @@ func awsRestxml_deserializeOpHttpBindingsCompleteMultipartUploadOutput(v *Comple
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("x-amz-expiration"); len(headerValues) != 0 {
@@ -516,7 +516,7 @@ func awsRestxml_deserializeOpHttpBindingsCopyObjectOutput(v *CopyObjectOutput, r
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("x-amz-copy-source-version-id"); len(headerValues) != 0 {
@@ -828,7 +828,7 @@ func awsRestxml_deserializeOpHttpBindingsCreateMultipartUploadOutput(v *CreateMu
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("x-amz-checksum-algorithm"); len(headerValues) != 0 {
@@ -943,6 +943,148 @@ func awsRestxml_deserializeOpDocumentCreateMultipartUploadOutput(v **CreateMulti
return nil
}
+type awsRestxml_deserializeOpCreateSession struct {
+}
+
+func (*awsRestxml_deserializeOpCreateSession) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpCreateSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorCreateSession(response, &metadata)
+ }
+ output := &CreateSessionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentCreateSessionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorCreateSession(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("NoSuchBucket", errorCode):
+ return awsRestxml_deserializeErrorNoSuchBucket(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentCreateSessionOutput(v **CreateSessionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateSessionOutput
+ if *v == nil {
+ sv = &CreateSessionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Credentials", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentSessionCredentials(&sv.Credentials, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
type awsRestxml_deserializeOpDeleteBucket struct {
}
@@ -2003,7 +2145,7 @@ func awsRestxml_deserializeOpHttpBindingsDeleteObjectOutput(v *DeleteObjectOutpu
if err != nil {
return err
}
- v.DeleteMarker = vv
+ v.DeleteMarker = ptr.Bool(vv)
}
if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
@@ -2369,6 +2511,11 @@ func (m *awsRestxml_deserializeOpGetBucketAccelerateConfiguration) HandleDeseria
output := &GetBucketAccelerateConfigurationOutput{}
out.Result = output
+ err = awsRestxml_deserializeOpHttpBindingsGetBucketAccelerateConfigurationOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
@@ -2440,6 +2587,18 @@ func awsRestxml_deserializeOpErrorGetBucketAccelerateConfiguration(response *smi
}
}
+func awsRestxml_deserializeOpHttpBindingsGetBucketAccelerateConfigurationOutput(v *GetBucketAccelerateConfigurationOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
func awsRestxml_deserializeOpDocumentGetBucketAccelerateConfigurationOutput(v **GetBucketAccelerateConfigurationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -5263,7 +5422,7 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 {
@@ -5312,7 +5471,7 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
if err != nil {
return err
}
- v.ContentLength = vv
+ v.ContentLength = ptr.Int64(vv)
}
if headerValues := response.Header.Values("Content-Range"); len(headerValues) != 0 {
@@ -5331,7 +5490,7 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
if err != nil {
return err
}
- v.DeleteMarker = vv
+ v.DeleteMarker = ptr.Bool(vv)
}
if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 {
@@ -5378,7 +5537,7 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
if err != nil {
return err
}
- v.MissingMeta = int32(vv)
+ v.MissingMeta = ptr.Int32(int32(vv))
}
if headerValues := response.Header.Values("x-amz-object-lock-legal-hold"); len(headerValues) != 0 {
@@ -5406,7 +5565,7 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
if err != nil {
return err
}
- v.PartsCount = int32(vv)
+ v.PartsCount = ptr.Int32(int32(vv))
}
if headerValues := response.Header.Values("x-amz-replication-status"); len(headerValues) != 0 {
@@ -5455,7 +5614,7 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
if err != nil {
return err
}
- v.TagCount = int32(vv)
+ v.TagCount = ptr.Int32(int32(vv))
}
if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
@@ -5759,7 +5918,7 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectAttributesOutput(v *GetObjectA
if err != nil {
return err
}
- v.DeleteMarker = vv
+ v.DeleteMarker = ptr.Bool(vv)
}
if headerValues := response.Header.Values("Last-Modified"); len(headerValues) != 0 {
@@ -5844,7 +6003,7 @@ func awsRestxml_deserializeOpDocumentGetObjectAttributesOutput(v **GetObjectAttr
if err != nil {
return err
}
- sv.ObjectSize = i64
+ sv.ObjectSize = ptr.Int64(i64)
}
case strings.EqualFold("StorageClass", t.Name.Local):
@@ -6711,10 +6870,9 @@ func (m *awsRestxml_deserializeOpHeadBucket) HandleDeserialize(ctx context.Conte
output := &HeadBucketOutput{}
out.Result = output
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
+ err = awsRestxml_deserializeOpHttpBindingsHeadBucketOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
}
return out, metadata, err
@@ -6763,6 +6921,38 @@ func awsRestxml_deserializeOpErrorHeadBucket(response *smithyhttp.Response, meta
}
}
+func awsRestxml_deserializeOpHttpBindingsHeadBucketOutput(v *HeadBucketOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-access-point-alias"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.AccessPointAlias = ptr.Bool(vv)
+ }
+
+ if headerValues := response.Header.Values("x-amz-bucket-location-name"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.BucketLocationName = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-bucket-location-type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.BucketLocationType = types.LocationType(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-bucket-region"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.BucketRegion = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
type awsRestxml_deserializeOpHeadObject struct {
}
@@ -6827,6 +7017,9 @@ func awsRestxml_deserializeOpErrorHeadObject(response *smithyhttp.Response, meta
}
errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("NotFound", errorCode):
+ return awsRestxml_deserializeErrorNotFound(response, errorBody)
+
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
@@ -6858,7 +7051,7 @@ func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, r
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 {
@@ -6907,7 +7100,7 @@ func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, r
if err != nil {
return err
}
- v.ContentLength = vv
+ v.ContentLength = ptr.Int64(vv)
}
if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 {
@@ -6921,7 +7114,7 @@ func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, r
if err != nil {
return err
}
- v.DeleteMarker = vv
+ v.DeleteMarker = ptr.Bool(vv)
}
if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 {
@@ -6968,7 +7161,7 @@ func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, r
if err != nil {
return err
}
- v.MissingMeta = int32(vv)
+ v.MissingMeta = ptr.Int32(int32(vv))
}
if headerValues := response.Header.Values("x-amz-object-lock-legal-hold"); len(headerValues) != 0 {
@@ -6996,7 +7189,7 @@ func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, r
if err != nil {
return err
}
- v.PartsCount = int32(vv)
+ v.PartsCount = ptr.Int32(int32(vv))
}
if headerValues := response.Header.Values("x-amz-replication-status"); len(headerValues) != 0 {
@@ -7203,7 +7396,7 @@ func awsRestxml_deserializeOpDocumentListBucketAnalyticsConfigurationsOutput(v *
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("NextContinuationToken", t.Name.Local):
@@ -7384,7 +7577,7 @@ func awsRestxml_deserializeOpDocumentListBucketIntelligentTieringConfigurationsO
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("NextContinuationToken", t.Name.Local):
@@ -7565,7 +7758,7 @@ func awsRestxml_deserializeOpDocumentListBucketInventoryConfigurationsOutput(v *
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("NextContinuationToken", t.Name.Local):
@@ -7740,7 +7933,7 @@ func awsRestxml_deserializeOpDocumentListBucketMetricsConfigurationsOutput(v **L
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("MetricsConfiguration", t.Name.Local):
@@ -7921,14 +8114,14 @@ func awsRestxml_deserializeOpDocumentListBucketsOutput(v **ListBucketsOutput, de
return nil
}
-type awsRestxml_deserializeOpListMultipartUploads struct {
+type awsRestxml_deserializeOpListDirectoryBuckets struct {
}
-func (*awsRestxml_deserializeOpListMultipartUploads) ID() string {
+func (*awsRestxml_deserializeOpListDirectoryBuckets) ID() string {
return "OperationDeserializer"
}
-func (m *awsRestxml_deserializeOpListMultipartUploads) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsRestxml_deserializeOpListDirectoryBuckets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -7942,9 +8135,9 @@ func (m *awsRestxml_deserializeOpListMultipartUploads) HandleDeserialize(ctx con
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestxml_deserializeOpErrorListMultipartUploads(response, &metadata)
+ return out, metadata, awsRestxml_deserializeOpErrorListDirectoryBuckets(response, &metadata)
}
- output := &ListMultipartUploadsOutput{}
+ output := &ListDirectoryBucketsOutput{}
out.Result = output
var buff [1024]byte
@@ -7965,7 +8158,7 @@ func (m *awsRestxml_deserializeOpListMultipartUploads) HandleDeserialize(ctx con
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- err = awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(&output, decoder)
+ err = awsRestxml_deserializeOpDocumentListDirectoryBucketsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -7978,7 +8171,7 @@ func (m *awsRestxml_deserializeOpListMultipartUploads) HandleDeserialize(ctx con
return out, metadata, err
}
-func awsRestxml_deserializeOpErrorListMultipartUploads(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsRestxml_deserializeOpErrorListDirectoryBuckets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -8018,13 +8211,13 @@ func awsRestxml_deserializeOpErrorListMultipartUploads(response *smithyhttp.Resp
}
}
-func awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(v **ListMultipartUploadsOutput, decoder smithyxml.NodeDecoder) error {
+func awsRestxml_deserializeOpDocumentListDirectoryBucketsOutput(v **ListDirectoryBucketsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *ListMultipartUploadsOutput
+ var sv *ListDirectoryBucketsOutput
if *v == nil {
- sv = &ListMultipartUploadsOutput{}
+ sv = &ListDirectoryBucketsOutput{}
} else {
sv = *v
}
@@ -8040,26 +8233,13 @@ func awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(v **ListMultipar
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
- case strings.EqualFold("Bucket", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Bucket = ptr.String(xtv)
- }
-
- case strings.EqualFold("CommonPrefixes", t.Name.Local):
+ case strings.EqualFold("Buckets", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentCommonPrefixListUnwrapped(&sv.CommonPrefixes, nodeDecoder); err != nil {
+ if err := awsRestxml_deserializeDocumentBuckets(&sv.Buckets, nodeDecoder); err != nil {
return err
}
- case strings.EqualFold("Delimiter", t.Name.Local):
+ case strings.EqualFold("ContinuationToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
@@ -8069,53 +8249,235 @@ func awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(v **ListMultipar
}
{
xtv := string(val)
- sv.Delimiter = ptr.String(xtv)
+ sv.ContinuationToken = ptr.String(xtv)
}
- case strings.EqualFold("EncodingType", t.Name.Local):
- val, err := decoder.Value()
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
if err != nil {
return err
}
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.EncodingType = types.EncodingType(xtv)
- }
- case strings.EqualFold("IsTruncated", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv, err := strconv.ParseBool(string(val))
- if err != nil {
- return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
- }
- sv.IsTruncated = xtv
- }
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
- case strings.EqualFold("KeyMarker", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.KeyMarker = ptr.String(xtv)
- }
+type awsRestxml_deserializeOpListMultipartUploads struct {
+}
- case strings.EqualFold("MaxUploads", t.Name.Local):
- val, err := decoder.Value()
+func (*awsRestxml_deserializeOpListMultipartUploads) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListMultipartUploads) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListMultipartUploads(response, &metadata)
+ }
+ output := &ListMultipartUploadsOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsListMultipartUploadsOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListMultipartUploads(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsListMultipartUploadsOutput(v *ListMultipartUploadsOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(v **ListMultipartUploadsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListMultipartUploadsOutput
+ if *v == nil {
+ sv = &ListMultipartUploadsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("CommonPrefixes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCommonPrefixListUnwrapped(&sv.CommonPrefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Delimiter", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Delimiter = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EncodingType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncodingType = types.EncodingType(xtv)
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("KeyMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MaxUploads", t.Name.Local):
+ val, err := decoder.Value()
if err != nil {
return err
}
@@ -8128,7 +8490,7 @@ func awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(v **ListMultipar
if err != nil {
return err
}
- sv.MaxUploads = int32(i64)
+ sv.MaxUploads = ptr.Int32(int32(i64))
}
case strings.EqualFold("NextKeyMarker", t.Name.Local):
@@ -8229,6 +8591,11 @@ func (m *awsRestxml_deserializeOpListObjects) HandleDeserialize(ctx context.Cont
output := &ListObjectsOutput{}
out.Result = output
+ err = awsRestxml_deserializeOpHttpBindingsListObjectsOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
@@ -8303,6 +8670,18 @@ func awsRestxml_deserializeOpErrorListObjects(response *smithyhttp.Response, met
}
}
+func awsRestxml_deserializeOpHttpBindingsListObjectsOutput(v *ListObjectsOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
func awsRestxml_deserializeOpDocumentListObjectsOutput(v **ListObjectsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -8376,7 +8755,7 @@ func awsRestxml_deserializeOpDocumentListObjectsOutput(v **ListObjectsOutput, de
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("Marker", t.Name.Local):
@@ -8406,7 +8785,7 @@ func awsRestxml_deserializeOpDocumentListObjectsOutput(v **ListObjectsOutput, de
if err != nil {
return err
}
- sv.MaxKeys = int32(i64)
+ sv.MaxKeys = ptr.Int32(int32(i64))
}
case strings.EqualFold("Name", t.Name.Local):
@@ -8488,6 +8867,11 @@ func (m *awsRestxml_deserializeOpListObjectsV2) HandleDeserialize(ctx context.Co
output := &ListObjectsV2Output{}
out.Result = output
+ err = awsRestxml_deserializeOpHttpBindingsListObjectsV2Output(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
@@ -8562,6 +8946,18 @@ func awsRestxml_deserializeOpErrorListObjectsV2(response *smithyhttp.Response, m
}
}
+func awsRestxml_deserializeOpHttpBindingsListObjectsV2Output(v *ListObjectsV2Output, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
func awsRestxml_deserializeOpDocumentListObjectsV2Output(v **ListObjectsV2Output, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -8648,7 +9044,7 @@ func awsRestxml_deserializeOpDocumentListObjectsV2Output(v **ListObjectsV2Output
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("KeyCount", t.Name.Local):
@@ -8665,7 +9061,7 @@ func awsRestxml_deserializeOpDocumentListObjectsV2Output(v **ListObjectsV2Output
if err != nil {
return err
}
- sv.KeyCount = int32(i64)
+ sv.KeyCount = ptr.Int32(int32(i64))
}
case strings.EqualFold("MaxKeys", t.Name.Local):
@@ -8682,7 +9078,7 @@ func awsRestxml_deserializeOpDocumentListObjectsV2Output(v **ListObjectsV2Output
if err != nil {
return err
}
- sv.MaxKeys = int32(i64)
+ sv.MaxKeys = ptr.Int32(int32(i64))
}
case strings.EqualFold("Name", t.Name.Local):
@@ -8777,6 +9173,11 @@ func (m *awsRestxml_deserializeOpListObjectVersions) HandleDeserialize(ctx conte
output := &ListObjectVersionsOutput{}
out.Result = output
+ err = awsRestxml_deserializeOpHttpBindingsListObjectVersionsOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
@@ -8848,6 +9249,18 @@ func awsRestxml_deserializeOpErrorListObjectVersions(response *smithyhttp.Respon
}
}
+func awsRestxml_deserializeOpHttpBindingsListObjectVersionsOutput(v *ListObjectVersionsOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
func awsRestxml_deserializeOpDocumentListObjectVersionsOutput(v **ListObjectVersionsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -8921,7 +9334,7 @@ func awsRestxml_deserializeOpDocumentListObjectVersionsOutput(v **ListObjectVers
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("KeyMarker", t.Name.Local):
@@ -8951,7 +9364,7 @@ func awsRestxml_deserializeOpDocumentListObjectVersionsOutput(v **ListObjectVers
if err != nil {
return err
}
- sv.MaxKeys = int32(i64)
+ sv.MaxKeys = ptr.Int32(int32(i64))
}
case strings.EqualFold("Name", t.Name.Local):
@@ -9234,7 +9647,7 @@ func awsRestxml_deserializeOpDocumentListPartsOutput(v **ListPartsOutput, decode
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("Key", t.Name.Local):
@@ -9264,7 +9677,7 @@ func awsRestxml_deserializeOpDocumentListPartsOutput(v **ListPartsOutput, decode
if err != nil {
return err
}
- sv.MaxParts = int32(i64)
+ sv.MaxParts = ptr.Int32(int32(i64))
}
case strings.EqualFold("NextPartNumberMarker", t.Name.Local):
@@ -10780,7 +11193,7 @@ func awsRestxml_deserializeOpHttpBindingsPutObjectOutput(v *PutObjectOutput, res
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("x-amz-checksum-crc32"); len(headerValues) != 0 {
@@ -11613,7 +12026,7 @@ func awsRestxml_deserializeOpHttpBindingsUploadPartOutput(v *UploadPartOutput, r
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("x-amz-checksum-crc32"); len(headerValues) != 0 {
@@ -11782,7 +12195,7 @@ func awsRestxml_deserializeOpHttpBindingsUploadPartCopyOutput(v *UploadPartCopyO
if err != nil {
return err
}
- v.BucketKeyEnabled = vv
+ v.BucketKeyEnabled = ptr.Bool(vv)
}
if headerValues := response.Header.Values("x-amz-copy-source-version-id"); len(headerValues) != 0 {
@@ -12304,7 +12717,7 @@ func awsRestxml_deserializeDocumentProgress(v **types.Progress, decoder smithyxm
if err != nil {
return err
}
- sv.BytesProcessed = i64
+ sv.BytesProcessed = ptr.Int64(i64)
}
case strings.EqualFold("BytesReturned", t.Name.Local):
@@ -12321,7 +12734,7 @@ func awsRestxml_deserializeDocumentProgress(v **types.Progress, decoder smithyxm
if err != nil {
return err
}
- sv.BytesReturned = i64
+ sv.BytesReturned = ptr.Int64(i64)
}
case strings.EqualFold("BytesScanned", t.Name.Local):
@@ -12338,7 +12751,7 @@ func awsRestxml_deserializeDocumentProgress(v **types.Progress, decoder smithyxm
if err != nil {
return err
}
- sv.BytesScanned = i64
+ sv.BytesScanned = ptr.Int64(i64)
}
default:
@@ -12391,7 +12804,7 @@ func awsRestxml_deserializeDocumentStats(v **types.Stats, decoder smithyxml.Node
if err != nil {
return err
}
- sv.BytesProcessed = i64
+ sv.BytesProcessed = ptr.Int64(i64)
}
case strings.EqualFold("BytesReturned", t.Name.Local):
@@ -12408,7 +12821,7 @@ func awsRestxml_deserializeDocumentStats(v **types.Stats, decoder smithyxml.Node
if err != nil {
return err
}
- sv.BytesReturned = i64
+ sv.BytesReturned = ptr.Int64(i64)
}
case strings.EqualFold("BytesScanned", t.Name.Local):
@@ -12425,7 +12838,7 @@ func awsRestxml_deserializeDocumentStats(v **types.Stats, decoder smithyxml.Node
if err != nil {
return err
}
- sv.BytesScanned = i64
+ sv.BytesScanned = ptr.Int64(i64)
}
default:
@@ -12551,7 +12964,7 @@ func awsRestxml_deserializeDocumentAbortIncompleteMultipartUpload(v **types.Abor
if err != nil {
return err
}
- sv.DaysAfterInitiation = int32(i64)
+ sv.DaysAfterInitiation = ptr.Int32(int32(i64))
}
default:
@@ -14104,7 +14517,7 @@ func awsRestxml_deserializeDocumentCORSRule(v **types.CORSRule, decoder smithyxm
if err != nil {
return err
}
- sv.MaxAgeSeconds = int32(i64)
+ sv.MaxAgeSeconds = ptr.Int32(int32(i64))
}
default:
@@ -14225,7 +14638,7 @@ func awsRestxml_deserializeDocumentDefaultRetention(v **types.DefaultRetention,
if err != nil {
return err
}
- sv.Days = int32(i64)
+ sv.Days = ptr.Int32(int32(i64))
}
case strings.EqualFold("Mode", t.Name.Local):
@@ -14255,7 +14668,7 @@ func awsRestxml_deserializeDocumentDefaultRetention(v **types.DefaultRetention,
if err != nil {
return err
}
- sv.Years = int32(i64)
+ sv.Years = ptr.Int32(int32(i64))
}
default:
@@ -14307,7 +14720,7 @@ func awsRestxml_deserializeDocumentDeletedObject(v **types.DeletedObject, decode
if err != nil {
return fmt.Errorf("expected DeleteMarker to be of type *bool, got %T instead", val)
}
- sv.DeleteMarker = xtv
+ sv.DeleteMarker = ptr.Bool(xtv)
}
case strings.EqualFold("DeleteMarkerVersionId", t.Name.Local):
@@ -14466,7 +14879,7 @@ func awsRestxml_deserializeDocumentDeleteMarkerEntry(v **types.DeleteMarkerEntry
if err != nil {
return fmt.Errorf("expected IsLatest to be of type *bool, got %T instead", val)
}
- sv.IsLatest = xtv
+ sv.IsLatest = ptr.Bool(xtv)
}
case strings.EqualFold("Key", t.Name.Local):
@@ -15412,7 +15825,7 @@ func awsRestxml_deserializeDocumentGetObjectAttributesParts(v **types.GetObjectA
if err != nil {
return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
}
- sv.IsTruncated = xtv
+ sv.IsTruncated = ptr.Bool(xtv)
}
case strings.EqualFold("MaxParts", t.Name.Local):
@@ -15429,7 +15842,7 @@ func awsRestxml_deserializeDocumentGetObjectAttributesParts(v **types.GetObjectA
if err != nil {
return err
}
- sv.MaxParts = int32(i64)
+ sv.MaxParts = ptr.Int32(int32(i64))
}
case strings.EqualFold("NextPartNumberMarker", t.Name.Local):
@@ -15478,7 +15891,7 @@ func awsRestxml_deserializeDocumentGetObjectAttributesParts(v **types.GetObjectA
if err != nil {
return err
}
- sv.TotalPartsCount = int32(i64)
+ sv.TotalPartsCount = ptr.Int32(int32(i64))
}
default:
@@ -16225,7 +16638,7 @@ func awsRestxml_deserializeDocumentInventoryConfiguration(v **types.InventoryCon
if err != nil {
return fmt.Errorf("expected IsEnabled to be of type *bool, got %T instead", val)
}
- sv.IsEnabled = xtv
+ sv.IsEnabled = ptr.Bool(xtv)
}
case strings.EqualFold("OptionalFields", t.Name.Local):
@@ -16879,7 +17292,7 @@ func awsRestxml_deserializeDocumentLifecycleExpiration(v **types.LifecycleExpira
if err != nil {
return err
}
- sv.Days = int32(i64)
+ sv.Days = ptr.Int32(int32(i64))
}
case strings.EqualFold("ExpiredObjectDeleteMarker", t.Name.Local):
@@ -16895,7 +17308,7 @@ func awsRestxml_deserializeDocumentLifecycleExpiration(v **types.LifecycleExpira
if err != nil {
return fmt.Errorf("expected ExpiredObjectDeleteMarker to be of type *bool, got %T instead", val)
}
- sv.ExpiredObjectDeleteMarker = xtv
+ sv.ExpiredObjectDeleteMarker = ptr.Bool(xtv)
}
default:
@@ -17059,7 +17472,7 @@ func awsRestxml_deserializeDocumentLifecycleRuleAndOperator(v **types.LifecycleR
if err != nil {
return err
}
- sv.ObjectSizeGreaterThan = i64
+ sv.ObjectSizeGreaterThan = ptr.Int64(i64)
}
case strings.EqualFold("ObjectSizeLessThan", t.Name.Local):
@@ -17076,7 +17489,7 @@ func awsRestxml_deserializeDocumentLifecycleRuleAndOperator(v **types.LifecycleR
if err != nil {
return err
}
- sv.ObjectSizeLessThan = i64
+ sv.ObjectSizeLessThan = ptr.Int64(i64)
}
case strings.EqualFold("Prefix", t.Name.Local):
@@ -17332,6 +17745,12 @@ func awsRestxml_deserializeDocumentLoggingEnabled(v **types.LoggingEnabled, deco
return err
}
+ case strings.EqualFold("TargetObjectKeyFormat", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTargetObjectKeyFormat(&sv.TargetObjectKeyFormat, nodeDecoder); err != nil {
+ return err
+ }
+
case strings.EqualFold("TargetPrefix", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -17913,7 +18332,7 @@ func awsRestxml_deserializeDocumentNoncurrentVersionExpiration(v **types.Noncurr
if err != nil {
return err
}
- sv.NewerNoncurrentVersions = int32(i64)
+ sv.NewerNoncurrentVersions = ptr.Int32(int32(i64))
}
case strings.EqualFold("NoncurrentDays", t.Name.Local):
@@ -17930,7 +18349,7 @@ func awsRestxml_deserializeDocumentNoncurrentVersionExpiration(v **types.Noncurr
if err != nil {
return err
}
- sv.NoncurrentDays = int32(i64)
+ sv.NoncurrentDays = ptr.Int32(int32(i64))
}
default:
@@ -17983,7 +18402,7 @@ func awsRestxml_deserializeDocumentNoncurrentVersionTransition(v **types.Noncurr
if err != nil {
return err
}
- sv.NewerNoncurrentVersions = int32(i64)
+ sv.NewerNoncurrentVersions = ptr.Int32(int32(i64))
}
case strings.EqualFold("NoncurrentDays", t.Name.Local):
@@ -18000,7 +18419,7 @@ func awsRestxml_deserializeDocumentNoncurrentVersionTransition(v **types.Noncurr
if err != nil {
return err
}
- sv.NoncurrentDays = int32(i64)
+ sv.NoncurrentDays = ptr.Int32(int32(i64))
}
case strings.EqualFold("StorageClass", t.Name.Local):
@@ -18361,7 +18780,13 @@ func awsRestxml_deserializeDocumentObject(v **types.Object, decoder smithyxml.No
return err
}
- case strings.EqualFold("Size", t.Name.Local):
+ case strings.EqualFold("RestoreStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentRestoreStatus(&sv.RestoreStatus, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Size", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
@@ -18375,7 +18800,7 @@ func awsRestxml_deserializeDocumentObject(v **types.Object, decoder smithyxml.No
if err != nil {
return err
}
- sv.Size = i64
+ sv.Size = ptr.Int64(i64)
}
case strings.EqualFold("StorageClass", t.Name.Local):
@@ -18845,7 +19270,7 @@ func awsRestxml_deserializeDocumentObjectPart(v **types.ObjectPart, decoder smit
if err != nil {
return err
}
- sv.PartNumber = int32(i64)
+ sv.PartNumber = ptr.Int32(int32(i64))
}
case strings.EqualFold("Size", t.Name.Local):
@@ -18862,7 +19287,7 @@ func awsRestxml_deserializeDocumentObjectPart(v **types.ObjectPart, decoder smit
if err != nil {
return err
}
- sv.Size = i64
+ sv.Size = ptr.Int64(i64)
}
default:
@@ -18933,7 +19358,7 @@ func awsRestxml_deserializeDocumentObjectVersion(v **types.ObjectVersion, decode
if err != nil {
return fmt.Errorf("expected IsLatest to be of type *bool, got %T instead", val)
}
- sv.IsLatest = xtv
+ sv.IsLatest = ptr.Bool(xtv)
}
case strings.EqualFold("Key", t.Name.Local):
@@ -18972,6 +19397,12 @@ func awsRestxml_deserializeDocumentObjectVersion(v **types.ObjectVersion, decode
return err
}
+ case strings.EqualFold("RestoreStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentRestoreStatus(&sv.RestoreStatus, nodeDecoder); err != nil {
+ return err
+ }
+
case strings.EqualFold("Size", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -18986,7 +19417,7 @@ func awsRestxml_deserializeDocumentObjectVersion(v **types.ObjectVersion, decode
if err != nil {
return err
}
- sv.Size = i64
+ sv.Size = ptr.Int64(i64)
}
case strings.EqualFold("StorageClass", t.Name.Local):
@@ -19436,7 +19867,7 @@ func awsRestxml_deserializeDocumentPart(v **types.Part, decoder smithyxml.NodeDe
if err != nil {
return err
}
- sv.PartNumber = int32(i64)
+ sv.PartNumber = ptr.Int32(int32(i64))
}
case strings.EqualFold("Size", t.Name.Local):
@@ -19453,7 +19884,56 @@ func awsRestxml_deserializeDocumentPart(v **types.Part, decoder smithyxml.NodeDe
if err != nil {
return err
}
- sv.Size = i64
+ sv.Size = ptr.Int64(i64)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentPartitionedPrefix(v **types.PartitionedPrefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PartitionedPrefix
+ if *v == nil {
+ sv = &types.PartitionedPrefix{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("PartitionDateSource", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PartitionDateSource = types.PartitionDateSource(xtv)
}
default:
@@ -19641,7 +20121,7 @@ func awsRestxml_deserializeDocumentPolicyStatus(v **types.PolicyStatus, decoder
if err != nil {
return fmt.Errorf("expected IsPublic to be of type *bool, got %T instead", val)
}
- sv.IsPublic = xtv
+ sv.IsPublic = ptr.Bool(xtv)
}
default:
@@ -19693,7 +20173,7 @@ func awsRestxml_deserializeDocumentPublicAccessBlockConfiguration(v **types.Publ
if err != nil {
return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
}
- sv.BlockPublicAcls = xtv
+ sv.BlockPublicAcls = ptr.Bool(xtv)
}
case strings.EqualFold("BlockPublicPolicy", t.Name.Local):
@@ -19709,7 +20189,7 @@ func awsRestxml_deserializeDocumentPublicAccessBlockConfiguration(v **types.Publ
if err != nil {
return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
}
- sv.BlockPublicPolicy = xtv
+ sv.BlockPublicPolicy = ptr.Bool(xtv)
}
case strings.EqualFold("IgnorePublicAcls", t.Name.Local):
@@ -19725,7 +20205,7 @@ func awsRestxml_deserializeDocumentPublicAccessBlockConfiguration(v **types.Publ
if err != nil {
return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
}
- sv.IgnorePublicAcls = xtv
+ sv.IgnorePublicAcls = ptr.Bool(xtv)
}
case strings.EqualFold("RestrictPublicBuckets", t.Name.Local):
@@ -19741,7 +20221,7 @@ func awsRestxml_deserializeDocumentPublicAccessBlockConfiguration(v **types.Publ
if err != nil {
return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
}
- sv.RestrictPublicBuckets = xtv
+ sv.RestrictPublicBuckets = ptr.Bool(xtv)
}
default:
@@ -20253,7 +20733,7 @@ func awsRestxml_deserializeDocumentReplicationRule(v **types.ReplicationRule, de
if err != nil {
return err
}
- sv.Priority = int32(i64)
+ sv.Priority = ptr.Int32(int32(i64))
}
case strings.EqualFold("SourceSelectionCriteria", t.Name.Local):
@@ -20574,7 +21054,76 @@ func awsRestxml_deserializeDocumentReplicationTimeValue(v **types.ReplicationTim
if err != nil {
return err
}
- sv.Minutes = int32(i64)
+ sv.Minutes = ptr.Int32(int32(i64))
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentRestoreStatus(v **types.RestoreStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RestoreStatus
+ if *v == nil {
+ sv = &types.RestoreStatus{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("IsRestoreInProgress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsRestoreInProgress to be of type *bool, got %T instead", val)
+ }
+ sv.IsRestoreInProgress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("RestoreExpiryDate", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.RestoreExpiryDate = ptr.Time(t)
}
default:
@@ -20894,7 +21443,7 @@ func awsRestxml_deserializeDocumentServerSideEncryptionRule(v **types.ServerSide
if err != nil {
return fmt.Errorf("expected BucketKeyEnabled to be of type *bool, got %T instead", val)
}
- sv.BucketKeyEnabled = xtv
+ sv.BucketKeyEnabled = ptr.Bool(xtv)
}
default:
@@ -20979,6 +21528,134 @@ func awsRestxml_deserializeDocumentServerSideEncryptionRulesUnwrapped(v *[]types
*v = sv
return nil
}
+func awsRestxml_deserializeDocumentSessionCredentials(v **types.SessionCredentials, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SessionCredentials
+ if *v == nil {
+ sv = &types.SessionCredentials{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccessKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Expiration", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Expiration = ptr.Time(t)
+ }
+
+ case strings.EqualFold("SecretAccessKey", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SecretAccessKey = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SessionToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SessionToken = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentSimplePrefix(v **types.SimplePrefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SimplePrefix
+ if *v == nil {
+ sv = &types.SimplePrefix{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentSourceSelectionCriteria(v **types.SourceSelectionCriteria, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -21511,6 +22188,54 @@ func awsRestxml_deserializeDocumentTargetGrantsUnwrapped(v *[]types.TargetGrant,
*v = sv
return nil
}
+func awsRestxml_deserializeDocumentTargetObjectKeyFormat(v **types.TargetObjectKeyFormat, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetObjectKeyFormat
+ if *v == nil {
+ sv = &types.TargetObjectKeyFormat{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("PartitionedPrefix", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentPartitionedPrefix(&sv.PartitionedPrefix, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("SimplePrefix", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentSimplePrefix(&sv.SimplePrefix, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentTiering(v **types.Tiering, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -21560,7 +22285,7 @@ func awsRestxml_deserializeDocumentTiering(v **types.Tiering, decoder smithyxml.
if err != nil {
return err
}
- sv.Days = int32(i64)
+ sv.Days = ptr.Int32(int32(i64))
}
default:
@@ -21840,7 +22565,7 @@ func awsRestxml_deserializeDocumentTransition(v **types.Transition, decoder smit
if err != nil {
return err
}
- sv.Days = int32(i64)
+ sv.Days = ptr.Int32(int32(i64))
}
case strings.EqualFold("StorageClass", t.Name.Local):
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go
index ce3203be..d825a41a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go
@@ -2,6 +2,4 @@
// Package s3 provides the API client, operations, and parameter types for Amazon
// Simple Storage Service.
-//
-//
package s3
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoint_auth_resolver.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoint_auth_resolver.go
new file mode 100644
index 00000000..bb5f4cf4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoint_auth_resolver.go
@@ -0,0 +1,126 @@
+package s3
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ smithyauth "github.com/aws/smithy-go/auth"
+)
+
+type endpointAuthResolver struct {
+ EndpointResolver EndpointResolverV2
+}
+
+var _ AuthSchemeResolver = (*endpointAuthResolver)(nil)
+
+func (r *endpointAuthResolver) ResolveAuthSchemes(
+ ctx context.Context, params *AuthResolverParameters,
+) (
+ []*smithyauth.Option, error,
+) {
+ if params.endpointParams.Region == nil {
+ // #2502: We're correcting the endpoint binding behavior to treat empty
+ // Region as "unset" (nil), but auth resolution technically doesn't
+ // care and someone could be using V1 or non-default V2 endpoint
+ // resolution, both of which would bypass the required-region check.
+ // They shouldn't be broken because the region is technically required
+ // by this service's endpoint-based auth resolver, so we stub it here.
+ params.endpointParams.Region = aws.String("")
+ }
+
+ opts, err := r.resolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ // canonicalize sigv4-s3express ID
+ for _, opt := range opts {
+ if opt.SchemeID == "sigv4-s3express" {
+ opt.SchemeID = "com.amazonaws.s3#sigv4express"
+ }
+ }
+
+ // preserve pre-SRA behavior where everything technically had anonymous
+ return append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ }), nil
+}
+
+func (r *endpointAuthResolver) resolveAuthSchemes(
+ ctx context.Context, params *AuthResolverParameters,
+) (
+ []*smithyauth.Option, error,
+) {
+ baseOpts, err := (&defaultAuthSchemeResolver{}).ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, fmt.Errorf("get base options: %w", err)
+ }
+
+ endpt, err := r.EndpointResolver.ResolveEndpoint(ctx, *params.endpointParams)
+ if err != nil {
+ return nil, fmt.Errorf("resolve endpoint: %w", err)
+ }
+
+ endptOpts, ok := smithyauth.GetAuthOptions(&endpt.Properties)
+ if !ok {
+ return baseOpts, nil
+ }
+
+ // the list of options from the endpoint is authoritative, however, the
+ // modeled options have some properties that the endpoint ones don't, so we
+ // start from the latter and merge in
+ for _, endptOpt := range endptOpts {
+ if baseOpt := findScheme(baseOpts, endptOpt.SchemeID); baseOpt != nil {
+ rebaseProps(endptOpt, baseOpt)
+ }
+ }
+
+ return endptOpts, nil
+}
+
+// rebase the properties of dst, taking src as the base and overlaying those
+// from dst
+func rebaseProps(dst, src *smithyauth.Option) {
+ iprops, sprops := src.IdentityProperties, src.SignerProperties
+
+ iprops.SetAll(&dst.IdentityProperties)
+ sprops.SetAll(&dst.SignerProperties)
+
+ dst.IdentityProperties = iprops
+ dst.SignerProperties = sprops
+}
+
+func findScheme(opts []*smithyauth.Option, schemeID string) *smithyauth.Option {
+ for _, opt := range opts {
+ if opt.SchemeID == schemeID {
+ return opt
+ }
+ }
+ return nil
+}
+
+func finalizeServiceEndpointAuthResolver(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &endpointAuthResolver{
+ EndpointResolver: options.EndpointResolverV2,
+ }
+}
+
+func finalizeOperationEndpointAuthResolver(options *Options) {
+ resolver, ok := options.AuthSchemeResolver.(*endpointAuthResolver)
+ if !ok {
+ return
+ }
+
+ if resolver.EndpointResolver == options.EndpointResolverV2 {
+ return
+ }
+
+ options.AuthSchemeResolver = &endpointAuthResolver{
+ EndpointResolver: options.EndpointResolverV2,
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
index 8df6368c..e6ae2e87 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
@@ -8,10 +8,22 @@ import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
internalendpoints "github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/endpoints/private/rulesfn"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
"net/url"
+ "os"
"strings"
)
@@ -39,13 +51,6 @@ func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointRe
return fn(region, options)
}
-func resolveDefaultEndpointConfiguration(o *Options) {
- if o.EndpointResolver != nil {
- return
- }
- o.EndpointResolver = NewDefaultEndpointResolver()
-}
-
// EndpointResolverFromURL returns an EndpointResolver configured using the
// provided endpoint url. By default, the resolved endpoint resolver uses the
// client region as signing region, and the endpoint source is set to
@@ -79,6 +84,10 @@ func (*ResolveEndpoint) ID() string {
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
@@ -94,6 +103,11 @@ func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.Ser
var endpoint aws.Endpoint
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
}
@@ -129,27 +143,10 @@ func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
type wrappedEndpointResolver struct {
awsResolver aws.EndpointResolverWithOptions
- resolver EndpointResolver
}
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- if w.awsResolver == nil {
- goto fallback
- }
- endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
- if err == nil {
- return endpoint, nil
- }
-
- if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
- return endpoint, err
- }
-
-fallback:
- if w.resolver == nil {
- return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
- }
- return w.resolver.ResolveEndpoint(region, options)
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
}
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
@@ -160,12 +157,13 @@ func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, opti
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
-// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
-// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
-// fallbackResolver for resolution.
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
//
-// fallbackResolver must not be nil
-func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
@@ -176,7 +174,6 @@ func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptio
return &wrappedEndpointResolver{
awsResolver: resolver,
- resolver: fallbackResolver,
}
}
@@ -206,3 +203,5627 @@ func finalizeClientEndpointResolverOptions(options *Options) {
}
}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+func resolveBaseEndpoint(cfg aws.Config, o *Options) {
+ if cfg.BaseEndpoint != nil {
+ o.BaseEndpoint = cfg.BaseEndpoint
+ }
+
+ _, g := os.LookupEnv("AWS_ENDPOINT_URL")
+ _, s := os.LookupEnv("AWS_ENDPOINT_URL_S3")
+
+ if g && !s {
+ return
+ }
+
+ value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "S3", cfg.ConfigSources)
+ if found && err == nil {
+ o.BaseEndpoint = &value
+ }
+}
+
+func bindRegion(region string) *string {
+ if region == "" {
+ return nil
+ }
+ return aws.String(endpoints.MapFIPSRegion(region))
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The S3 bucket used to send the request. This is an optional parameter that will
+ // be set automatically for operations that are scoped to an S3 bucket.
+ //
+ // Parameter
+ // is required.
+ Bucket *string
+
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+
+ // When true, force a path-style endpoint to be used where the bucket name is part
+ // of the path.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::S3::ForcePathStyle
+ ForcePathStyle *bool
+
+ // When true, use S3 Accelerate. NOTE: Not all regions support S3
+ // accelerate.
+ //
+ // Defaults to false if no value is provided.
+ //
+ // AWS::S3::Accelerate
+ Accelerate *bool
+
+ // Whether the global endpoint should be used, rather then the regional endpoint
+ // for us-east-1.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::S3::UseGlobalEndpoint
+ UseGlobalEndpoint *bool
+
+ // Internal parameter to use object lambda endpoint for an operation (eg:
+ // WriteGetObjectResponse)
+ //
+ // Parameter is required.
+ UseObjectLambdaEndpoint *bool
+
+ // The S3 Key used to send the request. This is an optional parameter that will be
+ // set automatically for operations that are scoped to an S3 Key.
+ //
+ // Parameter is
+ // required.
+ Key *string
+
+ // The S3 Prefix used to send the request. This is an optional parameter that will
+ // be set automatically for operations that are scoped to an S3 Prefix.
+ //
+ // Parameter
+ // is required.
+ Prefix *string
+
+ // Internal parameter to disable Access Point Buckets
+ //
+ // Parameter is required.
+ DisableAccessPoints *bool
+
+ // Whether multi-region access points (MRAP) should be disabled.
+ //
+ // Defaults to false
+ // if no value is provided.
+ //
+ // AWS::S3::DisableMultiRegionAccessPoints
+ DisableMultiRegionAccessPoints *bool
+
+ // When an Access Point ARN is provided and this flag is enabled, the SDK MUST use
+ // the ARN's region when constructing the endpoint instead of the client's
+ // configured region.
+ //
+ // Parameter is required.
+ //
+ // AWS::S3::UseArnRegion
+ UseArnRegion *bool
+
+ // Internal parameter to indicate whether S3Express operation should use control
+ // plane, (ex. CreateBucket)
+ //
+ // Parameter is required.
+ UseS3ExpressControlEndpoint *bool
+
+ // Parameter to indicate whether S3Express session auth should be
+ // disabled
+ //
+ // Parameter is required.
+ DisableS3ExpressSessionAuth *bool
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.Accelerate == nil {
+ return fmt.Errorf("parameter Accelerate is required")
+ }
+
+ if p.DisableMultiRegionAccessPoints == nil {
+ return fmt.Errorf("parameter DisableMultiRegionAccessPoints is required")
+ }
+
+ if p.ForcePathStyle == nil {
+ return fmt.Errorf("parameter ForcePathStyle is required")
+ }
+
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ if p.UseGlobalEndpoint == nil {
+ return fmt.Errorf("parameter UseGlobalEndpoint is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.Accelerate == nil {
+ p.Accelerate = ptr.Bool(false)
+ }
+
+ if p.DisableMultiRegionAccessPoints == nil {
+ p.DisableMultiRegionAccessPoints = ptr.Bool(false)
+ }
+
+ if p.ForcePathStyle == nil {
+ p.ForcePathStyle = ptr.Bool(false)
+ }
+
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+
+ if p.UseGlobalEndpoint == nil {
+ p.UseGlobalEndpoint = ptr.Bool(false)
+ }
+ return p
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseFIPS := *params.UseFIPS
+ _UseDualStack := *params.UseDualStack
+ _ForcePathStyle := *params.ForcePathStyle
+ _Accelerate := *params.Accelerate
+ _UseGlobalEndpoint := *params.UseGlobalEndpoint
+ _DisableMultiRegionAccessPoints := *params.DisableMultiRegionAccessPoints
+
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if _Accelerate == true {
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Accelerate cannot be used with FIPS")
+ }
+ }
+ if _UseDualStack == true {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Cannot set dual-stack in combination with a custom endpoint.")
+ }
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "A custom endpoint cannot be combined with FIPS")
+ }
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _Accelerate == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "A custom endpoint cannot be combined with S3 Accelerate")
+ }
+ }
+ if _UseFIPS == true {
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if _partitionResult.Name == "aws-cn" {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Partition does not support FIPS")
+ }
+ }
+ }
+ if exprVal := params.Bucket; exprVal != nil {
+ _Bucket := *exprVal
+ _ = _Bucket
+ if exprVal := rulesfn.SubString(_Bucket, 0, 6, true); exprVal != nil {
+ _bucketSuffix := *exprVal
+ _ = _bucketSuffix
+ if _bucketSuffix == "--x-s3" {
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3Express does not support Dual-stack.")
+ }
+ if _Accelerate == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3Express does not support S3 Accelerate.")
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if exprVal := params.DisableS3ExpressSessionAuth; exprVal != nil {
+ _DisableS3ExpressSessionAuth := *exprVal
+ _ = _DisableS3ExpressSessionAuth
+ if _DisableS3ExpressSessionAuth == true {
+ if _url.IsIp == true {
+ _uri_encoded_bucket := rulesfn.URIEncode(_Bucket)
+ _ = _uri_encoded_bucket
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if awsrulesfn.IsVirtualHostableS3Bucket(_Bucket, false) {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_Bucket)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3Express bucket name is not a valid virtual hostable name.")
+ }
+ }
+ if _url.IsIp == true {
+ _uri_encoded_bucket := rulesfn.URIEncode(_Bucket)
+ _ = _uri_encoded_bucket
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if awsrulesfn.IsVirtualHostableS3Bucket(_Bucket, false) {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_Bucket)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3Express bucket name is not a valid virtual hostable name.")
+ }
+ }
+ if exprVal := params.UseS3ExpressControlEndpoint; exprVal != nil {
+ _UseS3ExpressControlEndpoint := *exprVal
+ _ = _UseS3ExpressControlEndpoint
+ if _UseS3ExpressControlEndpoint == true {
+ _uri_encoded_bucket := rulesfn.URIEncode(_Bucket)
+ _ = _uri_encoded_bucket
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3express-control-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3express-control.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ }
+ if awsrulesfn.IsVirtualHostableS3Bucket(_Bucket, false) {
+ if exprVal := params.DisableS3ExpressSessionAuth; exprVal != nil {
+ _DisableS3ExpressSessionAuth := *exprVal
+ _ = _DisableS3ExpressSessionAuth
+ if _DisableS3ExpressSessionAuth == true {
+ if exprVal := rulesfn.SubString(_Bucket, 6, 14, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 14, 16, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 15, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 15, 17, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Unrecognized S3Express bucket name format.")
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 14, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 14, 16, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 15, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 15, 17, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Unrecognized S3Express bucket name format.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3Express bucket name is not a valid virtual hostable name.")
+ }
+ }
+ }
+ if !(params.Bucket != nil) {
+ if exprVal := params.UseS3ExpressControlEndpoint; exprVal != nil {
+ _UseS3ExpressControlEndpoint := *exprVal
+ _ = _UseS3ExpressControlEndpoint
+ if _UseS3ExpressControlEndpoint == true {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3express-control-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3express-control.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := params.Bucket; exprVal != nil {
+ _Bucket := *exprVal
+ _ = _Bucket
+ if exprVal := rulesfn.SubString(_Bucket, 49, 50, true); exprVal != nil {
+ _hardwareType := *exprVal
+ _ = _hardwareType
+ if exprVal := rulesfn.SubString(_Bucket, 8, 12, true); exprVal != nil {
+ _regionPrefix := *exprVal
+ _ = _regionPrefix
+ if exprVal := rulesfn.SubString(_Bucket, 0, 7, true); exprVal != nil {
+ _bucketAliasSuffix := *exprVal
+ _ = _bucketAliasSuffix
+ if exprVal := rulesfn.SubString(_Bucket, 32, 49, true); exprVal != nil {
+ _outpostId := *exprVal
+ _ = _outpostId
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _regionPartition := *exprVal
+ _ = _regionPartition
+ if _bucketAliasSuffix == "--op-s3" {
+ if rulesfn.IsValidHostLabel(_outpostId, false) {
+ if _hardwareType == "e" {
+ if _regionPrefix == "beta" {
+ if !(params.Endpoint != nil) {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Expected a endpoint to be specified but no endpoint was found")
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".ec2.")
+ out.WriteString(_url.Authority)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4a",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4ASigningRegions(&sp, []string{"*"})
+ return sp
+ }(),
+ },
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".ec2.s3-outposts.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_regionPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4a",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4ASigningRegions(&sp, []string{"*"})
+ return sp
+ }(),
+ },
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _hardwareType == "o" {
+ if _regionPrefix == "beta" {
+ if !(params.Endpoint != nil) {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Expected a endpoint to be specified but no endpoint was found")
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".op-")
+ out.WriteString(_outpostId)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4a",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4ASigningRegions(&sp, []string{"*"})
+ return sp
+ }(),
+ },
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".op-")
+ out.WriteString(_outpostId)
+ out.WriteString(".s3-outposts.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_regionPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4a",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4ASigningRegions(&sp, []string{"*"})
+ return sp
+ }(),
+ },
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Unrecognized hardware type: \"Expected hardware type o or e but got ")
+ out.WriteString(_hardwareType)
+ out.WriteString("\"")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.")
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if exprVal := params.Bucket; exprVal != nil {
+ _Bucket := *exprVal
+ _ = _Bucket
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if !(rulesfn.ParseURL(_Endpoint) != nil) {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Custom endpoint `")
+ out.WriteString(_Endpoint)
+ out.WriteString("` was not a valid URI")
+ return out.String()
+ }())
+ }
+ }
+ if _ForcePathStyle == false {
+ if awsrulesfn.IsVirtualHostableS3Bucket(_Bucket, false) {
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if rulesfn.IsValidHostLabel(_Region, false) {
+ if _Accelerate == true {
+ if _partitionResult.Name == "aws-cn" {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Accelerate cannot be used in this region")
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == true {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-fips.dualstack.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == true {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-fips.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == true {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-fips.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == true {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-fips.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == true {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == true {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == false {
+ if _Accelerate == true {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-accelerate.dualstack.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == false {
+ if _Accelerate == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-accelerate.dualstack.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == false {
+ if _Accelerate == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-accelerate.dualstack.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3.dualstack.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _url.IsIp == true {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_Bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _url.IsIp == false {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_Bucket)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _url.IsIp == true {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_Bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_Bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _url.IsIp == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_Bucket)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_Bucket)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _url.IsIp == true {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_Bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _url.IsIp == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_Bucket)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == true {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-accelerate.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-accelerate.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-accelerate.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3-accelerate.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if _UseFIPS == false {
+ if _Accelerate == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid region: region was not a valid DNS name.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _url.Scheme == "http" {
+ if awsrulesfn.IsVirtualHostableS3Bucket(_Bucket, true) {
+ if _ForcePathStyle == false {
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if _Accelerate == false {
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if rulesfn.IsValidHostLabel(_Region, false) {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_Bucket)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid region: region was not a valid DNS name.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if _ForcePathStyle == false {
+ if exprVal := awsrulesfn.ParseARN(_Bucket); exprVal != nil {
+ _bucketArn := *exprVal
+ _ = _bucketArn
+ if exprVal := _bucketArn.ResourceId.Get(0); exprVal != nil {
+ _arnType := *exprVal
+ _ = _arnType
+ if !(_arnType == "") {
+ if _bucketArn.Service == "s3-object-lambda" {
+ if _arnType == "accesspoint" {
+ if exprVal := _bucketArn.ResourceId.Get(1); exprVal != nil {
+ _accessPointName := *exprVal
+ _ = _accessPointName
+ if !(_accessPointName == "") {
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Object Lambda does not support Dual-stack")
+ }
+ if _Accelerate == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Object Lambda does not support S3 Accelerate")
+ }
+ if !(_bucketArn.Region == "") {
+ if exprVal := params.DisableAccessPoints; exprVal != nil {
+ _DisableAccessPoints := *exprVal
+ _ = _DisableAccessPoints
+ if _DisableAccessPoints == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Access points are not supported for this operation")
+ }
+ }
+ if !(_bucketArn.ResourceId.Get(2) != nil) {
+ if exprVal := params.UseArnRegion; exprVal != nil {
+ _UseArnRegion := *exprVal
+ _ = _UseArnRegion
+ if _UseArnRegion == false {
+ if !(_bucketArn.Region == _Region) {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid configuration: region from ARN `")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString("` does not match client region `")
+ out.WriteString(_Region)
+ out.WriteString("` and UseArnRegion is `false`")
+ return out.String()
+ }())
+ }
+ }
+ }
+ if exprVal := awsrulesfn.GetPartition(_bucketArn.Region); exprVal != nil {
+ _bucketPartition := *exprVal
+ _ = _bucketPartition
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if _bucketPartition.Name == _partitionResult.Name {
+ if rulesfn.IsValidHostLabel(_bucketArn.Region, true) {
+ if _bucketArn.AccountId == "" {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: Missing account id")
+ }
+ if rulesfn.IsValidHostLabel(_bucketArn.AccountId, false) {
+ if rulesfn.IsValidHostLabel(_accessPointName, false) {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-object-lambda")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-object-lambda")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".s3-object-lambda-fips.")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString(".")
+ out.WriteString(_bucketPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-object-lambda")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-object-lambda")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".s3-object-lambda.")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString(".")
+ out.WriteString(_bucketPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-object-lambda")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-object-lambda")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `")
+ out.WriteString(_accessPointName)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid region in ARN: `")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString("` (invalid DNS name)")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Client was configured for partition `")
+ out.WriteString(_partitionResult.Name)
+ out.WriteString("` but ARN (`")
+ out.WriteString(_Bucket)
+ out.WriteString("`) has `")
+ out.WriteString(_bucketPartition.Name)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: bucket ARN is missing a region")
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `")
+ out.WriteString(_arnType)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ if _arnType == "accesspoint" {
+ if exprVal := _bucketArn.ResourceId.Get(1); exprVal != nil {
+ _accessPointName := *exprVal
+ _ = _accessPointName
+ if !(_accessPointName == "") {
+ if !(_bucketArn.Region == "") {
+ if _arnType == "accesspoint" {
+ if !(_bucketArn.Region == "") {
+ if exprVal := params.DisableAccessPoints; exprVal != nil {
+ _DisableAccessPoints := *exprVal
+ _ = _DisableAccessPoints
+ if _DisableAccessPoints == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Access points are not supported for this operation")
+ }
+ }
+ if !(_bucketArn.ResourceId.Get(2) != nil) {
+ if exprVal := params.UseArnRegion; exprVal != nil {
+ _UseArnRegion := *exprVal
+ _ = _UseArnRegion
+ if _UseArnRegion == false {
+ if !(_bucketArn.Region == _Region) {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid configuration: region from ARN `")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString("` does not match client region `")
+ out.WriteString(_Region)
+ out.WriteString("` and UseArnRegion is `false`")
+ return out.String()
+ }())
+ }
+ }
+ }
+ if exprVal := awsrulesfn.GetPartition(_bucketArn.Region); exprVal != nil {
+ _bucketPartition := *exprVal
+ _ = _bucketPartition
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if _bucketPartition.Name == _partitionResult.Name {
+ if rulesfn.IsValidHostLabel(_bucketArn.Region, true) {
+ if _bucketArn.Service == "s3" {
+ if rulesfn.IsValidHostLabel(_bucketArn.AccountId, false) {
+ if rulesfn.IsValidHostLabel(_accessPointName, false) {
+ if _Accelerate == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Access Points do not support S3 Accelerate")
+ }
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".s3-accesspoint-fips.dualstack.")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString(".")
+ out.WriteString(_bucketPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ if _UseFIPS == true {
+ if _UseDualStack == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".s3-accesspoint-fips.")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString(".")
+ out.WriteString(_bucketPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".s3-accesspoint.dualstack.")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString(".")
+ out.WriteString(_bucketPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".s3-accesspoint.")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString(".")
+ out.WriteString(_bucketPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `")
+ out.WriteString(_accessPointName)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: The ARN was not for the S3 service, found: ")
+ out.WriteString(_bucketArn.Service)
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid region in ARN: `")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString("` (invalid DNS name)")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Client was configured for partition `")
+ out.WriteString(_partitionResult.Name)
+ out.WriteString("` but ARN (`")
+ out.WriteString(_Bucket)
+ out.WriteString("`) has `")
+ out.WriteString(_bucketPartition.Name)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ if rulesfn.IsValidHostLabel(_accessPointName, true) {
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 MRAP does not support dual-stack")
+ }
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 MRAP does not support FIPS")
+ }
+ if _Accelerate == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 MRAP does not support S3 Accelerate")
+ }
+ if _DisableMultiRegionAccessPoints == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid configuration: Multi-Region Access Point ARNs are disabled.")
+ }
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _mrapPartition := *exprVal
+ _ = _mrapPartition
+ if _mrapPartition.Name == _bucketArn.Partition {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString(".accesspoint.s3-global.")
+ out.WriteString(_mrapPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4a",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4ASigningRegions(&sp, []string{"*"})
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Client was configured for partition `")
+ out.WriteString(_mrapPartition.Name)
+ out.WriteString("` but bucket referred to partition `")
+ out.WriteString(_bucketArn.Partition)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Access Point Name")
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided")
+ }
+ if _bucketArn.Service == "s3-outposts" {
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Outposts does not support Dual-stack")
+ }
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Outposts does not support FIPS")
+ }
+ if _Accelerate == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Outposts does not support S3 Accelerate")
+ }
+ if exprVal := _bucketArn.ResourceId.Get(4); exprVal != nil {
+ _var_275 := *exprVal
+ _ = _var_275
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Arn: Outpost Access Point ARN contains sub resources")
+ }
+ if exprVal := _bucketArn.ResourceId.Get(1); exprVal != nil {
+ _outpostId := *exprVal
+ _ = _outpostId
+ if rulesfn.IsValidHostLabel(_outpostId, false) {
+ if exprVal := params.UseArnRegion; exprVal != nil {
+ _UseArnRegion := *exprVal
+ _ = _UseArnRegion
+ if _UseArnRegion == false {
+ if !(_bucketArn.Region == _Region) {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid configuration: region from ARN `")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString("` does not match client region `")
+ out.WriteString(_Region)
+ out.WriteString("` and UseArnRegion is `false`")
+ return out.String()
+ }())
+ }
+ }
+ }
+ if exprVal := awsrulesfn.GetPartition(_bucketArn.Region); exprVal != nil {
+ _bucketPartition := *exprVal
+ _ = _bucketPartition
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if _bucketPartition.Name == _partitionResult.Name {
+ if rulesfn.IsValidHostLabel(_bucketArn.Region, true) {
+ if rulesfn.IsValidHostLabel(_bucketArn.AccountId, false) {
+ if exprVal := _bucketArn.ResourceId.Get(2); exprVal != nil {
+ _outpostType := *exprVal
+ _ = _outpostType
+ if exprVal := _bucketArn.ResourceId.Get(3); exprVal != nil {
+ _accessPointName := *exprVal
+ _ = _accessPointName
+ if _outpostType == "accesspoint" {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".")
+ out.WriteString(_outpostId)
+ out.WriteString(".")
+ out.WriteString(_url.Authority)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4a",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4ASigningRegions(&sp, []string{"*"})
+ return sp
+ }(),
+ },
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_accessPointName)
+ out.WriteString("-")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString(".")
+ out.WriteString(_outpostId)
+ out.WriteString(".s3-outposts.")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString(".")
+ out.WriteString(_bucketPartition.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4a",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4ASigningRegions(&sp, []string{"*"})
+ return sp
+ }(),
+ },
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-outposts")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-outposts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _bucketArn.Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Expected an outpost type `accesspoint`, found ")
+ out.WriteString(_outpostType)
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: expected an access point name")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: Expected a 4-component resource")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `")
+ out.WriteString(_bucketArn.AccountId)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid region in ARN: `")
+ out.WriteString(_bucketArn.Region)
+ out.WriteString("` (invalid DNS name)")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Client was configured for partition `")
+ out.WriteString(_partitionResult.Name)
+ out.WriteString("` but ARN (`")
+ out.WriteString(_Bucket)
+ out.WriteString("`) has `")
+ out.WriteString(_bucketPartition.Name)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `")
+ out.WriteString(_outpostId)
+ out.WriteString("`")
+ return out.String()
+ }())
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: The Outpost Id was not set")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: Unrecognized format: ")
+ out.WriteString(_Bucket)
+ out.WriteString(" (type: ")
+ out.WriteString(_arnType)
+ out.WriteString(")")
+ return out.String()
+ }())
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid ARN: No ARN type specified")
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 0, 4, false); exprVal != nil {
+ _arnPrefix := *exprVal
+ _ = _arnPrefix
+ if _arnPrefix == "arn:" {
+ if !(awsrulesfn.ParseARN(_Bucket) != nil) {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", func() string {
+ var out strings.Builder
+ out.WriteString("Invalid ARN: `")
+ out.WriteString(_Bucket)
+ out.WriteString("` was not a valid ARN")
+ return out.String()
+ }())
+ }
+ }
+ }
+ if _ForcePathStyle == true {
+ if exprVal := awsrulesfn.ParseARN(_Bucket); exprVal != nil {
+ _var_288 := *exprVal
+ _ = _var_288
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Path-style addressing cannot be used with ARN buckets")
+ }
+ }
+ _uri_encoded_bucket := rulesfn.URIEncode(_Bucket)
+ _ = _uri_encoded_bucket
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if _Accelerate == false {
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == true {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.dualstack.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == true {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == true {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == true {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == true {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == true {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == false {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.dualstack.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _UseFIPS == false {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _UseFIPS == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _UseFIPS == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.NormalizedPath)
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == false {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _UseFIPS == false {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ out.WriteString("/")
+ out.WriteString(_uri_encoded_bucket)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Path-style addressing cannot be used with S3 Accelerate")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ if exprVal := params.UseObjectLambdaEndpoint; exprVal != nil {
+ _UseObjectLambdaEndpoint := *exprVal
+ _ = _UseObjectLambdaEndpoint
+ if _UseObjectLambdaEndpoint == true {
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if rulesfn.IsValidHostLabel(_Region, true) {
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Object Lambda does not support Dual-stack")
+ }
+ if _Accelerate == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Object Lambda does not support S3 Accelerate")
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-object-lambda")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-object-lambda")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-object-lambda-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-object-lambda")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-object-lambda")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-object-lambda.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3-object-lambda")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3-object-lambda")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid region: region was not a valid DNS name.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ }
+ if !(params.Bucket != nil) {
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _partitionResult := *exprVal
+ _ = _partitionResult
+ if rulesfn.IsValidHostLabel(_Region, true) {
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.dualstack.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == true {
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseFIPS == true {
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == true {
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.dualstack.us-east-1.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == true {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.dualstack.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if exprVal := rulesfn.ParseURL(_Endpoint); exprVal != nil {
+ _url := *exprVal
+ _ = _url
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString(_url.Scheme)
+ out.WriteString("://")
+ out.WriteString(_url.Authority)
+ out.WriteString(_url.Path)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if _Region == "aws-global" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == true {
+ if _Region == "us-east-1" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if !(params.Endpoint != nil) {
+ if !(_Region == "aws-global") {
+ if _UseGlobalEndpoint == false {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://s3.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_partitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid region: region was not a valid DNS name.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "A region must be set when sending requests to S3.")
+}
+
+type endpointParamsBinder interface {
+ bindEndpointParams(*EndpointParameters)
+}
+
+func bindEndpointParams(input interface{}, options Options) *EndpointParameters {
+ params := &EndpointParameters{}
+
+ params.Region = bindRegion(options.Region)
+ params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
+ params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
+ params.Endpoint = options.BaseEndpoint
+ params.ForcePathStyle = aws.Bool(options.UsePathStyle)
+ params.Accelerate = aws.Bool(options.UseAccelerate)
+ params.DisableMultiRegionAccessPoints = aws.Bool(options.DisableMultiRegionAccessPoints)
+ params.UseArnRegion = aws.Bool(options.UseARNRegion)
+
+ params.DisableS3ExpressSessionAuth = options.DisableS3ExpressSessionAuth
+
+ if b, ok := input.(endpointParamsBinder); ok {
+ b.bindEndpointParams(params)
+ }
+
+ return params
+}
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.options.EndpointResolverV2 == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := bindEndpointParams(getOperationInput(ctx), m.options)
+ endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
+ endpt.URI.RawPath = endpt.URI.Path
+ }
+ req.URL.Scheme = endpt.URI.Scheme
+ req.URL.Host = endpt.URI.Host
+ req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
+ req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
+ for k := range endpt.Headers {
+ req.Header.Set(k, endpt.Headers.Get(k))
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
+ for _, o := range opts {
+ rscheme.SignerProperties.SetAll(&o.SignerProperties)
+ }
+
+ backend := s3cust.GetPropertiesBackend(&endpt.Properties)
+ ctx = internalcontext.SetS3Backend(ctx, backend)
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express.go
new file mode 100644
index 00000000..bbac9ca2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express.go
@@ -0,0 +1,9 @@
+package s3
+
+import (
+ "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+)
+
+// ExpressCredentialsProvider retrieves credentials for operations against the
+// S3Express storage class.
+type ExpressCredentialsProvider = customizations.S3ExpressCredentialsProvider
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_default.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_default.go
new file mode 100644
index 00000000..3b35a3e5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_default.go
@@ -0,0 +1,170 @@
+package s3
+
+import (
+ "context"
+ "crypto/hmac"
+ "crypto/sha256"
+ "errors"
+ "fmt"
+ "sync"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/internal/sync/singleflight"
+ "github.com/aws/smithy-go/container/private/cache"
+ "github.com/aws/smithy-go/container/private/cache/lru"
+)
+
+const s3ExpressCacheCap = 100
+
+const s3ExpressRefreshWindow = 1 * time.Minute
+
+type cacheKey struct {
+ CredentialsHash string // hmac(sigv4 akid, sigv4 secret)
+ Bucket string
+}
+
+func (c cacheKey) Slug() string {
+ return fmt.Sprintf("%s%s", c.CredentialsHash, c.Bucket)
+}
+
+type sessionCredsCache struct {
+ mu sync.Mutex
+ cache cache.Cache
+}
+
+func (c *sessionCredsCache) Get(key cacheKey) (*aws.Credentials, bool) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ if v, ok := c.cache.Get(key); ok {
+ return v.(*aws.Credentials), true
+ }
+ return nil, false
+}
+
+func (c *sessionCredsCache) Put(key cacheKey, creds *aws.Credentials) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ c.cache.Put(key, creds)
+}
+
+// The default S3Express provider uses an LRU cache with a capacity of 100.
+//
+// Credentials will be refreshed asynchronously when a Retrieve() call is made
+// for cached credentials within an expiry window (1 minute, currently
+// non-configurable).
+type defaultS3ExpressCredentialsProvider struct {
+ sf singleflight.Group
+
+ client createSessionAPIClient
+ cache *sessionCredsCache
+ refreshWindow time.Duration
+ v4creds aws.CredentialsProvider // underlying credentials used for CreateSession
+}
+
+type createSessionAPIClient interface {
+ CreateSession(context.Context, *CreateSessionInput, ...func(*Options)) (*CreateSessionOutput, error)
+}
+
+func newDefaultS3ExpressCredentialsProvider() *defaultS3ExpressCredentialsProvider {
+ return &defaultS3ExpressCredentialsProvider{
+ cache: &sessionCredsCache{
+ cache: lru.New(s3ExpressCacheCap),
+ },
+ refreshWindow: s3ExpressRefreshWindow,
+ }
+}
+
+// returns a cloned provider using new base credentials, used when per-op
+// config mutations change the credentials provider
+func (p *defaultS3ExpressCredentialsProvider) CloneWithBaseCredentials(v4creds aws.CredentialsProvider) *defaultS3ExpressCredentialsProvider {
+ return &defaultS3ExpressCredentialsProvider{
+ client: p.client,
+ cache: p.cache,
+ refreshWindow: p.refreshWindow,
+ v4creds: v4creds,
+ }
+}
+
+func (p *defaultS3ExpressCredentialsProvider) Retrieve(ctx context.Context, bucket string) (aws.Credentials, error) {
+ v4creds, err := p.v4creds.Retrieve(ctx)
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("get sigv4 creds: %w", err)
+ }
+
+ key := cacheKey{
+ CredentialsHash: gethmac(v4creds.AccessKeyID, v4creds.SecretAccessKey),
+ Bucket: bucket,
+ }
+ creds, ok := p.cache.Get(key)
+ if !ok || creds.Expired() {
+ return p.awaitDoChanRetrieve(ctx, key)
+ }
+
+ if creds.Expires.Sub(sdk.NowTime()) <= p.refreshWindow {
+ p.doChanRetrieve(ctx, key)
+ }
+
+ return *creds, nil
+}
+
+func (p *defaultS3ExpressCredentialsProvider) doChanRetrieve(ctx context.Context, key cacheKey) <-chan singleflight.Result {
+ return p.sf.DoChan(key.Slug(), func() (interface{}, error) {
+ return p.retrieve(ctx, key)
+ })
+}
+
+func (p *defaultS3ExpressCredentialsProvider) awaitDoChanRetrieve(ctx context.Context, key cacheKey) (aws.Credentials, error) {
+ ch := p.doChanRetrieve(ctx, key)
+
+ select {
+ case r := <-ch:
+ return r.Val.(aws.Credentials), r.Err
+ case <-ctx.Done():
+ return aws.Credentials{}, errors.New("s3express retrieve credentials canceled")
+ }
+}
+
+func (p *defaultS3ExpressCredentialsProvider) retrieve(ctx context.Context, key cacheKey) (aws.Credentials, error) {
+ resp, err := p.client.CreateSession(ctx, &CreateSessionInput{
+ Bucket: aws.String(key.Bucket),
+ })
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+
+ creds, err := credentialsFromResponse(resp)
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+
+ p.cache.Put(key, creds)
+ return *creds, nil
+}
+
+func credentialsFromResponse(o *CreateSessionOutput) (*aws.Credentials, error) {
+ if o.Credentials == nil {
+ return nil, errors.New("s3express session credentials unset")
+ }
+
+ if o.Credentials.AccessKeyId == nil || o.Credentials.SecretAccessKey == nil || o.Credentials.SessionToken == nil || o.Credentials.Expiration == nil {
+ return nil, errors.New("s3express session credentials missing one or more required fields")
+ }
+
+ return &aws.Credentials{
+ AccessKeyID: *o.Credentials.AccessKeyId,
+ SecretAccessKey: *o.Credentials.SecretAccessKey,
+ SessionToken: *o.Credentials.SessionToken,
+ CanExpire: true,
+ Expires: *o.Credentials.Expiration,
+ }, nil
+}
+
+func gethmac(p, key string) string {
+ hash := hmac.New(sha256.New, []byte(key))
+ hash.Write([]byte(p))
+ return string(hash.Sum(nil))
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_resolve.go
new file mode 100644
index 00000000..7c7a7b42
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_resolve.go
@@ -0,0 +1,39 @@
+package s3
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+)
+
+// If the caller hasn't provided an S3Express provider, we use our default
+// which will grab a reference to the S3 client itself in finalization.
+func resolveExpressCredentials(o *Options) {
+ if o.ExpressCredentials == nil {
+ o.ExpressCredentials = newDefaultS3ExpressCredentialsProvider()
+ }
+}
+
+// Config finalizer: if we're using the default S3Express implementation, grab
+// a reference to the client for its CreateSession API, and the underlying
+// sigv4 credentials provider for cache keying.
+func finalizeExpressCredentials(o *Options, c *Client) {
+ if p, ok := o.ExpressCredentials.(*defaultS3ExpressCredentialsProvider); ok {
+ p.client = c
+ p.v4creds = o.Credentials
+ }
+}
+
+// Operation config finalizer: update the sigv4 credentials on the default
+// express provider in case it changed to ensure different cache keys
+func finalizeOperationExpressCredentials(o *Options, c Client) {
+ if p, ok := o.ExpressCredentials.(*defaultS3ExpressCredentialsProvider); ok {
+ o.ExpressCredentials = p.CloneWithBaseCredentials(o.Credentials)
+ }
+}
+
+// NewFromConfig resolver: pull from opaque sources if it exists.
+func resolveDisableExpressAuth(cfg aws.Config, o *Options) {
+ if v, ok := customizations.ResolveDisableExpressAuth(cfg.ConfigSources); ok {
+ o.DisableS3ExpressSessionAuth = &v
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
index 8643d42f..6e392285 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
@@ -19,6 +19,7 @@
"api_op_CopyObject.go",
"api_op_CreateBucket.go",
"api_op_CreateMultipartUpload.go",
+ "api_op_CreateSession.go",
"api_op_DeleteBucket.go",
"api_op_DeleteBucketAnalyticsConfiguration.go",
"api_op_DeleteBucketCors.go",
@@ -72,6 +73,7 @@
"api_op_ListBucketInventoryConfigurations.go",
"api_op_ListBucketMetricsConfigurations.go",
"api_op_ListBuckets.go",
+ "api_op_ListDirectoryBuckets.go",
"api_op_ListMultipartUploads.go",
"api_op_ListObjectVersions.go",
"api_op_ListObjects.go",
@@ -107,15 +109,20 @@
"api_op_UploadPart.go",
"api_op_UploadPartCopy.go",
"api_op_WriteGetObjectResponse.go",
+ "auth.go",
"deserializers.go",
"doc.go",
"endpoints.go",
+ "endpoints_config_test.go",
+ "endpoints_test.go",
"eventstream.go",
"generated.json",
"internal/endpoints/endpoints.go",
"internal/endpoints/endpoints_test.go",
+ "options.go",
"protocol_test.go",
"serializers.go",
+ "snapshot_test.go",
"types/enums.go",
"types/errors.go",
"types/types.go",
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
index 6d275d58..bf19d512 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
@@ -3,4 +3,4 @@
package s3
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.26.5"
+const goModuleVersion = "1.52.1"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/handwritten_paginators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/handwritten_paginators.go
new file mode 100644
index 00000000..6aae79e7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/handwritten_paginators.go
@@ -0,0 +1,214 @@
+package s3
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// ListObjectVersionsAPIClient is a client that implements the ListObjectVersions
+// operation
+type ListObjectVersionsAPIClient interface {
+ ListObjectVersions(context.Context, *ListObjectVersionsInput, ...func(*Options)) (*ListObjectVersionsOutput, error)
+}
+
+var _ ListObjectVersionsAPIClient = (*Client)(nil)
+
+// ListObjectVersionsPaginatorOptions is the paginator options for ListObjectVersions
+type ListObjectVersionsPaginatorOptions struct {
+ // (Optional) The maximum number of Object Versions that you want Amazon S3 to
+ // return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListObjectVersionsPaginator is a paginator for ListObjectVersions
+type ListObjectVersionsPaginator struct {
+ options ListObjectVersionsPaginatorOptions
+ client ListObjectVersionsAPIClient
+ params *ListObjectVersionsInput
+ firstPage bool
+ keyMarker *string
+ versionIDMarker *string
+ isTruncated bool
+}
+
+// NewListObjectVersionsPaginator returns a new ListObjectVersionsPaginator
+func NewListObjectVersionsPaginator(client ListObjectVersionsAPIClient, params *ListObjectVersionsInput, optFns ...func(*ListObjectVersionsPaginatorOptions)) *ListObjectVersionsPaginator {
+ if params == nil {
+ params = &ListObjectVersionsInput{}
+ }
+
+ options := ListObjectVersionsPaginatorOptions{}
+ if params.MaxKeys != nil {
+ options.Limit = aws.ToInt32(params.MaxKeys)
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListObjectVersionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ keyMarker: params.KeyMarker,
+ versionIDMarker: params.VersionIdMarker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListObjectVersionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.isTruncated
+}
+
+// NextPage retrieves the next ListObjectVersions page.
+func (p *ListObjectVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListObjectVersionsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.KeyMarker = p.keyMarker
+ params.VersionIdMarker = p.versionIDMarker
+
+ var limit int32
+ if p.options.Limit > 0 {
+ limit = p.options.Limit
+ }
+ if limit > 0 {
+ params.MaxKeys = aws.Int32(limit)
+ }
+
+ result, err := p.client.ListObjectVersions(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.keyMarker
+ p.isTruncated = aws.ToBool(result.IsTruncated)
+ p.keyMarker = nil
+ p.versionIDMarker = nil
+ if aws.ToBool(result.IsTruncated) {
+ p.keyMarker = result.NextKeyMarker
+ p.versionIDMarker = result.NextVersionIdMarker
+ }
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.keyMarker != nil &&
+ *prevToken == *p.keyMarker {
+ p.isTruncated = false
+ }
+
+ return result, nil
+}
+
+// ListMultipartUploadsAPIClient is a client that implements the ListMultipartUploads
+// operation
+type ListMultipartUploadsAPIClient interface {
+ ListMultipartUploads(context.Context, *ListMultipartUploadsInput, ...func(*Options)) (*ListMultipartUploadsOutput, error)
+}
+
+var _ ListMultipartUploadsAPIClient = (*Client)(nil)
+
+// ListMultipartUploadsPaginatorOptions is the paginator options for ListMultipartUploads
+type ListMultipartUploadsPaginatorOptions struct {
+ // (Optional) The maximum number of Multipart Uploads that you want Amazon S3 to
+ // return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListMultipartUploadsPaginator is a paginator for ListMultipartUploads
+type ListMultipartUploadsPaginator struct {
+ options ListMultipartUploadsPaginatorOptions
+ client ListMultipartUploadsAPIClient
+ params *ListMultipartUploadsInput
+ firstPage bool
+ keyMarker *string
+ uploadIDMarker *string
+ isTruncated bool
+}
+
+// NewListMultipartUploadsPaginator returns a new ListMultipartUploadsPaginator
+func NewListMultipartUploadsPaginator(client ListMultipartUploadsAPIClient, params *ListMultipartUploadsInput, optFns ...func(*ListMultipartUploadsPaginatorOptions)) *ListMultipartUploadsPaginator {
+ if params == nil {
+ params = &ListMultipartUploadsInput{}
+ }
+
+ options := ListMultipartUploadsPaginatorOptions{}
+ if params.MaxUploads != nil {
+ options.Limit = aws.ToInt32(params.MaxUploads)
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListMultipartUploadsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ keyMarker: params.KeyMarker,
+ uploadIDMarker: params.UploadIdMarker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListMultipartUploadsPaginator) HasMorePages() bool {
+ return p.firstPage || p.isTruncated
+}
+
+// NextPage retrieves the next ListMultipartUploads page.
+func (p *ListMultipartUploadsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMultipartUploadsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.KeyMarker = p.keyMarker
+ params.UploadIdMarker = p.uploadIDMarker
+
+ var limit int32
+ if p.options.Limit > 0 {
+ limit = p.options.Limit
+ }
+ if limit > 0 {
+ params.MaxUploads = aws.Int32(limit)
+ }
+
+ result, err := p.client.ListMultipartUploads(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.keyMarker
+ p.isTruncated = aws.ToBool(result.IsTruncated)
+ p.keyMarker = nil
+ p.uploadIDMarker = nil
+ if aws.ToBool(result.IsTruncated) {
+ p.keyMarker = result.NextKeyMarker
+ p.uploadIDMarker = result.NextUploadIdMarker
+ }
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.keyMarker != nil &&
+ *prevToken == *p.keyMarker {
+ p.isTruncated = false
+ }
+
+ return result, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/context.go
new file mode 100644
index 00000000..91b8fde0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/context.go
@@ -0,0 +1,21 @@
+package customizations
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+type bucketKey struct{}
+
+// SetBucket stores a bucket name within the request context, which is required
+// for a variety of custom S3 behaviors.
+func SetBucket(ctx context.Context, bucket string) context.Context {
+ return middleware.WithStackValue(ctx, bucketKey{}, bucket)
+}
+
+// GetBucket retrieves a stored bucket name within a context.
+func GetBucket(ctx context.Context) string {
+ v, _ := middleware.GetStackValue(ctx, bucketKey{}).(string)
+ return v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/doc.go
index 4629e494..e1d1cbef 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/doc.go
@@ -3,16 +3,15 @@ Package customizations provides customizations for the Amazon S3 API client.
This package provides support for following S3 customizations
- ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type
+ ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type
- UpdateEndpoint Middleware: resolves a custom endpoint as per s3 config options
+ UpdateEndpoint Middleware: resolves a custom endpoint as per s3 config options
- RemoveBucket Middleware: removes a serialized bucket name from request url path
+ RemoveBucket Middleware: removes a serialized bucket name from request url path
- processResponseWith200Error Middleware: Deserializing response error with 200 status code
+ processResponseWith200Error Middleware: Deserializing response error with 200 status code
-
-Virtual Host style url addressing
+# Virtual Host style url addressing
Since serializers serialize by default as path style url, we use customization
to modify the endpoint url when `UsePathStyle` option on S3Client is unset or
@@ -24,8 +23,7 @@ UsePathStyle was enabled. This behavior is also used if UseDualStackEndpoint is
https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html#dual-stack-endpoints-description
-
-Transfer acceleration
+# Transfer acceleration
By default S3 Transfer acceleration support is disabled. By enabling `UseAccelerate`
option on S3Client, one can enable s3 transfer acceleration support. Transfer
@@ -33,15 +31,12 @@ acceleration only works with Virtual Host style addressing, and thus `UsePathSty
option if set is ignored. Transfer acceleration is not supported for S3 operations
DeleteBucket, ListBuckets, and CreateBucket.
-
-Dualstack support
+# Dualstack support
By default dualstack support for s3 client is disabled. By enabling `UseDualstack`
option on s3 client, you can enable dualstack endpoint support.
-
-Endpoint customizations
-
+# Endpoint customizations
Customizations to lookup ARN, process ARN needs to happen before request serialization.
UpdateEndpoint middleware which mutates resources based on Options such as
@@ -49,25 +44,23 @@ UseDualstack, UseAccelerate for modifying resolved endpoint are executed after
request serialization. Remove bucket middleware is executed after
an request is serialized, and removes the serialized bucket name from request path
- Middleware layering:
-
+ Middleware layering:
- Initialize : HTTP Request -> ARN Lookup -> Input-Validation -> Serialize step
-
- Serialize : HTTP Request -> Process ARN -> operation serializer -> Update-Endpoint customization -> Remove-Bucket -> next middleware
+ Initialize : HTTP Request -> ARN Lookup -> Input-Validation -> Serialize step
+ Serialize : HTTP Request -> Process ARN -> operation serializer -> Update-Endpoint customization -> Remove-Bucket -> next middleware
Customization options:
- UseARNRegion (Disabled by Default)
- UsePathStyle (Disabled by Default)
+ UseARNRegion (Disabled by Default)
- UseAccelerate (Disabled by Default)
+ UsePathStyle (Disabled by Default)
- UseDualstack (Disabled by Default)
+ UseAccelerate (Disabled by Default)
+ UseDualstack (Disabled by Default)
-Handle Error response with 200 status code
+# Handle Error response with 200 status code
S3 operations: CopyObject, CompleteMultipartUpload, UploadPartCopy can have an
error Response with status code 2xx. The processResponseWith200Error middleware
@@ -79,9 +72,8 @@ than response deserialization. Since the behavior of Deserialization is in
reverse order to the other stack steps its easier to consider that "after" means
"before".
- Middleware layering:
-
- HTTP Response -> handle 200 error customization -> deserialize
+ Middleware layering:
+ HTTP Response -> handle 200 error customization -> deserialize
*/
package customizations
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express.go
new file mode 100644
index 00000000..8cc0b362
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express.go
@@ -0,0 +1,44 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+)
+
+// S3ExpressCredentialsProvider retrieves credentials for the S3Express storage
+// class.
+type S3ExpressCredentialsProvider interface {
+ Retrieve(ctx context.Context, bucket string) (aws.Credentials, error)
+}
+
+// ExpressIdentityResolver retrieves identity for the S3Express storage class.
+type ExpressIdentityResolver struct {
+ Provider S3ExpressCredentialsProvider
+}
+
+var _ (auth.IdentityResolver) = (*ExpressIdentityResolver)(nil)
+
+// GetIdentity retrieves AWS credentials using the underlying provider.
+func (v *ExpressIdentityResolver) GetIdentity(ctx context.Context, props smithy.Properties) (
+ auth.Identity, error,
+) {
+ bucket, ok := GetIdentityPropertiesBucket(&props)
+ if !ok {
+ bucket = GetBucket(ctx)
+ }
+ if bucket == "" {
+ return nil, fmt.Errorf("bucket name is missing")
+ }
+
+ creds, err := v.Provider.Retrieve(ctx, bucket)
+ if err != nil {
+ return nil, fmt.Errorf("get credentials: %v", err)
+ }
+
+ return &internalauthsmithy.CredentialsAdapter{Credentials: creds}, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_config.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_config.go
new file mode 100644
index 00000000..bb22d347
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_config.go
@@ -0,0 +1,18 @@
+package customizations
+
+type s3DisableExpressAuthProvider interface {
+ GetS3DisableExpressAuth() (bool, bool)
+}
+
+// ResolveDisableExpressAuth pulls S3DisableExpressAuth setting from config
+// sources.
+func ResolveDisableExpressAuth(configs []interface{}) (value bool, exists bool) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(s3DisableExpressAuthProvider); ok {
+ if value, exists = p.GetS3DisableExpressAuth(); exists {
+ break
+ }
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_default_checksum.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_default_checksum.go
new file mode 100644
index 00000000..cf3ff596
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_default_checksum.go
@@ -0,0 +1,42 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+
+ ictx "github.com/aws/aws-sdk-go-v2/internal/context"
+ "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type expressDefaultChecksumMiddleware struct{}
+
+func (*expressDefaultChecksumMiddleware) ID() string {
+ return "expressDefaultChecksum"
+}
+
+func (*expressDefaultChecksumMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if ictx.GetS3Backend(ctx) == ictx.S3BackendS3Express && ictx.GetChecksumInputAlgorithm(ctx) == "" {
+ ctx = ictx.SetChecksumInputAlgorithm(ctx, string(checksum.AlgorithmCRC32))
+ }
+ return next.HandleFinalize(ctx, in)
+}
+
+// AddExpressDefaultChecksumMiddleware appends a step to default to CRC32 for
+// S3Express requests. This should only be applied to operations where a
+// checksum is required (e.g. DeleteObject).
+func AddExpressDefaultChecksumMiddleware(s *middleware.Stack) error {
+ err := s.Finalize.Insert(
+ &expressDefaultChecksumMiddleware{},
+ "AWSChecksum:ComputeInputPayloadChecksum",
+ middleware.Before,
+ )
+ if err != nil {
+ return fmt.Errorf("add expressDefaultChecksum: %v", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_properties.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_properties.go
new file mode 100644
index 00000000..171de461
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_properties.go
@@ -0,0 +1,21 @@
+package customizations
+
+import "github.com/aws/smithy-go"
+
+// GetPropertiesBackend returns a resolved endpoint backend from the property
+// set.
+func GetPropertiesBackend(p *smithy.Properties) string {
+ v, _ := p.Get("backend").(string)
+ return v
+}
+
+// GetIdentityPropertiesBucket returns the S3 bucket from identity properties.
+func GetIdentityPropertiesBucket(ip *smithy.Properties) (string, bool) {
+ v, ok := ip.Get(bucketKey{}).(string)
+ return v, ok
+}
+
+// SetIdentityPropertiesBucket sets the S3 bucket to identity properties.
+func SetIdentityPropertiesBucket(ip *smithy.Properties, bucket string) {
+ ip.Set(bucketKey{}, bucket)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_signer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_signer.go
new file mode 100644
index 00000000..545e5b22
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_signer.go
@@ -0,0 +1,109 @@
+package customizations
+
+import (
+ "context"
+ "net/http"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/smithy-go/middleware"
+)
+
+const (
+ s3ExpressSignerVersion = "com.amazonaws.s3#sigv4express"
+ headerAmzSessionToken = "x-amz-s3session-token"
+)
+
+// adapts a v4 signer for S3Express
+type s3ExpressSignerAdapter struct {
+ v4 v4.HTTPSigner
+}
+
+// SignHTTP performs S3Express signing on a request, which is identical to
+// SigV4 signing save for an additional header containing the S3Express
+// session token.
+func (s *s3ExpressSignerAdapter) SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error {
+ r.Header.Set(headerAmzSessionToken, credentials.SessionToken)
+ optFns = append(optFns, func(o *v4.SignerOptions) {
+ o.DisableSessionToken = true
+ })
+ return s.v4.SignHTTP(ctx, credentials, r, payloadHash, service, region, signingTime, optFns...)
+}
+
+// adapts S3ExpressCredentialsProvider to the standard AWS
+// CredentialsProvider interface
+type s3ExpressCredentialsAdapter struct {
+ provider S3ExpressCredentialsProvider
+ bucket string
+}
+
+func (c *s3ExpressCredentialsAdapter) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ return c.provider.Retrieve(ctx, c.bucket)
+}
+
+// S3ExpressSignHTTPRequestMiddleware signs S3 S3Express requests.
+//
+// This is NOT mutually exclusive with existing v4 or v4a signer handling on
+// the stack itself, but only one handler will actually perform signing based
+// on the provided signing version in the context.
+type S3ExpressSignHTTPRequestMiddleware struct {
+ Credentials S3ExpressCredentialsProvider
+ Signer v4.HTTPSigner
+ LogSigning bool
+}
+
+// ID identifies S3ExpressSignHTTPRequestMiddleware.
+func (*S3ExpressSignHTTPRequestMiddleware) ID() string {
+ return "S3ExpressSigning"
+}
+
+// HandleFinalize will sign the request if the S3Express signer has been
+// selected.
+func (m *S3ExpressSignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if GetSignerVersion(ctx) != s3ExpressSignerVersion {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: m.credentialsAdapter(ctx),
+ Signer: m.signerAdapter(),
+ LogSigning: m.LogSigning,
+ })
+ return mw.HandleFinalize(ctx, in, next)
+}
+
+func (m *S3ExpressSignHTTPRequestMiddleware) credentialsAdapter(ctx context.Context) aws.CredentialsProvider {
+ return &s3ExpressCredentialsAdapter{
+ provider: m.Credentials,
+ bucket: GetBucket(ctx),
+ }
+}
+
+func (m *S3ExpressSignHTTPRequestMiddleware) signerAdapter() v4.HTTPSigner {
+ return &s3ExpressSignerAdapter{v4: m.Signer}
+}
+
+type s3ExpressPresignerAdapter struct {
+ v4 v4.HTTPPresigner
+}
+
+// SignHTTP performs S3Express signing on a request, which is identical to
+// SigV4 signing save for an additional header containing the S3Express
+// session token.
+func (s *s3ExpressPresignerAdapter) PresignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) (
+ string, http.Header, error,
+) {
+ r.Header.Set(headerAmzSessionToken, credentials.SessionToken)
+ optFns = append(optFns, func(o *v4.SignerOptions) {
+ o.DisableSessionToken = true
+ })
+ return s.v4.PresignHTTP(ctx, credentials, r, payloadHash, service, region, signingTime, optFns...)
+}
+
+var (
+ _ aws.CredentialsProvider = &s3ExpressCredentialsAdapter{}
+ _ v4.HTTPSigner = &s3ExpressSignerAdapter{}
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_signer_smithy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_signer_smithy.go
new file mode 100644
index 00000000..e3ec7f01
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_signer_smithy.go
@@ -0,0 +1,61 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ExpressSigner signs requests for the sigv4-s3express auth scheme.
+//
+// This signer respects the aws.auth#sigv4 properties for signing name and
+// region.
+type ExpressSigner struct {
+ Signer v4.HTTPSigner
+ Logger logging.Logger
+ LogSigning bool
+}
+
+var _ (smithyhttp.Signer) = (*ExpressSigner)(nil)
+
+// SignRequest signs the request with the provided identity.
+func (v *ExpressSigner) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, props smithy.Properties) error {
+ ca, ok := identity.(*internalauthsmithy.CredentialsAdapter)
+ if !ok {
+ return fmt.Errorf("unexpected identity type: %T", identity)
+ }
+
+ name, ok := smithyhttp.GetSigV4SigningName(&props)
+ if !ok {
+ return fmt.Errorf("sigv4 signing name is required for s3express variant")
+ }
+
+ region, ok := smithyhttp.GetSigV4SigningRegion(&props)
+ if !ok {
+ return fmt.Errorf("sigv4 signing region is required for s3express variant")
+ }
+
+ hash := v4.GetPayloadHash(ctx)
+
+ r.Header.Set(headerAmzSessionToken, ca.Credentials.SessionToken)
+ err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, sdk.NowTime(), func(o *v4.SignerOptions) {
+ o.DisableSessionToken = true
+
+ o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props)
+
+ o.Logger = v.Logger
+ o.LogSigning = v.LogSigning
+ })
+ if err != nil {
+ return fmt.Errorf("sign http: %v", err)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/process_arn_resource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/process_arn_resource.go
index a232e622..bbc971f2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/process_arn_resource.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/process_arn_resource.go
@@ -50,6 +50,10 @@ func (m *processARNResource) HandleSerialize(
) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
// check if arn was provided, if not skip this middleware
arnValue, ok := s3shared.GetARNResourceFromContext(ctx)
if !ok {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/remove_bucket_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/remove_bucket_middleware.go
index 2e030f29..cf3f4dc8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/remove_bucket_middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/remove_bucket_middleware.go
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/transport/http"
)
@@ -21,6 +22,10 @@ func (m *removeBucketFromPathMiddleware) HandleSerialize(
) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
// check if a bucket removal from HTTP path is required
bucket, ok := getRemoveBucketFromPath(ctx)
if !ok {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/s3_object_lambda.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/s3_object_lambda.go
index 325b2d36..6e1d4472 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/s3_object_lambda.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/s3_object_lambda.go
@@ -30,6 +30,10 @@ func (t *s3ObjectLambdaEndpoint) HandleSerialize(
) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
if !t.UseEndpoint {
return next.HandleSerialize(ctx, in)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/signer_wrapper.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/signer_wrapper.go
index 6689acb8..756823cb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/signer_wrapper.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/signer_wrapper.go
@@ -3,6 +3,7 @@ package customizations
import (
"context"
"fmt"
+ "strings"
"github.com/aws/aws-sdk-go-v2/aws"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
@@ -76,15 +77,21 @@ func (s *SignHTTPRequestMiddleware) ID() string {
return "Signing"
}
-// HandleFinalize will take the provided input and sign the request using the SigV4 authentication scheme
+// HandleFinalize will take the provided input and handle signing for either
+// SigV4 or SigV4A as called for.
func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
- // fetch signer type from context
- signerVersion := GetSignerVersion(ctx)
+ sv := GetSignerVersion(ctx)
- switch signerVersion {
- case v4a.Version:
+ if strings.EqualFold(sv, v4.Version) {
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: s.credentialsProvider,
+ Signer: s.v4Signer,
+ LogSigning: s.logSigning,
+ })
+ return mw.HandleFinalize(ctx, in, next)
+ } else if strings.EqualFold(sv, v4a.Version) {
v4aCredentialProvider, ok := s.credentialsProvider.(v4a.CredentialsProvider)
if !ok {
return out, metadata, fmt.Errorf("invalid credential-provider provided for sigV4a Signer")
@@ -96,15 +103,9 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
LogSigning: s.logSigning,
})
return mw.HandleFinalize(ctx, in, next)
-
- default:
- mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
- CredentialsProvider: s.credentialsProvider,
- Signer: s.v4Signer,
- LogSigning: s.logSigning,
- })
- return mw.HandleFinalize(ctx, in, next)
}
+
+ return next.HandleFinalize(ctx, in)
}
// RegisterSigningMiddleware registers the wrapper signing middleware to the stack. If a signing middleware is already
@@ -124,6 +125,7 @@ func RegisterSigningMiddleware(stack *middleware.Stack, signingMiddleware *SignH
// PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware.
type PresignHTTPRequestMiddlewareOptions struct {
CredentialsProvider aws.CredentialsProvider
+ ExpressCredentials S3ExpressCredentialsProvider
V4Presigner v4.HTTPPresigner
V4aPresigner v4a.HTTPPresigner
LogSigning bool
@@ -139,6 +141,9 @@ type PresignHTTPRequestMiddleware struct {
// cred provider and signer for sigv4
credentialsProvider aws.CredentialsProvider
+ // s3Express credentials
+ expressCredentials S3ExpressCredentialsProvider
+
// sigV4 signer
v4Signer v4.HTTPPresigner
@@ -153,6 +158,7 @@ type PresignHTTPRequestMiddleware struct {
func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware {
return &PresignHTTPRequestMiddleware{
credentialsProvider: options.CredentialsProvider,
+ expressCredentials: options.ExpressCredentials,
v4Signer: options.V4Presigner,
v4aSigner: options.V4aPresigner,
logSigning: options.LogSigning,
@@ -175,26 +181,34 @@ func (p *PresignHTTPRequestMiddleware) HandleFinalize(
signerVersion := GetSignerVersion(ctx)
switch signerVersion {
- case v4a.Version:
- v4aCredentialProvider, ok := p.credentialsProvider.(v4a.CredentialsProvider)
- if !ok {
- return out, metadata, fmt.Errorf("invalid credential-provider provided for sigV4a Signer")
- }
-
+ case "aws.auth#sigv4a":
mw := v4a.NewPresignHTTPRequestMiddleware(v4a.PresignHTTPRequestMiddlewareOptions{
- CredentialsProvider: v4aCredentialProvider,
- Presigner: p.v4aSigner,
- LogSigning: p.logSigning,
+ CredentialsProvider: &v4a.SymmetricCredentialAdaptor{
+ SymmetricProvider: p.credentialsProvider,
+ },
+ Presigner: p.v4aSigner,
+ LogSigning: p.logSigning,
})
return mw.HandleFinalize(ctx, in, next)
-
- default:
+ case "aws.auth#sigv4":
mw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
CredentialsProvider: p.credentialsProvider,
Presigner: p.v4Signer,
LogSigning: p.logSigning,
})
return mw.HandleFinalize(ctx, in, next)
+ case s3ExpressSignerVersion:
+ mw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: &s3ExpressCredentialsAdapter{
+ provider: p.expressCredentials,
+ bucket: GetBucket(ctx),
+ },
+ Presigner: &s3ExpressPresignerAdapter{v4: p.v4Signer},
+ LogSigning: p.logSigning,
+ })
+ return mw.HandleFinalize(ctx, in, next)
+ default:
+ return out, metadata, fmt.Errorf("unsupported signer type \"%s\"", signerVersion)
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/update_endpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/update_endpoint.go
index 209e554e..eedfc7ee 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/update_endpoint.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/update_endpoint.go
@@ -35,7 +35,6 @@ type UpdateEndpointParameterAccessor struct {
// UpdateEndpointOptions provides the options for the UpdateEndpoint middleware setup.
type UpdateEndpointOptions struct {
-
// Accessor are parameter accessors used by the middleware
Accessor UpdateEndpointParameterAccessor
@@ -70,9 +69,9 @@ func UpdateEndpoint(stack *middleware.Stack, options UpdateEndpointOptions) (err
const serializerID = "OperationSerializer"
// initial arn look up middleware
- err = stack.Initialize.Add(&s3shared.ARNLookup{
+ err = stack.Initialize.Insert(&s3shared.ARNLookup{
GetARNValue: options.Accessor.GetBucketFromInput,
- }, middleware.Before)
+ }, "legacyEndpointContextSetter", middleware.After)
if err != nil {
return err
}
@@ -142,6 +141,10 @@ func (u *updateEndpoint) HandleSerialize(
) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
// if arn was processed, skip this middleware
if _, ok := s3shared.GetARNResourceFromContext(ctx); ok {
return next.HandleSerialize(ctx, in)
@@ -256,8 +259,11 @@ func removeBucketFromPath(u *url.URL, bucket string) {
}
// hostCompatibleBucketName returns true if the request should
-// put the bucket in the host. This is false if S3ForcePathStyle is
-// explicitly set or if the bucket is not DNS compatible.
+// put the bucket in the host. This is false if the bucket is not
+// DNS compatible or the EndpointResolver resolves an aws.Endpoint with
+// HostnameImmutable member set to true.
+//
+// https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Endpoint.HostnameImmutable
func hostCompatibleBucketName(u *url.URL, bucket string) bool {
// Bucket might be DNS compatible but dots in the hostname will fail
// certificate validation, so do not use host-style.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
index cd09031f..f3e6b075 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
@@ -91,13 +91,17 @@ var partitionRegexp = struct {
AwsCn *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
AwsUsGov *regexp.Regexp
}{
- Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
}
@@ -195,6 +199,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.ap-south-1.amazonaws.com",
},
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-south-2.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "ap-southeast-1",
}: endpoints.Endpoint{
@@ -230,6 +243,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.ap-southeast-3.amazonaws.com",
},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-southeast-4.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "aws-global",
}: endpoints.Endpoint{
@@ -260,6 +282,27 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.ca-central-1.amazonaws.com",
},
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.ca-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.ca-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ca-west-1.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
@@ -269,6 +312,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.eu-central-1.amazonaws.com",
},
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-central-2.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{},
@@ -287,6 +339,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.eu-south-1.amazonaws.com",
},
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-south-2.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{
@@ -327,6 +388,15 @@ var defaultPartitions = endpoints.Partitions{
},
Deprecated: aws.TrueTernary,
},
+ endpoints.EndpointKey{
+ Region: "fips-ca-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.ca-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
endpoints.EndpointKey{
Region: "fips-us-east-1",
}: endpoints.Endpoint{
@@ -363,6 +433,24 @@ var defaultPartitions = endpoints.Partitions{
},
Deprecated: aws.TrueTernary,
},
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.il-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.me-central-1.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
@@ -574,15 +662,61 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "fips-us-iso-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-iso-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-iso-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
endpoints.EndpointKey{
Region: "us-iso-east-1",
}: endpoints.Endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.us-iso-east-1.c2s.ic.gov",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
endpoints.EndpointKey{
Region: "us-iso-west-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.us-iso-west-1.c2s.ic.gov",
+ },
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov",
+ },
},
},
{
@@ -606,11 +740,74 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "fips-us-isob-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
endpoints.EndpointKey{
Region: "us-isob-east-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.us-isob-east-1.sc2s.sgov.gov",
+ },
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov",
+ },
},
},
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "s3.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "s3.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ },
{
ID: "aws-us-gov",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
@@ -776,6 +973,32 @@ func GetDNSSuffix(id string, options Options) (string, error) {
}
+ case strings.EqualFold(id, "aws-iso-e"):
+ switch variant {
+ case endpoints.FIPSVariant:
+ return "cloud.adc-e.uk", nil
+
+ case 0:
+ return "cloud.adc-e.uk", nil
+
+ default:
+ return "", fmt.Errorf("unsupported endpoint variant %v, in partition %s", variant, id)
+
+ }
+
+ case strings.EqualFold(id, "aws-iso-f"):
+ switch variant {
+ case endpoints.FIPSVariant:
+ return "csp.hci.ic.gov", nil
+
+ case 0:
+ return "csp.hci.ic.gov", nil
+
+ default:
+ return "", fmt.Errorf("unsupported endpoint variant %v, in partition %s", variant, id)
+
+ }
+
case strings.EqualFold(id, "aws-us-gov"):
switch variant {
case endpoints.DualStackVariant:
@@ -817,6 +1040,12 @@ func GetDNSSuffixFromRegion(region string, options Options) (string, error) {
case partitionRegexp.AwsIsoB.MatchString(region):
return GetDNSSuffix("aws-iso-b", options)
+ case partitionRegexp.AwsIsoE.MatchString(region):
+ return GetDNSSuffix("aws-iso-e", options)
+
+ case partitionRegexp.AwsIsoF.MatchString(region):
+ return GetDNSSuffix("aws-iso-f", options)
+
case partitionRegexp.AwsUsGov.MatchString(region):
return GetDNSSuffix("aws-us-gov", options)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go
new file mode 100644
index 00000000..064bcefb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go
@@ -0,0 +1,314 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ "github.com/aws/aws-sdk-go-v2/internal/v4a"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+)
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The threshold ContentLength in bytes for HTTP PUT request to receive {Expect:
+ // 100-continue} header. Setting to -1 will disable adding the Expect header to
+ // requests; setting to 0 will set the threshold to default 2MB
+ ContinueHeaderThresholdBytes int64
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // Allows you to disable S3 Multi-Region access points feature.
+ DisableMultiRegionAccessPoints bool
+
+ // Disables this client's usage of Session Auth for S3Express buckets and reverts
+ // to using conventional SigV4 for those.
+ DisableS3ExpressSessionAuth *bool
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
+ // endpoint, set the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service operation. This should be
+ // used over the deprecated EndpointResolver.
+ EndpointResolverV2 EndpointResolverV2
+
+ // The credentials provider for S3Express requests.
+ ExpressCredentials ExpressCredentialsProvider
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. If specified in an operation call's
+ // functional options with a value that is different than the constructed client's
+ // Options, the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // Allows you to enable arn region support for the service.
+ UseARNRegion bool
+
+ // Allows you to enable S3 Accelerate feature. All operations compatible with S3
+ // Accelerate will use the accelerate endpoint for requests. Requests not
+ // compatible will fall back to normal S3 requests. The bucket must be enabled for
+ // accelerate to be used with S3 client with accelerate enabled. If the bucket is
+ // not enabled for accelerate an error will be returned. The bucket name must be
+ // DNS compatible to work with accelerate.
+ UseAccelerate bool
+
+ // Allows you to enable dual-stack endpoint support for the service.
+ //
+ // Deprecated: Set dual-stack by setting UseDualStackEndpoint on
+ // EndpointResolverOptions. When EndpointResolverOptions' UseDualStackEndpoint
+ // field is set it overrides this field value.
+ UseDualstack bool
+
+ // Allows you to enable the client to use path-style addressing, i.e.,
+ // https://s3.amazonaws.com/BUCKET/KEY . By default, the S3 client will use virtual
+ // hosted bucket addressing when possible( https://BUCKET.s3.amazonaws.com/KEY ).
+ UsePathStyle bool
+
+ // Signature Version 4a (SigV4a) Signer
+ httpSignerV4a httpSignerV4a
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // The auth scheme resolver which determines how to authenticate for each
+ // operation.
+ AuthSchemeResolver AuthSchemeResolver
+
+ // The list of auth schemes supported by the client.
+ AuthSchemes []smithyhttp.AuthScheme
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+
+func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
+ if schemeID == "aws.auth#sigv4" {
+ return getSigV4IdentityResolver(o)
+ }
+ if schemeID == "com.amazonaws.s3#sigv4express" {
+ return getExpressIdentityResolver(o)
+ }
+ if schemeID == "aws.auth#sigv4a" {
+ return getSigV4AIdentityResolver(o)
+ }
+ if schemeID == "smithy.api#noAuth" {
+ return &smithyauth.AnonymousIdentityResolver{}
+ }
+ return nil
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
+ }
+ return nil
+}
+
+// WithSigV4SigningName applies an override to the authentication workflow to
+// use the given signing name for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing name from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningName(name string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+// WithSigV4SigningRegion applies an override to the authentication workflow to
+// use the given signing region for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningRegion(region string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func getSigV4AIdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &v4a.CredentialsProviderAdapter{
+ Provider: &v4a.SymmetricCredentialAdaptor{
+ SymmetricProvider: o.Credentials,
+ },
+ }
+ }
+ return nil
+}
+
+// WithSigV4ASigningRegions applies an override to the authentication workflow to
+// use the given signing region set for SigV4A-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region set from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4ASigningRegions(regions []string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+ ) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, regions)
+ return next.HandleFinalize(ctx, in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Finalize.Insert(
+ middleware.FinalizeMiddlewareFunc("withSigV4ASigningRegions", fn),
+ "Signing",
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func ignoreAnonymousAuth(options *Options) {
+ if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
+ options.Credentials = nil
+ }
+}
+
+func getExpressIdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.ExpressCredentials != nil {
+ return &s3cust.ExpressIdentityResolver{Provider: o.ExpressCredentials}
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serialize_immutable_hostname_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serialize_immutable_hostname_bucket.go
new file mode 100644
index 00000000..4e34d1a2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serialize_immutable_hostname_bucket.go
@@ -0,0 +1,77 @@
+package s3
+
+import (
+ "context"
+ "fmt"
+ "path"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// serializeImmutableHostnameBucketMiddleware handles injecting the bucket name into
+// "immutable" hostnames resolved via v1 EndpointResolvers. This CANNOT be done in
+// serialization, since v2 endpoint resolution requires removing the {Bucket} path
+// segment from all S3 requests.
+//
+// This will only be done for non-ARN buckets, as the features that use those require
+// virtualhost manipulation to function and we previously (pre-ep2) expected the caller
+// to handle that in their resolver.
+type serializeImmutableHostnameBucketMiddleware struct {
+ UsePathStyle bool
+}
+
+func (*serializeImmutableHostnameBucketMiddleware) ID() string {
+ return "serializeImmutableHostnameBucket"
+}
+
+func (m *serializeImmutableHostnameBucketMiddleware) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ bucket, ok := bucketFromInput(in.Parameters)
+ if !ok {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ // a bucket being un-vhostable will also force us to use path style
+ usePathStyle := m.UsePathStyle || !awsrulesfn.IsVirtualHostableS3Bucket(bucket, request.URL.Scheme != "https")
+
+ if !smithyhttp.GetHostnameImmutable(ctx) &&
+ !(awsmiddleware.GetRequiresLegacyEndpoints(ctx) && usePathStyle) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ parsedBucket := awsrulesfn.ParseARN(bucket)
+
+ // disallow ARN buckets except for MRAP arns
+ if parsedBucket != nil && len(parsedBucket.Region) > 0 {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ request.URL.Path = path.Join(request.URL.Path, bucket)
+ request.URL.RawPath = path.Join(request.URL.RawPath, httpbinding.EscapePath(bucket, true))
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addSerializeImmutableHostnameBucketMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(
+ &serializeImmutableHostnameBucketMiddleware{
+ UsePathStyle: options.UsePathStyle,
+ },
+ "OperationSerializer",
+ middleware.Before,
+ )
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
index f398aa95..59524bdc 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
@@ -39,11 +39,18 @@ func (m *awsRestxml_serializeOpAbortMultipartUpload) HandleSerialize(ctx context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=AbortMultipartUpload")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=AbortMultipartUpload")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -64,15 +71,6 @@ func awsRestxml_serializeOpHttpBindingsAbortMultipartUploadInput(v *AbortMultipa
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -120,11 +118,18 @@ func (m *awsRestxml_serializeOpCompleteMultipartUpload) HandleSerialize(ctx cont
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=CompleteMultipartUpload")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=CompleteMultipartUpload")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -135,6 +140,7 @@ func (m *awsRestxml_serializeOpCompleteMultipartUpload) HandleSerialize(ctx cont
if input.MultipartUpload != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -168,15 +174,6 @@ func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteM
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ChecksumCRC32 != nil && len(*v.ChecksumCRC32) > 0 {
locationName := "X-Amz-Checksum-Crc32"
encoder.SetHeader(locationName).String(*v.ChecksumCRC32)
@@ -259,11 +256,18 @@ func (m *awsRestxml_serializeOpCopyObject) HandleSerialize(ctx context.Context,
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=CopyObject")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=CopyObject")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -289,18 +293,9 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod
encoder.SetHeader(locationName).String(string(v.ACL))
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
- if v.BucketKeyEnabled {
+ if v.BucketKeyEnabled != nil {
locationName := "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
- encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled)
}
if v.CacheControl != nil && len(*v.CacheControl) > 0 {
@@ -525,11 +520,18 @@ func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ opPath, opQuery := httpbinding.SplitURI("/")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -540,6 +542,7 @@ func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context
if input.CreateBucketConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -578,15 +581,6 @@ func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, e
encoder.SetHeader(locationName).String(string(v.ACL))
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
locationName := "X-Amz-Grant-Full-Control"
encoder.SetHeader(locationName).String(*v.GrantFullControl)
@@ -612,9 +606,9 @@ func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, e
encoder.SetHeader(locationName).String(*v.GrantWriteACP)
}
- if v.ObjectLockEnabledForBucket {
+ if v.ObjectLockEnabledForBucket != nil {
locationName := "X-Amz-Bucket-Object-Lock-Enabled"
- encoder.SetHeader(locationName).Boolean(v.ObjectLockEnabledForBucket)
+ encoder.SetHeader(locationName).Boolean(*v.ObjectLockEnabledForBucket)
}
if len(v.ObjectOwnership) > 0 {
@@ -646,11 +640,18 @@ func (m *awsRestxml_serializeOpCreateMultipartUpload) HandleSerialize(ctx contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?uploads&x-id=CreateMultipartUpload")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?uploads&x-id=CreateMultipartUpload")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -676,18 +677,9 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti
encoder.SetHeader(locationName).String(string(v.ACL))
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
- if v.BucketKeyEnabled {
+ if v.BucketKeyEnabled != nil {
locationName := "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
- encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled)
}
if v.CacheControl != nil && len(*v.CacheControl) > 0 {
@@ -836,6 +828,67 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti
return nil
}
+type awsRestxml_serializeOpCreateSession struct {
+}
+
+func (*awsRestxml_serializeOpCreateSession) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpCreateSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateSessionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/?session")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsCreateSessionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsCreateSessionInput(v *CreateSessionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.SessionMode) > 0 {
+ locationName := "X-Amz-Create-Session-Mode"
+ encoder.SetHeader(locationName).String(string(v.SessionMode))
+ }
+
+ return nil
+}
+
type awsRestxml_serializeOpDeleteBucket struct {
}
@@ -857,11 +910,18 @@ func (m *awsRestxml_serializeOpDeleteBucket) HandleSerialize(ctx context.Context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ opPath, opQuery := httpbinding.SplitURI("/")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -882,15 +942,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketInput(v *DeleteBucketInput, e
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -920,11 +971,18 @@ func (m *awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) HandleSeriali
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics")
+ opPath, opQuery := httpbinding.SplitURI("/?analytics")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -945,15 +1003,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketAnalyticsConfigurationInput(v
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -987,11 +1036,18 @@ func (m *awsRestxml_serializeOpDeleteBucketCors) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?cors")
+ opPath, opQuery := httpbinding.SplitURI("/?cors")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1012,15 +1068,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketCorsInput(v *DeleteBucketCors
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1050,11 +1097,18 @@ func (m *awsRestxml_serializeOpDeleteBucketEncryption) HandleSerialize(ctx conte
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?encryption")
+ opPath, opQuery := httpbinding.SplitURI("/?encryption")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1075,15 +1129,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketEncryptionInput(v *DeleteBuck
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1113,11 +1158,18 @@ func (m *awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) Hand
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering")
+ opPath, opQuery := httpbinding.SplitURI("/?intelligent-tiering")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1138,15 +1190,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketIntelligentTieringConfigurati
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.Id != nil {
encoder.SetQuery("id").String(*v.Id)
}
@@ -1175,11 +1218,18 @@ func (m *awsRestxml_serializeOpDeleteBucketInventoryConfiguration) HandleSeriali
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory")
+ opPath, opQuery := httpbinding.SplitURI("/?inventory")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1200,15 +1250,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketInventoryConfigurationInput(v
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1242,11 +1283,18 @@ func (m *awsRestxml_serializeOpDeleteBucketLifecycle) HandleSerialize(ctx contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?lifecycle")
+ opPath, opQuery := httpbinding.SplitURI("/?lifecycle")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1267,15 +1315,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleInput(v *DeleteBucke
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1305,11 +1344,18 @@ func (m *awsRestxml_serializeOpDeleteBucketMetricsConfiguration) HandleSerialize
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics")
+ opPath, opQuery := httpbinding.SplitURI("/?metrics")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1330,15 +1376,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketMetricsConfigurationInput(v *
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1372,11 +1409,18 @@ func (m *awsRestxml_serializeOpDeleteBucketOwnershipControls) HandleSerialize(ct
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?ownershipControls")
+ opPath, opQuery := httpbinding.SplitURI("/?ownershipControls")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1397,15 +1441,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketOwnershipControlsInput(v *Del
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1435,11 +1470,18 @@ func (m *awsRestxml_serializeOpDeleteBucketPolicy) HandleSerialize(ctx context.C
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policy")
+ opPath, opQuery := httpbinding.SplitURI("/?policy")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1460,15 +1502,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(v *DeleteBucketPo
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1498,11 +1531,18 @@ func (m *awsRestxml_serializeOpDeleteBucketReplication) HandleSerialize(ctx cont
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?replication")
+ opPath, opQuery := httpbinding.SplitURI("/?replication")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1523,15 +1563,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketReplicationInput(v *DeleteBuc
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1561,11 +1592,18 @@ func (m *awsRestxml_serializeOpDeleteBucketTagging) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?tagging")
+ opPath, opQuery := httpbinding.SplitURI("/?tagging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1586,15 +1624,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(v *DeleteBucketT
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1624,11 +1653,18 @@ func (m *awsRestxml_serializeOpDeleteBucketWebsite) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?website")
+ opPath, opQuery := httpbinding.SplitURI("/?website")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1649,15 +1685,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketWebsiteInput(v *DeleteBucketW
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1687,11 +1714,18 @@ func (m *awsRestxml_serializeOpDeleteObject) HandleSerialize(ctx context.Context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=DeleteObject")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=DeleteObject")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1712,18 +1746,9 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectInput(v *DeleteObjectInput, e
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
- if v.BypassGovernanceRetention {
+ if v.BypassGovernanceRetention != nil {
locationName := "X-Amz-Bypass-Governance-Retention"
- encoder.SetHeader(locationName).Boolean(v.BypassGovernanceRetention)
+ encoder.SetHeader(locationName).Boolean(*v.BypassGovernanceRetention)
}
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
@@ -1778,11 +1803,18 @@ func (m *awsRestxml_serializeOpDeleteObjects) HandleSerialize(ctx context.Contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?delete&x-id=DeleteObjects")
+ opPath, opQuery := httpbinding.SplitURI("/?delete&x-id=DeleteObjects")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1793,6 +1825,7 @@ func (m *awsRestxml_serializeOpDeleteObjects) HandleSerialize(ctx context.Contex
if input.Delete != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -1826,18 +1859,9 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectsInput(v *DeleteObjectsInput,
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
- if v.BypassGovernanceRetention {
+ if v.BypassGovernanceRetention != nil {
locationName := "X-Amz-Bypass-Governance-Retention"
- encoder.SetHeader(locationName).Boolean(v.BypassGovernanceRetention)
+ encoder.SetHeader(locationName).Boolean(*v.BypassGovernanceRetention)
}
if len(v.ChecksumAlgorithm) > 0 {
@@ -1884,11 +1908,18 @@ func (m *awsRestxml_serializeOpDeleteObjectTagging) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?tagging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1909,15 +1940,6 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectTaggingInput(v *DeleteObjectT
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -1960,11 +1982,18 @@ func (m *awsRestxml_serializeOpDeletePublicAccessBlock) HandleSerialize(ctx cont
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
+ opPath, opQuery := httpbinding.SplitURI("/?publicAccessBlock")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1985,15 +2014,6 @@ func awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(v *DeletePub
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2023,11 +2043,18 @@ func (m *awsRestxml_serializeOpGetBucketAccelerateConfiguration) HandleSerialize
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?accelerate")
+ opPath, opQuery := httpbinding.SplitURI("/?accelerate")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2048,20 +2075,16 @@ func awsRestxml_serializeOpHttpBindingsGetBucketAccelerateConfigurationInput(v *
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
}
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
return nil
}
@@ -2086,11 +2109,18 @@ func (m *awsRestxml_serializeOpGetBucketAcl) HandleSerialize(ctx context.Context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?acl")
+ opPath, opQuery := httpbinding.SplitURI("/?acl")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2111,15 +2141,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketAclInput(v *GetBucketAclInput, e
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2149,11 +2170,18 @@ func (m *awsRestxml_serializeOpGetBucketAnalyticsConfiguration) HandleSerialize(
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration")
+ opPath, opQuery := httpbinding.SplitURI("/?analytics&x-id=GetBucketAnalyticsConfiguration")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2174,15 +2202,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketAnalyticsConfigurationInput(v *G
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2216,11 +2235,18 @@ func (m *awsRestxml_serializeOpGetBucketCors) HandleSerialize(ctx context.Contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?cors")
+ opPath, opQuery := httpbinding.SplitURI("/?cors")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2241,15 +2267,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketCorsInput(v *GetBucketCorsInput,
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2279,11 +2296,18 @@ func (m *awsRestxml_serializeOpGetBucketEncryption) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?encryption")
+ opPath, opQuery := httpbinding.SplitURI("/?encryption")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2304,15 +2328,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketEncryptionInput(v *GetBucketEncr
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2342,11 +2357,18 @@ func (m *awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) HandleS
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration")
+ opPath, opQuery := httpbinding.SplitURI("/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2367,15 +2389,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketIntelligentTieringConfigurationI
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.Id != nil {
encoder.SetQuery("id").String(*v.Id)
}
@@ -2404,11 +2417,18 @@ func (m *awsRestxml_serializeOpGetBucketInventoryConfiguration) HandleSerialize(
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration")
+ opPath, opQuery := httpbinding.SplitURI("/?inventory&x-id=GetBucketInventoryConfiguration")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2429,15 +2449,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketInventoryConfigurationInput(v *G
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2471,11 +2482,18 @@ func (m *awsRestxml_serializeOpGetBucketLifecycleConfiguration) HandleSerialize(
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?lifecycle")
+ opPath, opQuery := httpbinding.SplitURI("/?lifecycle")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2496,15 +2514,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(v *G
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2534,11 +2543,18 @@ func (m *awsRestxml_serializeOpGetBucketLocation) HandleSerialize(ctx context.Co
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?location")
+ opPath, opQuery := httpbinding.SplitURI("/?location")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2559,15 +2575,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketLocationInput(v *GetBucketLocati
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2597,11 +2604,18 @@ func (m *awsRestxml_serializeOpGetBucketLogging) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?logging")
+ opPath, opQuery := httpbinding.SplitURI("/?logging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2622,15 +2636,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketLoggingInput(v *GetBucketLogging
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2660,11 +2665,18 @@ func (m *awsRestxml_serializeOpGetBucketMetricsConfiguration) HandleSerialize(ct
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration")
+ opPath, opQuery := httpbinding.SplitURI("/?metrics&x-id=GetBucketMetricsConfiguration")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2685,15 +2697,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketMetricsConfigurationInput(v *Get
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2727,11 +2730,18 @@ func (m *awsRestxml_serializeOpGetBucketNotificationConfiguration) HandleSeriali
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?notification")
+ opPath, opQuery := httpbinding.SplitURI("/?notification")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2752,15 +2762,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketNotificationConfigurationInput(v
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2790,11 +2791,18 @@ func (m *awsRestxml_serializeOpGetBucketOwnershipControls) HandleSerialize(ctx c
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?ownershipControls")
+ opPath, opQuery := httpbinding.SplitURI("/?ownershipControls")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2815,15 +2823,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketOwnershipControlsInput(v *GetBuc
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2853,11 +2852,18 @@ func (m *awsRestxml_serializeOpGetBucketPolicy) HandleSerialize(ctx context.Cont
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policy")
+ opPath, opQuery := httpbinding.SplitURI("/?policy")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2878,15 +2884,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(v *GetBucketPolicyIn
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2916,11 +2913,18 @@ func (m *awsRestxml_serializeOpGetBucketPolicyStatus) HandleSerialize(ctx contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policyStatus")
+ opPath, opQuery := httpbinding.SplitURI("/?policyStatus")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -2941,15 +2945,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketPolicyStatusInput(v *GetBucketPo
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -2979,11 +2974,18 @@ func (m *awsRestxml_serializeOpGetBucketReplication) HandleSerialize(ctx context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?replication")
+ opPath, opQuery := httpbinding.SplitURI("/?replication")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3004,15 +3006,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketReplicationInput(v *GetBucketRep
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3042,11 +3035,18 @@ func (m *awsRestxml_serializeOpGetBucketRequestPayment) HandleSerialize(ctx cont
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?requestPayment")
+ opPath, opQuery := httpbinding.SplitURI("/?requestPayment")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3067,15 +3067,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketRequestPaymentInput(v *GetBucket
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3105,11 +3096,18 @@ func (m *awsRestxml_serializeOpGetBucketTagging) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?tagging")
+ opPath, opQuery := httpbinding.SplitURI("/?tagging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3130,15 +3128,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(v *GetBucketTagging
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3168,11 +3157,18 @@ func (m *awsRestxml_serializeOpGetBucketVersioning) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?versioning")
+ opPath, opQuery := httpbinding.SplitURI("/?versioning")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3193,15 +3189,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketVersioningInput(v *GetBucketVers
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3231,11 +3218,18 @@ func (m *awsRestxml_serializeOpGetBucketWebsite) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?website")
+ opPath, opQuery := httpbinding.SplitURI("/?website")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3256,15 +3250,6 @@ func awsRestxml_serializeOpHttpBindingsGetBucketWebsiteInput(v *GetBucketWebsite
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3294,11 +3279,18 @@ func (m *awsRestxml_serializeOpGetObject) HandleSerialize(ctx context.Context, i
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=GetObject")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=GetObject")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3319,15 +3311,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumMode) > 0 {
locationName := "X-Amz-Checksum-Mode"
encoder.SetHeader(locationName).String(string(v.ChecksumMode))
@@ -3367,8 +3350,8 @@ func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder
}
}
- if v.PartNumber != 0 {
- encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ if v.PartNumber != nil {
+ encoder.SetQuery("partNumber").Integer(*v.PartNumber)
}
if v.Range != nil && len(*v.Range) > 0 {
@@ -3448,11 +3431,18 @@ func (m *awsRestxml_serializeOpGetObjectAcl) HandleSerialize(ctx context.Context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?acl")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?acl")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3473,15 +3463,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAclInput(v *GetObjectAclInput, e
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3529,11 +3510,18 @@ func (m *awsRestxml_serializeOpGetObjectAttributes) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?attributes")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?attributes")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3554,15 +3542,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(v *GetObjectAttr
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3577,9 +3556,9 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(v *GetObjectAttr
}
}
- if v.MaxParts != 0 {
+ if v.MaxParts != nil {
locationName := "X-Amz-Max-Parts"
- encoder.SetHeader(locationName).Integer(v.MaxParts)
+ encoder.SetHeader(locationName).Integer(*v.MaxParts)
}
if v.ObjectAttributes != nil {
@@ -3649,11 +3628,18 @@ func (m *awsRestxml_serializeOpGetObjectLegalHold) HandleSerialize(ctx context.C
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?legal-hold")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?legal-hold")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3674,15 +3660,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectLegalHoldInput(v *GetObjectLegal
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3730,11 +3707,18 @@ func (m *awsRestxml_serializeOpGetObjectLockConfiguration) HandleSerialize(ctx c
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?object-lock")
+ opPath, opQuery := httpbinding.SplitURI("/?object-lock")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3755,15 +3739,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectLockConfigurationInput(v *GetObj
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3793,11 +3768,18 @@ func (m *awsRestxml_serializeOpGetObjectRetention) HandleSerialize(ctx context.C
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?retention")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?retention")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3818,15 +3800,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectRetentionInput(v *GetObjectReten
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3874,11 +3847,18 @@ func (m *awsRestxml_serializeOpGetObjectTagging) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?tagging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3899,15 +3879,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectTaggingInput(v *GetObjectTagging
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -3955,11 +3926,18 @@ func (m *awsRestxml_serializeOpGetObjectTorrent) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?torrent")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?torrent")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -3980,15 +3958,6 @@ func awsRestxml_serializeOpHttpBindingsGetObjectTorrentInput(v *GetObjectTorrent
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -4032,11 +4001,18 @@ func (m *awsRestxml_serializeOpGetPublicAccessBlock) HandleSerialize(ctx context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
+ opPath, opQuery := httpbinding.SplitURI("/?publicAccessBlock")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4057,15 +4033,6 @@ func awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(v *GetPublicAcc
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -4095,11 +4062,18 @@ func (m *awsRestxml_serializeOpHeadBucket) HandleSerialize(ctx context.Context,
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ opPath, opQuery := httpbinding.SplitURI("/")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "HEAD"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4120,15 +4094,6 @@ func awsRestxml_serializeOpHttpBindingsHeadBucketInput(v *HeadBucketInput, encod
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -4158,11 +4123,18 @@ func (m *awsRestxml_serializeOpHeadObject) HandleSerialize(ctx context.Context,
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "HEAD"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4183,15 +4155,6 @@ func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encod
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumMode) > 0 {
locationName := "X-Amz-Checksum-Mode"
encoder.SetHeader(locationName).String(string(v.ChecksumMode))
@@ -4231,8 +4194,8 @@ func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encod
}
}
- if v.PartNumber != 0 {
- encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ if v.PartNumber != nil {
+ encoder.SetQuery("partNumber").Integer(*v.PartNumber)
}
if v.Range != nil && len(*v.Range) > 0 {
@@ -4288,11 +4251,18 @@ func (m *awsRestxml_serializeOpListBucketAnalyticsConfigurations) HandleSerializ
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations")
+ opPath, opQuery := httpbinding.SplitURI("/?analytics&x-id=ListBucketAnalyticsConfigurations")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4313,15 +4283,6 @@ func awsRestxml_serializeOpHttpBindingsListBucketAnalyticsConfigurationsInput(v
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ContinuationToken != nil {
encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
}
@@ -4355,11 +4316,18 @@ func (m *awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) Handl
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations")
+ opPath, opQuery := httpbinding.SplitURI("/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4380,15 +4348,6 @@ func awsRestxml_serializeOpHttpBindingsListBucketIntelligentTieringConfiguration
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ContinuationToken != nil {
encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
}
@@ -4417,11 +4376,18 @@ func (m *awsRestxml_serializeOpListBucketInventoryConfigurations) HandleSerializ
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations")
+ opPath, opQuery := httpbinding.SplitURI("/?inventory&x-id=ListBucketInventoryConfigurations")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4442,15 +4408,6 @@ func awsRestxml_serializeOpHttpBindingsListBucketInventoryConfigurationsInput(v
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ContinuationToken != nil {
encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
}
@@ -4484,11 +4441,18 @@ func (m *awsRestxml_serializeOpListBucketMetricsConfigurations) HandleSerialize(
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations")
+ opPath, opQuery := httpbinding.SplitURI("/?metrics&x-id=ListBucketMetricsConfigurations")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4509,15 +4473,6 @@ func awsRestxml_serializeOpHttpBindingsListBucketMetricsConfigurationsInput(v *L
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ContinuationToken != nil {
encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
}
@@ -4551,11 +4506,18 @@ func (m *awsRestxml_serializeOpListBuckets) HandleSerialize(ctx context.Context,
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/")
+ opPath, opQuery := httpbinding.SplitURI("/?x-id=ListBuckets")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4575,6 +4537,70 @@ func awsRestxml_serializeOpHttpBindingsListBucketsInput(v *ListBucketsInput, enc
return nil
}
+type awsRestxml_serializeOpListDirectoryBuckets struct {
+}
+
+func (*awsRestxml_serializeOpListDirectoryBuckets) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListDirectoryBuckets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListDirectoryBucketsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/?x-id=ListDirectoryBuckets")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListDirectoryBucketsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListDirectoryBucketsInput(v *ListDirectoryBucketsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.ContinuationToken != nil {
+ encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
+ }
+
+ if v.MaxDirectoryBuckets != nil {
+ encoder.SetQuery("max-directory-buckets").Integer(*v.MaxDirectoryBuckets)
+ }
+
+ return nil
+}
+
type awsRestxml_serializeOpListMultipartUploads struct {
}
@@ -4596,11 +4622,18 @@ func (m *awsRestxml_serializeOpListMultipartUploads) HandleSerialize(ctx context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?uploads")
+ opPath, opQuery := httpbinding.SplitURI("/?uploads")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4621,15 +4654,6 @@ func awsRestxml_serializeOpHttpBindingsListMultipartUploadsInput(v *ListMultipar
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.Delimiter != nil {
encoder.SetQuery("delimiter").String(*v.Delimiter)
}
@@ -4647,14 +4671,19 @@ func awsRestxml_serializeOpHttpBindingsListMultipartUploadsInput(v *ListMultipar
encoder.SetQuery("key-marker").String(*v.KeyMarker)
}
- if v.MaxUploads != 0 {
- encoder.SetQuery("max-uploads").Integer(v.MaxUploads)
+ if v.MaxUploads != nil {
+ encoder.SetQuery("max-uploads").Integer(*v.MaxUploads)
}
if v.Prefix != nil {
encoder.SetQuery("prefix").String(*v.Prefix)
}
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
if v.UploadIdMarker != nil {
encoder.SetQuery("upload-id-marker").String(*v.UploadIdMarker)
}
@@ -4683,11 +4712,18 @@ func (m *awsRestxml_serializeOpListObjects) HandleSerialize(ctx context.Context,
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ opPath, opQuery := httpbinding.SplitURI("/")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4708,15 +4744,6 @@ func awsRestxml_serializeOpHttpBindingsListObjectsInput(v *ListObjectsInput, enc
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.Delimiter != nil {
encoder.SetQuery("delimiter").String(*v.Delimiter)
}
@@ -4734,8 +4761,22 @@ func awsRestxml_serializeOpHttpBindingsListObjectsInput(v *ListObjectsInput, enc
encoder.SetQuery("marker").String(*v.Marker)
}
- if v.MaxKeys != 0 {
- encoder.SetQuery("max-keys").Integer(v.MaxKeys)
+ if v.MaxKeys != nil {
+ encoder.SetQuery("max-keys").Integer(*v.MaxKeys)
+ }
+
+ if v.OptionalObjectAttributes != nil {
+ locationName := "X-Amz-Optional-Object-Attributes"
+ for i := range v.OptionalObjectAttributes {
+ if len(v.OptionalObjectAttributes[i]) > 0 {
+ escaped := string(v.OptionalObjectAttributes[i])
+ if strings.Index(string(v.OptionalObjectAttributes[i]), `,`) != -1 || strings.Index(string(v.OptionalObjectAttributes[i]), `"`) != -1 {
+ escaped = strconv.Quote(string(v.OptionalObjectAttributes[i]))
+ }
+
+ encoder.AddHeader(locationName).String(string(escaped))
+ }
+ }
}
if v.Prefix != nil {
@@ -4771,11 +4812,18 @@ func (m *awsRestxml_serializeOpListObjectsV2) HandleSerialize(ctx context.Contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?list-type=2")
+ opPath, opQuery := httpbinding.SplitURI("/?list-type=2")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4796,15 +4844,6 @@ func awsRestxml_serializeOpHttpBindingsListObjectsV2Input(v *ListObjectsV2Input,
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ContinuationToken != nil {
encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
}
@@ -4822,12 +4861,26 @@ func awsRestxml_serializeOpHttpBindingsListObjectsV2Input(v *ListObjectsV2Input,
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
}
- if v.FetchOwner {
- encoder.SetQuery("fetch-owner").Boolean(v.FetchOwner)
+ if v.FetchOwner != nil {
+ encoder.SetQuery("fetch-owner").Boolean(*v.FetchOwner)
+ }
+
+ if v.MaxKeys != nil {
+ encoder.SetQuery("max-keys").Integer(*v.MaxKeys)
}
- if v.MaxKeys != 0 {
- encoder.SetQuery("max-keys").Integer(v.MaxKeys)
+ if v.OptionalObjectAttributes != nil {
+ locationName := "X-Amz-Optional-Object-Attributes"
+ for i := range v.OptionalObjectAttributes {
+ if len(v.OptionalObjectAttributes[i]) > 0 {
+ escaped := string(v.OptionalObjectAttributes[i])
+ if strings.Index(string(v.OptionalObjectAttributes[i]), `,`) != -1 || strings.Index(string(v.OptionalObjectAttributes[i]), `"`) != -1 {
+ escaped = strconv.Quote(string(v.OptionalObjectAttributes[i]))
+ }
+
+ encoder.AddHeader(locationName).String(string(escaped))
+ }
+ }
}
if v.Prefix != nil {
@@ -4867,11 +4920,18 @@ func (m *awsRestxml_serializeOpListObjectVersions) HandleSerialize(ctx context.C
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?versions")
+ opPath, opQuery := httpbinding.SplitURI("/?versions")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4892,15 +4952,6 @@ func awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(v *ListObjectVers
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.Delimiter != nil {
encoder.SetQuery("delimiter").String(*v.Delimiter)
}
@@ -4918,14 +4969,33 @@ func awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(v *ListObjectVers
encoder.SetQuery("key-marker").String(*v.KeyMarker)
}
- if v.MaxKeys != 0 {
- encoder.SetQuery("max-keys").Integer(v.MaxKeys)
+ if v.MaxKeys != nil {
+ encoder.SetQuery("max-keys").Integer(*v.MaxKeys)
+ }
+
+ if v.OptionalObjectAttributes != nil {
+ locationName := "X-Amz-Optional-Object-Attributes"
+ for i := range v.OptionalObjectAttributes {
+ if len(v.OptionalObjectAttributes[i]) > 0 {
+ escaped := string(v.OptionalObjectAttributes[i])
+ if strings.Index(string(v.OptionalObjectAttributes[i]), `,`) != -1 || strings.Index(string(v.OptionalObjectAttributes[i]), `"`) != -1 {
+ escaped = strconv.Quote(string(v.OptionalObjectAttributes[i]))
+ }
+
+ encoder.AddHeader(locationName).String(string(escaped))
+ }
+ }
}
if v.Prefix != nil {
encoder.SetQuery("prefix").String(*v.Prefix)
}
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
if v.VersionIdMarker != nil {
encoder.SetQuery("version-id-marker").String(*v.VersionIdMarker)
}
@@ -4954,11 +5024,18 @@ func (m *awsRestxml_serializeOpListParts) HandleSerialize(ctx context.Context, i
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=ListParts")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=ListParts")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -4979,15 +5056,6 @@ func awsRestxml_serializeOpHttpBindingsListPartsInput(v *ListPartsInput, encoder
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -5002,8 +5070,8 @@ func awsRestxml_serializeOpHttpBindingsListPartsInput(v *ListPartsInput, encoder
}
}
- if v.MaxParts != 0 {
- encoder.SetQuery("max-parts").Integer(v.MaxParts)
+ if v.MaxParts != nil {
+ encoder.SetQuery("max-parts").Integer(*v.MaxParts)
}
if v.PartNumberMarker != nil {
@@ -5058,11 +5126,18 @@ func (m *awsRestxml_serializeOpPutBucketAccelerateConfiguration) HandleSerialize
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?accelerate")
+ opPath, opQuery := httpbinding.SplitURI("/?accelerate")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5073,6 +5148,7 @@ func (m *awsRestxml_serializeOpPutBucketAccelerateConfiguration) HandleSerialize
if input.AccelerateConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5106,15 +5182,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketAccelerateConfigurationInput(v *
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -5149,11 +5216,18 @@ func (m *awsRestxml_serializeOpPutBucketAcl) HandleSerialize(ctx context.Context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?acl")
+ opPath, opQuery := httpbinding.SplitURI("/?acl")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5164,6 +5238,7 @@ func (m *awsRestxml_serializeOpPutBucketAcl) HandleSerialize(ctx context.Context
if input.AccessControlPolicy != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5202,15 +5277,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketAclInput(v *PutBucketAclInput, e
encoder.SetHeader(locationName).String(string(v.ACL))
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -5275,11 +5341,18 @@ func (m *awsRestxml_serializeOpPutBucketAnalyticsConfiguration) HandleSerialize(
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics")
+ opPath, opQuery := httpbinding.SplitURI("/?analytics")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5290,6 +5363,7 @@ func (m *awsRestxml_serializeOpPutBucketAnalyticsConfiguration) HandleSerialize(
if input.AnalyticsConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5323,15 +5397,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketAnalyticsConfigurationInput(v *P
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -5365,11 +5430,18 @@ func (m *awsRestxml_serializeOpPutBucketCors) HandleSerialize(ctx context.Contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?cors")
+ opPath, opQuery := httpbinding.SplitURI("/?cors")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5380,6 +5452,7 @@ func (m *awsRestxml_serializeOpPutBucketCors) HandleSerialize(ctx context.Contex
if input.CORSConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5413,15 +5486,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketCorsInput(v *PutBucketCorsInput,
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -5461,11 +5525,18 @@ func (m *awsRestxml_serializeOpPutBucketEncryption) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?encryption")
+ opPath, opQuery := httpbinding.SplitURI("/?encryption")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5476,6 +5547,7 @@ func (m *awsRestxml_serializeOpPutBucketEncryption) HandleSerialize(ctx context.
if input.ServerSideEncryptionConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5509,15 +5581,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketEncryptionInput(v *PutBucketEncr
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -5557,11 +5620,18 @@ func (m *awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) HandleS
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering")
+ opPath, opQuery := httpbinding.SplitURI("/?intelligent-tiering")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5572,6 +5642,7 @@ func (m *awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) HandleS
if input.IntelligentTieringConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5605,15 +5676,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketIntelligentTieringConfigurationI
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.Id != nil {
encoder.SetQuery("id").String(*v.Id)
}
@@ -5642,11 +5704,18 @@ func (m *awsRestxml_serializeOpPutBucketInventoryConfiguration) HandleSerialize(
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory")
+ opPath, opQuery := httpbinding.SplitURI("/?inventory")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5657,6 +5726,7 @@ func (m *awsRestxml_serializeOpPutBucketInventoryConfiguration) HandleSerialize(
if input.InventoryConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5690,15 +5760,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketInventoryConfigurationInput(v *P
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -5732,11 +5793,18 @@ func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize(
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?lifecycle")
+ opPath, opQuery := httpbinding.SplitURI("/?lifecycle")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5747,6 +5815,7 @@ func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize(
if input.LifecycleConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5780,15 +5849,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(v *P
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -5823,11 +5883,18 @@ func (m *awsRestxml_serializeOpPutBucketLogging) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?logging")
+ opPath, opQuery := httpbinding.SplitURI("/?logging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5838,6 +5905,7 @@ func (m *awsRestxml_serializeOpPutBucketLogging) HandleSerialize(ctx context.Con
if input.BucketLoggingStatus != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5871,15 +5939,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketLoggingInput(v *PutBucketLogging
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -5919,11 +5978,18 @@ func (m *awsRestxml_serializeOpPutBucketMetricsConfiguration) HandleSerialize(ct
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics")
+ opPath, opQuery := httpbinding.SplitURI("/?metrics")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -5934,6 +6000,7 @@ func (m *awsRestxml_serializeOpPutBucketMetricsConfiguration) HandleSerialize(ct
if input.MetricsConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -5967,15 +6034,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketMetricsConfigurationInput(v *Put
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -6009,11 +6067,18 @@ func (m *awsRestxml_serializeOpPutBucketNotificationConfiguration) HandleSeriali
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?notification")
+ opPath, opQuery := httpbinding.SplitURI("/?notification")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6024,6 +6089,7 @@ func (m *awsRestxml_serializeOpPutBucketNotificationConfiguration) HandleSeriali
if input.NotificationConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -6057,23 +6123,14 @@ func awsRestxml_serializeOpHttpBindingsPutBucketNotificationConfigurationInput(v
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
}
- if v.SkipDestinationValidation {
+ if v.SkipDestinationValidation != nil {
locationName := "X-Amz-Skip-Destination-Validation"
- encoder.SetHeader(locationName).Boolean(v.SkipDestinationValidation)
+ encoder.SetHeader(locationName).Boolean(*v.SkipDestinationValidation)
}
return nil
@@ -6100,11 +6157,18 @@ func (m *awsRestxml_serializeOpPutBucketOwnershipControls) HandleSerialize(ctx c
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?ownershipControls")
+ opPath, opQuery := httpbinding.SplitURI("/?ownershipControls")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6115,6 +6179,7 @@ func (m *awsRestxml_serializeOpPutBucketOwnershipControls) HandleSerialize(ctx c
if input.OwnershipControls != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -6148,15 +6213,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketOwnershipControlsInput(v *PutBuc
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
locationName := "Content-Md5"
encoder.SetHeader(locationName).String(*v.ContentMD5)
@@ -6191,11 +6247,18 @@ func (m *awsRestxml_serializeOpPutBucketPolicy) HandleSerialize(ctx context.Cont
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policy")
+ opPath, opQuery := httpbinding.SplitURI("/?policy")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6204,11 +6267,12 @@ func (m *awsRestxml_serializeOpPutBucketPolicy) HandleSerialize(ctx context.Cont
return out, metadata, &smithy.SerializationError{Err: err}
}
- if input.Policy != nil {
- if !restEncoder.HasHeader("Content-Type") {
- restEncoder.SetHeader("Content-Type").String("text/plain")
- }
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("text/plain")
+ }
+ if input.Policy != nil {
payload := strings.NewReader(*input.Policy)
if request, err = request.SetStream(payload); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
@@ -6227,23 +6291,14 @@ func awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(v *PutBucketPolicyIn
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
}
- if v.ConfirmRemoveSelfBucketAccess {
+ if v.ConfirmRemoveSelfBucketAccess != nil {
locationName := "X-Amz-Confirm-Remove-Self-Bucket-Access"
- encoder.SetHeader(locationName).Boolean(v.ConfirmRemoveSelfBucketAccess)
+ encoder.SetHeader(locationName).Boolean(*v.ConfirmRemoveSelfBucketAccess)
}
if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
@@ -6280,11 +6335,18 @@ func (m *awsRestxml_serializeOpPutBucketReplication) HandleSerialize(ctx context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?replication")
+ opPath, opQuery := httpbinding.SplitURI("/?replication")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6295,6 +6357,7 @@ func (m *awsRestxml_serializeOpPutBucketReplication) HandleSerialize(ctx context
if input.ReplicationConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -6328,15 +6391,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketReplicationInput(v *PutBucketRep
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -6381,11 +6435,18 @@ func (m *awsRestxml_serializeOpPutBucketRequestPayment) HandleSerialize(ctx cont
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?requestPayment")
+ opPath, opQuery := httpbinding.SplitURI("/?requestPayment")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6396,6 +6457,7 @@ func (m *awsRestxml_serializeOpPutBucketRequestPayment) HandleSerialize(ctx cont
if input.RequestPaymentConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -6429,15 +6491,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketRequestPaymentInput(v *PutBucket
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -6477,11 +6530,18 @@ func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?tagging")
+ opPath, opQuery := httpbinding.SplitURI("/?tagging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6492,6 +6552,7 @@ func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Con
if input.Tagging != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -6525,15 +6586,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(v *PutBucketTagging
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -6573,11 +6625,18 @@ func (m *awsRestxml_serializeOpPutBucketVersioning) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?versioning")
+ opPath, opQuery := httpbinding.SplitURI("/?versioning")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6588,6 +6647,7 @@ func (m *awsRestxml_serializeOpPutBucketVersioning) HandleSerialize(ctx context.
if input.VersioningConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -6621,15 +6681,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketVersioningInput(v *PutBucketVers
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -6674,11 +6725,18 @@ func (m *awsRestxml_serializeOpPutBucketWebsite) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?website")
+ opPath, opQuery := httpbinding.SplitURI("/?website")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6689,6 +6747,7 @@ func (m *awsRestxml_serializeOpPutBucketWebsite) HandleSerialize(ctx context.Con
if input.WebsiteConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -6722,15 +6781,6 @@ func awsRestxml_serializeOpHttpBindingsPutBucketWebsiteInput(v *PutBucketWebsite
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -6770,11 +6820,18 @@ func (m *awsRestxml_serializeOpPutObject) HandleSerialize(ctx context.Context, i
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=PutObject")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=PutObject")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -6783,11 +6840,12 @@ func (m *awsRestxml_serializeOpPutObject) HandleSerialize(ctx context.Context, i
return out, metadata, &smithy.SerializationError{Err: err}
}
- if input.Body != nil {
- if !restEncoder.HasHeader("Content-Type") {
- restEncoder.SetHeader("Content-Type").String("application/octet-stream")
- }
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+ if input.Body != nil {
payload := input.Body
if request, err = request.SetStream(payload); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
@@ -6811,18 +6869,9 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder
encoder.SetHeader(locationName).String(string(v.ACL))
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
- if v.BucketKeyEnabled {
+ if v.BucketKeyEnabled != nil {
locationName := "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
- encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled)
}
if v.CacheControl != nil && len(*v.CacheControl) > 0 {
@@ -6870,9 +6919,9 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder
encoder.SetHeader(locationName).String(*v.ContentLanguage)
}
- if v.ContentLength != 0 {
+ if v.ContentLength != nil {
locationName := "Content-Length"
- encoder.SetHeader(locationName).Long(v.ContentLength)
+ encoder.SetHeader(locationName).Long(*v.ContentLength)
}
if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
@@ -7022,11 +7071,18 @@ func (m *awsRestxml_serializeOpPutObjectAcl) HandleSerialize(ctx context.Context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?acl")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?acl")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7037,6 +7093,7 @@ func (m *awsRestxml_serializeOpPutObjectAcl) HandleSerialize(ctx context.Context
if input.AccessControlPolicy != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -7075,15 +7132,6 @@ func awsRestxml_serializeOpHttpBindingsPutObjectAclInput(v *PutObjectAclInput, e
encoder.SetHeader(locationName).String(string(v.ACL))
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -7166,11 +7214,18 @@ func (m *awsRestxml_serializeOpPutObjectLegalHold) HandleSerialize(ctx context.C
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?legal-hold")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?legal-hold")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7181,6 +7236,7 @@ func (m *awsRestxml_serializeOpPutObjectLegalHold) HandleSerialize(ctx context.C
if input.LegalHold != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -7214,15 +7270,6 @@ func awsRestxml_serializeOpHttpBindingsPutObjectLegalHoldInput(v *PutObjectLegal
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -7280,11 +7327,18 @@ func (m *awsRestxml_serializeOpPutObjectLockConfiguration) HandleSerialize(ctx c
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?object-lock")
+ opPath, opQuery := httpbinding.SplitURI("/?object-lock")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7295,6 +7349,7 @@ func (m *awsRestxml_serializeOpPutObjectLockConfiguration) HandleSerialize(ctx c
if input.ObjectLockConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -7328,15 +7383,6 @@ func awsRestxml_serializeOpHttpBindingsPutObjectLockConfigurationInput(v *PutObj
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -7386,11 +7432,18 @@ func (m *awsRestxml_serializeOpPutObjectRetention) HandleSerialize(ctx context.C
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?retention")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?retention")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7401,6 +7454,7 @@ func (m *awsRestxml_serializeOpPutObjectRetention) HandleSerialize(ctx context.C
if input.Retention != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -7434,18 +7488,9 @@ func awsRestxml_serializeOpHttpBindingsPutObjectRetentionInput(v *PutObjectReten
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
- if v.BypassGovernanceRetention {
+ if v.BypassGovernanceRetention != nil {
locationName := "X-Amz-Bypass-Governance-Retention"
- encoder.SetHeader(locationName).Boolean(v.BypassGovernanceRetention)
+ encoder.SetHeader(locationName).Boolean(*v.BypassGovernanceRetention)
}
if len(v.ChecksumAlgorithm) > 0 {
@@ -7505,11 +7550,18 @@ func (m *awsRestxml_serializeOpPutObjectTagging) HandleSerialize(ctx context.Con
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?tagging")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7520,6 +7572,7 @@ func (m *awsRestxml_serializeOpPutObjectTagging) HandleSerialize(ctx context.Con
if input.Tagging != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -7553,15 +7606,6 @@ func awsRestxml_serializeOpHttpBindingsPutObjectTaggingInput(v *PutObjectTagging
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -7619,11 +7663,18 @@ func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
+ opPath, opQuery := httpbinding.SplitURI("/?publicAccessBlock")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7634,6 +7685,7 @@ func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context
if input.PublicAccessBlockConfiguration != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -7667,15 +7719,6 @@ func awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(v *PutPublicAcc
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -7715,11 +7758,18 @@ func (m *awsRestxml_serializeOpRestoreObject) HandleSerialize(ctx context.Contex
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?restore&x-id=RestoreObject")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?restore&x-id=RestoreObject")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7730,6 +7780,7 @@ func (m *awsRestxml_serializeOpRestoreObject) HandleSerialize(ctx context.Contex
if input.RestoreRequest != nil {
if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
restEncoder.SetHeader("Content-Type").String("application/xml")
}
@@ -7763,15 +7814,6 @@ func awsRestxml_serializeOpHttpBindingsRestoreObjectInput(v *RestoreObjectInput,
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -7824,11 +7866,18 @@ func (m *awsRestxml_serializeOpSelectObjectContent) HandleSerialize(ctx context.
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?select&select-type=2&x-id=SelectObjectContent")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?select&select-type=2&x-id=SelectObjectContent")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -7867,15 +7916,6 @@ func awsRestxml_serializeOpHttpBindingsSelectObjectContentInput(v *SelectObjectC
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
@@ -8008,11 +8048,18 @@ func (m *awsRestxml_serializeOpUploadPart) HandleSerialize(ctx context.Context,
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=UploadPart")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=UploadPart")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -8021,11 +8068,12 @@ func (m *awsRestxml_serializeOpUploadPart) HandleSerialize(ctx context.Context,
return out, metadata, &smithy.SerializationError{Err: err}
}
- if input.Body != nil {
- if !restEncoder.HasHeader("Content-Type") {
- restEncoder.SetHeader("Content-Type").String("application/octet-stream")
- }
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+ if input.Body != nil {
payload := input.Body
if request, err = request.SetStream(payload); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
@@ -8044,15 +8092,6 @@ func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encod
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if len(v.ChecksumAlgorithm) > 0 {
locationName := "X-Amz-Sdk-Checksum-Algorithm"
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
@@ -8078,9 +8117,9 @@ func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encod
encoder.SetHeader(locationName).String(*v.ChecksumSHA256)
}
- if v.ContentLength != 0 {
+ if v.ContentLength != nil {
locationName := "Content-Length"
- encoder.SetHeader(locationName).Long(v.ContentLength)
+ encoder.SetHeader(locationName).Long(*v.ContentLength)
}
if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
@@ -8102,8 +8141,8 @@ func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encod
}
}
- {
- encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ if v.PartNumber != nil {
+ encoder.SetQuery("partNumber").Integer(*v.PartNumber)
}
if len(v.RequestPayer) > 0 {
@@ -8154,11 +8193,18 @@ func (m *awsRestxml_serializeOpUploadPartCopy) HandleSerialize(ctx context.Conte
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
- opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=UploadPartCopy")
+ opPath, opQuery := httpbinding.SplitURI("/{Key+}?x-id=UploadPartCopy")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PUT"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -8179,15 +8225,6 @@ func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInpu
return fmt.Errorf("unsupported serialization of nil %T", v)
}
- if v.Bucket == nil || len(*v.Bucket) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
- }
- if v.Bucket != nil {
- if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
- return err
- }
- }
-
if v.CopySource != nil && len(*v.CopySource) > 0 {
locationName := "X-Amz-Copy-Source"
encoder.SetHeader(locationName).String(*v.CopySource)
@@ -8252,8 +8289,8 @@ func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInpu
}
}
- {
- encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ if v.PartNumber != nil {
+ encoder.SetQuery("partNumber").Integer(*v.PartNumber)
}
if len(v.RequestPayer) > 0 {
@@ -8308,7 +8345,14 @@ func (m *awsRestxml_serializeOpWriteGetObjectResponse) HandleSerialize(ctx conte
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -8317,11 +8361,12 @@ func (m *awsRestxml_serializeOpWriteGetObjectResponse) HandleSerialize(ctx conte
return out, metadata, &smithy.SerializationError{Err: err}
}
- if input.Body != nil {
- if !restEncoder.HasHeader("Content-Type") {
- restEncoder.SetHeader("Content-Type").String("application/octet-stream")
- }
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+ if input.Body != nil {
payload := input.Body
if request, err = request.SetStream(payload); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
@@ -8345,9 +8390,9 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
encoder.SetHeader(locationName).String(*v.AcceptRanges)
}
- if v.BucketKeyEnabled {
+ if v.BucketKeyEnabled != nil {
locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
- encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled)
}
if v.CacheControl != nil && len(*v.CacheControl) > 0 {
@@ -8390,9 +8435,9 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
encoder.SetHeader(locationName).String(*v.ContentLanguage)
}
- if v.ContentLength != 0 {
+ if v.ContentLength != nil {
locationName := "Content-Length"
- encoder.SetHeader(locationName).Long(v.ContentLength)
+ encoder.SetHeader(locationName).Long(*v.ContentLength)
}
if v.ContentRange != nil && len(*v.ContentRange) > 0 {
@@ -8405,9 +8450,9 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
encoder.SetHeader(locationName).String(*v.ContentType)
}
- if v.DeleteMarker {
+ if v.DeleteMarker != nil {
locationName := "X-Amz-Fwd-Header-X-Amz-Delete-Marker"
- encoder.SetHeader(locationName).Boolean(v.DeleteMarker)
+ encoder.SetHeader(locationName).Boolean(*v.DeleteMarker)
}
if v.ErrorCode != nil && len(*v.ErrorCode) > 0 {
@@ -8449,9 +8494,9 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
}
}
- if v.MissingMeta != 0 {
+ if v.MissingMeta != nil {
locationName := "X-Amz-Fwd-Header-X-Amz-Missing-Meta"
- encoder.SetHeader(locationName).Integer(v.MissingMeta)
+ encoder.SetHeader(locationName).Integer(*v.MissingMeta)
}
if len(v.ObjectLockLegalHoldStatus) > 0 {
@@ -8469,9 +8514,9 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
encoder.SetHeader(locationName).String(smithytime.FormatDateTime(*v.ObjectLockRetainUntilDate))
}
- if v.PartsCount != 0 {
+ if v.PartsCount != nil {
locationName := "X-Amz-Fwd-Header-X-Amz-Mp-Parts-Count"
- encoder.SetHeader(locationName).Integer(v.PartsCount)
+ encoder.SetHeader(locationName).Integer(*v.PartsCount)
}
if len(v.ReplicationStatus) > 0 {
@@ -8519,9 +8564,9 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
encoder.SetHeader(locationName).String(*v.SSEKMSKeyId)
}
- if v.StatusCode != 0 {
+ if v.StatusCode != nil {
locationName := "X-Amz-Fwd-Status"
- encoder.SetHeader(locationName).Integer(v.StatusCode)
+ encoder.SetHeader(locationName).Integer(*v.StatusCode)
}
if len(v.StorageClass) > 0 {
@@ -8529,9 +8574,9 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
encoder.SetHeader(locationName).String(string(v.StorageClass))
}
- if v.TagCount != 0 {
+ if v.TagCount != nil {
locationName := "X-Amz-Fwd-Header-X-Amz-Tagging-Count"
- encoder.SetHeader(locationName).Integer(v.TagCount)
+ encoder.SetHeader(locationName).Integer(*v.TagCount)
}
if v.VersionId != nil && len(*v.VersionId) > 0 {
@@ -8544,7 +8589,7 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
func awsRestxml_serializeDocumentAbortIncompleteMultipartUpload(v *types.AbortIncompleteMultipartUpload, value smithyxml.Value) error {
defer value.Close()
- if v.DaysAfterInitiation != 0 {
+ if v.DaysAfterInitiation != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -8553,7 +8598,7 @@ func awsRestxml_serializeDocumentAbortIncompleteMultipartUpload(v *types.AbortIn
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.DaysAfterInitiation)
+ el.Integer(*v.DaysAfterInitiation)
}
return nil
}
@@ -8845,6 +8890,33 @@ func awsRestxml_serializeDocumentAnalyticsS3BucketDestination(v *types.Analytics
return nil
}
+func awsRestxml_serializeDocumentBucketInfo(v *types.BucketInfo, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.DataRedundancy) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "DataRedundancy",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.DataRedundancy))
+ }
+ if len(v.Type) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Type",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Type))
+ }
+ return nil
+}
+
func awsRestxml_serializeDocumentBucketLifecycleConfiguration(v *types.BucketLifecycleConfiguration, value smithyxml.Value) error {
defer value.Close()
if v.Rules != nil {
@@ -8956,7 +9028,7 @@ func awsRestxml_serializeDocumentCompletedPart(v *types.CompletedPart, value smi
el := value.MemberElement(root)
el.String(*v.ETag)
}
- if v.PartNumber != 0 {
+ if v.PartNumber != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -8965,7 +9037,7 @@ func awsRestxml_serializeDocumentCompletedPart(v *types.CompletedPart, value smi
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.PartNumber)
+ el.Integer(*v.PartNumber)
}
return nil
}
@@ -9095,7 +9167,7 @@ func awsRestxml_serializeDocumentCORSRule(v *types.CORSRule, value smithyxml.Val
el := value.MemberElement(root)
el.String(*v.ID)
}
- if v.MaxAgeSeconds != 0 {
+ if v.MaxAgeSeconds != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -9104,7 +9176,7 @@ func awsRestxml_serializeDocumentCORSRule(v *types.CORSRule, value smithyxml.Val
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.MaxAgeSeconds)
+ el.Integer(*v.MaxAgeSeconds)
}
return nil
}
@@ -9126,6 +9198,32 @@ func awsRestxml_serializeDocumentCORSRules(v []types.CORSRule, value smithyxml.V
func awsRestxml_serializeDocumentCreateBucketConfiguration(v *types.CreateBucketConfiguration, value smithyxml.Value) error {
defer value.Close()
+ if v.Bucket != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Bucket",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentBucketInfo(v.Bucket, el); err != nil {
+ return err
+ }
+ }
+ if v.Location != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Location",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentLocationInfo(v.Location, el); err != nil {
+ return err
+ }
+ }
if len(v.LocationConstraint) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
@@ -9142,7 +9240,7 @@ func awsRestxml_serializeDocumentCreateBucketConfiguration(v *types.CreateBucket
func awsRestxml_serializeDocumentCSVInput(v *types.CSVInput, value smithyxml.Value) error {
defer value.Close()
- if v.AllowQuotedRecordDelimiter {
+ if v.AllowQuotedRecordDelimiter != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -9151,7 +9249,7 @@ func awsRestxml_serializeDocumentCSVInput(v *types.CSVInput, value smithyxml.Val
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.AllowQuotedRecordDelimiter)
+ el.Boolean(*v.AllowQuotedRecordDelimiter)
}
if v.Comments != nil {
rootAttr := []smithyxml.Attr{}
@@ -9284,7 +9382,7 @@ func awsRestxml_serializeDocumentCSVOutput(v *types.CSVOutput, value smithyxml.V
func awsRestxml_serializeDocumentDefaultRetention(v *types.DefaultRetention, value smithyxml.Value) error {
defer value.Close()
- if v.Days != 0 {
+ if v.Days != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -9293,7 +9391,7 @@ func awsRestxml_serializeDocumentDefaultRetention(v *types.DefaultRetention, val
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Days)
+ el.Integer(*v.Days)
}
if len(v.Mode) > 0 {
rootAttr := []smithyxml.Attr{}
@@ -9306,7 +9404,7 @@ func awsRestxml_serializeDocumentDefaultRetention(v *types.DefaultRetention, val
el := value.MemberElement(root)
el.String(string(v.Mode))
}
- if v.Years != 0 {
+ if v.Years != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -9315,7 +9413,7 @@ func awsRestxml_serializeDocumentDefaultRetention(v *types.DefaultRetention, val
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Years)
+ el.Integer(*v.Years)
}
return nil
}
@@ -9335,7 +9433,7 @@ func awsRestxml_serializeDocumentDelete(v *types.Delete, value smithyxml.Value)
return err
}
}
- if v.Quiet {
+ if v.Quiet != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -9344,7 +9442,7 @@ func awsRestxml_serializeDocumentDelete(v *types.Delete, value smithyxml.Value)
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.Quiet)
+ el.Boolean(*v.Quiet)
}
return nil
}
@@ -9981,7 +10079,7 @@ func awsRestxml_serializeDocumentInventoryConfiguration(v *types.InventoryConfig
el := value.MemberElement(root)
el.String(string(v.IncludedObjectVersions))
}
- {
+ if v.IsEnabled != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -9990,7 +10088,7 @@ func awsRestxml_serializeDocumentInventoryConfiguration(v *types.InventoryConfig
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.IsEnabled)
+ el.Boolean(*v.IsEnabled)
}
if v.OptionalFields != nil {
rootAttr := []smithyxml.Attr{}
@@ -10297,7 +10395,7 @@ func awsRestxml_serializeDocumentLifecycleExpiration(v *types.LifecycleExpiratio
el := value.MemberElement(root)
el.String(smithytime.FormatDateTime(*v.Date))
}
- if v.Days != 0 {
+ if v.Days != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10306,9 +10404,9 @@ func awsRestxml_serializeDocumentLifecycleExpiration(v *types.LifecycleExpiratio
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Days)
+ el.Integer(*v.Days)
}
- if v.ExpiredObjectDeleteMarker {
+ if v.ExpiredObjectDeleteMarker != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10317,7 +10415,7 @@ func awsRestxml_serializeDocumentLifecycleExpiration(v *types.LifecycleExpiratio
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.ExpiredObjectDeleteMarker)
+ el.Boolean(*v.ExpiredObjectDeleteMarker)
}
return nil
}
@@ -10440,7 +10538,7 @@ func awsRestxml_serializeDocumentLifecycleRule(v *types.LifecycleRule, value smi
func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRuleAndOperator, value smithyxml.Value) error {
defer value.Close()
- if v.ObjectSizeGreaterThan != 0 {
+ if v.ObjectSizeGreaterThan != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10449,9 +10547,9 @@ func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRule
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Long(v.ObjectSizeGreaterThan)
+ el.Long(*v.ObjectSizeGreaterThan)
}
- if v.ObjectSizeLessThan != 0 {
+ if v.ObjectSizeLessThan != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10460,7 +10558,7 @@ func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRule
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Long(v.ObjectSizeLessThan)
+ el.Long(*v.ObjectSizeLessThan)
}
if v.Prefix != nil {
rootAttr := []smithyxml.Attr{}
@@ -10573,6 +10671,33 @@ func awsRestxml_serializeDocumentLifecycleRules(v []types.LifecycleRule, value s
return nil
}
+func awsRestxml_serializeDocumentLocationInfo(v *types.LocationInfo, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Name != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Name",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Name)
+ }
+ if len(v.Type) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Type",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Type))
+ }
+ return nil
+}
+
func awsRestxml_serializeDocumentLoggingEnabled(v *types.LoggingEnabled, value smithyxml.Value) error {
defer value.Close()
if v.TargetBucket != nil {
@@ -10599,6 +10724,19 @@ func awsRestxml_serializeDocumentLoggingEnabled(v *types.LoggingEnabled, value s
return err
}
}
+ if v.TargetObjectKeyFormat != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TargetObjectKeyFormat",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentTargetObjectKeyFormat(v.TargetObjectKeyFormat, el); err != nil {
+ return err
+ }
+ }
if v.TargetPrefix != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
@@ -10798,7 +10936,7 @@ func awsRestxml_serializeDocumentMetricsFilter(v types.MetricsFilter, value smit
func awsRestxml_serializeDocumentNoncurrentVersionExpiration(v *types.NoncurrentVersionExpiration, value smithyxml.Value) error {
defer value.Close()
- if v.NewerNoncurrentVersions != 0 {
+ if v.NewerNoncurrentVersions != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10807,9 +10945,9 @@ func awsRestxml_serializeDocumentNoncurrentVersionExpiration(v *types.Noncurrent
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.NewerNoncurrentVersions)
+ el.Integer(*v.NewerNoncurrentVersions)
}
- if v.NoncurrentDays != 0 {
+ if v.NoncurrentDays != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10818,14 +10956,14 @@ func awsRestxml_serializeDocumentNoncurrentVersionExpiration(v *types.Noncurrent
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.NoncurrentDays)
+ el.Integer(*v.NoncurrentDays)
}
return nil
}
func awsRestxml_serializeDocumentNoncurrentVersionTransition(v *types.NoncurrentVersionTransition, value smithyxml.Value) error {
defer value.Close()
- if v.NewerNoncurrentVersions != 0 {
+ if v.NewerNoncurrentVersions != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10834,9 +10972,9 @@ func awsRestxml_serializeDocumentNoncurrentVersionTransition(v *types.Noncurrent
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.NewerNoncurrentVersions)
+ el.Integer(*v.NewerNoncurrentVersions)
}
- if v.NoncurrentDays != 0 {
+ if v.NoncurrentDays != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -10845,7 +10983,7 @@ func awsRestxml_serializeDocumentNoncurrentVersionTransition(v *types.Noncurrent
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.NoncurrentDays)
+ el.Integer(*v.NoncurrentDays)
}
if len(v.StorageClass) > 0 {
rootAttr := []smithyxml.Attr{}
@@ -11213,9 +11351,25 @@ func awsRestxml_serializeDocumentParquetInput(v *types.ParquetInput, value smith
return nil
}
+func awsRestxml_serializeDocumentPartitionedPrefix(v *types.PartitionedPrefix, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.PartitionDateSource) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "PartitionDateSource",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.PartitionDateSource))
+ }
+ return nil
+}
+
func awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v *types.PublicAccessBlockConfiguration, value smithyxml.Value) error {
defer value.Close()
- if v.BlockPublicAcls {
+ if v.BlockPublicAcls != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11224,9 +11378,9 @@ func awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v *types.PublicA
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.BlockPublicAcls)
+ el.Boolean(*v.BlockPublicAcls)
}
- if v.BlockPublicPolicy {
+ if v.BlockPublicPolicy != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11235,9 +11389,9 @@ func awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v *types.PublicA
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.BlockPublicPolicy)
+ el.Boolean(*v.BlockPublicPolicy)
}
- if v.IgnorePublicAcls {
+ if v.IgnorePublicAcls != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11246,9 +11400,9 @@ func awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v *types.PublicA
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.IgnorePublicAcls)
+ el.Boolean(*v.IgnorePublicAcls)
}
- if v.RestrictPublicBuckets {
+ if v.RestrictPublicBuckets != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11257,7 +11411,7 @@ func awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v *types.PublicA
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.RestrictPublicBuckets)
+ el.Boolean(*v.RestrictPublicBuckets)
}
return nil
}
@@ -11538,7 +11692,7 @@ func awsRestxml_serializeDocumentReplicationRule(v *types.ReplicationRule, value
el := value.MemberElement(root)
el.String(*v.Prefix)
}
- if v.Priority != 0 {
+ if v.Priority != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11547,7 +11701,7 @@ func awsRestxml_serializeDocumentReplicationRule(v *types.ReplicationRule, value
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Priority)
+ el.Integer(*v.Priority)
}
if v.SourceSelectionCriteria != nil {
rootAttr := []smithyxml.Attr{}
@@ -11698,7 +11852,7 @@ func awsRestxml_serializeDocumentReplicationTime(v *types.ReplicationTime, value
func awsRestxml_serializeDocumentReplicationTimeValue(v *types.ReplicationTimeValue, value smithyxml.Value) error {
defer value.Close()
- if v.Minutes != 0 {
+ if v.Minutes != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11707,7 +11861,7 @@ func awsRestxml_serializeDocumentReplicationTimeValue(v *types.ReplicationTimeVa
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Minutes)
+ el.Integer(*v.Minutes)
}
return nil
}
@@ -11730,7 +11884,7 @@ func awsRestxml_serializeDocumentRequestPaymentConfiguration(v *types.RequestPay
func awsRestxml_serializeDocumentRequestProgress(v *types.RequestProgress, value smithyxml.Value) error {
defer value.Close()
- if v.Enabled {
+ if v.Enabled != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11739,14 +11893,14 @@ func awsRestxml_serializeDocumentRequestProgress(v *types.RequestProgress, value
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.Enabled)
+ el.Boolean(*v.Enabled)
}
return nil
}
func awsRestxml_serializeDocumentRestoreRequest(v *types.RestoreRequest, value smithyxml.Value) error {
defer value.Close()
- if v.Days != 0 {
+ if v.Days != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -11755,7 +11909,7 @@ func awsRestxml_serializeDocumentRestoreRequest(v *types.RestoreRequest, value s
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Days)
+ el.Integer(*v.Days)
}
if v.Description != nil {
rootAttr := []smithyxml.Attr{}
@@ -12006,7 +12160,7 @@ func awsRestxml_serializeDocumentS3Location(v *types.S3Location, value smithyxml
func awsRestxml_serializeDocumentScanRange(v *types.ScanRange, value smithyxml.Value) error {
defer value.Close()
- if v.End != 0 {
+ if v.End != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -12015,9 +12169,9 @@ func awsRestxml_serializeDocumentScanRange(v *types.ScanRange, value smithyxml.V
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Long(v.End)
+ el.Long(*v.End)
}
- if v.Start != 0 {
+ if v.Start != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -12026,7 +12180,7 @@ func awsRestxml_serializeDocumentScanRange(v *types.ScanRange, value smithyxml.V
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Long(v.Start)
+ el.Long(*v.Start)
}
return nil
}
@@ -12144,7 +12298,7 @@ func awsRestxml_serializeDocumentServerSideEncryptionRule(v *types.ServerSideEnc
return err
}
}
- if v.BucketKeyEnabled {
+ if v.BucketKeyEnabled != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -12153,7 +12307,7 @@ func awsRestxml_serializeDocumentServerSideEncryptionRule(v *types.ServerSideEnc
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Boolean(v.BucketKeyEnabled)
+ el.Boolean(*v.BucketKeyEnabled)
}
return nil
}
@@ -12173,6 +12327,11 @@ func awsRestxml_serializeDocumentServerSideEncryptionRules(v []types.ServerSideE
return nil
}
+func awsRestxml_serializeDocumentSimplePrefix(v *types.SimplePrefix, value smithyxml.Value) error {
+ defer value.Close()
+ return nil
+}
+
func awsRestxml_serializeDocumentSourceSelectionCriteria(v *types.SourceSelectionCriteria, value smithyxml.Value) error {
defer value.Close()
if v.ReplicaModifications != nil {
@@ -12412,6 +12571,37 @@ func awsRestxml_serializeDocumentTargetGrants(v []types.TargetGrant, value smith
return nil
}
+func awsRestxml_serializeDocumentTargetObjectKeyFormat(v *types.TargetObjectKeyFormat, value smithyxml.Value) error {
+ defer value.Close()
+ if v.PartitionedPrefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "PartitionedPrefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentPartitionedPrefix(v.PartitionedPrefix, el); err != nil {
+ return err
+ }
+ }
+ if v.SimplePrefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SimplePrefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentSimplePrefix(v.SimplePrefix, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
func awsRestxml_serializeDocumentTiering(v *types.Tiering, value smithyxml.Value) error {
defer value.Close()
if len(v.AccessTier) > 0 {
@@ -12425,7 +12615,7 @@ func awsRestxml_serializeDocumentTiering(v *types.Tiering, value smithyxml.Value
el := value.MemberElement(root)
el.String(string(v.AccessTier))
}
- {
+ if v.Days != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -12434,7 +12624,7 @@ func awsRestxml_serializeDocumentTiering(v *types.Tiering, value smithyxml.Value
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Days)
+ el.Integer(*v.Days)
}
return nil
}
@@ -12535,7 +12725,7 @@ func awsRestxml_serializeDocumentTransition(v *types.Transition, value smithyxml
el := value.MemberElement(root)
el.String(smithytime.FormatDateTime(*v.Date))
}
- if v.Days != 0 {
+ if v.Days != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
@@ -12544,7 +12734,7 @@ func awsRestxml_serializeDocumentTransition(v *types.Transition, value smithyxml
Attr: rootAttr,
}
el := value.MemberElement(root)
- el.Integer(v.Days)
+ el.Integer(*v.Days)
}
if len(v.StorageClass) > 0 {
rootAttr := []smithyxml.Attr{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
index 5b525408..ea3b9c82 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
@@ -86,8 +86,10 @@ const (
BucketLocationConstraintApNortheast2 BucketLocationConstraint = "ap-northeast-2"
BucketLocationConstraintApNortheast3 BucketLocationConstraint = "ap-northeast-3"
BucketLocationConstraintApSouth1 BucketLocationConstraint = "ap-south-1"
+ BucketLocationConstraintApSouth2 BucketLocationConstraint = "ap-south-2"
BucketLocationConstraintApSoutheast1 BucketLocationConstraint = "ap-southeast-1"
BucketLocationConstraintApSoutheast2 BucketLocationConstraint = "ap-southeast-2"
+ BucketLocationConstraintApSoutheast3 BucketLocationConstraint = "ap-southeast-3"
BucketLocationConstraintCaCentral1 BucketLocationConstraint = "ca-central-1"
BucketLocationConstraintCnNorth1 BucketLocationConstraint = "cn-north-1"
BucketLocationConstraintCnNorthwest1 BucketLocationConstraint = "cn-northwest-1"
@@ -95,6 +97,7 @@ const (
BucketLocationConstraintEuCentral1 BucketLocationConstraint = "eu-central-1"
BucketLocationConstraintEuNorth1 BucketLocationConstraint = "eu-north-1"
BucketLocationConstraintEuSouth1 BucketLocationConstraint = "eu-south-1"
+ BucketLocationConstraintEuSouth2 BucketLocationConstraint = "eu-south-2"
BucketLocationConstraintEuWest1 BucketLocationConstraint = "eu-west-1"
BucketLocationConstraintEuWest2 BucketLocationConstraint = "eu-west-2"
BucketLocationConstraintEuWest3 BucketLocationConstraint = "eu-west-3"
@@ -107,9 +110,9 @@ const (
BucketLocationConstraintUsWest2 BucketLocationConstraint = "us-west-2"
)
-// Values returns all known values for BucketLocationConstraint. Note that this can
-// be expanded in the future, and so it is only as up to date as the client. The
-// ordering of this slice is not guaranteed to be stable across updates.
+// Values returns all known values for BucketLocationConstraint. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
func (BucketLocationConstraint) Values() []BucketLocationConstraint {
return []BucketLocationConstraint{
"af-south-1",
@@ -118,8 +121,10 @@ func (BucketLocationConstraint) Values() []BucketLocationConstraint {
"ap-northeast-2",
"ap-northeast-3",
"ap-south-1",
+ "ap-south-2",
"ap-southeast-1",
"ap-southeast-2",
+ "ap-southeast-3",
"ca-central-1",
"cn-north-1",
"cn-northwest-1",
@@ -127,6 +132,7 @@ func (BucketLocationConstraint) Values() []BucketLocationConstraint {
"eu-central-1",
"eu-north-1",
"eu-south-1",
+ "eu-south-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
@@ -160,6 +166,22 @@ func (BucketLogsPermission) Values() []BucketLogsPermission {
}
}
+type BucketType string
+
+// Enum values for BucketType
+const (
+ BucketTypeDirectory BucketType = "Directory"
+)
+
+// Values returns all known values for BucketType. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (BucketType) Values() []BucketType {
+ return []BucketType{
+ "Directory",
+ }
+}
+
type BucketVersioningStatus string
// Enum values for BucketVersioningStatus
@@ -207,9 +229,9 @@ const (
ChecksumModeEnabled ChecksumMode = "ENABLED"
)
-// Values returns all known values for ChecksumMode. Note that this can be expanded
-// in the future, and so it is only as up to date as the client. The ordering of
-// this slice is not guaranteed to be stable across updates.
+// Values returns all known values for ChecksumMode. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
func (ChecksumMode) Values() []ChecksumMode {
return []ChecksumMode{
"ENABLED",
@@ -236,6 +258,22 @@ func (CompressionType) Values() []CompressionType {
}
}
+type DataRedundancy string
+
+// Enum values for DataRedundancy
+const (
+ DataRedundancySingleAvailabilityZone DataRedundancy = "SingleAvailabilityZone"
+)
+
+// Values returns all known values for DataRedundancy. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (DataRedundancy) Values() []DataRedundancy {
+ return []DataRedundancy{
+ "SingleAvailabilityZone",
+ }
+}
+
type DeleteMarkerReplicationStatus string
// Enum values for DeleteMarkerReplicationStatus
@@ -262,9 +300,9 @@ const (
EncodingTypeUrl EncodingType = "url"
)
-// Values returns all known values for EncodingType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client. The ordering of
-// this slice is not guaranteed to be stable across updates.
+// Values returns all known values for EncodingType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
func (EncodingType) Values() []EncodingType {
return []EncodingType{
"url",
@@ -273,8 +311,39 @@ func (EncodingType) Values() []EncodingType {
type Event string
-// Values returns all known values for Event. Note that this can be expanded in the
-// future, and so it is only as up to date as the client. The ordering of this
+// Enum values for Event
+const (
+ EventS3ReducedRedundancyLostObject Event = "s3:ReducedRedundancyLostObject"
+ EventS3ObjectCreated Event = "s3:ObjectCreated:*"
+ EventS3ObjectCreatedPut Event = "s3:ObjectCreated:Put"
+ EventS3ObjectCreatedPost Event = "s3:ObjectCreated:Post"
+ EventS3ObjectCreatedCopy Event = "s3:ObjectCreated:Copy"
+ EventS3ObjectCreatedCompleteMultipartUpload Event = "s3:ObjectCreated:CompleteMultipartUpload"
+ EventS3ObjectRemoved Event = "s3:ObjectRemoved:*"
+ EventS3ObjectRemovedDelete Event = "s3:ObjectRemoved:Delete"
+ EventS3ObjectRemovedDeleteMarkerCreated Event = "s3:ObjectRemoved:DeleteMarkerCreated"
+ EventS3ObjectRestore Event = "s3:ObjectRestore:*"
+ EventS3ObjectRestorePost Event = "s3:ObjectRestore:Post"
+ EventS3ObjectRestoreCompleted Event = "s3:ObjectRestore:Completed"
+ EventS3Replication Event = "s3:Replication:*"
+ EventS3ReplicationOperationFailedReplication Event = "s3:Replication:OperationFailedReplication"
+ EventS3ReplicationOperationNotTracked Event = "s3:Replication:OperationNotTracked"
+ EventS3ReplicationOperationMissedThreshold Event = "s3:Replication:OperationMissedThreshold"
+ EventS3ReplicationOperationReplicatedAfterThreshold Event = "s3:Replication:OperationReplicatedAfterThreshold"
+ EventS3ObjectRestoreDelete Event = "s3:ObjectRestore:Delete"
+ EventS3LifecycleTransition Event = "s3:LifecycleTransition"
+ EventS3IntelligentTiering Event = "s3:IntelligentTiering"
+ EventS3ObjectAclPut Event = "s3:ObjectAcl:Put"
+ EventS3LifecycleExpiration Event = "s3:LifecycleExpiration:*"
+ EventS3LifecycleExpirationDelete Event = "s3:LifecycleExpiration:Delete"
+ EventS3LifecycleExpirationDeleteMarkerCreated Event = "s3:LifecycleExpiration:DeleteMarkerCreated"
+ EventS3ObjectTagging Event = "s3:ObjectTagging:*"
+ EventS3ObjectTaggingPut Event = "s3:ObjectTagging:Put"
+ EventS3ObjectTaggingDelete Event = "s3:ObjectTagging:Delete"
+)
+
+// Values returns all known values for Event. Note that this can be expanded in
+// the future, and so it is only as up to date as the client. The ordering of this
// slice is not guaranteed to be stable across updates.
func (Event) Values() []Event {
return []Event{
@@ -407,9 +476,10 @@ const (
IntelligentTieringAccessTierDeepArchiveAccess IntelligentTieringAccessTier = "DEEP_ARCHIVE_ACCESS"
)
-// Values returns all known values for IntelligentTieringAccessTier. Note that this
-// can be expanded in the future, and so it is only as up to date as the client.
-// The ordering of this slice is not guaranteed to be stable across updates.
+// Values returns all known values for IntelligentTieringAccessTier. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client. The ordering of this slice is not guaranteed to be stable across
+// updates.
func (IntelligentTieringAccessTier) Values() []IntelligentTieringAccessTier {
return []IntelligentTieringAccessTier{
"ARCHIVE_ACCESS",
@@ -425,9 +495,9 @@ const (
IntelligentTieringStatusDisabled IntelligentTieringStatus = "Disabled"
)
-// Values returns all known values for IntelligentTieringStatus. Note that this can
-// be expanded in the future, and so it is only as up to date as the client. The
-// ordering of this slice is not guaranteed to be stable across updates.
+// Values returns all known values for IntelligentTieringStatus. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
func (IntelligentTieringStatus) Values() []IntelligentTieringStatus {
return []IntelligentTieringStatus{
"Enabled",
@@ -509,6 +579,8 @@ const (
InventoryOptionalFieldIntelligentTieringAccessTier InventoryOptionalField = "IntelligentTieringAccessTier"
InventoryOptionalFieldBucketKeyStatus InventoryOptionalField = "BucketKeyStatus"
InventoryOptionalFieldChecksumAlgorithm InventoryOptionalField = "ChecksumAlgorithm"
+ InventoryOptionalFieldObjectAccessControlList InventoryOptionalField = "ObjectAccessControlList"
+ InventoryOptionalFieldObjectOwner InventoryOptionalField = "ObjectOwner"
)
// Values returns all known values for InventoryOptionalField. Note that this can
@@ -529,6 +601,8 @@ func (InventoryOptionalField) Values() []InventoryOptionalField {
"IntelligentTieringAccessTier",
"BucketKeyStatus",
"ChecksumAlgorithm",
+ "ObjectAccessControlList",
+ "ObjectOwner",
}
}
@@ -550,6 +624,22 @@ func (JSONType) Values() []JSONType {
}
}
+type LocationType string
+
+// Enum values for LocationType
+const (
+ LocationTypeAvailabilityZone LocationType = "AvailabilityZone"
+)
+
+// Values returns all known values for LocationType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (LocationType) Values() []LocationType {
+ return []LocationType{
+ "AvailabilityZone",
+ }
+}
+
type MetadataDirective string
// Enum values for MetadataDirective
@@ -594,9 +684,9 @@ const (
MFADeleteDisabled MFADelete = "Disabled"
)
-// Values returns all known values for MFADelete. Note that this can be expanded in
-// the future, and so it is only as up to date as the client. The ordering of this
-// slice is not guaranteed to be stable across updates.
+// Values returns all known values for MFADelete. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
func (MFADelete) Values() []MFADelete {
return []MFADelete{
"Enabled",
@@ -777,6 +867,8 @@ const (
ObjectStorageClassDeepArchive ObjectStorageClass = "DEEP_ARCHIVE"
ObjectStorageClassOutposts ObjectStorageClass = "OUTPOSTS"
ObjectStorageClassGlacierIr ObjectStorageClass = "GLACIER_IR"
+ ObjectStorageClassSnow ObjectStorageClass = "SNOW"
+ ObjectStorageClassExpressOnezone ObjectStorageClass = "EXPRESS_ONEZONE"
)
// Values returns all known values for ObjectStorageClass. Note that this can be
@@ -793,6 +885,8 @@ func (ObjectStorageClass) Values() []ObjectStorageClass {
"DEEP_ARCHIVE",
"OUTPOSTS",
"GLACIER_IR",
+ "SNOW",
+ "EXPRESS_ONEZONE",
}
}
@@ -812,6 +906,22 @@ func (ObjectVersionStorageClass) Values() []ObjectVersionStorageClass {
}
}
+type OptionalObjectAttributes string
+
+// Enum values for OptionalObjectAttributes
+const (
+ OptionalObjectAttributesRestoreStatus OptionalObjectAttributes = "RestoreStatus"
+)
+
+// Values returns all known values for OptionalObjectAttributes. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (OptionalObjectAttributes) Values() []OptionalObjectAttributes {
+ return []OptionalObjectAttributes{
+ "RestoreStatus",
+ }
+}
+
type OwnerOverride string
// Enum values for OwnerOverride
@@ -828,6 +938,24 @@ func (OwnerOverride) Values() []OwnerOverride {
}
}
+type PartitionDateSource string
+
+// Enum values for PartitionDateSource
+const (
+ PartitionDateSourceEventTime PartitionDateSource = "EventTime"
+ PartitionDateSourceDeliveryTime PartitionDateSource = "DeliveryTime"
+)
+
+// Values returns all known values for PartitionDateSource. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (PartitionDateSource) Values() []PartitionDateSource {
+ return []PartitionDateSource{
+ "EventTime",
+ "DeliveryTime",
+ }
+}
+
type Payer string
// Enum values for Payer
@@ -836,8 +964,8 @@ const (
PayerBucketOwner Payer = "BucketOwner"
)
-// Values returns all known values for Payer. Note that this can be expanded in the
-// future, and so it is only as up to date as the client. The ordering of this
+// Values returns all known values for Payer. Note that this can be expanded in
+// the future, and so it is only as up to date as the client. The ordering of this
// slice is not guaranteed to be stable across updates.
func (Payer) Values() []Payer {
return []Payer{
@@ -932,8 +1060,8 @@ const (
ReplicationRuleStatusDisabled ReplicationRuleStatus = "Disabled"
)
-// Values returns all known values for ReplicationRuleStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client. The
+// Values returns all known values for ReplicationRuleStatus. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ReplicationRuleStatus) Values() []ReplicationRuleStatus {
return []ReplicationRuleStatus{
@@ -946,10 +1074,11 @@ type ReplicationStatus string
// Enum values for ReplicationStatus
const (
- ReplicationStatusComplete ReplicationStatus = "COMPLETE"
- ReplicationStatusPending ReplicationStatus = "PENDING"
- ReplicationStatusFailed ReplicationStatus = "FAILED"
- ReplicationStatusReplica ReplicationStatus = "REPLICA"
+ ReplicationStatusComplete ReplicationStatus = "COMPLETE"
+ ReplicationStatusPending ReplicationStatus = "PENDING"
+ ReplicationStatusFailed ReplicationStatus = "FAILED"
+ ReplicationStatusReplica ReplicationStatus = "REPLICA"
+ ReplicationStatusCompleted ReplicationStatus = "COMPLETED"
)
// Values returns all known values for ReplicationStatus. Note that this can be
@@ -961,6 +1090,7 @@ func (ReplicationStatus) Values() []ReplicationStatus {
"PENDING",
"FAILED",
"REPLICA",
+ "COMPLETED",
}
}
@@ -972,8 +1102,8 @@ const (
ReplicationTimeStatusDisabled ReplicationTimeStatus = "Disabled"
)
-// Values returns all known values for ReplicationTimeStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client. The
+// Values returns all known values for ReplicationTimeStatus. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ReplicationTimeStatus) Values() []ReplicationTimeStatus {
return []ReplicationTimeStatus{
@@ -1005,9 +1135,9 @@ const (
RequestPayerRequester RequestPayer = "requester"
)
-// Values returns all known values for RequestPayer. Note that this can be expanded
-// in the future, and so it is only as up to date as the client. The ordering of
-// this slice is not guaranteed to be stable across updates.
+// Values returns all known values for RequestPayer. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
func (RequestPayer) Values() []RequestPayer {
return []RequestPayer{
"requester",
@@ -1034,8 +1164,9 @@ type ServerSideEncryption string
// Enum values for ServerSideEncryption
const (
- ServerSideEncryptionAes256 ServerSideEncryption = "AES256"
- ServerSideEncryptionAwsKms ServerSideEncryption = "aws:kms"
+ ServerSideEncryptionAes256 ServerSideEncryption = "AES256"
+ ServerSideEncryptionAwsKms ServerSideEncryption = "aws:kms"
+ ServerSideEncryptionAwsKmsDsse ServerSideEncryption = "aws:kms:dsse"
)
// Values returns all known values for ServerSideEncryption. Note that this can be
@@ -1045,6 +1176,25 @@ func (ServerSideEncryption) Values() []ServerSideEncryption {
return []ServerSideEncryption{
"AES256",
"aws:kms",
+ "aws:kms:dsse",
+ }
+}
+
+type SessionMode string
+
+// Enum values for SessionMode
+const (
+ SessionModeReadOnly SessionMode = "ReadOnly"
+ SessionModeReadWrite SessionMode = "ReadWrite"
+)
+
+// Values returns all known values for SessionMode. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (SessionMode) Values() []SessionMode {
+ return []SessionMode{
+ "ReadOnly",
+ "ReadWrite",
}
}
@@ -1056,9 +1206,10 @@ const (
SseKmsEncryptedObjectsStatusDisabled SseKmsEncryptedObjectsStatus = "Disabled"
)
-// Values returns all known values for SseKmsEncryptedObjectsStatus. Note that this
-// can be expanded in the future, and so it is only as up to date as the client.
-// The ordering of this slice is not guaranteed to be stable across updates.
+// Values returns all known values for SseKmsEncryptedObjectsStatus. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client. The ordering of this slice is not guaranteed to be stable across
+// updates.
func (SseKmsEncryptedObjectsStatus) Values() []SseKmsEncryptedObjectsStatus {
return []SseKmsEncryptedObjectsStatus{
"Enabled",
@@ -1079,11 +1230,13 @@ const (
StorageClassDeepArchive StorageClass = "DEEP_ARCHIVE"
StorageClassOutposts StorageClass = "OUTPOSTS"
StorageClassGlacierIr StorageClass = "GLACIER_IR"
+ StorageClassSnow StorageClass = "SNOW"
+ StorageClassExpressOnezone StorageClass = "EXPRESS_ONEZONE"
)
-// Values returns all known values for StorageClass. Note that this can be expanded
-// in the future, and so it is only as up to date as the client. The ordering of
-// this slice is not guaranteed to be stable across updates.
+// Values returns all known values for StorageClass. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
func (StorageClass) Values() []StorageClass {
return []StorageClass{
"STANDARD",
@@ -1095,6 +1248,8 @@ func (StorageClass) Values() []StorageClass {
"DEEP_ARCHIVE",
"OUTPOSTS",
"GLACIER_IR",
+ "SNOW",
+ "EXPRESS_ONEZONE",
}
}
@@ -1105,8 +1260,8 @@ const (
StorageClassAnalysisSchemaVersionV1 StorageClassAnalysisSchemaVersion = "V_1"
)
-// Values returns all known values for StorageClassAnalysisSchemaVersion. Note that
-// this can be expanded in the future, and so it is only as up to date as the
+// Values returns all known values for StorageClassAnalysisSchemaVersion. Note
+// that this can be expanded in the future, and so it is only as up to date as the
// client. The ordering of this slice is not guaranteed to be stable across
// updates.
func (StorageClassAnalysisSchemaVersion) Values() []StorageClassAnalysisSchemaVersion {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
index 8c3a386f..166484f4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
@@ -12,6 +12,8 @@ import (
type BucketAlreadyExists struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -24,17 +26,24 @@ func (e *BucketAlreadyExists) ErrorMessage() string {
}
return *e.Message
}
-func (e *BucketAlreadyExists) ErrorCode() string { return "BucketAlreadyExists" }
+func (e *BucketAlreadyExists) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "BucketAlreadyExists"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *BucketAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-// The bucket you tried to create already exists, and you own it. Amazon S3 returns
-// this error in all Amazon Web Services Regions except in the North Virginia
-// Region. For legacy compatibility, if you re-create an existing bucket that you
-// already own in the North Virginia Region, Amazon S3 returns 200 OK and resets
-// the bucket access control lists (ACLs).
+// The bucket you tried to create already exists, and you own it. Amazon S3
+// returns this error in all Amazon Web Services Regions except in the North
+// Virginia Region. For legacy compatibility, if you re-create an existing bucket
+// that you already own in the North Virginia Region, Amazon S3 returns 200 OK and
+// resets the bucket access control lists (ACLs).
type BucketAlreadyOwnedByYou struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -47,13 +56,27 @@ func (e *BucketAlreadyOwnedByYou) ErrorMessage() string {
}
return *e.Message
}
-func (e *BucketAlreadyOwnedByYou) ErrorCode() string { return "BucketAlreadyOwnedByYou" }
+func (e *BucketAlreadyOwnedByYou) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "BucketAlreadyOwnedByYou"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *BucketAlreadyOwnedByYou) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-// Object is archived and inaccessible until restored.
+// Object is archived and inaccessible until restored. If the object you are
+// retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3
+// Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access
+// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can
+// retrieve the object you must first restore a copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
+// . Otherwise, this operation returns an InvalidObjectState error. For
+// information about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html)
+// in the Amazon S3 User Guide.
type InvalidObjectState struct {
Message *string
+ ErrorCodeOverride *string
+
StorageClass StorageClass
AccessTier IntelligentTieringAccessTier
@@ -69,13 +92,20 @@ func (e *InvalidObjectState) ErrorMessage() string {
}
return *e.Message
}
-func (e *InvalidObjectState) ErrorCode() string { return "InvalidObjectState" }
+func (e *InvalidObjectState) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidObjectState"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *InvalidObjectState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified bucket does not exist.
type NoSuchBucket struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -88,13 +118,20 @@ func (e *NoSuchBucket) ErrorMessage() string {
}
return *e.Message
}
-func (e *NoSuchBucket) ErrorCode() string { return "NoSuchBucket" }
+func (e *NoSuchBucket) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "NoSuchBucket"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *NoSuchBucket) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified key does not exist.
type NoSuchKey struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -107,13 +144,20 @@ func (e *NoSuchKey) ErrorMessage() string {
}
return *e.Message
}
-func (e *NoSuchKey) ErrorCode() string { return "NoSuchKey" }
+func (e *NoSuchKey) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "NoSuchKey"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *NoSuchKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified multipart upload does not exist.
type NoSuchUpload struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -126,13 +170,20 @@ func (e *NoSuchUpload) ErrorMessage() string {
}
return *e.Message
}
-func (e *NoSuchUpload) ErrorCode() string { return "NoSuchUpload" }
+func (e *NoSuchUpload) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "NoSuchUpload"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *NoSuchUpload) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified content does not exist.
type NotFound struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -145,13 +196,20 @@ func (e *NotFound) ErrorMessage() string {
}
return *e.Message
}
-func (e *NotFound) ErrorCode() string { return "NotFound" }
+func (e *NotFound) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "NotFound"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *NotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This action is not allowed against this storage tier.
type ObjectAlreadyInActiveTierError struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -164,7 +222,12 @@ func (e *ObjectAlreadyInActiveTierError) ErrorMessage() string {
}
return *e.Message
}
-func (e *ObjectAlreadyInActiveTierError) ErrorCode() string { return "ObjectAlreadyInActiveTierError" }
+func (e *ObjectAlreadyInActiveTierError) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ObjectAlreadyInActiveTierError"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *ObjectAlreadyInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The source object of the COPY action is not in the active tier and is only
@@ -172,6 +235,8 @@ func (e *ObjectAlreadyInActiveTierError) ErrorFault() smithy.ErrorFault { return
type ObjectNotInActiveTierError struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -184,5 +249,10 @@ func (e *ObjectNotInActiveTierError) ErrorMessage() string {
}
return *e.Message
}
-func (e *ObjectNotInActiveTierError) ErrorCode() string { return "ObjectNotInActiveTierError" }
+func (e *ObjectNotInActiveTierError) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ObjectNotInActiveTierError"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *ObjectNotInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
index 422e630c..4299b57c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
@@ -9,23 +9,21 @@ import (
// Specifies the days since the initiation of an incomplete multipart upload that
// Amazon S3 will wait before permanently removing all parts of the upload. For
-// more information, see Aborting Incomplete Multipart Uploads Using a Bucket
-// Lifecycle Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
+// more information, see Aborting Incomplete Multipart Uploads Using a Bucket
+// Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
// in the Amazon S3 User Guide.
type AbortIncompleteMultipartUpload struct {
// Specifies the number of days after which Amazon S3 aborts an incomplete
// multipart upload.
- DaysAfterInitiation int32
+ DaysAfterInitiation *int32
noSmithyDocumentSerde
}
// Configures the transfer acceleration state for an Amazon S3 bucket. For more
-// information, see Amazon S3 Transfer Acceleration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) in
-// the Amazon S3 User Guide.
+// information, see Amazon S3 Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
+// in the Amazon S3 User Guide.
type AccelerateConfiguration struct {
// Specifies the transfer acceleration status of the bucket.
@@ -50,8 +48,7 @@ type AccessControlPolicy struct {
type AccessControlTranslation struct {
// Specifies the replica ownership. For default and valid values, see PUT bucket
- // replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
+ // replication (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
// in the Amazon S3 API Reference.
//
// This member is required.
@@ -60,9 +57,10 @@ type AccessControlTranslation struct {
noSmithyDocumentSerde
}
-// A conjunction (logical AND) of predicates, which is used in evaluating a metrics
-// filter. The operator must have at least two predicates in any combination, and
-// an object must match all of the predicates for the filter to apply.
+// A conjunction (logical AND) of predicates, which is used in evaluating a
+// metrics filter. The operator must have at least two predicates in any
+// combination, and an object must match all of the predicates for the filter to
+// apply.
type AnalyticsAndOperator struct {
// The prefix to use when evaluating an AND predicate: The prefix that an object
@@ -114,9 +112,10 @@ type AnalyticsExportDestination struct {
// filter is provided, all objects will be considered in any analysis.
//
// The following types satisfy this interface:
-// AnalyticsFilterMemberAnd
-// AnalyticsFilterMemberPrefix
-// AnalyticsFilterMemberTag
+//
+// AnalyticsFilterMemberAnd
+// AnalyticsFilterMemberPrefix
+// AnalyticsFilterMemberTag
type AnalyticsFilter interface {
isAnalyticsFilter()
}
@@ -174,9 +173,7 @@ type AnalyticsS3BucketDestination struct {
noSmithyDocumentSerde
}
-// In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name is
-// globally unique, and the namespace is shared by all Amazon Web Services
-// accounts.
+// In terms of implementation, a Bucket is a resource.
type Bucket struct {
// Date the bucket was created. This date can change when making changes to your
@@ -189,10 +186,24 @@ type Bucket struct {
noSmithyDocumentSerde
}
+// Specifies the information about the bucket that will be created. For more
+// information about directory buckets, see Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html)
+// in the Amazon S3 User Guide. This functionality is only supported by directory
+// buckets.
+type BucketInfo struct {
+
+ // The number of Availability Zone that's used for redundancy for the bucket.
+ DataRedundancy DataRedundancy
+
+ // The type of bucket.
+ Type BucketType
+
+ noSmithyDocumentSerde
+}
+
// Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For
-// more information, see Object Lifecycle Management
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) in
-// the Amazon S3 User Guide.
+// more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
+// in the Amazon S3 User Guide.
type BucketLifecycleConfiguration struct {
// A lifecycle rule for individual objects in an Amazon S3 bucket.
@@ -206,10 +217,9 @@ type BucketLifecycleConfiguration struct {
// Container for logging status information.
type BucketLoggingStatus struct {
- // Describes where logs are stored and the prefix that Amazon S3 assigns to all log
- // object keys for a bucket. For more information, see PUT Bucket logging
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in
- // the Amazon S3 API Reference.
+ // Describes where logs are stored and the prefix that Amazon S3 assigns to all
+ // log object keys for a bucket. For more information, see PUT Bucket logging (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
+ // in the Amazon S3 API Reference.
LoggingEnabled *LoggingEnabled
noSmithyDocumentSerde
@@ -219,45 +229,49 @@ type BucketLoggingStatus struct {
type Checksum struct {
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
noSmithyDocumentSerde
}
-// Container for all (if there are any) keys between Prefix and the next occurrence
-// of the string specified by a delimiter. CommonPrefixes lists keys that act like
-// subdirectories in the directory specified by Prefix. For example, if the prefix
-// is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common
-// prefix is notes/summer/.
+// Container for all (if there are any) keys between Prefix and the next
+// occurrence of the string specified by a delimiter. CommonPrefixes lists keys
+// that act like subdirectories in the directory specified by Prefix. For example,
+// if the prefix is notes/ and the delimiter is a slash (/) as in
+// notes/summer/july, the common prefix is notes/summer/.
type CommonPrefix struct {
// Container for the specified common prefix.
@@ -280,34 +294,38 @@ type CompletedMultipartUpload struct {
type CompletedPart struct {
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
@@ -316,7 +334,15 @@ type CompletedPart struct {
// Part number that identifies the part. This is a positive integer between 1 and
// 10,000.
- PartNumber int32
+ // - General purpose buckets - In CompleteMultipartUpload , when a additional
+ // checksum (including x-amz-checksum-crc32 , x-amz-checksum-crc32c ,
+ // x-amz-checksum-sha1 , or x-amz-checksum-sha256 ) is applied to each part, the
+ // PartNumber must start at 1 and the part numbers must be consecutive.
+ // Otherwise, Amazon S3 generates an HTTP 400 Bad Request status code and an
+ // InvalidPartOrder error code.
+ // - Directory buckets - In CompleteMultipartUpload , the PartNumber must start
+ // at 1 and the part numbers must be consecutive.
+ PartNumber *int32
noSmithyDocumentSerde
}
@@ -335,21 +361,20 @@ type Condition struct {
HttpErrorCodeReturnedEquals *string
// The object key name prefix when the redirect is applied. For example, to
- // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
- // To redirect request for all pages with the prefix docs/, the key prefix will be
- // /docs, which identifies all objects in the docs/ folder. Required when the
- // parent element Condition is specified and sibling HttpErrorCodeReturnedEquals is
- // not specified. If both conditions are specified, both must be true for the
+ // redirect requests for ExamplePage.html , the key prefix will be ExamplePage.html
+ // . To redirect request for all pages with the prefix docs/ , the key prefix will
+ // be /docs , which identifies all objects in the docs/ folder. Required when the
+ // parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
+ // is not specified. If both conditions are specified, both must be true for the
// redirect to be applied. Replacement must be made for object keys containing
// special characters (such as carriage returns) when using XML requests. For more
- // information, see XML related object key constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
KeyPrefixEquals *string
noSmithyDocumentSerde
}
-//
type ContinuationEvent struct {
noSmithyDocumentSerde
}
@@ -358,34 +383,26 @@ type ContinuationEvent struct {
type CopyObjectResult struct {
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. For more information, see Checking
+ // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
@@ -403,34 +420,38 @@ type CopyObjectResult struct {
type CopyPartResult struct {
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
@@ -444,9 +465,8 @@ type CopyPartResult struct {
}
// Describes the cross-origin access configuration for objects in an Amazon S3
-// bucket. For more information, see Enabling Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3
-// User Guide.
+// bucket. For more information, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
+// in the Amazon S3 User Guide.
type CORSConfiguration struct {
// A set of origins and methods (cross-origin access that you want to allow). You
@@ -461,8 +481,8 @@ type CORSConfiguration struct {
// Specifies a cross-origin access rule for an Amazon S3 bucket.
type CORSRule struct {
- // An HTTP method that you allow the origin to execute. Valid values are GET, PUT,
- // HEAD, POST, and DELETE.
+ // An HTTP method that you allow the origin to execute. Valid values are GET , PUT
+ // , HEAD , POST , and DELETE .
//
// This member is required.
AllowedMethods []string
@@ -477,16 +497,17 @@ type CORSRule struct {
// OPTIONS request, Amazon S3 returns any requested headers that are allowed.
AllowedHeaders []string
- // One or more headers in the response that you want customers to be able to access
- // from their applications (for example, from a JavaScript XMLHttpRequest object).
+ // One or more headers in the response that you want customers to be able to
+ // access from their applications (for example, from a JavaScript XMLHttpRequest
+ // object).
ExposeHeaders []string
// Unique identifier for the rule. The value cannot be longer than 255 characters.
ID *string
- // The time in seconds that your browser is to cache the preflight response for the
- // specified resource.
- MaxAgeSeconds int32
+ // The time in seconds that your browser is to cache the preflight response for
+ // the specified resource.
+ MaxAgeSeconds *int32
noSmithyDocumentSerde
}
@@ -494,8 +515,23 @@ type CORSRule struct {
// The configuration information for the bucket.
type CreateBucketConfiguration struct {
- // Specifies the Region where the bucket will be created. If you don't specify a
- // Region, the bucket is created in the US East (N. Virginia) Region (us-east-1).
+ // Specifies the information about the bucket that will be created. This
+ // functionality is only supported by directory buckets.
+ Bucket *BucketInfo
+
+ // Specifies the location where the bucket will be created. For directory buckets,
+ // the location type is Availability Zone. This functionality is only supported by
+ // directory buckets.
+ Location *LocationInfo
+
+ // Specifies the Region where the bucket will be created. You might choose a
+ // Region to optimize latency, minimize costs, or address regulatory requirements.
+ // For example, if you reside in Europe, you will probably find it advantageous to
+ // create buckets in the Europe (Ireland) Region. For more information, see
+ // Accessing a bucket (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro)
+ // in the Amazon S3 User Guide. If you don't specify a Region, the bucket is
+ // created in the US East (N. Virginia) Region (us-east-1) by default. This
+ // functionality is not supported for directory buckets.
LocationConstraint BucketLocationConstraint
noSmithyDocumentSerde
@@ -508,11 +544,11 @@ type CSVInput struct {
// Specifies that CSV field values may contain quoted record delimiters and such
// records should be allowed. Default value is FALSE. Setting this value to TRUE
// may lower performance.
- AllowQuotedRecordDelimiter bool
+ AllowQuotedRecordDelimiter *bool
// A single character used to indicate that a row should be ignored when the
// character is present at the start of that row. You can specify any character to
- // indicate a comment line.
+ // indicate a comment line. The default character is # . Default: #
Comments *string
// A single character used to separate individual fields in a record. You can
@@ -520,27 +556,22 @@ type CSVInput struct {
FieldDelimiter *string
// Describes the first line of input. Valid values are:
- //
- // * NONE: First line is not
- // a header.
- //
- // * IGNORE: First line is a header, but you can't use the header values
- // to indicate the column in an expression. You can use column position (such as
- // _1, _2, …) to indicate the column (SELECT s._1 FROM OBJECT s).
- //
- // * Use: First
- // line is a header, and you can use the header value to identify a column in an
- // expression (SELECT "name" FROM OBJECT).
+ // - NONE : First line is not a header.
+ // - IGNORE : First line is a header, but you can't use the header values to
+ // indicate the column in an expression. You can use column position (such as _1,
+ // _2, …) to indicate the column ( SELECT s._1 FROM OBJECT s ).
+ // - Use : First line is a header, and you can use the header value to identify a
+ // column in an expression ( SELECT "name" FROM OBJECT ).
FileHeaderInfo FileHeaderInfo
// A single character used for escaping when the field delimiter is part of the
- // value. For example, if the value is a, b, Amazon S3 wraps this field value in
- // quotation marks, as follows: " a , b ". Type: String Default: " Ancestors: CSV
+ // value. For example, if the value is a, b , Amazon S3 wraps this field value in
+ // quotation marks, as follows: " a , b " . Type: String Default: " Ancestors: CSV
QuoteCharacter *string
// A single character used for escaping the quotation mark character inside an
- // already escaped value. For example, the value """ a , b """ is parsed as " a , b
- // ".
+ // already escaped value. For example, the value """ a , b """ is parsed as " a ,
+ // b " .
QuoteEscapeCharacter *string
// A single character used to separate individual records in the input. Instead of
@@ -559,8 +590,8 @@ type CSVOutput struct {
FieldDelimiter *string
// A single character used for escaping when the field delimiter is part of the
- // value. For example, if the value is a, b, Amazon S3 wraps this field value in
- // quotation marks, as follows: " a , b ".
+ // value. For example, if the value is a, b , Amazon S3 wraps this field value in
+ // quotation marks, as follows: " a , b " .
QuoteCharacter *string
// The single character used for escaping the quote character inside an already
@@ -568,16 +599,12 @@ type CSVOutput struct {
QuoteEscapeCharacter *string
// Indicates whether to use quotation marks around output fields.
- //
- // * ALWAYS: Always
- // use quotation marks for output fields.
- //
- // * ASNEEDED: Use quotation marks for
- // output fields when needed.
+ // - ALWAYS : Always use quotation marks for output fields.
+ // - ASNEEDED : Use quotation marks for output fields when needed.
QuoteFields QuoteFields
- // A single character used to separate individual records in the output. Instead of
- // the default value, you can specify an arbitrary delimiter.
+ // A single character used to separate individual records in the output. Instead
+ // of the default value, you can specify an arbitrary delimiter.
RecordDelimiter *string
noSmithyDocumentSerde
@@ -585,26 +612,22 @@ type CSVOutput struct {
// The container element for specifying the default Object Lock retention settings
// for new objects placed in the specified bucket.
-//
-// * The DefaultRetention settings
-// require both a mode and a period.
-//
-// * The DefaultRetention period can be either
-// Days or Years but you must select one. You cannot specify Days and Years at the
-// same time.
+// - The DefaultRetention settings require both a mode and a period.
+// - The DefaultRetention period can be either Days or Years but you must select
+// one. You cannot specify Days and Years at the same time.
type DefaultRetention struct {
// The number of days that you want to specify for the default retention period.
- // Must be used with Mode.
- Days int32
+ // Must be used with Mode .
+ Days *int32
// The default Object Lock retention mode you want to apply to new objects placed
- // in the specified bucket. Must be used with either Days or Years.
+ // in the specified bucket. Must be used with either Days or Years .
Mode ObjectLockRetentionMode
// The number of years that you want to specify for the default retention period.
- // Must be used with Mode.
- Years int32
+ // Must be used with Mode .
+ Years *int32
noSmithyDocumentSerde
}
@@ -612,14 +635,17 @@ type DefaultRetention struct {
// Container for the objects to delete.
type Delete struct {
- // The objects to delete.
+ // The object to delete. Directory buckets - For directory buckets, an object
+ // that's composed entirely of whitespace characters is not supported by the
+ // DeleteObjects API operation. The request will receive a 400 Bad Request error
+ // and none of the objects in the request will be deleted.
//
// This member is required.
Objects []ObjectIdentifier
// Element to enable quiet mode for the request. When you add this element, you
- // must set its value to true.
- Quiet bool
+ // must set its value to true .
+ Quiet *bool
noSmithyDocumentSerde
}
@@ -627,20 +653,24 @@ type Delete struct {
// Information about the deleted object.
type DeletedObject struct {
- // Specifies whether the versioned object that was permanently deleted was (true)
- // or was not (false) a delete marker. In a simple DELETE, this header indicates
- // whether (true) or not (false) a delete marker was created.
- DeleteMarker bool
-
- // The version ID of the delete marker created as a result of the DELETE operation.
- // If you delete a specific object version, the value returned by this header is
- // the version ID of the object version deleted.
+ // Indicates whether the specified object version that was permanently deleted was
+ // (true) or was not (false) a delete marker before deletion. In a simple DELETE,
+ // this header indicates whether (true) or not (false) the current version of the
+ // object is a delete marker. This functionality is not supported for directory
+ // buckets.
+ DeleteMarker *bool
+
+ // The version ID of the delete marker created as a result of the DELETE
+ // operation. If you delete a specific object version, the value returned by this
+ // header is the version ID of the object version deleted. This functionality is
+ // not supported for directory buckets.
DeleteMarkerVersionId *string
// The name of the deleted object.
Key *string
- // The version ID of the deleted object.
+ // The version ID of the deleted object. This functionality is not supported for
+ // directory buckets.
VersionId *string
noSmithyDocumentSerde
@@ -651,12 +681,12 @@ type DeleteMarkerEntry struct {
// Specifies whether the object is (true) or is not (false) the latest version of
// an object.
- IsLatest bool
+ IsLatest *bool
// The object key.
Key *string
- // Date and time the object was last modified.
+ // Date and time when the object was last modified.
LastModified *time.Time
// The account that created the delete marker.>
@@ -671,17 +701,15 @@ type DeleteMarkerEntry struct {
// Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
// in your replication configuration, you must also include a
// DeleteMarkerReplication element. If your Filter includes a Tag element, the
-// DeleteMarkerReplicationStatus must be set to Disabled, because Amazon S3 does
+// DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does
// not support replicating delete markers for tag-based rules. For an example
-// configuration, see Basic Rule Configuration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
-// For more information about delete marker replication, see Basic Rule
-// Configuration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
-// If you are using an earlier version of the replication configuration, Amazon S3
-// handles replication of delete markers differently. For more information, see
-// Backward Compatibility
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
+// configuration, see Basic Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config)
+// . For more information about delete marker replication, see Basic Rule
+// Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html)
+// . If you are using an earlier version of the replication configuration, Amazon
+// S3 handles replication of delete markers differently. For more information, see
+// Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations)
+// .
type DeleteMarkerReplication struct {
// Indicates whether to replicate delete markers. Indicates whether to replicate
@@ -710,10 +738,10 @@ type Destination struct {
// Destination bucket owner account ID. In a cross-account scenario, if you direct
// Amazon S3 to change replica ownership to the Amazon Web Services account that
- // owns the destination bucket by specifying the AccessControlTranslation property,
- // this is the account ID of the destination bucket owner. For more information,
- // see Replication Additional Configuration: Changing the Replica Owner
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html)
+ // owns the destination bucket by specifying the AccessControlTranslation
+ // property, this is the account ID of the destination bucket owner. For more
+ // information, see Replication Additional Configuration: Changing the Replica
+ // Owner (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html)
// in the Amazon S3 User Guide.
Account *string
@@ -721,8 +749,8 @@ type Destination struct {
// SourceSelectionCriteria is specified, you must specify this element.
EncryptionConfiguration *EncryptionConfiguration
- // A container specifying replication metrics-related settings enabling replication
- // metrics and events.
+ // A container specifying replication metrics-related settings enabling
+ // replication metrics and events.
Metrics *Metrics
// A container specifying S3 Replication Time Control (S3 RTC), including whether
@@ -733,8 +761,7 @@ type Destination struct {
// The storage class to use when replicating objects, such as S3 Standard or
// reduced redundancy. By default, Amazon S3 uses the storage class of the source
// object to create the object replica. For valid values, see the StorageClass
- // element of the PUT Bucket replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
+ // element of the PUT Bucket replication (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
// action in the Amazon S3 API Reference.
StorageClass StorageClass
@@ -745,20 +772,19 @@ type Destination struct {
type Encryption struct {
// The server-side encryption algorithm used when storing job results in Amazon S3
- // (for example, AES256, aws:kms).
+ // (for example, AES256, aws:kms ).
//
// This member is required.
EncryptionType ServerSideEncryption
- // If the encryption type is aws:kms, this optional value can be used to specify
+ // If the encryption type is aws:kms , this optional value can be used to specify
// the encryption context for the restore results.
KMSContext *string
- // If the encryption type is aws:kms, this optional value specifies the ID of the
- // symmetric customer managed key to use for encryption of job results. Amazon S3
- // only supports symmetric keys. For more information, see Using symmetric and
- // asymmetric keys
- // (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // If the encryption type is aws:kms , this optional value specifies the ID of the
+ // symmetric encryption customer managed key to use for encryption of job results.
+ // Amazon S3 only supports symmetric encryption KMS keys. For more information, see
+ // Asymmetric keys in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
// in the Amazon Web Services Key Management Service Developer Guide.
KMSKeyId *string
@@ -772,9 +798,8 @@ type EncryptionConfiguration struct {
// Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web
// Services KMS key stored in Amazon Web Services Key Management Service (KMS) for
// the destination bucket. Amazon S3 uses this key to encrypt replica objects.
- // Amazon S3 only supports symmetric, customer managed KMS keys. For more
- // information, see Using symmetric and asymmetric keys
- // (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // Amazon S3 only supports symmetric encryption KMS keys. For more information, see
+ // Asymmetric keys in Amazon Web Services KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
// in the Amazon Web Services Key Management Service Developer Guide.
ReplicaKmsKeyID *string
@@ -783,7 +808,7 @@ type EncryptionConfiguration struct {
// A message that indicates the request is complete and no more messages will be
// sent. You should not assume that the request is complete until the client
-// receives an EndEvent.
+// receives an EndEvent .
type EndEvent struct {
noSmithyDocumentSerde
}
@@ -793,934 +818,415 @@ type Error struct {
// The error code is a string that uniquely identifies an error condition. It is
// meant to be read and understood by programs that detect and handle errors by
- // type. Amazon S3 error codes
- //
- // * Code: AccessDenied
- //
- // * Description: Access
- // Denied
- //
- // * HTTP Status Code: 403 Forbidden
- //
- // * SOAP Fault Code Prefix: Client
- //
- // *
- // Code: AccountProblem
- //
- // * Description: There is a problem with your Amazon Web
- // Services account that prevents the action from completing successfully. Contact
- // Amazon Web Services Support for further assistance.
- //
- // * HTTP Status Code: 403
- // Forbidden
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: AllAccessDisabled
- //
- // *
- // Description: All access to this Amazon S3 resource has been disabled. Contact
- // Amazon Web Services Support for further assistance.
- //
- // * HTTP Status Code: 403
- // Forbidden
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // AmbiguousGrantByEmailAddress
- //
- // * Description: The email address you provided is
- // associated with more than one account.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // *
- // SOAP Fault Code Prefix: Client
- //
- // * Code: AuthorizationHeaderMalformed
- //
- // *
- // Description: The authorization header you provided is invalid.
- //
- // * HTTP Status
- // Code: 400 Bad Request
- //
- // * HTTP Status Code: N/A
- //
- // * Code: BadDigest
- //
- // *
- // Description: The Content-MD5 you specified did not match what we received.
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // BucketAlreadyExists
- //
- // * Description: The requested bucket name is not available.
- // The bucket namespace is shared by all users of the system. Please select a
- // different name and try again.
- //
- // * HTTP Status Code: 409 Conflict
- //
- // * SOAP Fault
- // Code Prefix: Client
- //
- // * Code: BucketAlreadyOwnedByYou
- //
- // * Description: The bucket
- // you tried to create already exists, and you own it. Amazon S3 returns this error
- // in all Amazon Web Services Regions except in the North Virginia Region. For
- // legacy compatibility, if you re-create an existing bucket that you already own
- // in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket
- // access control lists (ACLs).
- //
- // * Code: 409 Conflict (in all Regions except the
- // North Virginia Region)
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // BucketNotEmpty
- //
- // * Description: The bucket you tried to delete is not empty.
- //
- // *
- // HTTP Status Code: 409 Conflict
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // CredentialsNotSupported
- //
- // * Description: This request does not support
- // credentials.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: CrossLocationLoggingProhibited
- //
- // * Description: Cross-location
- // logging not allowed. Buckets in one geographic location cannot log information
- // to a bucket in another location.
- //
- // * HTTP Status Code: 403 Forbidden
- //
- // * SOAP
- // Fault Code Prefix: Client
- //
- // * Code: EntityTooSmall
- //
- // * Description: Your proposed
- // upload is smaller than the minimum allowed object size.
- //
- // * HTTP Status Code: 400
- // Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: EntityTooLarge
- //
- // *
- // Description: Your proposed upload exceeds the maximum allowed object size.
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // ExpiredToken
- //
- // * Description: The provided token has expired.
- //
- // * HTTP Status
- // Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // IllegalVersioningConfigurationException
- //
- // * Description: Indicates that the
- // versioning configuration specified in the request is invalid.
- //
- // * HTTP Status
- // Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // IncompleteBody
- //
- // * Description: You did not provide the number of bytes specified
- // by the Content-Length HTTP header
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP
- // Fault Code Prefix: Client
- //
- // * Code: IncorrectNumberOfFilesInPostRequest
- //
- // *
- // Description: POST requires exactly one file upload per request.
- //
- // * HTTP Status
- // Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InlineDataTooLarge
- //
- // * Description: Inline data exceeds the maximum allowed
- // size.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // *
- // Code: InternalError
- //
- // * Description: We encountered an internal error. Please try
- // again.
- //
- // * HTTP Status Code: 500 Internal Server Error
- //
- // * SOAP Fault Code Prefix:
- // Server
- //
- // * Code: InvalidAccessKeyId
- //
- // * Description: The Amazon Web Services
- // access key ID you provided does not exist in our records.
- //
- // * HTTP Status Code:
- // 403 Forbidden
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidAddressingHeader
- //
- // * Description: You must specify the Anonymous role.
- //
- // *
- // HTTP Status Code: N/A
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidArgument
- //
- // * Description: Invalid Argument
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidBucketName
- //
- // *
- // Description: The specified bucket is not valid.
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidBucketState
- //
- // *
- // Description: The request is not valid with the current state of the bucket.
- //
- // *
- // HTTP Status Code: 409 Conflict
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidDigest
- //
- // * Description: The Content-MD5 you specified is not valid.
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidEncryptionAlgorithmError
- //
- // * Description: The encryption request you
- // specified is not valid. The valid value is AES256.
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidLocationConstraint
- //
- // *
- // Description: The specified location constraint is not valid. For more
- // information about Regions, see How to Select a Region for Your Buckets
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidObjectState
- //
- // * Description: The action is not valid for the current state
- // of the object.
- //
- // * HTTP Status Code: 403 Forbidden
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: InvalidPart
- //
- // * Description: One or more of the specified parts
- // could not be found. The part might not have been uploaded, or the specified
- // entity tag might not have matched the part's entity tag.
- //
- // * HTTP Status Code:
- // 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidPartOrder
- //
- // *
- // Description: The list of parts was not in ascending order. Parts list must be
- // specified in order by part number.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP
- // Fault Code Prefix: Client
- //
- // * Code: InvalidPayer
- //
- // * Description: All access to
- // this object has been disabled. Please contact Amazon Web Services Support for
- // further assistance.
- //
- // * HTTP Status Code: 403 Forbidden
- //
- // * SOAP Fault Code
- // Prefix: Client
- //
- // * Code: InvalidPolicyDocument
- //
- // * Description: The content of the
- // form does not meet the conditions specified in the policy document.
- //
- // * HTTP
- // Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidRange
- //
- // * Description: The requested range cannot be satisfied.
- //
- // * HTTP
- // Status Code: 416 Requested Range Not Satisfiable
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: InvalidRequest
- //
- // * Description: Please use AWS4-HMAC-SHA256.
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * Code: N/A
- //
- // * Code: InvalidRequest
- //
- // *
- // Description: SOAP requests must be made over an HTTPS connection.
- //
- // * HTTP Status
- // Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidRequest
- //
- // * Description: Amazon S3 Transfer Acceleration is not supported
- // for buckets with non-DNS compliant names.
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * Code: N/A
- //
- // * Code: InvalidRequest
- //
- // * Description: Amazon S3 Transfer
- // Acceleration is not supported for buckets with periods (.) in their names.
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * Code: N/A
- //
- // * Code: InvalidRequest
- //
- // *
- // Description: Amazon S3 Transfer Accelerate endpoint only supports virtual style
- // requests.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * Code: N/A
- //
- // * Code:
- // InvalidRequest
- //
- // * Description: Amazon S3 Transfer Accelerate is not configured
- // on this bucket.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * Code: N/A
- //
- // * Code:
- // InvalidRequest
- //
- // * Description: Amazon S3 Transfer Accelerate is disabled on this
- // bucket.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * Code: N/A
- //
- // * Code:
- // InvalidRequest
- //
- // * Description: Amazon S3 Transfer Acceleration is not supported
- // on this bucket. Contact Amazon Web Services Support for more information.
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * Code: N/A
- //
- // * Code: InvalidRequest
- //
- // *
- // Description: Amazon S3 Transfer Acceleration cannot be enabled on this bucket.
- // Contact Amazon Web Services Support for more information.
- //
- // * HTTP Status Code:
- // 400 Bad Request
- //
- // * Code: N/A
- //
- // * Code: InvalidSecurity
- //
- // * Description: The
- // provided security credentials are not valid.
- //
- // * HTTP Status Code: 403
- // Forbidden
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidSOAPRequest
- //
- // *
- // Description: The SOAP request body is invalid.
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidStorageClass
- //
- // *
- // Description: The storage class you specified is not valid.
- //
- // * HTTP Status Code:
- // 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // InvalidTargetBucketForLogging
- //
- // * Description: The target bucket for logging does
- // not exist, is not owned by you, or does not have the appropriate grants for the
- // log-delivery group.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code
- // Prefix: Client
- //
- // * Code: InvalidToken
- //
- // * Description: The provided token is
- // malformed or otherwise invalid.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP
- // Fault Code Prefix: Client
- //
- // * Code: InvalidURI
- //
- // * Description: Couldn't parse the
- // specified URI.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: KeyTooLongError
- //
- // * Description: Your key is too long.
- //
- // * HTTP
- // Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // MalformedACLError
- //
- // * Description: The XML you provided was not well-formed or
- // did not validate against our published schema.
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: MalformedPOSTRequest
- //
- // *
- // Description: The body of your POST request is not well-formed
- // multipart/form-data.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code
- // Prefix: Client
- //
- // * Code: MalformedXML
- //
- // * Description: This happens when the user
- // sends malformed XML (XML that doesn't conform to the published XSD) for the
- // configuration. The error message is, "The XML you provided was not well-formed
- // or did not validate against our published schema."
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: MaxMessageLengthExceeded
- //
- // *
- // Description: Your request was too big.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // *
- // SOAP Fault Code Prefix: Client
- //
- // * Code: MaxPostPreDataLengthExceededError
- //
- // *
- // Description: Your POST request fields preceding the upload file were too
- // large.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // *
- // Code: MetadataTooLarge
- //
- // * Description: Your metadata headers exceed the maximum
- // allowed metadata size.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code
- // Prefix: Client
- //
- // * Code: MethodNotAllowed
- //
- // * Description: The specified method is
- // not allowed against this resource.
- //
- // * HTTP Status Code: 405 Method Not
- // Allowed
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: MissingAttachment
- //
- // *
- // Description: A SOAP attachment was expected, but none were found.
- //
- // * HTTP Status
- // Code: N/A
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: MissingContentLength
- //
- // *
- // Description: You must provide the Content-Length HTTP header.
- //
- // * HTTP Status
- // Code: 411 Length Required
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // MissingRequestBodyError
- //
- // * Description: This happens when the user sends an
- // empty XML document as a request. The error message is, "Request body is
- // empty."
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: MissingSecurityElement
- //
- // * Description: The SOAP 1.1 request is
- // missing a security element.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault
- // Code Prefix: Client
- //
- // * Code: MissingSecurityHeader
- //
- // * Description: Your request
- // is missing a required header.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault
- // Code Prefix: Client
- //
- // * Code: NoLoggingStatusForKey
- //
- // * Description: There is no
- // such thing as a logging status subresource for a key.
- //
- // * HTTP Status Code: 400
- // Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchBucket
- //
- // *
- // Description: The specified bucket does not exist.
- //
- // * HTTP Status Code: 404 Not
- // Found
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchBucketPolicy
- //
- // *
- // Description: The specified bucket does not have a bucket policy.
- //
- // * HTTP Status
- // Code: 404 Not Found
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchKey
- //
- // *
- // Description: The specified key does not exist.
- //
- // * HTTP Status Code: 404 Not
- // Found
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchLifecycleConfiguration
- //
- // *
- // Description: The lifecycle configuration does not exist.
- //
- // * HTTP Status Code:
- // 404 Not Found
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchUpload
- //
- // *
- // Description: The specified multipart upload does not exist. The upload ID might
- // be invalid, or the multipart upload might have been aborted or completed.
- //
- // *
- // HTTP Status Code: 404 Not Found
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // NoSuchVersion
- //
- // * Description: Indicates that the version ID specified in the
- // request does not match an existing version.
- //
- // * HTTP Status Code: 404 Not
- // Found
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: NotImplemented
- //
- // * Description:
- // A header you provided implies functionality that is not implemented.
- //
- // * HTTP
- // Status Code: 501 Not Implemented
- //
- // * SOAP Fault Code Prefix: Server
- //
- // * Code:
- // NotSignedUp
- //
- // * Description: Your account is not signed up for the Amazon S3
- // service. You must sign up before you can use Amazon S3. You can sign up at the
- // following URL: Amazon S3 (http://aws.amazon.com/s3)
- //
- // * HTTP Status Code: 403
- // Forbidden
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: OperationAborted
- //
- // *
- // Description: A conflicting conditional action is currently in progress against
- // this resource. Try again.
- //
- // * HTTP Status Code: 409 Conflict
- //
- // * SOAP Fault Code
- // Prefix: Client
- //
- // * Code: PermanentRedirect
- //
- // * Description: The bucket you are
- // attempting to access must be addressed using the specified endpoint. Send all
- // future requests to this endpoint.
- //
- // * HTTP Status Code: 301 Moved Permanently
- //
- // *
- // SOAP Fault Code Prefix: Client
- //
- // * Code: PreconditionFailed
- //
- // * Description: At
- // least one of the preconditions you specified did not hold.
- //
- // * HTTP Status Code:
- // 412 Precondition Failed
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: Redirect
- //
- // *
- // Description: Temporary redirect.
- //
- // * HTTP Status Code: 307 Moved Temporarily
- //
- // *
- // SOAP Fault Code Prefix: Client
- //
- // * Code: RestoreAlreadyInProgress
- //
- // * Description:
- // Object restore is already in progress.
- //
- // * HTTP Status Code: 409 Conflict
- //
- // * SOAP
- // Fault Code Prefix: Client
- //
- // * Code: RequestIsNotMultiPartContent
- //
- // * Description:
- // Bucket POST must be of the enclosure-type multipart/form-data.
- //
- // * HTTP Status
- // Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // RequestTimeout
- //
- // * Description: Your socket connection to the server was not read
- // from or written to within the timeout period.
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: RequestTimeTooSkewed
- //
- // *
- // Description: The difference between the request time and the server's time is
- // too large.
- //
- // * HTTP Status Code: 403 Forbidden
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: RequestTorrentOfBucketError
- //
- // * Description: Requesting the
- // torrent file of a bucket is not permitted.
- //
- // * HTTP Status Code: 400 Bad
- // Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code: SignatureDoesNotMatch
- //
- // *
- // Description: The request signature we calculated does not match the signature
- // you provided. Check your Amazon Web Services secret access key and signing
- // method. For more information, see REST Authentication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) and
- // SOAP Authentication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html) for
- // details.
- //
- // * HTTP Status Code: 403 Forbidden
- //
- // * SOAP Fault Code Prefix: Client
- //
- // *
- // Code: ServiceUnavailable
- //
- // * Description: Reduce your request rate.
- //
- // * HTTP
- // Status Code: 503 Service Unavailable
- //
- // * SOAP Fault Code Prefix: Server
- //
- // * Code:
- // SlowDown
- //
- // * Description: Reduce your request rate.
- //
- // * HTTP Status Code: 503 Slow
- // Down
- //
- // * SOAP Fault Code Prefix: Server
- //
- // * Code: TemporaryRedirect
- //
- // *
- // Description: You are being redirected to the bucket while DNS updates.
- //
- // * HTTP
- // Status Code: 307 Moved Temporarily
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // TokenRefreshRequired
- //
- // * Description: The provided token must be refreshed.
- //
- // *
- // HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // TooManyBuckets
- //
- // * Description: You have attempted to create more buckets than
- // allowed.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: UnexpectedContent
- //
- // * Description: This request does not support
- // content.
- //
- // * HTTP Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix:
- // Client
- //
- // * Code: UnresolvableGrantByEmailAddress
- //
- // * Description: The email
- // address you provided does not match any account on record.
- //
- // * HTTP Status Code:
- // 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
- //
- // * Code:
- // UserKeyMustBeSpecified
- //
- // * Description: The bucket POST must contain the
- // specified field name. If it is specified, check the order of the fields.
- //
- // * HTTP
- // Status Code: 400 Bad Request
- //
- // * SOAP Fault Code Prefix: Client
+ // type. The following is a list of Amazon S3 error codes. For more information,
+ // see Error responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
+ // .
+ // - Code: AccessDenied
+ // - Description: Access Denied
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: AccountProblem
+ // - Description: There is a problem with your Amazon Web Services account that
+ // prevents the action from completing successfully. Contact Amazon Web Services
+ // Support for further assistance.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: AllAccessDisabled
+ // - Description: All access to this Amazon S3 resource has been disabled.
+ // Contact Amazon Web Services Support for further assistance.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: AmbiguousGrantByEmailAddress
+ // - Description: The email address you provided is associated with more than
+ // one account.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: AuthorizationHeaderMalformed
+ // - Description: The authorization header you provided is invalid.
+ // - HTTP Status Code: 400 Bad Request
+ // - HTTP Status Code: N/A
+ // - Code: BadDigest
+ // - Description: The Content-MD5 you specified did not match what we received.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: BucketAlreadyExists
+ // - Description: The requested bucket name is not available. The bucket
+ // namespace is shared by all users of the system. Please select a different name
+ // and try again.
+ // - HTTP Status Code: 409 Conflict
+ // - SOAP Fault Code Prefix: Client
+ // - Code: BucketAlreadyOwnedByYou
+ // - Description: The bucket you tried to create already exists, and you own it.
+ // Amazon S3 returns this error in all Amazon Web Services Regions except in the
+ // North Virginia Region. For legacy compatibility, if you re-create an existing
+ // bucket that you already own in the North Virginia Region, Amazon S3 returns 200
+ // OK and resets the bucket access control lists (ACLs).
+ // - Code: 409 Conflict (in all Regions except the North Virginia Region)
+ // - SOAP Fault Code Prefix: Client
+ // - Code: BucketNotEmpty
+ // - Description: The bucket you tried to delete is not empty.
+ // - HTTP Status Code: 409 Conflict
+ // - SOAP Fault Code Prefix: Client
+ // - Code: CredentialsNotSupported
+ // - Description: This request does not support credentials.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: CrossLocationLoggingProhibited
+ // - Description: Cross-location logging not allowed. Buckets in one geographic
+ // location cannot log information to a bucket in another location.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: EntityTooSmall
+ // - Description: Your proposed upload is smaller than the minimum allowed
+ // object size.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: EntityTooLarge
+ // - Description: Your proposed upload exceeds the maximum allowed object size.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: ExpiredToken
+ // - Description: The provided token has expired.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: IllegalVersioningConfigurationException
+ // - Description: Indicates that the versioning configuration specified in the
+ // request is invalid.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: IncompleteBody
+ // - Description: You did not provide the number of bytes specified by the
+ // Content-Length HTTP header
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: IncorrectNumberOfFilesInPostRequest
+ // - Description: POST requires exactly one file upload per request.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InlineDataTooLarge
+ // - Description: Inline data exceeds the maximum allowed size.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InternalError
+ // - Description: We encountered an internal error. Please try again.
+ // - HTTP Status Code: 500 Internal Server Error
+ // - SOAP Fault Code Prefix: Server
+ // - Code: InvalidAccessKeyId
+ // - Description: The Amazon Web Services access key ID you provided does not
+ // exist in our records.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidAddressingHeader
+ // - Description: You must specify the Anonymous role.
+ // - HTTP Status Code: N/A
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidArgument
+ // - Description: Invalid Argument
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidBucketName
+ // - Description: The specified bucket is not valid.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidBucketState
+ // - Description: The request is not valid with the current state of the bucket.
+ // - HTTP Status Code: 409 Conflict
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidDigest
+ // - Description: The Content-MD5 you specified is not valid.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidEncryptionAlgorithmError
+ // - Description: The encryption request you specified is not valid. The valid
+ // value is AES256.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidLocationConstraint
+ // - Description: The specified location constraint is not valid. For more
+ // information about Regions, see How to Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro)
+ // .
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidObjectState
+ // - Description: The action is not valid for the current state of the object.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidPart
+ // - Description: One or more of the specified parts could not be found. The
+ // part might not have been uploaded, or the specified entity tag might not have
+ // matched the part's entity tag.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidPartOrder
+ // - Description: The list of parts was not in ascending order. Parts list must
+ // be specified in order by part number.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidPayer
+ // - Description: All access to this object has been disabled. Please contact
+ // Amazon Web Services Support for further assistance.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidPolicyDocument
+ // - Description: The content of the form does not meet the conditions specified
+ // in the policy document.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidRange
+ // - Description: The requested range cannot be satisfied.
+ // - HTTP Status Code: 416 Requested Range Not Satisfiable
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidRequest
+ // - Description: Please use AWS4-HMAC-SHA256 .
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidRequest
+ // - Description: SOAP requests must be made over an HTTPS connection.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidRequest
+ // - Description: Amazon S3 Transfer Acceleration is not supported for buckets
+ // with non-DNS compliant names.
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidRequest
+ // - Description: Amazon S3 Transfer Acceleration is not supported for buckets
+ // with periods (.) in their names.
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidRequest
+ // - Description: Amazon S3 Transfer Accelerate endpoint only supports virtual
+ // style requests.
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidRequest
+ // - Description: Amazon S3 Transfer Accelerate is not configured on this
+ // bucket.
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidRequest
+ // - Description: Amazon S3 Transfer Accelerate is disabled on this bucket.
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidRequest
+ // - Description: Amazon S3 Transfer Acceleration is not supported on this
+ // bucket. Contact Amazon Web Services Support for more information.
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidRequest
+ // - Description: Amazon S3 Transfer Acceleration cannot be enabled on this
+ // bucket. Contact Amazon Web Services Support for more information.
+ // - HTTP Status Code: 400 Bad Request
+ // - Code: N/A
+ // - Code: InvalidSecurity
+ // - Description: The provided security credentials are not valid.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidSOAPRequest
+ // - Description: The SOAP request body is invalid.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidStorageClass
+ // - Description: The storage class you specified is not valid.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidTargetBucketForLogging
+ // - Description: The target bucket for logging does not exist, is not owned by
+ // you, or does not have the appropriate grants for the log-delivery group.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidToken
+ // - Description: The provided token is malformed or otherwise invalid.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: InvalidURI
+ // - Description: Couldn't parse the specified URI.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: KeyTooLongError
+ // - Description: Your key is too long.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MalformedACLError
+ // - Description: The XML you provided was not well-formed or did not validate
+ // against our published schema.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MalformedPOSTRequest
+ // - Description: The body of your POST request is not well-formed
+ // multipart/form-data.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MalformedXML
+ // - Description: This happens when the user sends malformed XML (XML that
+ // doesn't conform to the published XSD) for the configuration. The error message
+ // is, "The XML you provided was not well-formed or did not validate against our
+ // published schema."
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MaxMessageLengthExceeded
+ // - Description: Your request was too big.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MaxPostPreDataLengthExceededError
+ // - Description: Your POST request fields preceding the upload file were too
+ // large.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MetadataTooLarge
+ // - Description: Your metadata headers exceed the maximum allowed metadata
+ // size.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MethodNotAllowed
+ // - Description: The specified method is not allowed against this resource.
+ // - HTTP Status Code: 405 Method Not Allowed
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MissingAttachment
+ // - Description: A SOAP attachment was expected, but none were found.
+ // - HTTP Status Code: N/A
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MissingContentLength
+ // - Description: You must provide the Content-Length HTTP header.
+ // - HTTP Status Code: 411 Length Required
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MissingRequestBodyError
+ // - Description: This happens when the user sends an empty XML document as a
+ // request. The error message is, "Request body is empty."
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MissingSecurityElement
+ // - Description: The SOAP 1.1 request is missing a security element.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: MissingSecurityHeader
+ // - Description: Your request is missing a required header.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NoLoggingStatusForKey
+ // - Description: There is no such thing as a logging status subresource for a
+ // key.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NoSuchBucket
+ // - Description: The specified bucket does not exist.
+ // - HTTP Status Code: 404 Not Found
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NoSuchBucketPolicy
+ // - Description: The specified bucket does not have a bucket policy.
+ // - HTTP Status Code: 404 Not Found
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NoSuchKey
+ // - Description: The specified key does not exist.
+ // - HTTP Status Code: 404 Not Found
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NoSuchLifecycleConfiguration
+ // - Description: The lifecycle configuration does not exist.
+ // - HTTP Status Code: 404 Not Found
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NoSuchUpload
+ // - Description: The specified multipart upload does not exist. The upload ID
+ // might be invalid, or the multipart upload might have been aborted or completed.
+ // - HTTP Status Code: 404 Not Found
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NoSuchVersion
+ // - Description: Indicates that the version ID specified in the request does
+ // not match an existing version.
+ // - HTTP Status Code: 404 Not Found
+ // - SOAP Fault Code Prefix: Client
+ // - Code: NotImplemented
+ // - Description: A header you provided implies functionality that is not
+ // implemented.
+ // - HTTP Status Code: 501 Not Implemented
+ // - SOAP Fault Code Prefix: Server
+ // - Code: NotSignedUp
+ // - Description: Your account is not signed up for the Amazon S3 service. You
+ // must sign up before you can use Amazon S3. You can sign up at the following URL:
+ // Amazon S3 (http://aws.amazon.com/s3)
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: OperationAborted
+ // - Description: A conflicting conditional action is currently in progress
+ // against this resource. Try again.
+ // - HTTP Status Code: 409 Conflict
+ // - SOAP Fault Code Prefix: Client
+ // - Code: PermanentRedirect
+ // - Description: The bucket you are attempting to access must be addressed
+ // using the specified endpoint. Send all future requests to this endpoint.
+ // - HTTP Status Code: 301 Moved Permanently
+ // - SOAP Fault Code Prefix: Client
+ // - Code: PreconditionFailed
+ // - Description: At least one of the preconditions you specified did not hold.
+ // - HTTP Status Code: 412 Precondition Failed
+ // - SOAP Fault Code Prefix: Client
+ // - Code: Redirect
+ // - Description: Temporary redirect.
+ // - HTTP Status Code: 307 Moved Temporarily
+ // - SOAP Fault Code Prefix: Client
+ // - Code: RestoreAlreadyInProgress
+ // - Description: Object restore is already in progress.
+ // - HTTP Status Code: 409 Conflict
+ // - SOAP Fault Code Prefix: Client
+ // - Code: RequestIsNotMultiPartContent
+ // - Description: Bucket POST must be of the enclosure-type multipart/form-data.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: RequestTimeout
+ // - Description: Your socket connection to the server was not read from or
+ // written to within the timeout period.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: RequestTimeTooSkewed
+ // - Description: The difference between the request time and the server's time
+ // is too large.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: RequestTorrentOfBucketError
+ // - Description: Requesting the torrent file of a bucket is not permitted.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: SignatureDoesNotMatch
+ // - Description: The request signature we calculated does not match the
+ // signature you provided. Check your Amazon Web Services secret access key and
+ // signing method. For more information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+ // and SOAP Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html)
+ // for details.
+ // - HTTP Status Code: 403 Forbidden
+ // - SOAP Fault Code Prefix: Client
+ // - Code: ServiceUnavailable
+ // - Description: Service is unable to handle request.
+ // - HTTP Status Code: 503 Service Unavailable
+ // - SOAP Fault Code Prefix: Server
+ // - Code: SlowDown
+ // - Description: Reduce your request rate.
+ // - HTTP Status Code: 503 Slow Down
+ // - SOAP Fault Code Prefix: Server
+ // - Code: TemporaryRedirect
+ // - Description: You are being redirected to the bucket while DNS updates.
+ // - HTTP Status Code: 307 Moved Temporarily
+ // - SOAP Fault Code Prefix: Client
+ // - Code: TokenRefreshRequired
+ // - Description: The provided token must be refreshed.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: TooManyBuckets
+ // - Description: You have attempted to create more buckets than allowed.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: UnexpectedContent
+ // - Description: This request does not support content.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: UnresolvableGrantByEmailAddress
+ // - Description: The email address you provided does not match any account on
+ // record.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
+ // - Code: UserKeyMustBeSpecified
+ // - Description: The bucket POST must contain the specified field name. If it
+ // is specified, check the order of the fields.
+ // - HTTP Status Code: 400 Bad Request
+ // - SOAP Fault Code Prefix: Client
Code *string
// The error key.
@@ -1734,7 +1240,8 @@ type Error struct {
// error message.
Message *string
- // The version ID of the error.
+ // The version ID of the error. This functionality is not supported for directory
+ // buckets.
VersionId *string
noSmithyDocumentSerde
@@ -1745,9 +1252,9 @@ type ErrorDocument struct {
// The object key name to use when a 4XX class error occurs. Replacement must be
// made for object keys containing special characters (such as carriage returns)
- // when using XML requests. For more information, see XML related object key
- // constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // when using XML requests. For more information, see XML related object key
+ // constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
//
// This member is required.
Key *string
@@ -1761,12 +1268,11 @@ type EventBridgeConfiguration struct {
}
// Optional configuration to replicate existing source bucket objects. For more
-// information, see Replicating Existing Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
+// information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
// in the Amazon S3 User Guide.
type ExistingObjectReplication struct {
- //
+ // Specifies whether Amazon S3 replicates existing source bucket objects.
//
// This member is required.
Status ExistingObjectReplicationStatus
@@ -1774,16 +1280,22 @@ type ExistingObjectReplication struct {
noSmithyDocumentSerde
}
-// Specifies the Amazon S3 object key name to filter on and whether to filter on
-// the suffix or prefix of the key name.
+// Specifies the Amazon S3 object key name to filter on. An object key name is the
+// name assigned to an object in your Amazon S3 bucket. You specify whether to
+// filter on the suffix or prefix of the object key name. A prefix is a specific
+// string of characters at the beginning of an object key name, which you can use
+// to organize objects. For example, you can start the key names of related objects
+// with a prefix, such as 2023- or engineering/ . Then, you can use FilterRule to
+// find objects in a bucket with key names that have the same prefix. A suffix is
+// similar to a prefix, but it is at the end of the object key name instead of at
+// the beginning.
type FilterRule struct {
// The object key name prefix or suffix identifying one or more objects to which
// the filtering rule applies. The maximum length is 1,024 characters. Overlapping
// prefixes and suffixes are not supported. For more information, see Configuring
- // Event Notifications
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
- // Amazon S3 User Guide.
+ // Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+ // in the Amazon S3 User Guide.
Name FilterRuleName
// The value that the filter searches for in object key names.
@@ -1798,10 +1310,10 @@ type GetObjectAttributesParts struct {
// Indicates whether the returned list of parts is truncated. A value of true
// indicates that the list was truncated. A list can be truncated if the number of
// parts exceeds the limit returned in the MaxParts element.
- IsTruncated bool
+ IsTruncated *bool
// The maximum number of parts allowed in the response.
- MaxParts int32
+ MaxParts *int32
// When a list is truncated, this element specifies the last part in the list, as
// well as the value to use for the PartNumberMarker request parameter in a
@@ -1813,10 +1325,17 @@ type GetObjectAttributesParts struct {
// A container for elements related to a particular part. A response can contain
// zero or more Parts elements.
+ // - General purpose buckets - For GetObjectAttributes , if a additional checksum
+ // (including x-amz-checksum-crc32 , x-amz-checksum-crc32c , x-amz-checksum-sha1
+ // , or x-amz-checksum-sha256 ) isn't applied to the object specified in the
+ // request, the response doesn't return Part .
+ // - Directory buckets - For GetObjectAttributes , no matter whether a additional
+ // checksum is applied to the object specified in the request, the response returns
+ // Part .
Parts []ObjectPart
// The total number of parts.
- TotalPartsCount int32
+ TotalPartsCount *int32
noSmithyDocumentSerde
}
@@ -1855,32 +1374,19 @@ type Grantee struct {
// Screen name of the grantee.
DisplayName *string
- // Email address of the grantee. Using email addresses to specify a grantee is only
- // supported in the following Amazon Web Services Regions:
- //
- // * US East (N.
- // Virginia)
- //
- // * US West (N. California)
- //
- // * US West (Oregon)
- //
- // * Asia Pacific
- // (Singapore)
- //
- // * Asia Pacific (Sydney)
- //
- // * Asia Pacific (Tokyo)
- //
- // * Europe
- // (Ireland)
- //
- // * South America (São Paulo)
- //
- // For a list of all the Amazon S3
- // supported Regions and endpoints, see Regions and Endpoints
- // (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
- // Amazon Web Services General Reference.
+ // Email address of the grantee. Using email addresses to specify a grantee is
+ // only supported in the following Amazon Web Services Regions:
+ // - US East (N. Virginia)
+ // - US West (N. California)
+ // - US West (Oregon)
+ // - Asia Pacific (Singapore)
+ // - Asia Pacific (Sydney)
+ // - Asia Pacific (Tokyo)
+ // - Europe (Ireland)
+ // - South America (São Paulo)
+ // For a list of all the Amazon S3 supported Regions and endpoints, see Regions
+ // and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+ // in the Amazon Web Services General Reference.
EmailAddress *string
// The canonical user ID of the grantee.
@@ -1901,8 +1407,8 @@ type IndexDocument struct {
// key name images/index.html) The suffix must not be empty and must not include a
// slash character. Replacement must be made for object keys containing special
// characters (such as carriage returns) when using XML requests. For more
- // information, see XML related object key constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
//
// This member is required.
Suffix *string
@@ -1913,11 +1419,15 @@ type IndexDocument struct {
// Container element that identifies who initiated the multipart upload.
type Initiator struct {
- // Name of the Principal.
+ // Name of the Principal. This functionality is not supported for directory
+ // buckets.
DisplayName *string
// If the principal is an Amazon Web Services account, it provides the Canonical
// User ID. If the principal is an IAM User, it provides a user ARN value.
+ // Directory buckets - If the principal is an Amazon Web Services account, it
+ // provides the Amazon Web Services account ID. If the principal is an IAM User, it
+ // provides a user ARN value.
ID *string
noSmithyDocumentSerde
@@ -1942,8 +1452,8 @@ type InputSerialization struct {
noSmithyDocumentSerde
}
-// A container for specifying S3 Intelligent-Tiering filters. The filters determine
-// the subset of objects to which the rule applies.
+// A container for specifying S3 Intelligent-Tiering filters. The filters
+// determine the subset of objects to which the rule applies.
type IntelligentTieringAndOperator struct {
// An object key name prefix that identifies the subset of objects to which the
@@ -1959,8 +1469,8 @@ type IntelligentTieringAndOperator struct {
// Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket. For
// information about the S3 Intelligent-Tiering storage class, see Storage class
-// for automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
+// for automatically optimizing frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
+// .
type IntelligentTieringConfiguration struct {
// The ID used to identify the S3 Intelligent-Tiering configuration.
@@ -1978,8 +1488,8 @@ type IntelligentTieringConfiguration struct {
// This member is required.
Tierings []Tiering
- // Specifies a bucket filter. The configuration only includes objects that meet the
- // filter's criteria.
+ // Specifies a bucket filter. The configuration only includes objects that meet
+ // the filter's criteria.
Filter *IntelligentTieringFilter
noSmithyDocumentSerde
@@ -1989,16 +1499,16 @@ type IntelligentTieringConfiguration struct {
// configuration applies to.
type IntelligentTieringFilter struct {
- // A conjunction (logical AND) of predicates, which is used in evaluating a metrics
- // filter. The operator must have at least two predicates, and an object must match
- // all of the predicates in order for the filter to apply.
+ // A conjunction (logical AND) of predicates, which is used in evaluating a
+ // metrics filter. The operator must have at least two predicates, and an object
+ // must match all of the predicates in order for the filter to apply.
And *IntelligentTieringAndOperator
// An object key name prefix that identifies the subset of objects to which the
// rule applies. Replacement must be made for object keys containing special
// characters (such as carriage returns) when using XML requests. For more
- // information, see XML related object key constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
Prefix *string
// A container of a key value name pair.
@@ -2008,8 +1518,7 @@ type IntelligentTieringFilter struct {
}
// Specifies the inventory configuration for an Amazon S3 bucket. For more
-// information, see GET Bucket inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html)
+// information, see GET Bucket inventory (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html)
// in the Amazon S3 API Reference.
type InventoryConfiguration struct {
@@ -2023,27 +1532,27 @@ type InventoryConfiguration struct {
// This member is required.
Id *string
- // Object versions to include in the inventory list. If set to All, the list
+ // Object versions to include in the inventory list. If set to All , the list
// includes all the object versions, which adds the version-related fields
- // VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list
- // does not contain these version-related fields.
+ // VersionId , IsLatest , and DeleteMarker to the list. If set to Current , the
+ // list does not contain these version-related fields.
//
// This member is required.
IncludedObjectVersions InventoryIncludedObjectVersions
- // Specifies whether the inventory is enabled or disabled. If set to True, an
- // inventory list is generated. If set to False, no inventory list is generated.
+ // Specifies whether the inventory is enabled or disabled. If set to True , an
+ // inventory list is generated. If set to False , no inventory list is generated.
//
// This member is required.
- IsEnabled bool
+ IsEnabled *bool
// Specifies the schedule for generating inventory results.
//
// This member is required.
Schedule *InventorySchedule
- // Specifies an inventory filter. The inventory only includes objects that meet the
- // filter's criteria.
+ // Specifies an inventory filter. The inventory only includes objects that meet
+ // the filter's criteria.
Filter *InventoryFilter
// Contains the optional fields that are included in the inventory results.
@@ -2077,8 +1586,8 @@ type InventoryEncryption struct {
noSmithyDocumentSerde
}
-// Specifies an inventory filter. The inventory only includes objects that meet the
-// filter's criteria.
+// Specifies an inventory filter. The inventory only includes objects that meet
+// the filter's criteria.
type InventoryFilter struct {
// The prefix that an object must have to be included in the inventory results.
@@ -2154,9 +1663,8 @@ type JSONOutput struct {
type LambdaFunctionConfiguration struct {
// The Amazon S3 bucket event for which to invoke the Lambda function. For more
- // information, see Supported Event Types
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
- // Amazon S3 User Guide.
+ // information, see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Events []Event
@@ -2168,9 +1676,8 @@ type LambdaFunctionConfiguration struct {
LambdaFunctionArn *string
// Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
- // Amazon S3 User Guide.
+ // filtering, see Configuring event notifications using object key name filtering (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html)
+ // in the Amazon S3 User Guide.
Filter *NotificationConfigurationFilter
// An optional unique identifier for configurations in a notification
@@ -2180,27 +1687,31 @@ type LambdaFunctionConfiguration struct {
noSmithyDocumentSerde
}
-// Container for the expiration for the lifecycle of the object.
+// Container for the expiration for the lifecycle of the object. For more
+// information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html)
+// in the Amazon S3 User Guide.
type LifecycleExpiration struct {
- // Indicates at what date the object is to be moved or deleted. Should be in GMT
- // ISO 8601 Format.
+ // Indicates at what date the object is to be moved or deleted. The date value
+ // must conform to the ISO 8601 format. The time is always midnight UTC.
Date *time.Time
// Indicates the lifetime, in days, of the objects that are subject to the rule.
// The value must be a non-zero positive integer.
- Days int32
+ Days *int32
// Indicates whether Amazon S3 will remove a delete marker with no noncurrent
// versions. If set to true, the delete marker will be expired; if set to false the
// policy takes no action. This cannot be specified with Days or Date in a
// Lifecycle Expiration Policy.
- ExpiredObjectDeleteMarker bool
+ ExpiredObjectDeleteMarker *bool
noSmithyDocumentSerde
}
-// A lifecycle rule for individual objects in an Amazon S3 bucket.
+// A lifecycle rule for individual objects in an Amazon S3 bucket. For more
+// information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html)
+// in the Amazon S3 User Guide.
type LifecycleRule struct {
// If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is
@@ -2211,9 +1722,8 @@ type LifecycleRule struct {
// Specifies the days since the initiation of an incomplete multipart upload that
// Amazon S3 will wait before permanently removing all parts of the upload. For
- // more information, see Aborting Incomplete Multipart Uploads Using a Bucket
- // Lifecycle Policy
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
+ // more information, see Aborting Incomplete Multipart Uploads Using a Bucket
+ // Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
// in the Amazon S3 User Guide.
AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload
@@ -2222,7 +1732,7 @@ type LifecycleRule struct {
Expiration *LifecycleExpiration
// The Filter is used to identify objects that a Lifecycle Rule applies to. A
- // Filter must have exactly one of Prefix, Tag, or And specified. Filter is
+ // Filter must have exactly one of Prefix , Tag , or And specified. Filter is
// required if the LifecycleRule does not contain a Prefix element.
Filter LifecycleRuleFilter
@@ -2246,8 +1756,8 @@ type LifecycleRule struct {
// Prefix identifying one or more objects to which the rule applies. This is no
// longer used; use Filter instead. Replacement must be made for object keys
// containing special characters (such as carriage returns) when using XML
- // requests. For more information, see XML related object key constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // requests. For more information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
//
// Deprecated: This member has been deprecated.
Prefix *string
@@ -2264,10 +1774,10 @@ type LifecycleRule struct {
type LifecycleRuleAndOperator struct {
// Minimum object size to which the rule applies.
- ObjectSizeGreaterThan int64
+ ObjectSizeGreaterThan *int64
// Maximum object size to which the rule applies.
- ObjectSizeLessThan int64
+ ObjectSizeLessThan *int64
// Prefix identifying one or more objects to which the rule applies.
Prefix *string
@@ -2280,14 +1790,17 @@ type LifecycleRuleAndOperator struct {
}
// The Filter is used to identify objects that a Lifecycle Rule applies to. A
-// Filter must have exactly one of Prefix, Tag, or And specified.
+// Filter can have exactly one of Prefix , Tag , ObjectSizeGreaterThan ,
+// ObjectSizeLessThan , or And specified. If the Filter element is left empty, the
+// Lifecycle Rule applies to all objects in the bucket.
//
// The following types satisfy this interface:
-// LifecycleRuleFilterMemberAnd
-// LifecycleRuleFilterMemberObjectSizeGreaterThan
-// LifecycleRuleFilterMemberObjectSizeLessThan
-// LifecycleRuleFilterMemberPrefix
-// LifecycleRuleFilterMemberTag
+//
+// LifecycleRuleFilterMemberAnd
+// LifecycleRuleFilterMemberObjectSizeGreaterThan
+// LifecycleRuleFilterMemberObjectSizeLessThan
+// LifecycleRuleFilterMemberPrefix
+// LifecycleRuleFilterMemberTag
type LifecycleRuleFilter interface {
isLifecycleRuleFilter()
}
@@ -2323,9 +1836,9 @@ func (*LifecycleRuleFilterMemberObjectSizeLessThan) isLifecycleRuleFilter() {}
// Prefix identifying one or more objects to which the rule applies. Replacement
// must be made for object keys containing special characters (such as carriage
-// returns) when using XML requests. For more information, see XML related object
-// key constraints
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+// returns) when using XML requests. For more information, see XML related object
+// key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+// .
type LifecycleRuleFilterMemberPrefix struct {
Value string
@@ -2343,10 +1856,27 @@ type LifecycleRuleFilterMemberTag struct {
func (*LifecycleRuleFilterMemberTag) isLifecycleRuleFilter() {}
-// Describes where logs are stored and the prefix that Amazon S3 assigns to all log
-// object keys for a bucket. For more information, see PUT Bucket logging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in
-// the Amazon S3 API Reference.
+// Specifies the location where the bucket will be created. For directory buckets,
+// the location type is Availability Zone. For more information about directory
+// buckets, see Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html)
+// in the Amazon S3 User Guide. This functionality is only supported by directory
+// buckets.
+type LocationInfo struct {
+
+ // The name of the location where the bucket will be created. For directory
+ // buckets, the name of the location is the AZ ID of the Availability Zone where
+ // the bucket will be created. An example AZ ID value is usw2-az1 .
+ Name *string
+
+ // The type of location where the bucket will be created.
+ Type LocationType
+
+ noSmithyDocumentSerde
+}
+
+// Describes where logs are stored and the prefix that Amazon S3 assigns to all
+// log object keys for a bucket. For more information, see PUT Bucket logging (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
+// in the Amazon S3 API Reference.
type LoggingEnabled struct {
// Specifies the bucket where you want Amazon S3 to store server access logs. You
@@ -2359,37 +1889,39 @@ type LoggingEnabled struct {
// This member is required.
TargetBucket *string
- // A prefix for all log object keys. If you store log files from multiple Amazon S3
- // buckets in a single bucket, you can use a prefix to distinguish which log files
- // came from which bucket.
+ // A prefix for all log object keys. If you store log files from multiple Amazon
+ // S3 buckets in a single bucket, you can use a prefix to distinguish which log
+ // files came from which bucket.
//
// This member is required.
TargetPrefix *string
// Container for granting information. Buckets that use the bucket owner enforced
// setting for Object Ownership don't support target grants. For more information,
- // see Permissions for server access log delivery
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
+ // see Permissions for server access log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
// in the Amazon S3 User Guide.
TargetGrants []TargetGrant
+ // Amazon S3 key format for log objects.
+ TargetObjectKeyFormat *TargetObjectKeyFormat
+
noSmithyDocumentSerde
}
// A metadata key-value pair to store with an object.
type MetadataEntry struct {
- // Name of the Object.
+ // Name of the object.
Name *string
- // Value of the Object.
+ // Value of the object.
Value *string
noSmithyDocumentSerde
}
-// A container specifying replication metrics-related settings enabling replication
-// metrics and events.
+// A container specifying replication metrics-related settings enabling
+// replication metrics and events.
type Metrics struct {
// Specifies whether the replication metrics are enabled.
@@ -2404,9 +1936,9 @@ type Metrics struct {
noSmithyDocumentSerde
}
-// A conjunction (logical AND) of predicates, which is used in evaluating a metrics
-// filter. The operator must have at least two predicates, and an object must match
-// all of the predicates in order for the filter to apply.
+// A conjunction (logical AND) of predicates, which is used in evaluating a
+// metrics filter. The operator must have at least two predicates, and an object
+// must match all of the predicates in order for the filter to apply.
type MetricsAndOperator struct {
// The access point ARN used when evaluating an AND predicate.
@@ -2425,11 +1957,12 @@ type MetricsAndOperator struct {
// by the metrics configuration ID) from an Amazon S3 bucket. If you're updating an
// existing metrics configuration, note that this is a full replacement of the
// existing metrics configuration. If you don't include the elements you want to
-// keep, they are erased. For more information, see PutBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html).
+// keep, they are erased. For more information, see PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html)
+// .
type MetricsConfiguration struct {
- // The ID used to identify the metrics configuration.
+ // The ID used to identify the metrics configuration. The ID has a 64 character
+ // limit and can only contain letters, numbers, periods, dashes, and underscores.
//
// This member is required.
Id *string
@@ -2445,14 +1978,15 @@ type MetricsConfiguration struct {
// Specifies a metrics configuration filter. The metrics configuration only
// includes objects that meet the filter's criteria. A filter must be a prefix, an
// object tag, an access point ARN, or a conjunction (MetricsAndOperator). For more
-// information, see PutBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html).
+// information, see PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
+// .
//
// The following types satisfy this interface:
-// MetricsFilterMemberAccessPointArn
-// MetricsFilterMemberAnd
-// MetricsFilterMemberPrefix
-// MetricsFilterMemberTag
+//
+// MetricsFilterMemberAccessPointArn
+// MetricsFilterMemberAnd
+// MetricsFilterMemberPrefix
+// MetricsFilterMemberTag
type MetricsFilter interface {
isMetricsFilter()
}
@@ -2466,9 +2000,9 @@ type MetricsFilterMemberAccessPointArn struct {
func (*MetricsFilterMemberAccessPointArn) isMetricsFilter() {}
-// A conjunction (logical AND) of predicates, which is used in evaluating a metrics
-// filter. The operator must have at least two predicates, and an object must match
-// all of the predicates in order for the filter to apply.
+// A conjunction (logical AND) of predicates, which is used in evaluating a
+// metrics filter. The operator must have at least two predicates, and an object
+// must match all of the predicates in order for the filter to apply.
type MetricsFilterMemberAnd struct {
Value MetricsAndOperator
@@ -2511,9 +2045,13 @@ type MultipartUpload struct {
Key *string
// Specifies the owner of the object that is part of the multipart upload.
+ // Directory buckets - The bucket owner is returned as the object owner for all the
+ // objects.
Owner *Owner
- // The class of storage used to store the object.
+ // The class of storage used to store the object. Directory buckets - Only the S3
+ // Express One Zone storage class is supported by directory buckets to store
+ // objects.
StorageClass StorageClass
// Upload ID that identifies the multipart upload.
@@ -2529,48 +2067,45 @@ type MultipartUpload struct {
// the object's lifetime.
type NoncurrentVersionExpiration struct {
- // Specifies how many noncurrent versions Amazon S3 will retain. If there are this
- // many more recent noncurrent versions, Amazon S3 will take the associated action.
- // For more information about noncurrent versions, see Lifecycle configuration
- // elements
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
+ // Specifies how many newer noncurrent versions must exist before Amazon S3 can
+ // perform the associated action on a given version. If there are this many more
+ // recent noncurrent versions, Amazon S3 will take the associated action. For more
+ // information about noncurrent versions, see Lifecycle configuration elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
// in the Amazon S3 User Guide.
- NewerNoncurrentVersions int32
+ NewerNoncurrentVersions *int32
// Specifies the number of days an object is noncurrent before Amazon S3 can
- // perform the associated action. For information about the noncurrent days
- // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
+ // perform the associated action. The value must be a non-zero positive integer.
+ // For information about the noncurrent days calculations, see How Amazon S3
+ // Calculates When an Object Became Noncurrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
// in the Amazon S3 User Guide.
- NoncurrentDays int32
+ NoncurrentDays *int32
noSmithyDocumentSerde
}
// Container for the transition rule that describes when noncurrent objects
-// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR,
-// GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled (or
-// versioning is suspended), you can set this action to request that Amazon S3
-// transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA,
-// INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at a
+// transition to the STANDARD_IA , ONEZONE_IA , INTELLIGENT_TIERING , GLACIER_IR ,
+// GLACIER , or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled
+// (or versioning is suspended), you can set this action to request that Amazon S3
+// transition noncurrent object versions to the STANDARD_IA , ONEZONE_IA ,
+// INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE storage class at a
// specific period in the object's lifetime.
type NoncurrentVersionTransition struct {
- // Specifies how many noncurrent versions Amazon S3 will retain. If there are this
- // many more recent noncurrent versions, Amazon S3 will take the associated action.
- // For more information about noncurrent versions, see Lifecycle configuration
- // elements
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
+ // Specifies how many newer noncurrent versions must exist before Amazon S3 can
+ // perform the associated action on a given version. If there are this many more
+ // recent noncurrent versions, Amazon S3 will take the associated action. For more
+ // information about noncurrent versions, see Lifecycle configuration elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
// in the Amazon S3 User Guide.
- NewerNoncurrentVersions int32
+ NewerNoncurrentVersions *int32
// Specifies the number of days an object is noncurrent before Amazon S3 can
// perform the associated action. For information about the noncurrent days
// calculations, see How Amazon S3 Calculates How Long an Object Has Been
- // Noncurrent
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
+ // Noncurrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
// in the Amazon S3 User Guide.
- NoncurrentDays int32
+ NoncurrentDays *int32
// The class of storage used to store the object.
StorageClass TransitionStorageClass
@@ -2578,8 +2113,8 @@ type NoncurrentVersionTransition struct {
noSmithyDocumentSerde
}
-// A container for specifying the notification configuration of the bucket. If this
-// element is empty, notifications are turned off for the bucket.
+// A container for specifying the notification configuration of the bucket. If
+// this element is empty, notifications are turned off for the bucket.
type NotificationConfiguration struct {
// Enables delivery of events to Amazon EventBridge.
@@ -2589,21 +2124,20 @@ type NotificationConfiguration struct {
// them.
LambdaFunctionConfigurations []LambdaFunctionConfiguration
- // The Amazon Simple Queue Service queues to publish messages to and the events for
- // which to publish messages.
+ // The Amazon Simple Queue Service queues to publish messages to and the events
+ // for which to publish messages.
QueueConfigurations []QueueConfiguration
- // The topic to which notifications are sent and the events for which notifications
- // are generated.
+ // The topic to which notifications are sent and the events for which
+ // notifications are generated.
TopicConfigurations []TopicConfiguration
noSmithyDocumentSerde
}
// Specifies object key name filtering rules. For information about key name
-// filtering, see Configuring Event Notifications
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
-// Amazon S3 User Guide.
+// filtering, see Configuring event notifications using object key name filtering (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html)
+// in the Amazon S3 User Guide.
type NotificationConfigurationFilter struct {
// A container for object key name prefix and suffix filtering rules.
@@ -2622,20 +2156,18 @@ type Object struct {
// contents of an object, not its metadata. The ETag may or may not be an MD5
// digest of the object data. Whether or not it is depends on how the object was
// created and how it is encrypted as described below:
- //
- // * Objects created by the
- // PUT Object, POST Object, or Copy operation, or through the Amazon Web Services
- // Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that
- // are an MD5 digest of their object data.
- //
- // * Objects created by the PUT Object,
- // POST Object, or Copy operation, or through the Amazon Web Services Management
- // Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5
- // digest of their object data.
- //
- // * If an object is created by either the Multipart
- // Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the
- // method of encryption.
+ // - Objects created by the PUT Object, POST Object, or Copy operation, or
+ // through the Amazon Web Services Management Console, and are encrypted by SSE-S3
+ // or plaintext, have ETags that are an MD5 digest of their object data.
+ // - Objects created by the PUT Object, POST Object, or Copy operation, or
+ // through the Amazon Web Services Management Console, and are encrypted by SSE-C
+ // or SSE-KMS, have ETags that are not an MD5 digest of their object data.
+ // - If an object is created by either the Multipart Upload or Part Copy
+ // operation, the ETag is not an MD5 digest, regardless of the method of
+ // encryption. If an object is larger than 16 MB, the Amazon Web Services
+ // Management Console will upload or copy that object as a Multipart Upload, and
+ // therefore the ETag will not be an MD5 digest.
+ // Directory buckets - MD5 is not supported by directory buckets.
ETag *string
// The name that you assign to an object. You use the object key to retrieve the
@@ -2645,13 +2177,25 @@ type Object struct {
// Creation date of the object.
LastModified *time.Time
- // The owner of the object
+ // The owner of the object Directory buckets - The bucket owner is returned as the
+ // object owner.
Owner *Owner
+ // Specifies the restoration status of an object. Objects in certain storage
+ // classes must be restored before they can be retrieved. For more information
+ // about these storage classes and how to work with archived objects, see Working
+ // with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets. Only the S3 Express One Zone storage class is supported by directory
+ // buckets to store objects.
+ RestoreStatus *RestoreStatus
+
// Size in bytes of the object
- Size int64
+ Size *int64
- // The class of storage used to store the object.
+ // The class of storage used to store the object. Directory buckets - Only the S3
+ // Express One Zone storage class is supported by directory buckets to store
+ // objects.
StorageClass ObjectStorageClass
noSmithyDocumentSerde
@@ -2662,13 +2206,14 @@ type ObjectIdentifier struct {
// Key name of the object. Replacement must be made for object keys containing
// special characters (such as carriage returns) when using XML requests. For more
- // information, see XML related object key constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
//
// This member is required.
Key *string
- // VersionId for the specific version of the object to delete.
+ // Version ID for the specific version of the object to delete. This functionality
+ // is not supported for directory buckets.
VersionId *string
noSmithyDocumentSerde
@@ -2682,9 +2227,9 @@ type ObjectLockConfiguration struct {
ObjectLockEnabled ObjectLockEnabled
// Specifies the Object Lock rule for the specified object. Enable the this rule
- // when you apply ObjectLockConfiguration to a bucket. Bucket settings require both
- // a mode and a period. The period can be either Days or Years but you must select
- // one. You cannot specify Days and Years at the same time.
+ // when you apply ObjectLockConfiguration to a bucket. Bucket settings require
+ // both a mode and a period. The period can be either Days or Years but you must
+ // select one. You cannot specify Days and Years at the same time.
Rule *ObjectLockRule
noSmithyDocumentSerde
@@ -2729,41 +2274,43 @@ type ObjectPart struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32 checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
- // The part number identifying the part. This value is a positive integer between 1
- // and 10,000.
- PartNumber int32
+ // The part number identifying the part. This value is a positive integer between
+ // 1 and 10,000.
+ PartNumber *int32
// The size of the uploaded part in bytes.
- Size int64
+ Size *int64
noSmithyDocumentSerde
}
@@ -2779,19 +2326,26 @@ type ObjectVersion struct {
// Specifies whether the object is (true) or is not (false) the latest version of
// an object.
- IsLatest bool
+ IsLatest *bool
// The object key.
Key *string
- // Date and time the object was last modified.
+ // Date and time when the object was last modified.
LastModified *time.Time
// Specifies the owner of the object.
Owner *Owner
+ // Specifies the restoration status of an object. Objects in certain storage
+ // classes must be restored before they can be retrieved. For more information
+ // about these storage classes and how to work with archived objects, see Working
+ // with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html)
+ // in the Amazon S3 User Guide.
+ RestoreStatus *RestoreStatus
+
// Size in bytes of the object.
- Size int64
+ Size *int64
// The class of storage used to store the object.
StorageClass ObjectVersionStorageClass
@@ -2826,7 +2380,17 @@ type OutputSerialization struct {
// Container for the owner's display name and ID.
type Owner struct {
- // Container for the display name of the owner.
+ // Container for the display name of the owner. This value is only supported in
+ // the following Amazon Web Services Regions:
+ // - US East (N. Virginia)
+ // - US West (N. California)
+ // - US West (Oregon)
+ // - Asia Pacific (Singapore)
+ // - Asia Pacific (Sydney)
+ // - Asia Pacific (Tokyo)
+ // - Europe (Ireland)
+ // - South America (São Paulo)
+ // This functionality is not supported for directory buckets.
DisplayName *string
// Container for the ID of the owner.
@@ -2857,9 +2421,16 @@ type OwnershipControlsRule struct {
// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
// affect permissions. The bucket owner automatically owns and has full control
// over every object in the bucket. The bucket only accepts PUT requests that don't
- // specify an ACL or bucket owner full control ACLs, such as the
- // bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed
- // in the XML format.
+ // specify an ACL or specify bucket owner full control ACLs (such as the predefined
+ // bucket-owner-full-control canned ACL or a custom ACL in XML format that grants
+ // the same permissions). By default, ObjectOwnership is set to BucketOwnerEnforced
+ // and ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon
+ // use cases where you must control access for each object individually. For more
+ // information about S3 Object Ownership, see Controlling ownership of objects and
+ // disabling ACLs for your bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
+ // in the Amazon S3 User Guide. This functionality is not supported for directory
+ // buckets. Directory buckets use the bucket owner enforced setting for S3 Object
+ // Ownership.
//
// This member is required.
ObjectOwnership ObjectOwnership
@@ -2878,32 +2449,32 @@ type Part struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 32-bit CRC32 checksum of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumCRC32 *string
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use an API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumCRC32C *string
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this may not
- // be a checksum value of the object. For more information about how checksums are
- // calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
+ // present if it was uploaded with the object. When you use the API operation on an
+ // object that was uploaded using multipart uploads, this value may not be a direct
+ // checksum value of the full object. Instead, it's a calculation based on the
+ // checksum values of each individual part. For more information about how
+ // checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
// in the Amazon S3 User Guide.
ChecksumSHA1 *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
// base64-encoded, 256-bit SHA-256 digest of the object. For more information, see
- // Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
+ // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
// in the Amazon S3 User Guide.
ChecksumSHA256 *string
@@ -2915,10 +2486,23 @@ type Part struct {
// Part number identifying the part. This is a positive integer between 1 and
// 10,000.
- PartNumber int32
+ PartNumber *int32
// Size in bytes of the uploaded part data.
- Size int64
+ Size *int64
+
+ noSmithyDocumentSerde
+}
+
+// Amazon S3 keys for log objects are partitioned in the following format:
+// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]
+// PartitionedPrefix defaults to EventTime delivery when server access logs are
+// delivered.
+type PartitionedPrefix struct {
+
+ // Specifies the partition date source for the partitioned prefix.
+ // PartitionDateSource can be EventTime or DeliveryTime.
+ PartitionDateSource PartitionDateSource
noSmithyDocumentSerde
}
@@ -2928,7 +2512,7 @@ type PolicyStatus struct {
// The policy status for this bucket. TRUE indicates that this bucket is public.
// FALSE indicates that the bucket is not public.
- IsPublic bool
+ IsPublic *bool
noSmithyDocumentSerde
}
@@ -2937,13 +2521,13 @@ type PolicyStatus struct {
type Progress struct {
// The current number of uncompressed object bytes processed.
- BytesProcessed int64
+ BytesProcessed *int64
// The current number of bytes of records payload data returned.
- BytesReturned int64
+ BytesReturned *int64
// The current number of object bytes scanned.
- BytesScanned int64
+ BytesScanned *int64
noSmithyDocumentSerde
}
@@ -2960,39 +2544,32 @@ type ProgressEvent struct {
// The PublicAccessBlock configuration that you want to apply to this Amazon S3
// bucket. You can enable the configuration options in any combination. For more
// information about when Amazon S3 considers a bucket or object public, see The
-// Meaning of "Public"
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
+// Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
// in the Amazon S3 User Guide.
type PublicAccessBlockConfiguration struct {
// Specifies whether Amazon S3 should block public access control lists (ACLs) for
// this bucket and objects in this bucket. Setting this element to TRUE causes the
// following behavior:
- //
- // * PUT Bucket ACL and PUT Object ACL calls fail if the
- // specified ACL is public.
- //
- // * PUT Object calls fail if the request includes a
- // public ACL.
- //
- // * PUT Bucket calls fail if the request includes a public
- // ACL.
- //
+ // - PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is
+ // public.
+ // - PUT Object calls fail if the request includes a public ACL.
+ // - PUT Bucket calls fail if the request includes a public ACL.
// Enabling this setting doesn't affect existing policies or ACLs.
- BlockPublicAcls bool
+ BlockPublicAcls *bool
- // Specifies whether Amazon S3 should block public bucket policies for this bucket.
- // Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket
- // policy if the specified bucket policy allows public access. Enabling this
+ // Specifies whether Amazon S3 should block public bucket policies for this
+ // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to PUT
+ // Bucket policy if the specified bucket policy allows public access. Enabling this
// setting doesn't affect existing bucket policies.
- BlockPublicPolicy bool
+ BlockPublicPolicy *bool
// Specifies whether Amazon S3 should ignore public ACLs for this bucket and
// objects in this bucket. Setting this element to TRUE causes Amazon S3 to ignore
// all public ACLs on this bucket and objects in this bucket. Enabling this setting
// doesn't affect the persistence of any existing ACLs and doesn't prevent new
// public ACLs from being set.
- IgnorePublicAcls bool
+ IgnorePublicAcls *bool
// Specifies whether Amazon S3 should restrict public bucket policies for this
// bucket. Setting this element to TRUE restricts access to this bucket to only
@@ -3001,7 +2578,7 @@ type PublicAccessBlockConfiguration struct {
// stored bucket policies, except that public and cross-account access within any
// public bucket policy, including non-public delegation to specific accounts, is
// blocked.
- RestrictPublicBuckets bool
+ RestrictPublicBuckets *bool
noSmithyDocumentSerde
}
@@ -3022,9 +2599,8 @@ type QueueConfiguration struct {
QueueArn *string
// Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
- // Amazon S3 User Guide.
+ // filtering, see Configuring event notifications using object key name filtering (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html)
+ // in the Amazon S3 User Guide.
Filter *NotificationConfigurationFilter
// An optional unique identifier for configurations in a notification
@@ -3043,8 +2619,8 @@ type RecordsEvent struct {
noSmithyDocumentSerde
}
-// Specifies how requests are redirected. In the event of an error, you can specify
-// a different error code to return.
+// Specifies how requests are redirected. In the event of an error, you can
+// specify a different error code to return.
type Redirect struct {
// The host name to use in the redirect request.
@@ -3060,22 +2636,21 @@ type Redirect struct {
// The object key prefix to use in the redirect request. For example, to redirect
// requests for all pages with prefix docs/ (objects in the docs/ folder) to
- // documents/, you can set a condition block with KeyPrefixEquals set to docs/ and
- // in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of
- // the siblings is present. Can be present only if ReplaceKeyWith is not provided.
- // Replacement must be made for object keys containing special characters (such as
- // carriage returns) when using XML requests. For more information, see XML
- // related object key constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // documents/ , you can set a condition block with KeyPrefixEquals set to docs/
+ // and in the Redirect set ReplaceKeyPrefixWith to /documents . Not required if one
+ // of the siblings is present. Can be present only if ReplaceKeyWith is not
+ // provided. Replacement must be made for object keys containing special characters
+ // (such as carriage returns) when using XML requests. For more information, see
+ // XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
ReplaceKeyPrefixWith *string
// The specific object key to use in the redirect request. For example, redirect
- // request to error.html. Not required if one of the siblings is present. Can be
+ // request to error.html . Not required if one of the siblings is present. Can be
// present only if ReplaceKeyPrefixWith is not provided. Replacement must be made
// for object keys containing special characters (such as carriage returns) when
- // using XML requests. For more information, see XML related object key
- // constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // using XML requests. For more information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
ReplaceKeyWith *string
noSmithyDocumentSerde
@@ -3099,11 +2674,11 @@ type RedirectAllRequestsTo struct {
// A filter that you can specify for selection for modifications on replicas.
// Amazon S3 doesn't replicate replica modifications by default. In the latest
-// version of replication configuration (when Filter is specified), you can specify
-// this element and set the status to Enabled to replicate modifications on
-// replicas. If you don't specify the Filter element, Amazon S3 assumes that the
-// replication configuration is the earlier version, V1. In the earlier version,
-// this element is not allowed.
+// version of replication configuration (when Filter is specified), you can
+// specify this element and set the status to Enabled to replicate modifications
+// on replicas. If you don't specify the Filter element, Amazon S3 assumes that
+// the replication configuration is the earlier version, V1. In the earlier
+// version, this element is not allowed.
type ReplicaModifications struct {
// Specifies whether Amazon S3 replicates modifications on replicas.
@@ -3120,9 +2695,8 @@ type ReplicationConfiguration struct {
// The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role
// that Amazon S3 assumes when replicating objects. For more information, see How
- // to Set Up Replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html) in
- // the Amazon S3 User Guide.
+ // to Set Up Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Role *string
@@ -3153,24 +2727,25 @@ type ReplicationRule struct {
// Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
// in your replication configuration, you must also include a
// DeleteMarkerReplication element. If your Filter includes a Tag element, the
- // DeleteMarkerReplicationStatus must be set to Disabled, because Amazon S3 does
+ // DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does
// not support replicating delete markers for tag-based rules. For an example
- // configuration, see Basic Rule Configuration
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
- // For more information about delete marker replication, see Basic Rule
- // Configuration
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
- // If you are using an earlier version of the replication configuration, Amazon S3
- // handles replication of delete markers differently. For more information, see
- // Backward Compatibility
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
+ // configuration, see Basic Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config)
+ // . For more information about delete marker replication, see Basic Rule
+ // Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html)
+ // . If you are using an earlier version of the replication configuration, Amazon
+ // S3 handles replication of delete markers differently. For more information, see
+ // Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations)
+ // .
DeleteMarkerReplication *DeleteMarkerReplication
- //
+ // Optional configuration to replicate existing source bucket objects. For more
+ // information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
+ // in the Amazon S3 User Guide.
ExistingObjectReplication *ExistingObjectReplication
// A filter that identifies the subset of objects to which the replication rule
- // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
+ // applies. A Filter must specify exactly one Prefix , Tag , or an And child
+ // element.
Filter ReplicationRuleFilter
// A unique identifier for the rule. The maximum value is 255 characters.
@@ -3180,8 +2755,8 @@ type ReplicationRule struct {
// rule applies. The maximum prefix length is 1,024 characters. To include all
// objects in a bucket, specify an empty string. Replacement must be made for
// object keys containing special characters (such as carriage returns) when using
- // XML requests. For more information, see XML related object key constraints
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ // XML requests. For more information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+ // .
//
// Deprecated: This member has been deprecated.
Prefix *string
@@ -3191,16 +2766,15 @@ type ReplicationRule struct {
// according to all replication rules. However, if there are two or more rules with
// the same destination bucket, then objects will be replicated according to the
// rule with the highest priority. The higher the number, the higher the priority.
- // For more information, see Replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon
- // S3 User Guide.
- Priority int32
-
- // A container that describes additional filters for identifying the source objects
- // that you want to replicate. You can choose to enable or disable the replication
- // of these objects. Currently, Amazon S3 supports only the filter that you can
- // specify for objects created with server-side encryption using a customer managed
- // key stored in Amazon Web Services Key Management Service (SSE-KMS).
+ // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
+ // in the Amazon S3 User Guide.
+ Priority *int32
+
+ // A container that describes additional filters for identifying the source
+ // objects that you want to replicate. You can choose to enable or disable the
+ // replication of these objects. Currently, Amazon S3 supports only the filter that
+ // you can specify for objects created with server-side encryption using a customer
+ // managed key stored in Amazon Web Services Key Management Service (SSE-KMS).
SourceSelectionCriteria *SourceSelectionCriteria
noSmithyDocumentSerde
@@ -3209,12 +2783,10 @@ type ReplicationRule struct {
// A container for specifying rule filters. The filters determine the subset of
// objects to which the rule applies. This element is required only if you specify
// more than one filter. For example:
-//
-// * If you specify both a Prefix and a Tag
-// filter, wrap these filters in an And tag.
-//
-// * If you specify a filter based on
-// multiple tags, wrap the Tag elements in an And tag.
+// - If you specify both a Prefix and a Tag filter, wrap these filters in an And
+// tag.
+// - If you specify a filter based on multiple tags, wrap the Tag elements in an
+// And tag.
type ReplicationRuleAndOperator struct {
// An object key name prefix that identifies the subset of objects to which the
@@ -3228,12 +2800,14 @@ type ReplicationRuleAndOperator struct {
}
// A filter that identifies the subset of objects to which the replication rule
-// applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
+// applies. A Filter must specify exactly one Prefix , Tag , or an And child
+// element.
//
// The following types satisfy this interface:
-// ReplicationRuleFilterMemberAnd
-// ReplicationRuleFilterMemberPrefix
-// ReplicationRuleFilterMemberTag
+//
+// ReplicationRuleFilterMemberAnd
+// ReplicationRuleFilterMemberPrefix
+// ReplicationRuleFilterMemberTag
type ReplicationRuleFilter interface {
isReplicationRuleFilter()
}
@@ -3241,12 +2815,10 @@ type ReplicationRuleFilter interface {
// A container for specifying rule filters. The filters determine the subset of
// objects to which the rule applies. This element is required only if you specify
// more than one filter. For example:
-//
-// * If you specify both a Prefix and a Tag
-// filter, wrap these filters in an And tag.
-//
-// * If you specify a filter based on
-// multiple tags, wrap the Tag elements in an And tag.
+// - If you specify both a Prefix and a Tag filter, wrap these filters in an And
+// tag.
+// - If you specify a filter based on multiple tags, wrap the Tag elements in an
+// And tag.
type ReplicationRuleFilterMemberAnd struct {
Value ReplicationRuleAndOperator
@@ -3258,8 +2830,8 @@ func (*ReplicationRuleFilterMemberAnd) isReplicationRuleFilter() {}
// An object key name prefix that identifies the subset of objects to which the
// rule applies. Replacement must be made for object keys containing special
// characters (such as carriage returns) when using XML requests. For more
-// information, see XML related object key constraints
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+// information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints)
+// .
type ReplicationRuleFilterMemberPrefix struct {
Value string
@@ -3268,8 +2840,8 @@ type ReplicationRuleFilterMemberPrefix struct {
func (*ReplicationRuleFilterMemberPrefix) isReplicationRuleFilter() {}
-// A container for specifying a tag key and value. The rule applies only to objects
-// that have the tag in their tag set.
+// A container for specifying a tag key and value. The rule applies only to
+// objects that have the tag in their tag set.
type ReplicationRuleFilterMemberTag struct {
Value Tag
@@ -3278,9 +2850,10 @@ type ReplicationRuleFilterMemberTag struct {
func (*ReplicationRuleFilterMemberTag) isReplicationRuleFilter() {}
-// A container specifying S3 Replication Time Control (S3 RTC) related information,
-// including whether S3 RTC is enabled and the time when all objects and operations
-// on objects must be replicated. Must be specified together with a Metrics block.
+// A container specifying S3 Replication Time Control (S3 RTC) related
+// information, including whether S3 RTC is enabled and the time when all objects
+// and operations on objects must be replicated. Must be specified together with a
+// Metrics block.
type ReplicationTime struct {
// Specifies whether the replication time is enabled.
@@ -3298,11 +2871,11 @@ type ReplicationTime struct {
}
// A container specifying the time value for S3 Replication Time Control (S3 RTC)
-// and replication metrics EventThreshold.
+// and replication metrics EventThreshold .
type ReplicationTimeValue struct {
// Contains an integer specifying time in minutes. Valid value: 15
- Minutes int32
+ Minutes *int32
noSmithyDocumentSerde
}
@@ -3323,7 +2896,7 @@ type RequestProgress struct {
// Specifies whether periodic QueryProgress frames should be sent. Valid values:
// TRUE, FALSE. Default value: FALSE.
- Enabled bool
+ Enabled *bool
noSmithyDocumentSerde
}
@@ -3332,15 +2905,15 @@ type RequestProgress struct {
type RestoreRequest struct {
// Lifetime of the active copy in days. Do not use with restores that specify
- // OutputLocation. The Days element is required for regular restores, and must not
+ // OutputLocation . The Days element is required for regular restores, and must not
// be provided for select requests.
- Days int32
+ Days *int32
// The optional description for the job.
Description *string
// S3 Glacier related parameters pertaining to this job. Do not use with restores
- // that specify OutputLocation.
+ // that specify OutputLocation .
GlacierJobParameters *GlacierJobParameters
// Describes the location where the restore job's output is stored.
@@ -3358,9 +2931,35 @@ type RestoreRequest struct {
noSmithyDocumentSerde
}
+// Specifies the restoration status of an object. Objects in certain storage
+// classes must be restored before they can be retrieved. For more information
+// about these storage classes and how to work with archived objects, see Working
+// with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html)
+// in the Amazon S3 User Guide. This functionality is not supported for directory
+// buckets. Only the S3 Express One Zone storage class is supported by directory
+// buckets to store objects.
+type RestoreStatus struct {
+
+ // Specifies whether the object is currently being restored. If the object
+ // restoration is in progress, the header returns the value TRUE . For example:
+ // x-amz-optional-object-attributes: IsRestoreInProgress="true" If the object
+ // restoration has completed, the header returns the value FALSE . For example:
+ // x-amz-optional-object-attributes: IsRestoreInProgress="false",
+ // RestoreExpiryDate="2012-12-21T00:00:00.000Z" If the object hasn't been restored,
+ // there is no header response.
+ IsRestoreInProgress *bool
+
+ // Indicates when the restored copy will expire. This value is populated only if
+ // the object has already been restored. For example:
+ // x-amz-optional-object-attributes: IsRestoreInProgress="false",
+ // RestoreExpiryDate="2012-12-21T00:00:00.000Z"
+ RestoreExpiryDate *time.Time
+
+ noSmithyDocumentSerde
+}
+
// Specifies the redirect behavior and when a redirect is applied. For more
-// information about routing rules, see Configuring advanced conditional redirects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects)
+// information about routing rules, see Configuring advanced conditional redirects (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects)
// in the Amazon S3 User Guide.
type RoutingRule struct {
@@ -3435,13 +3034,13 @@ type ScanRange struct {
// non-negative integers. The default value is one less than the size of the object
// being queried. If only the End parameter is supplied, it is interpreted to mean
// scan the last N bytes of the file. For example, 50 means scan the last 50 bytes.
- End int64
+ End *int64
- // Specifies the start of the byte range. This parameter is optional. Valid values:
- // non-negative integers. The default value is 0. If only start is supplied, it
- // means scan from that point to the end of the file. For example, 50 means scan
- // from byte 50 until the end of the file.
- Start int64
+ // Specifies the start of the byte range. This parameter is optional. Valid
+ // values: non-negative integers. The default value is 0. If only start is
+ // supplied, it means scan from that point to the end of the file. For example, 50
+ // means scan from byte 50 until the end of the file.
+ Start *int64
noSmithyDocumentSerde
}
@@ -3449,11 +3048,12 @@ type ScanRange struct {
// The container for selecting objects from a content event stream.
//
// The following types satisfy this interface:
-// SelectObjectContentEventStreamMemberCont
-// SelectObjectContentEventStreamMemberEnd
-// SelectObjectContentEventStreamMemberProgress
-// SelectObjectContentEventStreamMemberRecords
-// SelectObjectContentEventStreamMemberStats
+//
+// SelectObjectContentEventStreamMemberCont
+// SelectObjectContentEventStreamMemberEnd
+// SelectObjectContentEventStreamMemberProgress
+// SelectObjectContentEventStreamMemberRecords
+// SelectObjectContentEventStreamMemberStats
type SelectObjectContentEventStream interface {
isSelectObjectContentEventStream()
}
@@ -3535,8 +3135,7 @@ type SelectParameters struct {
// at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key
// in your Amazon Web Services account the first time that you add an object
// encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key for
-// SSE-KMS. For more information, see PUT Bucket encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html)
+// SSE-KMS. For more information, see PUT Bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html)
// in the Amazon S3 API Reference.
type ServerSideEncryptionByDefault struct {
@@ -3547,23 +3146,18 @@ type ServerSideEncryptionByDefault struct {
// Amazon Web Services Key Management Service (KMS) customer Amazon Web Services
// KMS key ID to use for the default encryption. This parameter is allowed if and
- // only if SSEAlgorithm is set to aws:kms. You can specify the key ID or the Amazon
- // Resource Name (ARN) of the KMS key. However, if you are using encryption with
- // cross-account or Amazon Web Services service operations you must use a fully
- // qualified KMS key ARN. For more information, see Using encryption for
- // cross-account operations
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy).
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN:
- // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // Amazon
- // S3 only supports symmetric KMS keys and not asymmetric KMS keys. For more
- // information, see Using symmetric and asymmetric keys
- // (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // only if SSEAlgorithm is set to aws:kms or aws:kms:dsse . You can specify the key
+ // ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ // - Key Alias: alias/alias-name
+ // If you use a key ID, you can run into a LogDestination undeliverable error when
+ // creating a VPC flow log. If you are using encryption with cross-account or
+ // Amazon Web Services service operations you must use a fully qualified KMS key
+ // ARN. For more information, see Using encryption for cross-account operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy)
+ // . Amazon S3 only supports symmetric encryption KMS keys. For more information,
+ // see Asymmetric keys in Amazon Web Services KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
// in the Amazon Web Services Key Management Service Developer Guide.
KMSMasterKeyID *string
@@ -3594,28 +3188,70 @@ type ServerSideEncryptionRule struct {
// encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects
// are not affected. Setting the BucketKeyEnabled element to true causes Amazon S3
// to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled. For more
- // information, see Amazon S3 Bucket Keys
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon
- // S3 User Guide.
- BucketKeyEnabled bool
+ // information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
+ // in the Amazon S3 User Guide.
+ BucketKeyEnabled *bool
noSmithyDocumentSerde
}
-// A container that describes additional filters for identifying the source objects
-// that you want to replicate. You can choose to enable or disable the replication
-// of these objects. Currently, Amazon S3 supports only the filter that you can
-// specify for objects created with server-side encryption using a customer managed
-// key stored in Amazon Web Services Key Management Service (SSE-KMS).
+// The established temporary security credentials of the session. Directory
+// buckets - These session credentials are only supported for the authentication
+// and authorization of Zonal endpoint APIs on directory buckets.
+type SessionCredentials struct {
+
+ // A unique identifier that's associated with a secret access key. The access key
+ // ID and the secret access key are used together to sign programmatic Amazon Web
+ // Services requests cryptographically.
+ //
+ // This member is required.
+ AccessKeyId *string
+
+ // Temporary security credentials expire after a specified interval. After
+ // temporary credentials expire, any calls that you make with those credentials
+ // will fail. So you must generate a new set of temporary credentials. Temporary
+ // credentials cannot be extended or refreshed beyond the original specified
+ // interval.
+ //
+ // This member is required.
+ Expiration *time.Time
+
+ // A key that's used with the access key ID to cryptographically sign programmatic
+ // Amazon Web Services requests. Signing a request identifies the sender and
+ // prevents the request from being altered.
+ //
+ // This member is required.
+ SecretAccessKey *string
+
+ // A part of the temporary security credentials. The session token is used to
+ // validate the temporary security credentials.
+ //
+ // This member is required.
+ SessionToken *string
+
+ noSmithyDocumentSerde
+}
+
+// To use simple format for S3 keys for log objects, set SimplePrefix to an empty
+// object. [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]
+type SimplePrefix struct {
+ noSmithyDocumentSerde
+}
+
+// A container that describes additional filters for identifying the source
+// objects that you want to replicate. You can choose to enable or disable the
+// replication of these objects. Currently, Amazon S3 supports only the filter that
+// you can specify for objects created with server-side encryption using a customer
+// managed key stored in Amazon Web Services Key Management Service (SSE-KMS).
type SourceSelectionCriteria struct {
// A filter that you can specify for selections for modifications on replicas.
// Amazon S3 doesn't replicate replica modifications by default. In the latest
- // version of replication configuration (when Filter is specified), you can specify
- // this element and set the status to Enabled to replicate modifications on
- // replicas. If you don't specify the Filter element, Amazon S3 assumes that the
- // replication configuration is the earlier version, V1. In the earlier version,
- // this element is not allowed
+ // version of replication configuration (when Filter is specified), you can
+ // specify this element and set the status to Enabled to replicate modifications
+ // on replicas. If you don't specify the Filter element, Amazon S3 assumes that
+ // the replication configuration is the earlier version, V1. In the earlier
+ // version, this element is not allowed
ReplicaModifications *ReplicaModifications
// A container for filter information for the selection of Amazon S3 objects
@@ -3629,9 +3265,8 @@ type SourceSelectionCriteria struct {
// Specifies the use of SSE-KMS to encrypt delivered inventory reports.
type SSEKMS struct {
- // Specifies the ID of the Amazon Web Services Key Management Service (Amazon Web
- // Services KMS) symmetric customer managed key to use for encrypting inventory
- // reports.
+ // Specifies the ID of the Key Management Service (KMS) symmetric encryption
+ // customer managed key to use for encrypting inventory reports.
//
// This member is required.
KeyId *string
@@ -3662,13 +3297,13 @@ type SSES3 struct {
type Stats struct {
// The total number of uncompressed object bytes processed.
- BytesProcessed int64
+ BytesProcessed *int64
// The total number of bytes of records payload data returned.
- BytesReturned int64
+ BytesReturned *int64
// The total number of object bytes scanned.
- BytesScanned int64
+ BytesScanned *int64
noSmithyDocumentSerde
}
@@ -3686,15 +3321,15 @@ type StatsEvent struct {
// analyze the tradeoffs between different storage classes for an Amazon S3 bucket.
type StorageClassAnalysis struct {
- // Specifies how data related to the storage class analysis for an Amazon S3 bucket
- // should be exported.
+ // Specifies how data related to the storage class analysis for an Amazon S3
+ // bucket should be exported.
DataExport *StorageClassAnalysisDataExport
noSmithyDocumentSerde
}
-// Container for data related to the storage class analysis for an Amazon S3 bucket
-// for export.
+// Container for data related to the storage class analysis for an Amazon S3
+// bucket for export.
type StorageClassAnalysisDataExport struct {
// The place to store the data for an analysis.
@@ -3702,7 +3337,7 @@ type StorageClassAnalysisDataExport struct {
// This member is required.
Destination *AnalyticsExportDestination
- // The version of the output schema to use when exporting data. Must be V_1.
+ // The version of the output schema to use when exporting data. Must be V_1 .
//
// This member is required.
OutputSchemaVersion StorageClassAnalysisSchemaVersion
@@ -3739,8 +3374,7 @@ type Tagging struct {
// Container for granting information. Buckets that use the bucket owner enforced
// setting for Object Ownership don't support target grants. For more information,
-// see Permissions server access log delivery
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
+// see Permissions server access log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
// in the Amazon S3 User Guide.
type TargetGrant struct {
@@ -3753,14 +3387,27 @@ type TargetGrant struct {
noSmithyDocumentSerde
}
+// Amazon S3 key format for log objects. Only one format, PartitionedPrefix or
+// SimplePrefix, is allowed.
+type TargetObjectKeyFormat struct {
+
+ // Partitioned S3 key for log objects.
+ PartitionedPrefix *PartitionedPrefix
+
+ // To use the simple format for S3 keys for log objects. To specify SimplePrefix
+ // format, set SimplePrefix to {}.
+ SimplePrefix *SimplePrefix
+
+ noSmithyDocumentSerde
+}
+
// The S3 Intelligent-Tiering storage class is designed to optimize storage costs
// by automatically moving data to the most cost-effective storage access tier,
// without additional operational overhead.
type Tiering struct {
// S3 Intelligent-Tiering access tier. See Storage class for automatically
- // optimizing frequently and infrequently accessed objects
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
+ // optimizing frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
// for a list of access tiers in the S3 Intelligent-Tiering storage class.
//
// This member is required.
@@ -3773,7 +3420,7 @@ type Tiering struct {
// days).
//
// This member is required.
- Days int32
+ Days *int32
noSmithyDocumentSerde
}
@@ -3784,9 +3431,8 @@ type Tiering struct {
type TopicConfiguration struct {
// The Amazon S3 bucket event about which to send notifications. For more
- // information, see Supported Event Types
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
- // Amazon S3 User Guide.
+ // information, see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+ // in the Amazon S3 User Guide.
//
// This member is required.
Events []Event
@@ -3798,9 +3444,8 @@ type TopicConfiguration struct {
TopicArn *string
// Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
- // Amazon S3 User Guide.
+ // filtering, see Configuring event notifications using object key name filtering (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html)
+ // in the Amazon S3 User Guide.
Filter *NotificationConfigurationFilter
// An optional unique identifier for configurations in a notification
@@ -3812,18 +3457,17 @@ type TopicConfiguration struct {
// Specifies when an object transitions to a specified storage class. For more
// information about Amazon S3 lifecycle configuration rules, see Transitioning
-// Objects Using Amazon S3 Lifecycle
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
+// Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
// in the Amazon S3 User Guide.
type Transition struct {
- // Indicates when objects are transitioned to the specified storage class. The date
- // value must be in ISO 8601 format. The time is always midnight UTC.
+ // Indicates when objects are transitioned to the specified storage class. The
+ // date value must be in ISO 8601 format. The time is always midnight UTC.
Date *time.Time
- // Indicates the number of days after creation when objects are transitioned to the
- // specified storage class. The value must be a positive integer.
- Days int32
+ // Indicates the number of days after creation when objects are transitioned to
+ // the specified storage class. The value must be a positive integer.
+ Days *int32
// The storage class to which you want the object to transition.
StorageClass TransitionStorageClass
@@ -3831,9 +3475,8 @@ type Transition struct {
noSmithyDocumentSerde
}
-// Describes the versioning state of an Amazon S3 bucket. For more information, see
-// PUT Bucket versioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html)
+// Describes the versioning state of an Amazon S3 bucket. For more information,
+// see PUT Bucket versioning (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html)
// in the Amazon S3 API Reference.
type VersioningConfiguration struct {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
index ccd845a7..e954b302 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
@@ -110,6 +110,26 @@ func (m *validateOpCreateMultipartUpload) HandleInitialize(ctx context.Context,
return next.HandleInitialize(ctx, in)
}
+type validateOpCreateSession struct {
+}
+
+func (*validateOpCreateSession) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateSessionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateSessionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpDeleteBucketAnalyticsConfiguration struct {
}
@@ -1870,6 +1890,10 @@ func addOpCreateMultipartUploadValidationMiddleware(stack *middleware.Stack) err
return stack.Initialize.Add(&validateOpCreateMultipartUpload{}, middleware.After)
}
+func addOpCreateSessionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateSession{}, middleware.After)
+}
+
func addOpDeleteBucketAnalyticsConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteBucketAnalyticsConfiguration{}, middleware.After)
}
@@ -2699,6 +2723,9 @@ func validateInventoryConfiguration(v *types.InventoryConfiguration) error {
invalidParams.AddNested("Destination", err.(smithy.InvalidParamsError))
}
}
+ if v.IsEnabled == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("IsEnabled"))
+ }
if v.Filter != nil {
if err := validateInventoryFilter(v.Filter); err != nil {
invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
@@ -3735,6 +3762,9 @@ func validateTiering(v *types.Tiering) error {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Tiering"}
+ if v.Days == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Days"))
+ }
if len(v.AccessTier) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("AccessTier"))
}
@@ -3925,6 +3955,21 @@ func validateOpCreateMultipartUploadInput(v *CreateMultipartUploadInput) error {
}
}
+func validateOpCreateSessionInput(v *CreateSessionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateSessionInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpDeleteBucketAnalyticsConfigurationInput(v *DeleteBucketAnalyticsConfigurationInput) error {
if v == nil {
return nil
@@ -5444,6 +5489,9 @@ func validateOpUploadPartCopyInput(v *UploadPartCopyInput) error {
if v.Key == nil {
invalidParams.Add(smithy.NewErrParamRequired("Key"))
}
+ if v.PartNumber == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PartNumber"))
+ }
if v.UploadId == nil {
invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
}
@@ -5465,6 +5513,9 @@ func validateOpUploadPartInput(v *UploadPartInput) error {
if v.Key == nil {
invalidParams.Add(smithy.NewErrParamRequired("Key"))
}
+ if v.PartNumber == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PartNumber"))
+ }
if v.UploadId == nil {
invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md
index 85902f73..bf1f14f5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md
@@ -1,3 +1,296 @@
+# v1.31.2 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.31.1 (2024-02-23)
+
+* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.31.0 (2024-02-22)
+
+* **Feature**: Add middleware stack snapshot tests.
+
+# v1.30.3 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.2 (2024-02-20)
+
+* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
+
+# v1.30.1 (2024-02-15)
+
+* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field.
+
+# v1.30.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.7 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.6 (2023-12-20)
+
+* No change notes available for this release.
+
+# v1.29.5 (2023-12-08)
+
+* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
+
+# v1.29.4 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.3 (2023-12-06)
+
+* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
+
+# v1.29.2 (2023-12-01)
+
+* **Bug Fix**: Correct wrapping of errors in authentication workflow.
+* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.1 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.0 (2023-11-29)
+
+* **Feature**: Expose Options() accessor on service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.4 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.3 (2023-11-28)
+
+* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
+
+# v1.28.2 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.1 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.0 (2023-11-09)
+
+* **Feature**: This release enables customers to call SQS using AWS JSON-1.0 protocol and bug fix.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.0 (2023-11-08)
+
+* **Feature**: This release enables customers to call SQS using AWS JSON-1.0 protocol.
+
+# v1.26.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.7 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.6 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.5 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.4 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.3 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.24.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.4 (2023-07-28)
+
+* **Documentation**: Documentation changes related to SQS APIs.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.3 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.2 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.23.1 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.0 (2023-06-06)
+
+* **Feature**: Amazon SQS adds three new APIs - StartMessageMoveTask, CancelMessageMoveTask, and ListMessageMoveTasks to automate redriving messages from dead-letter queues to source queues or a custom destination.
+
+# v1.22.0 (2023-05-05)
+
+* **Feature**: Revert previous SQS protocol change.
+
+# v1.21.0 (2023-05-04)
+
+* **Feature**: This release enables customers to call SQS using AWS JSON-1.0 protocol.
+
+# v1.20.9 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.8 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.20.7 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.6 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.5 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.4 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.20.3 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.2 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade smithy to 1.27.2 and correct empty query list serialization.
+
+# v1.20.1 (2023-01-23)
+
+* No change notes available for this release.
+
+# v1.20.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.19.17 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.16 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.15 (2022-11-22)
+
+* No change notes available for this release.
+
+# v1.19.14 (2022-11-16)
+
+* No change notes available for this release.
+
+# v1.19.13 (2022-11-10)
+
+* No change notes available for this release.
+
+# v1.19.12 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.11 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.10 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.9 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.8 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.7 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.6 (2022-08-30)
+
+* No change notes available for this release.
+
+# v1.19.5 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.4 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.3 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.2 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.1 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.0 (2022-07-05)
+
+* **Feature**: Adds support for the SQS client to automatically validate message checksums for SendMessage, SendMessageBatch, and ReceiveMessage. A DisableMessageChecksumValidation parameter has been added to the Options struct for SQS package. Setting this to true will disable the checksum validation. This can be set when creating a client, or per operation call.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.18.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go
index ce463aca..9dd98599 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go
@@ -4,12 +4,15 @@ package sqs
import (
"context"
+ "fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/defaults"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
smithy "github.com/aws/smithy-go"
smithydocument "github.com/aws/smithy-go/document"
@@ -46,128 +49,48 @@ func New(options Options, optFns ...func(*Options)) *Client {
resolveHTTPSignerV4(&options)
- resolveDefaultEndpointConfiguration(&options)
+ resolveEndpointResolverV2(&options)
+
+ resolveAuthSchemeResolver(&options)
for _, fn := range optFns {
fn(&options)
}
- client := &Client{
- options: options,
- }
-
- return client
-}
-
-type Options struct {
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- APIOptions []func(*middleware.Stack) error
-
- // Configures the events that will be sent to the configured logger.
- ClientLogMode aws.ClientLogMode
-
- // The credentials object to use when signing requests.
- Credentials aws.CredentialsProvider
-
- // The configuration DefaultsMode that the SDK should use when constructing the
- // clients initial default settings.
- DefaultsMode aws.DefaultsMode
-
- // The endpoint options to be used when attempting to resolve an endpoint.
- EndpointOptions EndpointResolverOptions
-
- // The service endpoint resolver.
- EndpointResolver EndpointResolver
-
- // Signature Version 4 (SigV4) Signer
- HTTPSignerV4 HTTPSignerV4
-
- // The logger writer interface to write logging messages to.
- Logger logging.Logger
+ finalizeRetryMaxAttempts(&options)
- // The region to send requests to. (Required)
- Region string
+ ignoreAnonymousAuth(&options)
- // RetryMaxAttempts specifies the maximum number attempts an API client will call
- // an operation that fails with a retryable error. A value of 0 is ignored, and
- // will not be used to configure the API client created default retryer, or modify
- // per operation call's retry max attempts. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. If specified in an operation call's functional
- // options with a value that is different than the constructed client's Options,
- // the Client's Retryer will be wrapped to use the operation's specific
- // RetryMaxAttempts value.
- RetryMaxAttempts int
+ wrapWithAnonymousAuth(&options)
- // RetryMode specifies the retry mode the API client will be created with, if
- // Retryer option is not also specified. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. Currently does not support per operation call
- // overrides, may in the future.
- RetryMode aws.RetryMode
+ resolveAuthSchemes(&options)
- // Retryer guides how HTTP requests should be retried in case of recoverable
- // failures. When nil the API client will use a default retryer. The kind of
- // default retry created by the API client can be changed with the RetryMode
- // option.
- Retryer aws.Retryer
-
- // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
- // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
- // should not populate this structure programmatically, or rely on the values here
- // within your applications.
- RuntimeEnvironment aws.RuntimeEnvironment
-
- // The initial DefaultsMode used when the client options were constructed. If the
- // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
- // value was at that point in time. Currently does not support per operation call
- // overrides, may in the future.
- resolvedDefaultsMode aws.DefaultsMode
-
- // The HTTP client to invoke API calls with. Defaults to client's default HTTP
- // implementation if nil.
- HTTPClient HTTPClient
-}
-
-// WithAPIOptions returns a functional option for setting the Client's APIOptions
-// option.
-func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, optFns...)
+ client := &Client{
+ options: options,
}
-}
-// WithEndpointResolver returns a functional option for setting the Client's
-// EndpointResolver option.
-func WithEndpointResolver(v EndpointResolver) func(*Options) {
- return func(o *Options) {
- o.EndpointResolver = v
- }
+ return client
}
-type HTTPClient interface {
- Do(*http.Request) (*http.Response, error)
+// Options returns a copy of the client configuration.
+//
+// Callers SHOULD NOT perform mutations on any inner structures within client
+// config. Config overrides should instead be made on a per-operation basis through
+// functional options.
+func (c *Client) Options() Options {
+ return c.options.Copy()
}
-// Copy creates a clone where the APIOptions list is deep copied.
-func (o Options) Copy() Options {
- to := o
- to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
- copy(to.APIOptions, o.APIOptions)
-
- return to
-}
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
ctx = middleware.ClearStackValues(ctx)
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
options := c.options.Copy()
+
for _, fn := range optFns {
fn(&options)
}
- finalizeRetryMaxAttemptOptions(&options, *c)
+ finalizeOperationRetryMaxAttempts(&options, *c)
finalizeClientEndpointResolverOptions(&options)
@@ -195,8 +118,89 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
return result, metadata, err
}
+type operationInputKey struct{}
+
+func setOperationInput(ctx context.Context, input interface{}) context.Context {
+ return middleware.WithStackValue(ctx, operationInputKey{}, input)
+}
+
+func getOperationInput(ctx context.Context) interface{} {
+ return middleware.GetStackValue(ctx, operationInputKey{})
+}
+
+type setOperationInputMiddleware struct {
+}
+
+func (*setOperationInputMiddleware) ID() string {
+ return "setOperationInput"
+}
+
+func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = setOperationInput(ctx, in.Parameters)
+ return next.HandleSerialize(ctx, in)
+}
+
+func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %v", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %v", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
+func resolveAuthSchemeResolver(options *Options) {
+ if options.AuthSchemeResolver == nil {
+ options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
+ }
+}
+
+func resolveAuthSchemes(options *Options) {
+ if options.AuthSchemes == nil {
+ options.AuthSchemes = []smithyhttp.AuthScheme{
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ }
+ }
+}
+
type noSmithyDocumentSerde = smithydocument.NoSerde
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -234,6 +238,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
APIOptions: cfg.APIOptions,
Logger: cfg.Logger,
ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
@@ -241,6 +246,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
resolveAWSEndpointResolver(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
+ resolveBaseEndpoint(cfg, &opts)
return New(opts, optFns...)
}
@@ -332,7 +338,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
o.RetryMaxAttempts = cfg.RetryMaxAttempts
}
-func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+func finalizeRetryMaxAttempts(o *Options) {
+ if o.RetryMaxAttempts == 0 {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
return
}
@@ -344,20 +358,39 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
return
}
- o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
}
-func addClientUserAgent(stack *middleware.Stack) error {
- return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sqs", goModuleVersion)(stack)
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sqs", goModuleVersion)
+ if len(options.AppID) > 0 {
+ ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
+ }
+
+ return nil
}
-func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
- mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
- CredentialsProvider: o.Credentials,
- Signer: o.HTTPSignerV4,
- LogSigning: o.ClientLogMode.IsSigning(),
- })
- return stack.Finalize.Add(mw, middleware.After)
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
+ id := (*awsmiddleware.RequestUserAgent)(nil).ID()
+ mw, ok := stack.Build.Get(id)
+ if !ok {
+ mw = awsmiddleware.NewRequestUserAgent()
+ if err := stack.Build.Add(mw, middleware.After); err != nil {
+ return nil, err
+ }
+ }
+
+ ua, ok := mw.(*awsmiddleware.RequestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
+ }
+
+ return ua, nil
}
type HTTPSignerV4 interface {
@@ -378,12 +411,48 @@ func newDefaultV4Signer(o Options) *v4.Signer {
})
}
-func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
- mo := retry.AddRetryMiddlewaresOptions{
- Retryer: o.Retryer,
- LogRetryAttempts: o.ClientLogMode.IsRetries(),
+func addClientRequestID(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
+}
+
+func addComputeContentLength(stack *middleware.Stack) error {
+ return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
+}
+
+func addRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
+}
+
+func addRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
+}
+func addStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
+}
+
+func addUnsignedPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addComputePayloadSHA256(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addContentSHA256Header(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
+}
+
+func addRetry(stack *middleware.Stack, o Options) error {
+ attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
+ m.LogAttempts = o.ClientLogMode.IsRetries()
+ })
+ if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ return err
+ }
+ if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
+ return err
}
- return retry.AddRetryMiddlewares(stack, mo)
+ return nil
}
// resolves dual-stack endpoint configuration
@@ -416,12 +485,18 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
return nil
}
+func addRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
+}
+
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
- return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+ return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
+
}
func addResponseErrorMiddleware(stack *middleware.Stack) error {
- return awshttp.AddResponseErrorMiddleware(stack)
+ return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+
}
func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
@@ -432,3 +507,32 @@ func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
}, middleware.After)
}
+
+type disableHTTPSMiddleware struct {
+ DisableHTTPS bool
+}
+
+func (*disableHTTPSMiddleware) ID() string {
+ return "disableHTTPS"
+}
+
+func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Finalize.Insert(&disableHTTPSMiddleware{
+ DisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "ResolveEndpointV2", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go
index 3194eb8f..52e7b957 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go
@@ -4,41 +4,30 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Adds a permission to a queue for a specific principal
-// (https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P). This allows
-// sharing access to the queue. When you create a queue, you have full control
-// access rights for the queue. Only you, the owner of the queue, can grant or deny
-// permissions to the queue. For more information about these permissions, see
-// Allow Developers to Write Messages to a Shared Queue
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue)
+// Adds a permission to a queue for a specific principal (https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P)
+// . This allows sharing access to the queue. When you create a queue, you have
+// full control access rights for the queue. Only you, the owner of the queue, can
+// grant or deny permissions to the queue. For more information about these
+// permissions, see Allow Developers to Write Messages to a Shared Queue (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue)
// in the Amazon SQS Developer Guide.
+// - AddPermission generates a policy for you. You can use SetQueueAttributes to
+// upload your policy. For more information, see Using Custom Policies with the
+// Amazon SQS Access Policy Language (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-creating-custom-policies.html)
+// in the Amazon SQS Developer Guide.
+// - An Amazon SQS policy can have a maximum of seven actions per statement.
+// - To remove the ability to change queue permissions, you must deny permission
+// to the AddPermission , RemovePermission , and SetQueueAttributes actions in
+// your IAM policy.
+// - Amazon SQS AddPermission does not support adding a non-account principal.
//
-// * AddPermission generates a policy for you.
-// You can use SetQueueAttributes to upload your policy. For more information, see
-// Using Custom Policies with the Amazon SQS Access Policy Language
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-creating-custom-policies.html)
-// in the Amazon SQS Developer Guide.
-//
-// * An Amazon SQS policy can have a maximum of
-// 7 actions.
-//
-// * To remove the ability to change queue permissions, you must deny
-// permission to the AddPermission, RemovePermission, and SetQueueAttributes
-// actions in your IAM policy.
-//
-// Some actions take lists of parameters. These lists
-// are specified using the param.n notation. Values of n are integers starting from
-// 1. For example, a parameter list with two elements looks like this:
-// &AttributeName.1=first&AttributeName.2=second Cross-account permissions don't
-// apply to this action. For more information, see Grant cross-account permissions
-// to a role and a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// Cross-account permissions don't apply to this action. For more information, see
+// Grant cross-account permissions to a role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
// in the Amazon SQS Developer Guide.
func (c *Client) AddPermission(ctx context.Context, params *AddPermissionInput, optFns ...func(*Options)) (*AddPermissionOutput, error) {
if params == nil {
@@ -55,35 +44,31 @@ func (c *Client) AddPermission(ctx context.Context, params *AddPermissionInput,
return out, nil
}
-//
type AddPermissionInput struct {
- // The Amazon Web Services account numbers of the principals
- // (https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P) who are to
- // receive permission. For information about locating the Amazon Web Services
- // account identification, see Your Amazon Web Services Identifiers
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication)
+ // The Amazon Web Services account numbers of the principals (https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P)
+ // who are to receive permission. For information about locating the Amazon Web
+ // Services account identification, see Your Amazon Web Services Identifiers (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication)
// in the Amazon SQS Developer Guide.
//
// This member is required.
AWSAccountIds []string
// The action the client wants to allow for the specified principal. Valid values:
- // the name of any action or *. For more information about these actions, see
+ // the name of any action or * . For more information about these actions, see
// Overview of Managing Access Permissions to Your Amazon Simple Queue Service
- // Resource
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html)
- // in the Amazon SQS Developer Guide. Specifying SendMessage, DeleteMessage, or
+ // Resource (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html)
+ // in the Amazon SQS Developer Guide. Specifying SendMessage , DeleteMessage , or
// ChangeMessageVisibility for ActionName.n also grants permissions for the
- // corresponding batch versions of those actions: SendMessageBatch,
- // DeleteMessageBatch, and ChangeMessageVisibilityBatch.
+ // corresponding batch versions of those actions: SendMessageBatch ,
+ // DeleteMessageBatch , and ChangeMessageVisibilityBatch .
//
// This member is required.
Actions []string
// The unique identification of the permission you're setting (for example,
- // AliceSendMessage). Maximum 80 characters. Allowed characters include
- // alphanumeric characters, hyphens (-), and underscores (_).
+ // AliceSendMessage ). Maximum 80 characters. Allowed characters include
+ // alphanumeric characters, hyphens ( - ), and underscores ( _ ).
//
// This member is required.
Label *string
@@ -105,42 +90,49 @@ type AddPermissionOutput struct {
}
func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpAddPermission{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpAddPermission{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAddPermission{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpAddPermission{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AddPermission"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -149,12 +141,18 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpAddPermissionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddPermission(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -164,6 +162,9 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -171,7 +172,6 @@ func newServiceMetadataMiddleware_opAddPermission(region string) *awsmiddleware.
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "AddPermission",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CancelMessageMoveTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CancelMessageMoveTask.go
new file mode 100644
index 00000000..783b7a8f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CancelMessageMoveTask.go
@@ -0,0 +1,146 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sqs
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Cancels a specified message movement task. A message movement can only be
+// cancelled when the current status is RUNNING. Cancelling a message movement task
+// does not revert the messages that have already been moved. It can only stop the
+// messages that have not been moved yet.
+// - This action is currently limited to supporting message redrive from
+// dead-letter queues (DLQs) (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+// only. In this context, the source queue is the dead-letter queue (DLQ), while
+// the destination queue can be the original source queue (from which the messages
+// were driven to the dead-letter-queue), or a custom destination queue.
+// - Currently, only standard queues are supported.
+// - Only one active message movement task is supported per queue at any given
+// time.
+func (c *Client) CancelMessageMoveTask(ctx context.Context, params *CancelMessageMoveTaskInput, optFns ...func(*Options)) (*CancelMessageMoveTaskOutput, error) {
+ if params == nil {
+ params = &CancelMessageMoveTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelMessageMoveTask", params, optFns, c.addOperationCancelMessageMoveTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelMessageMoveTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CancelMessageMoveTaskInput struct {
+
+ // An identifier associated with a message movement task.
+ //
+ // This member is required.
+ TaskHandle *string
+
+ noSmithyDocumentSerde
+}
+
+type CancelMessageMoveTaskOutput struct {
+
+ // The approximate number of messages already moved to the destination queue.
+ ApproximateNumberOfMessagesMoved int64
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelMessageMoveTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpCancelMessageMoveTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCancelMessageMoveTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CancelMessageMoveTask"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpCancelMessageMoveTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelMessageMoveTask(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCancelMessageMoveTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CancelMessageMoveTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go
index 02d77e89..d7339c67 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go
@@ -4,47 +4,43 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Changes the visibility timeout of a specified message in a queue to a new value.
-// The default visibility timeout for a message is 30 seconds. The minimum is 0
-// seconds. The maximum is 12 hours. For more information, see Visibility Timeout
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
-// in the Amazon SQS Developer Guide. For example, you have a message with a
-// visibility timeout of 5 minutes. After 3 minutes, you call
-// ChangeMessageVisibility with a timeout of 10 minutes. You can continue to call
-// ChangeMessageVisibility to extend the visibility timeout to the maximum allowed
-// time. If you try to extend the visibility timeout beyond the maximum, your
-// request is rejected. An Amazon SQS message has three basic states:
+// Changes the visibility timeout of a specified message in a queue to a new
+// value. The default visibility timeout for a message is 30 seconds. The minimum
+// is 0 seconds. The maximum is 12 hours. For more information, see Visibility
+// Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
+// in the Amazon SQS Developer Guide. For example, if the default timeout for a
+// queue is 60 seconds, 15 seconds have elapsed since you received the message, and
+// you send a ChangeMessageVisibility call with VisibilityTimeout set to 10
+// seconds, the 10 seconds begin to count from the time that you make the
+// ChangeMessageVisibility call. Thus, any attempt to change the visibility timeout
+// or to delete that message 10 seconds after you initially change the visibility
+// timeout (a total of 25 seconds) might result in an error. An Amazon SQS message
+// has three basic states:
+// - Sent to a queue by a producer.
+// - Received from the queue by a consumer.
+// - Deleted from the queue.
//
-// * Sent to a
-// queue by a producer.
-//
-// * Received from the queue by a consumer.
-//
-// * Deleted from
-// the queue.
-//
-// A message is considered to be stored after it is sent to a queue by
-// a producer, but not yet received from the queue by a consumer (that is, between
-// states 1 and 2). There is no limit to the number of stored messages. A message
-// is considered to be in flight after it is received from a queue by a consumer,
-// but not yet deleted from the queue (that is, between states 2 and 3). There is a
-// limit to the number of inflight messages. Limits that apply to inflight messages
-// are unrelated to the unlimited number of stored messages. For most standard
-// queues (depending on queue traffic and message backlog), there can be a maximum
-// of approximately 120,000 inflight messages (received from a queue by a consumer,
+// A message is considered to be stored after it is sent to a queue by a producer,
+// but not yet received from the queue by a consumer (that is, between states 1 and
+// 2). There is no limit to the number of stored messages. A message is considered
+// to be in flight after it is received from a queue by a consumer, but not yet
+// deleted from the queue (that is, between states 2 and 3). There is a limit to
+// the number of in flight messages. Limits that apply to in flight messages are
+// unrelated to the unlimited number of stored messages. For most standard queues
+// (depending on queue traffic and message backlog), there can be a maximum of
+// approximately 120,000 in flight messages (received from a queue by a consumer,
// but not yet deleted from the queue). If you reach this limit, Amazon SQS returns
// the OverLimit error message. To avoid reaching the limit, you should delete
// messages from the queue after they're processed. You can also increase the
// number of queues you use to process your messages. To request a limit increase,
-// file a support request
-// (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sqs).
-// For FIFO queues, there can be a maximum of 20,000 inflight messages (received
+// file a support request (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sqs)
+// . For FIFO queues, there can be a maximum of 20,000 in flight messages (received
// from a queue by a consumer, but not yet deleted from the queue). If you reach
// this limit, Amazon SQS returns no error messages. If you attempt to set the
// VisibilityTimeout to a value greater than the maximum time left, Amazon SQS
@@ -78,14 +74,14 @@ type ChangeMessageVisibilityInput struct {
// This member is required.
QueueUrl *string
- // The receipt handle associated with the message whose visibility timeout is
+ // The receipt handle associated with the message, whose visibility timeout is
// changed. This parameter is returned by the ReceiveMessage action.
//
// This member is required.
ReceiptHandle *string
// The new value for the message's visibility timeout (in seconds). Values range: 0
- // to 43200. Maximum: 12 hours.
+ // to 43200 . Maximum: 12 hours.
//
// This member is required.
VisibilityTimeout int32
@@ -101,42 +97,49 @@ type ChangeMessageVisibilityOutput struct {
}
func (c *Client) addOperationChangeMessageVisibilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpChangeMessageVisibility{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpChangeMessageVisibility{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpChangeMessageVisibility{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpChangeMessageVisibility{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ChangeMessageVisibility"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -145,12 +148,18 @@ func (c *Client) addOperationChangeMessageVisibilityMiddlewares(stack *middlewar
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpChangeMessageVisibilityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeMessageVisibility(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -160,6 +169,9 @@ func (c *Client) addOperationChangeMessageVisibilityMiddlewares(stack *middlewar
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -167,7 +179,6 @@ func newServiceMetadataMiddleware_opChangeMessageVisibility(region string) *awsm
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "ChangeMessageVisibility",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go
index 0d8879b3..ac359caf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go
@@ -4,24 +4,20 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Changes the visibility timeout of multiple messages. This is a batch version of
-// ChangeMessageVisibility. The result of the action on each message is reported
+// ChangeMessageVisibility . The result of the action on each message is reported
// individually in the response. You can send up to 10 ChangeMessageVisibility
// requests with each ChangeMessageVisibilityBatch action. Because the batch
// request can result in a combination of successful and unsuccessful actions, you
// should check for batch errors even when the call returns an HTTP status code of
-// 200. Some actions take lists of parameters. These lists are specified using the
-// param.n notation. Values of n are integers starting from 1. For example, a
-// parameter list with two elements looks like this: &AttributeName.1=first
-//
-// &AttributeName.2=second
+// 200 .
func (c *Client) ChangeMessageVisibilityBatch(ctx context.Context, params *ChangeMessageVisibilityBatchInput, optFns ...func(*Options)) (*ChangeMessageVisibilityBatchOutput, error) {
if params == nil {
params = &ChangeMessageVisibilityBatchInput{}
@@ -37,10 +33,9 @@ func (c *Client) ChangeMessageVisibilityBatch(ctx context.Context, params *Chang
return out, nil
}
-//
type ChangeMessageVisibilityBatchInput struct {
- // A list of receipt handles of the messages for which the visibility timeout must
+ // Lists the receipt handles of the messages for which the visibility timeout must
// be changed.
//
// This member is required.
@@ -77,42 +72,49 @@ type ChangeMessageVisibilityBatchOutput struct {
}
func (c *Client) addOperationChangeMessageVisibilityBatchMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpChangeMessageVisibilityBatch{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpChangeMessageVisibilityBatch{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpChangeMessageVisibilityBatch{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpChangeMessageVisibilityBatch{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ChangeMessageVisibilityBatch"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -121,12 +123,18 @@ func (c *Client) addOperationChangeMessageVisibilityBatchMiddlewares(stack *midd
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpChangeMessageVisibilityBatchValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeMessageVisibilityBatch(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -136,6 +144,9 @@ func (c *Client) addOperationChangeMessageVisibilityBatchMiddlewares(stack *midd
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -143,7 +154,6 @@ func newServiceMetadataMiddleware_opChangeMessageVisibilityBatch(region string)
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "ChangeMessageVisibilityBatch",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go
index 6d9171e3..35e691ff 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go
@@ -4,54 +4,40 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Creates a new standard or FIFO queue. You can pass one or more attributes in the
-// request. Keep the following in mind:
+// Creates a new standard or FIFO queue. You can pass one or more attributes in
+// the request. Keep the following in mind:
+// - If you don't specify the FifoQueue attribute, Amazon SQS creates a standard
+// queue. You can't change the queue type after you create it and you can't convert
+// an existing standard queue into a FIFO queue. You must either create a new FIFO
+// queue for your application or delete your existing standard queue and recreate
+// it as a FIFO queue. For more information, see Moving From a Standard Queue to
+// a FIFO Queue (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving)
+// in the Amazon SQS Developer Guide.
+// - If you don't provide a value for an attribute, the queue is created with
+// the default value for the attribute.
+// - If you delete a queue, you must wait at least 60 seconds before creating a
+// queue with the same name.
//
-// * If you don't specify the FifoQueue
-// attribute, Amazon SQS creates a standard queue. You can't change the queue type
-// after you create it and you can't convert an existing standard queue into a FIFO
-// queue. You must either create a new FIFO queue for your application or delete
-// your existing standard queue and recreate it as a FIFO queue. For more
-// information, see Moving From a Standard Queue to a FIFO Queue
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving)
-// in the Amazon SQS Developer Guide.
-//
-// * If you don't provide a value for an
-// attribute, the queue is created with the default value for the attribute.
-//
-// * If
-// you delete a queue, you must wait at least 60 seconds before creating a queue
-// with the same name.
-//
-// To successfully create a new queue, you must provide a
-// queue name that adheres to the limits related to queues
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html)
+// To successfully create a new queue, you must provide a queue name that adheres
+// to the limits related to queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html)
// and is unique within the scope of your queues. After you create a queue, you
// must wait at least one second after the queue is created to be able to use the
// queue. To get the queue URL, use the GetQueueUrl action. GetQueueUrl requires
// only the QueueName parameter. be aware of existing queue names:
+// - If you provide the name of an existing queue along with the exact names and
+// values of all the queue's attributes, CreateQueue returns the queue URL for
+// the existing queue.
+// - If the queue name, attribute names, or attribute values don't match an
+// existing queue, CreateQueue returns an error.
//
-// * If you
-// provide the name of an existing queue along with the exact names and values of
-// all the queue's attributes, CreateQueue returns the queue URL for the existing
-// queue.
-//
-// * If the queue name, attribute names, or attribute values don't match an
-// existing queue, CreateQueue returns an error.
-//
-// Some actions take lists of
-// parameters. These lists are specified using the param.n notation. Values of n
-// are integers starting from 1. For example, a parameter list with two elements
-// looks like this: &AttributeName.1=first&AttributeName.2=second Cross-account
-// permissions don't apply to this action. For more information, see Grant
-// cross-account permissions to a role and a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// Cross-account permissions don't apply to this action. For more information, see
+// Grant cross-account permissions to a role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
// in the Amazon SQS Developer Guide.
func (c *Client) CreateQueue(ctx context.Context, params *CreateQueueInput, optFns ...func(*Options)) (*CreateQueueOutput, error) {
if params == nil {
@@ -68,20 +54,12 @@ func (c *Client) CreateQueue(ctx context.Context, params *CreateQueueInput, optF
return out, nil
}
-//
type CreateQueueInput struct {
// The name of the new queue. The following limits apply to this name:
- //
- // * A queue
- // name can have up to 80 characters.
- //
- // * Valid values: alphanumeric characters,
- // hyphens (-), and underscores (_).
- //
- // * A FIFO queue name must end with the .fifo
- // suffix.
- //
+ // - A queue name can have up to 80 characters.
+ // - Valid values: alphanumeric characters, hyphens ( - ), and underscores ( _ ).
+ // - A FIFO queue name must end with the .fifo suffix.
// Queue URLs and names are case-sensitive.
//
// This member is required.
@@ -90,194 +68,143 @@ type CreateQueueInput struct {
// A map of attributes with their corresponding values. The following lists the
// names, descriptions, and values of the special request parameters that the
// CreateQueue action uses:
- //
- // * DelaySeconds – The length of time, in seconds, for
- // which the delivery of all messages in the queue is delayed. Valid values: An
- // integer from 0 to 900 seconds (15 minutes). Default: 0.
- //
- // * MaximumMessageSize –
- // The limit of how many bytes a message can contain before Amazon SQS rejects it.
- // Valid values: An integer from 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB).
- // Default: 262,144 (256 KiB).
- //
- // * MessageRetentionPeriod – The length of time, in
- // seconds, for which Amazon SQS retains a message. Valid values: An integer from
- // 60 seconds (1 minute) to 1,209,600 seconds (14 days). Default: 345,600 (4
- // days).
- //
- // * Policy – The queue's policy. A valid Amazon Web Services policy. For
- // more information about policy structure, see Overview of Amazon Web Services IAM
- // Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) in the
- // Amazon IAM User Guide.
- //
- // * ReceiveMessageWaitTimeSeconds – The length of time, in
- // seconds, for which a ReceiveMessage action waits for a message to arrive. Valid
- // values: An integer from 0 to 20 (seconds). Default: 0.
- //
- // * RedrivePolicy – The
- // string that includes the parameters for the dead-letter queue functionality of
- // the source queue as a JSON object. For more information about the redrive policy
- // and dead-letter queues, see Using Amazon SQS Dead-Letter Queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
- // in the Amazon SQS Developer Guide.
- //
- // * deadLetterTargetArn – The Amazon Resource
- // Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the
- // value of maxReceiveCount is exceeded.
- //
- // * maxReceiveCount – The number of times a
- // message is delivered to the source queue before being moved to the dead-letter
- // queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a
- // queue, Amazon SQS moves the message to the dead-letter-queue.
- //
- // The dead-letter
- // queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter
- // queue of a standard queue must also be a standard queue.
- //
- // * VisibilityTimeout –
- // The visibility timeout for the queue, in seconds. Valid values: An integer from
- // 0 to 43,200 (12 hours). Default: 30. For more information about the visibility
- // timeout, see Visibility Timeout
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
- // in the Amazon SQS Developer Guide.
- //
- // The following attributes apply only to
- // server-side-encryption
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html):
- //
- // *
- // KmsMasterKeyId – The ID of an Amazon Web Services managed customer master key
- // (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms).
- // While the alias of the Amazon Web Services managed CMK for Amazon SQS is always
- // alias/aws/sqs, the alias of a custom CMK can, for example, be alias/MyAlias .
- // For more examples, see KeyId
- // (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters)
- // in the Key Management Service API Reference.
- //
- // * KmsDataKeyReusePeriodSeconds –
- // The length of time, in seconds, for which Amazon SQS can reuse a data key
- // (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys)
- // to encrypt or decrypt messages before calling KMS again. An integer representing
- // seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default:
- // 300 (5 minutes). A shorter time period provides better security but results in
- // more calls to KMS which might incur charges after Free Tier. For more
- // information, see How Does the Data Key Reuse Period Work?
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work).
- //
- // *
- // SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned
- // encryption keys. Only one server-side encryption option is supported per queue
- // (e.g. SSE-KMS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
- // or SSE-SQS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)).
- //
- // The
- // following attributes apply only to FIFO (first-in-first-out) queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html):
- //
- // *
- // FifoQueue – Designates a queue as FIFO. Valid values are true and false. If you
- // don't specify the FifoQueue attribute, Amazon SQS creates a standard queue. You
- // can provide this attribute only during queue creation. You can't change it for
- // an existing queue. When you set this attribute, you must also provide the
- // MessageGroupId for your messages explicitly. For more information, see FIFO
- // queue logic
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-understanding-logic.html)
- // in the Amazon SQS Developer Guide.
- //
- // * ContentBasedDeduplication – Enables
- // content-based deduplication. Valid values are true and false. For more
- // information, see Exactly-once processing
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
- // in the Amazon SQS Developer Guide. Note the following:
- //
- // * Every message must
- // have a unique MessageDeduplicationId.
- //
- // * You may provide a
- // MessageDeduplicationId explicitly.
- //
- // * If you aren't able to provide a
- // MessageDeduplicationId and you enable ContentBasedDeduplication for your queue,
- // Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId using the
- // body of the message (but not the attributes of the message).
- //
- // * If you don't
- // provide a MessageDeduplicationId and the queue doesn't have
- // ContentBasedDeduplication set, the action fails with an error.
- //
- // * If the queue
- // has ContentBasedDeduplication set, your MessageDeduplicationId overrides the
- // generated one.
- //
- // * When ContentBasedDeduplication is in effect, messages with
- // identical content sent within the deduplication interval are treated as
- // duplicates and only one copy of the message is delivered.
- //
- // * If you send one
- // message with ContentBasedDeduplication enabled and then another message with a
- // MessageDeduplicationId that is the same as the one generated for the first
- // MessageDeduplicationId, the two messages are treated as duplicates and only one
- // copy of the message is delivered.
- //
- // The following attributes apply only to high
- // throughput for FIFO queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html):
- //
- // *
- // DeduplicationScope – Specifies whether message deduplication occurs at the
- // message group or queue level. Valid values are messageGroup and queue.
- //
- // *
- // FifoThroughputLimit – Specifies whether the FIFO queue throughput quota applies
- // to the entire queue or per message group. Valid values are perQueue and
- // perMessageGroupId. The perMessageGroupId value is allowed only when the value
- // for DeduplicationScope is messageGroup.
- //
- // To enable high throughput for FIFO
- // queues, do the following:
- //
- // * Set DeduplicationScope to messageGroup.
- //
- // * Set
- // FifoThroughputLimit to perMessageGroupId.
- //
- // If you set these attributes to
- // anything other than the values shown for enabling high throughput, normal
- // throughput is in effect and deduplication occurs as specified. For information
- // on throughput quotas, see Quotas related to messages
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html)
+ // - DelaySeconds – The length of time, in seconds, for which the delivery of all
+ // messages in the queue is delayed. Valid values: An integer from 0 to 900 seconds
+ // (15 minutes). Default: 0.
+ // - MaximumMessageSize – The limit of how many bytes a message can contain
+ // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB)
+ // to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).
+ // - MessageRetentionPeriod – The length of time, in seconds, for which Amazon
+ // SQS retains a message. Valid values: An integer from 60 seconds (1 minute) to
+ // 1,209,600 seconds (14 days). Default: 345,600 (4 days). When you change a
+ // queue's attributes, the change can take up to 60 seconds for most of the
+ // attributes to propagate throughout the Amazon SQS system. Changes made to the
+ // MessageRetentionPeriod attribute can take up to 15 minutes and will impact
+ // existing messages in the queue potentially causing them to be expired and
+ // deleted if the MessageRetentionPeriod is reduced below the age of existing
+ // messages.
+ // - Policy – The queue's policy. A valid Amazon Web Services policy. For more
+ // information about policy structure, see Overview of Amazon Web Services IAM
+ // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html)
+ // in the IAM User Guide.
+ // - ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for which a
+ // ReceiveMessage action waits for a message to arrive. Valid values: An integer
+ // from 0 to 20 (seconds). Default: 0.
+ // - VisibilityTimeout – The visibility timeout for the queue, in seconds. Valid
+ // values: An integer from 0 to 43,200 (12 hours). Default: 30. For more
+ // information about the visibility timeout, see Visibility Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
+ // in the Amazon SQS Developer Guide.
+ // The following attributes apply only to dead-letter queues: (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+ // - RedrivePolicy – The string that includes the parameters for the dead-letter
+ // queue functionality of the source queue as a JSON object. The parameters are as
+ // follows:
+ // - deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter
+ // queue to which Amazon SQS moves messages after the value of maxReceiveCount is
+ // exceeded.
+ // - maxReceiveCount – The number of times a message is delivered to the source
+ // queue before being moved to the dead-letter queue. Default: 10. When the
+ // ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS
+ // moves the message to the dead-letter-queue.
+ // - RedriveAllowPolicy – The string that includes the parameters for the
+ // permissions for the dead-letter queue redrive permission and which source queues
+ // can specify dead-letter queues as a JSON object. The parameters are as follows:
+ // - redrivePermission – The permission type that defines which source queues can
+ // specify the current queue as the dead-letter queue. Valid values are:
+ // - allowAll – (Default) Any source queues in this Amazon Web Services account
+ // in the same Region can specify this queue as the dead-letter queue.
+ // - denyAll – No source queues can specify this queue as the dead-letter queue.
+ // - byQueue – Only queues specified by the sourceQueueArns parameter can specify
+ // this queue as the dead-letter queue.
+ // - sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that
+ // can specify this queue as the dead-letter queue and redrive messages. You can
+ // specify this parameter only when the redrivePermission parameter is set to
+ // byQueue . You can specify up to 10 source queue ARNs. To allow more than 10
+ // source queues to specify dead-letter queues, set the redrivePermission
+ // parameter to allowAll .
+ // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the
+ // dead-letter queue of a standard queue must also be a standard queue. The
+ // following attributes apply only to server-side-encryption (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html)
+ // :
+ // - KmsMasterKeyId – The ID of an Amazon Web Services managed customer master
+ // key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms)
+ // . While the alias of the Amazon Web Services managed CMK for Amazon SQS is
+ // always alias/aws/sqs , the alias of a custom CMK can, for example, be
+ // alias/MyAlias . For more examples, see KeyId (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters)
+ // in the Key Management Service API Reference.
+ // - KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for which
+ // Amazon SQS can reuse a data key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys)
+ // to encrypt or decrypt messages before calling KMS again. An integer representing
+ // seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default:
+ // 300 (5 minutes). A shorter time period provides better security but results in
+ // more calls to KMS which might incur charges after Free Tier. For more
+ // information, see How Does the Data Key Reuse Period Work? (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work)
+ // - SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned
+ // encryption keys. Only one server-side encryption option is supported per queue
+ // (for example, SSE-KMS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
+ // or SSE-SQS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)
+ // ).
+ // The following attributes apply only to FIFO (first-in-first-out) queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html)
+ // :
+ // - FifoQueue – Designates a queue as FIFO. Valid values are true and false . If
+ // you don't specify the FifoQueue attribute, Amazon SQS creates a standard
+ // queue. You can provide this attribute only during queue creation. You can't
+ // change it for an existing queue. When you set this attribute, you must also
+ // provide the MessageGroupId for your messages explicitly. For more information,
+ // see FIFO queue logic (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-understanding-logic.html)
+ // in the Amazon SQS Developer Guide.
+ // - ContentBasedDeduplication – Enables content-based deduplication. Valid
+ // values are true and false . For more information, see Exactly-once processing (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
+ // in the Amazon SQS Developer Guide. Note the following:
+ // - Every message must have a unique MessageDeduplicationId .
+ // - You may provide a MessageDeduplicationId explicitly.
+ // - If you aren't able to provide a MessageDeduplicationId and you enable
+ // ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to
+ // generate the MessageDeduplicationId using the body of the message (but not the
+ // attributes of the message).
+ // - If you don't provide a MessageDeduplicationId and the queue doesn't have
+ // ContentBasedDeduplication set, the action fails with an error.
+ // - If the queue has ContentBasedDeduplication set, your MessageDeduplicationId
+ // overrides the generated one.
+ // - When ContentBasedDeduplication is in effect, messages with identical content
+ // sent within the deduplication interval are treated as duplicates and only one
+ // copy of the message is delivered.
+ // - If you send one message with ContentBasedDeduplication enabled and then
+ // another message with a MessageDeduplicationId that is the same as the one
+ // generated for the first MessageDeduplicationId , the two messages are treated
+ // as duplicates and only one copy of the message is delivered.
+ // The following attributes apply only to high throughput for FIFO queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html)
+ // :
+ // - DeduplicationScope – Specifies whether message deduplication occurs at the
+ // message group or queue level. Valid values are messageGroup and queue .
+ // - FifoThroughputLimit – Specifies whether the FIFO queue throughput quota
+ // applies to the entire queue or per message group. Valid values are perQueue
+ // and perMessageGroupId . The perMessageGroupId value is allowed only when the
+ // value for DeduplicationScope is messageGroup .
+ // To enable high throughput for FIFO queues, do the following:
+ // - Set DeduplicationScope to messageGroup .
+ // - Set FifoThroughputLimit to perMessageGroupId .
+ // If you set these attributes to anything other than the values shown for
+ // enabling high throughput, normal throughput is in effect and deduplication
+ // occurs as specified. For information on throughput quotas, see Quotas related
+ // to messages (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html)
// in the Amazon SQS Developer Guide.
Attributes map[string]string
- // Add cost allocation tags to the specified Amazon SQS queue. For an overview, see
- // Tagging Your Amazon SQS Queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
+ // Add cost allocation tags to the specified Amazon SQS queue. For an overview,
+ // see Tagging Your Amazon SQS Queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
// in the Amazon SQS Developer Guide. When you use queue tags, keep the following
// guidelines in mind:
- //
- // * Adding more than 50 tags to a queue isn't recommended.
- //
- // *
- // Tags don't have any semantic meaning. Amazon SQS interprets tags as character
- // strings.
- //
- // * Tags are case-sensitive.
- //
- // * A new tag with a key identical to that
- // of an existing tag overwrites the existing tag.
- //
- // For a full list of tag
- // restrictions, see Quotas related to queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues)
+ // - Adding more than 50 tags to a queue isn't recommended.
+ // - Tags don't have any semantic meaning. Amazon SQS interprets tags as
+ // character strings.
+ // - Tags are case-sensitive.
+ // - A new tag with a key identical to that of an existing tag overwrites the
+ // existing tag.
+ // For a full list of tag restrictions, see Quotas related to queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues)
// in the Amazon SQS Developer Guide. To be able to tag a queue on creation, you
// must have the sqs:CreateQueue and sqs:TagQueue permissions. Cross-account
// permissions don't apply to this action. For more information, see Grant
- // cross-account permissions to a role and a user name
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+ // cross-account permissions to a role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
// in the Amazon SQS Developer Guide.
Tags map[string]string
@@ -297,42 +224,49 @@ type CreateQueueOutput struct {
}
func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateQueue{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateQueue{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateQueue{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateQueue{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateQueue"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -341,12 +275,18 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpCreateQueueValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateQueue(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -356,6 +296,9 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -363,7 +306,6 @@ func newServiceMetadataMiddleware_opCreateQueue(region string) *awsmiddleware.Re
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "CreateQueue",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go
index 38cd866d..2e3011be 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go
@@ -4,14 +4,14 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the specified message from the specified queue. To select the message to
-// delete, use the ReceiptHandle of the message (not the MessageId which you
+// Deletes the specified message from the specified queue. To select the message
+// to delete, use the ReceiptHandle of the message (not the MessageId which you
// receive when you send the message). Amazon SQS can delete a message from a queue
// even if a visibility timeout setting causes the message to be locked by another
// consumer. Amazon SQS automatically deletes messages left in a queue longer than
@@ -20,7 +20,7 @@ import (
// than once, the ReceiptHandle is different each time you receive a message. When
// you use the DeleteMessage action, you must provide the most recently received
// ReceiptHandle for the message (otherwise, the request succeeds, but the message
-// might not be deleted). For standard queues, it is possible to receive a message
+// will not be deleted). For standard queues, it is possible to receive a message
// even after you delete it. This might happen on rare occasions if one of the
// servers which stores a copy of the message is unavailable when you send the
// request to delete the message. The copy remains on the server and might be
@@ -42,7 +42,6 @@ func (c *Client) DeleteMessage(ctx context.Context, params *DeleteMessageInput,
return out, nil
}
-//
type DeleteMessageInput struct {
// The URL of the Amazon SQS queue from which messages are deleted. Queue URLs and
@@ -67,42 +66,49 @@ type DeleteMessageOutput struct {
}
func (c *Client) addOperationDeleteMessageMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteMessage{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteMessage{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteMessage{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteMessage{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMessage"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -111,12 +117,18 @@ func (c *Client) addOperationDeleteMessageMiddlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpDeleteMessageValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMessage(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -126,6 +138,9 @@ func (c *Client) addOperationDeleteMessageMiddlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -133,7 +148,6 @@ func newServiceMetadataMiddleware_opDeleteMessage(region string) *awsmiddleware.
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "DeleteMessage",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go
index d8067375..36834805 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go
@@ -4,22 +4,18 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes up to ten messages from the specified queue. This is a batch version of
-// DeleteMessage. The result of the action on each message is reported individually
-// in the response. Because the batch request can result in a combination of
-// successful and unsuccessful actions, you should check for batch errors even when
-// the call returns an HTTP status code of 200. Some actions take lists of
-// parameters. These lists are specified using the param.n notation. Values of n
-// are integers starting from 1. For example, a parameter list with two elements
-// looks like this: &AttributeName.1=first
-// &AttributeName.2=second
+// DeleteMessage . The result of the action on each message is reported
+// individually in the response. Because the batch request can result in a
+// combination of successful and unsuccessful actions, you should check for batch
+// errors even when the call returns an HTTP status code of 200 .
func (c *Client) DeleteMessageBatch(ctx context.Context, params *DeleteMessageBatchInput, optFns ...func(*Options)) (*DeleteMessageBatchOutput, error) {
if params == nil {
params = &DeleteMessageBatchInput{}
@@ -35,10 +31,9 @@ func (c *Client) DeleteMessageBatch(ctx context.Context, params *DeleteMessageBa
return out, nil
}
-//
type DeleteMessageBatchInput struct {
- // A list of receipt handles for the messages to be deleted.
+ // Lists the receipt handles for the messages to be deleted.
//
// This member is required.
Entries []types.DeleteMessageBatchRequestEntry
@@ -74,42 +69,49 @@ type DeleteMessageBatchOutput struct {
}
func (c *Client) addOperationDeleteMessageBatchMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteMessageBatch{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteMessageBatch{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteMessageBatch{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteMessageBatch{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMessageBatch"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -118,12 +120,18 @@ func (c *Client) addOperationDeleteMessageBatchMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpDeleteMessageBatchValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMessageBatch(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -133,6 +141,9 @@ func (c *Client) addOperationDeleteMessageBatchMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -140,7 +151,6 @@ func newServiceMetadataMiddleware_opDeleteMessageBatch(region string) *awsmiddle
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "DeleteMessageBatch",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go
index 07c3f085..2fa662b8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go
@@ -4,23 +4,23 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the queue specified by the QueueUrl, regardless of the queue's contents.
-// Be careful with the DeleteQueue action: When you delete a queue, any messages in
-// the queue are no longer available. When you delete a queue, the deletion process
-// takes up to 60 seconds. Requests you send involving that queue during the 60
-// seconds might succeed. For example, a SendMessage request might succeed, but
-// after 60 seconds the queue and the message you sent no longer exist. When you
-// delete a queue, you must wait at least 60 seconds before creating a queue with
-// the same name. Cross-account permissions don't apply to this action. For more
-// information, see Grant cross-account permissions to a role and a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
-// in the Amazon SQS Developer Guide.
+// Deletes the queue specified by the QueueUrl , regardless of the queue's
+// contents. Be careful with the DeleteQueue action: When you delete a queue, any
+// messages in the queue are no longer available. When you delete a queue, the
+// deletion process takes up to 60 seconds. Requests you send involving that queue
+// during the 60 seconds might succeed. For example, a SendMessage request might
+// succeed, but after 60 seconds the queue and the message you sent no longer
+// exist. When you delete a queue, you must wait at least 60 seconds before
+// creating a queue with the same name. Cross-account permissions don't apply to
+// this action. For more information, see Grant cross-account permissions to a
+// role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// in the Amazon SQS Developer Guide. The delete operation uses the HTTP GET verb.
func (c *Client) DeleteQueue(ctx context.Context, params *DeleteQueueInput, optFns ...func(*Options)) (*DeleteQueueOutput, error) {
if params == nil {
params = &DeleteQueueInput{}
@@ -36,7 +36,6 @@ func (c *Client) DeleteQueue(ctx context.Context, params *DeleteQueueInput, optF
return out, nil
}
-//
type DeleteQueueInput struct {
// The URL of the Amazon SQS queue to delete. Queue URLs and names are
@@ -56,42 +55,49 @@ type DeleteQueueOutput struct {
}
func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteQueue{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteQueue{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteQueue{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteQueue{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteQueue"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -100,12 +106,18 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpDeleteQueueValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueue(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -115,6 +127,9 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -122,7 +137,6 @@ func newServiceMetadataMiddleware_opDeleteQueue(region string) *awsmiddleware.Re
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "DeleteQueue",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go
index 140aa1e1..6f90d735 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go
@@ -4,16 +4,15 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Gets attributes for the specified queue. To determine whether a queue is FIFO
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html),
-// you can check whether QueueName ends with the .fifo suffix.
+// Gets attributes for the specified queue. To determine whether a queue is FIFO (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html)
+// , you can check whether QueueName ends with the .fifo suffix.
func (c *Client) GetQueueAttributes(ctx context.Context, params *GetQueueAttributesInput, optFns ...func(*Options)) (*GetQueueAttributesOutput, error) {
if params == nil {
params = &GetQueueAttributesInput{}
@@ -29,7 +28,6 @@ func (c *Client) GetQueueAttributes(ctx context.Context, params *GetQueueAttribu
return out, nil
}
-//
type GetQueueAttributesInput struct {
// The URL of the Amazon SQS queue whose attribute information is retrieved. Queue
@@ -38,153 +36,117 @@ type GetQueueAttributesInput struct {
// This member is required.
QueueUrl *string
- // A list of attributes for which to retrieve information. The AttributeName.N
+ // A list of attributes for which to retrieve information. The AttributeNames
// parameter is optional, but if you don't specify values for this parameter, the
// request returns empty results. In the future, new attributes might be added. If
// you write code that calls this action, we recommend that you structure your code
// so that it can handle new attributes gracefully. The following attributes are
- // supported: The ApproximateNumberOfMessagesDelayed,
- // ApproximateNumberOfMessagesNotVisible, and ApproximateNumberOfMessagesVisible
- // metrics may not achieve consistency until at least 1 minute after the producers
- // stop sending messages. This period is required for the queue metadata to reach
+ // supported: The ApproximateNumberOfMessagesDelayed ,
+ // ApproximateNumberOfMessagesNotVisible , and ApproximateNumberOfMessages metrics
+ // may not achieve consistency until at least 1 minute after the producers stop
+ // sending messages. This period is required for the queue metadata to reach
// eventual consistency.
- //
- // * All – Returns all values.
- //
- // *
- // ApproximateNumberOfMessages – Returns the approximate number of messages
- // available for retrieval from the queue.
- //
- // * ApproximateNumberOfMessagesDelayed –
- // Returns the approximate number of messages in the queue that are delayed and not
- // available for reading immediately. This can happen when the queue is configured
- // as a delay queue or when a message has been sent with a delay parameter.
- //
- // *
- // ApproximateNumberOfMessagesNotVisible – Returns the approximate number of
- // messages that are in flight. Messages are considered to be in flight if they
- // have been sent to a client but have not yet been deleted or have not yet reached
- // the end of their visibility window.
- //
- // * CreatedTimestamp – Returns the time when
- // the queue was created in seconds (epoch time
- // (http://en.wikipedia.org/wiki/Unix_time)).
- //
- // * DelaySeconds – Returns the default
- // delay on the queue in seconds.
- //
- // * LastModifiedTimestamp – Returns the time when
- // the queue was last changed in seconds (epoch time
- // (http://en.wikipedia.org/wiki/Unix_time)).
- //
- // * MaximumMessageSize – Returns the
- // limit of how many bytes a message can contain before Amazon SQS rejects it.
- //
- // *
- // MessageRetentionPeriod – Returns the length of time, in seconds, for which
- // Amazon SQS retains a message.
- //
- // * Policy – Returns the policy of the queue.
- //
- // *
- // QueueArn – Returns the Amazon resource name (ARN) of the queue.
- //
- // *
- // ReceiveMessageWaitTimeSeconds – Returns the length of time, in seconds, for
- // which the ReceiveMessage action waits for a message to arrive.
- //
- // * RedrivePolicy
- // – The string that includes the parameters for the dead-letter queue
- // functionality of the source queue as a JSON object. For more information about
- // the redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter
- // Queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
- // in the Amazon SQS Developer Guide.
- //
- // * deadLetterTargetArn – The Amazon Resource
- // Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the
- // value of maxReceiveCount is exceeded.
- //
- // * maxReceiveCount – The number of times a
- // message is delivered to the source queue before being moved to the dead-letter
- // queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a
- // queue, Amazon SQS moves the message to the dead-letter-queue.
- //
- // *
- // VisibilityTimeout – Returns the visibility timeout for the queue. For more
- // information about the visibility timeout, see Visibility Timeout
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
- // in the Amazon SQS Developer Guide.
- //
- // The following attributes apply only to
- // server-side-encryption
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html):
- //
- // *
- // KmsMasterKeyId – Returns the ID of an Amazon Web Services managed customer
- // master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key
- // Terms
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms).
- //
- // *
- // KmsDataKeyReusePeriodSeconds – Returns the length of time, in seconds, for which
- // Amazon SQS can reuse a data key to encrypt or decrypt messages before calling
- // KMS again. For more information, see How Does the Data Key Reuse Period Work?
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work).
- //
- // *
- // SqsManagedSseEnabled – Returns information about whether the queue is using
- // SSE-SQS encryption using SQS owned encryption keys. Only one server-side
- // encryption option is supported per queue (e.g. SSE-KMS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
- // or SSE-SQS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)).
- //
- // The
- // following attributes apply only to FIFO (first-in-first-out) queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html):
- //
- // *
- // FifoQueue – Returns information about whether the queue is FIFO. For more
- // information, see FIFO queue logic
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-understanding-logic.html)
- // in the Amazon SQS Developer Guide. To determine whether a queue is FIFO
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html),
- // you can check whether QueueName ends with the .fifo suffix.
- //
- // *
- // ContentBasedDeduplication – Returns whether content-based deduplication is
- // enabled for the queue. For more information, see Exactly-once processing
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
- // in the Amazon SQS Developer Guide.
- //
- // The following attributes apply only to high
- // throughput for FIFO queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html):
- //
- // *
- // DeduplicationScope – Specifies whether message deduplication occurs at the
- // message group or queue level. Valid values are messageGroup and queue.
- //
- // *
- // FifoThroughputLimit – Specifies whether the FIFO queue throughput quota applies
- // to the entire queue or per message group. Valid values are perQueue and
- // perMessageGroupId. The perMessageGroupId value is allowed only when the value
- // for DeduplicationScope is messageGroup.
- //
- // To enable high throughput for FIFO
- // queues, do the following:
- //
- // * Set DeduplicationScope to messageGroup.
- //
- // * Set
- // FifoThroughputLimit to perMessageGroupId.
- //
- // If you set these attributes to
- // anything other than the values shown for enabling high throughput, normal
- // throughput is in effect and deduplication occurs as specified. For information
- // on throughput quotas, see Quotas related to messages
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html)
+ // - All – Returns all values.
+ // - ApproximateNumberOfMessages – Returns the approximate number of messages
+ // available for retrieval from the queue.
+ // - ApproximateNumberOfMessagesDelayed – Returns the approximate number of
+ // messages in the queue that are delayed and not available for reading
+ // immediately. This can happen when the queue is configured as a delay queue or
+ // when a message has been sent with a delay parameter.
+ // - ApproximateNumberOfMessagesNotVisible – Returns the approximate number of
+ // messages that are in flight. Messages are considered to be in flight if they
+ // have been sent to a client but have not yet been deleted or have not yet reached
+ // the end of their visibility window.
+ // - CreatedTimestamp – Returns the time when the queue was created in seconds (
+ // epoch time (http://en.wikipedia.org/wiki/Unix_time) ).
+ // - DelaySeconds – Returns the default delay on the queue in seconds.
+ // - LastModifiedTimestamp – Returns the time when the queue was last changed in
+ // seconds ( epoch time (http://en.wikipedia.org/wiki/Unix_time) ).
+ // - MaximumMessageSize – Returns the limit of how many bytes a message can
+ // contain before Amazon SQS rejects it.
+ // - MessageRetentionPeriod – Returns the length of time, in seconds, for which
+ // Amazon SQS retains a message. When you change a queue's attributes, the change
+ // can take up to 60 seconds for most of the attributes to propagate throughout the
+ // Amazon SQS system. Changes made to the MessageRetentionPeriod attribute can
+ // take up to 15 minutes and will impact existing messages in the queue potentially
+ // causing them to be expired and deleted if the MessageRetentionPeriod is
+ // reduced below the age of existing messages.
+ // - Policy – Returns the policy of the queue.
+ // - QueueArn – Returns the Amazon resource name (ARN) of the queue.
+ // - ReceiveMessageWaitTimeSeconds – Returns the length of time, in seconds, for
+ // which the ReceiveMessage action waits for a message to arrive.
+ // - VisibilityTimeout – Returns the visibility timeout for the queue. For more
+ // information about the visibility timeout, see Visibility Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
+ // in the Amazon SQS Developer Guide.
+ // The following attributes apply only to dead-letter queues: (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+ // - RedrivePolicy – The string that includes the parameters for the dead-letter
+ // queue functionality of the source queue as a JSON object. The parameters are as
+ // follows:
+ // - deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter
+ // queue to which Amazon SQS moves messages after the value of maxReceiveCount is
+ // exceeded.
+ // - maxReceiveCount – The number of times a message is delivered to the source
+ // queue before being moved to the dead-letter queue. Default: 10. When the
+ // ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS
+ // moves the message to the dead-letter-queue.
+ // - RedriveAllowPolicy – The string that includes the parameters for the
+ // permissions for the dead-letter queue redrive permission and which source queues
+ // can specify dead-letter queues as a JSON object. The parameters are as follows:
+ // - redrivePermission – The permission type that defines which source queues can
+ // specify the current queue as the dead-letter queue. Valid values are:
+ // - allowAll – (Default) Any source queues in this Amazon Web Services account
+ // in the same Region can specify this queue as the dead-letter queue.
+ // - denyAll – No source queues can specify this queue as the dead-letter queue.
+ // - byQueue – Only queues specified by the sourceQueueArns parameter can specify
+ // this queue as the dead-letter queue.
+ // - sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that
+ // can specify this queue as the dead-letter queue and redrive messages. You can
+ // specify this parameter only when the redrivePermission parameter is set to
+ // byQueue . You can specify up to 10 source queue ARNs. To allow more than 10
+ // source queues to specify dead-letter queues, set the redrivePermission
+ // parameter to allowAll .
+ // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the
+ // dead-letter queue of a standard queue must also be a standard queue. The
+ // following attributes apply only to server-side-encryption (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html)
+ // :
+ // - KmsMasterKeyId – Returns the ID of an Amazon Web Services managed customer
+ // master key (CMK) for Amazon SQS or a custom CMK. For more information, see
+ // Key Terms (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms)
+ // .
+ // - KmsDataKeyReusePeriodSeconds – Returns the length of time, in seconds, for
+ // which Amazon SQS can reuse a data key to encrypt or decrypt messages before
+ // calling KMS again. For more information, see How Does the Data Key Reuse
+ // Period Work? (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work)
+ // .
+ // - SqsManagedSseEnabled – Returns information about whether the queue is using
+ // SSE-SQS encryption using SQS owned encryption keys. Only one server-side
+ // encryption option is supported per queue (for example, SSE-KMS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
+ // or SSE-SQS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)
+ // ).
+ // The following attributes apply only to FIFO (first-in-first-out) queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html)
+ // :
+ // - FifoQueue – Returns information about whether the queue is FIFO. For more
+ // information, see FIFO queue logic (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-understanding-logic.html)
+ // in the Amazon SQS Developer Guide. To determine whether a queue is FIFO (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html)
+ // , you can check whether QueueName ends with the .fifo suffix.
+ // - ContentBasedDeduplication – Returns whether content-based deduplication is
+ // enabled for the queue. For more information, see Exactly-once processing (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
+ // in the Amazon SQS Developer Guide.
+ // The following attributes apply only to high throughput for FIFO queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html)
+ // :
+ // - DeduplicationScope – Specifies whether message deduplication occurs at the
+ // message group or queue level. Valid values are messageGroup and queue .
+ // - FifoThroughputLimit – Specifies whether the FIFO queue throughput quota
+ // applies to the entire queue or per message group. Valid values are perQueue
+ // and perMessageGroupId . The perMessageGroupId value is allowed only when the
+ // value for DeduplicationScope is messageGroup .
+ // To enable high throughput for FIFO queues, do the following:
+ // - Set DeduplicationScope to messageGroup .
+ // - Set FifoThroughputLimit to perMessageGroupId .
+ // If you set these attributes to anything other than the values shown for
+ // enabling high throughput, normal throughput is in effect and deduplication
+ // occurs as specified. For information on throughput quotas, see Quotas related
+ // to messages (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html)
// in the Amazon SQS Developer Guide.
AttributeNames []types.QueueAttributeName
@@ -204,42 +166,49 @@ type GetQueueAttributesOutput struct {
}
func (c *Client) addOperationGetQueueAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpGetQueueAttributes{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetQueueAttributes{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetQueueAttributes{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetQueueAttributes{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetQueueAttributes"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -248,12 +217,18 @@ func (c *Client) addOperationGetQueueAttributesMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpGetQueueAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueueAttributes(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -263,6 +238,9 @@ func (c *Client) addOperationGetQueueAttributesMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -270,7 +248,6 @@ func newServiceMetadataMiddleware_opGetQueueAttributes(region string) *awsmiddle
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "GetQueueAttributes",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go
index db11c4ac..5e89c73b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go
@@ -4,8 +4,8 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
@@ -14,8 +14,7 @@ import (
// to another AWS account, use the QueueOwnerAWSAccountId parameter to specify the
// account ID of the queue's owner. The queue's owner must grant you permission to
// access the queue. For more information about shared queue access, see
-// AddPermission or see Allow Developers to Write Messages to a Shared Queue
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue)
+// AddPermission or see Allow Developers to Write Messages to a Shared Queue (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue)
// in the Amazon SQS Developer Guide.
func (c *Client) GetQueueUrl(ctx context.Context, params *GetQueueUrlInput, optFns ...func(*Options)) (*GetQueueUrlOutput, error) {
if params == nil {
@@ -32,12 +31,11 @@ func (c *Client) GetQueueUrl(ctx context.Context, params *GetQueueUrlInput, optF
return out, nil
}
-//
type GetQueueUrlInput struct {
// The name of the queue whose URL must be fetched. Maximum 80 characters. Valid
- // values: alphanumeric characters, hyphens (-), and underscores (_). Queue URLs
- // and names are case-sensitive.
+ // values: alphanumeric characters, hyphens ( - ), and underscores ( _ ). Queue
+ // URLs and names are case-sensitive.
//
// This member is required.
QueueName *string
@@ -48,8 +46,7 @@ type GetQueueUrlInput struct {
noSmithyDocumentSerde
}
-// For more information, see Interpreting Responses
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-api-responses.html)
+// For more information, see Interpreting Responses (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-api-responses.html)
// in the Amazon SQS Developer Guide.
type GetQueueUrlOutput struct {
@@ -63,42 +60,49 @@ type GetQueueUrlOutput struct {
}
func (c *Client) addOperationGetQueueUrlMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpGetQueueUrl{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetQueueUrl{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetQueueUrl{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetQueueUrl{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetQueueUrl"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -107,12 +111,18 @@ func (c *Client) addOperationGetQueueUrlMiddlewares(stack *middleware.Stack, opt
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpGetQueueUrlValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueueUrl(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -122,6 +132,9 @@ func (c *Client) addOperationGetQueueUrlMiddlewares(stack *middleware.Stack, opt
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -129,7 +142,6 @@ func newServiceMetadataMiddleware_opGetQueueUrl(region string) *awsmiddleware.Re
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "GetQueueUrl",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go
index be568b74..c877ac29 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go
@@ -6,7 +6,6 @@ import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
@@ -15,13 +14,12 @@ import (
// configured with a dead-letter queue. The ListDeadLetterSourceQueues methods
// supports pagination. Set parameter MaxResults in the request to specify the
// maximum number of results to be returned in the response. If you do not set
-// MaxResults, the response includes a maximum of 1,000 results. If you set
+// MaxResults , the response includes a maximum of 1,000 results. If you set
// MaxResults and there are additional results to display, the response includes a
-// value for NextToken. Use NextToken as a parameter in your next request to
+// value for NextToken . Use NextToken as a parameter in your next request to
// ListDeadLetterSourceQueues to receive the next page of results. For more
// information about using dead-letter queues, see Using Amazon SQS Dead-Letter
-// Queues
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+// Queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
// in the Amazon SQS Developer Guide.
func (c *Client) ListDeadLetterSourceQueues(ctx context.Context, params *ListDeadLetterSourceQueuesInput, optFns ...func(*Options)) (*ListDeadLetterSourceQueuesOutput, error) {
if params == nil {
@@ -38,7 +36,6 @@ func (c *Client) ListDeadLetterSourceQueues(ctx context.Context, params *ListDea
return out, nil
}
-//
type ListDeadLetterSourceQueuesInput struct {
// The URL of a dead-letter queue. Queue URLs and names are case-sensitive.
@@ -77,42 +74,49 @@ type ListDeadLetterSourceQueuesOutput struct {
}
func (c *Client) addOperationListDeadLetterSourceQueuesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpListDeadLetterSourceQueues{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpListDeadLetterSourceQueues{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListDeadLetterSourceQueues{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListDeadLetterSourceQueues{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListDeadLetterSourceQueues"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -121,12 +125,18 @@ func (c *Client) addOperationListDeadLetterSourceQueuesMiddlewares(stack *middle
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpListDeadLetterSourceQueuesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeadLetterSourceQueues(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -136,6 +146,9 @@ func (c *Client) addOperationListDeadLetterSourceQueuesMiddlewares(stack *middle
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -237,7 +250,6 @@ func newServiceMetadataMiddleware_opListDeadLetterSourceQueues(region string) *a
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "ListDeadLetterSourceQueues",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListMessageMoveTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListMessageMoveTasks.go
new file mode 100644
index 00000000..6187d407
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListMessageMoveTasks.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sqs
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/sqs/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets the most recent message movement tasks (up to 10) under a specific source
+// queue.
+// - This action is currently limited to supporting message redrive from
+// dead-letter queues (DLQs) (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+// only. In this context, the source queue is the dead-letter queue (DLQ), while
+// the destination queue can be the original source queue (from which the messages
+// were driven to the dead-letter-queue), or a custom destination queue.
+// - Currently, only standard queues are supported.
+// - Only one active message movement task is supported per queue at any given
+// time.
+func (c *Client) ListMessageMoveTasks(ctx context.Context, params *ListMessageMoveTasksInput, optFns ...func(*Options)) (*ListMessageMoveTasksOutput, error) {
+ if params == nil {
+ params = &ListMessageMoveTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListMessageMoveTasks", params, optFns, c.addOperationListMessageMoveTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListMessageMoveTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListMessageMoveTasksInput struct {
+
+ // The ARN of the queue whose message movement tasks are to be listed.
+ //
+ // This member is required.
+ SourceArn *string
+
+ // The maximum number of results to include in the response. The default is 1,
+ // which provides the most recent message movement task. The upper limit is 10.
+ MaxResults *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListMessageMoveTasksOutput struct {
+
+ // A list of message movement tasks and their attributes.
+ Results []types.ListMessageMoveTasksResultEntry
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListMessageMoveTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpListMessageMoveTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListMessageMoveTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListMessageMoveTasks"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpListMessageMoveTasksValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMessageMoveTasks(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListMessageMoveTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListMessageMoveTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go
index b40539f7..226fb297 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go
@@ -4,19 +4,17 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List all cost allocation tags added to the specified Amazon SQS queue. For an
-// overview, see Tagging Your Amazon SQS Queues
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
+// overview, see Tagging Your Amazon SQS Queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
// in the Amazon SQS Developer Guide. Cross-account permissions don't apply to this
// action. For more information, see Grant cross-account permissions to a role and
-// a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
// in the Amazon SQS Developer Guide.
func (c *Client) ListQueueTags(ctx context.Context, params *ListQueueTagsInput, optFns ...func(*Options)) (*ListQueueTagsOutput, error) {
if params == nil {
@@ -55,42 +53,49 @@ type ListQueueTagsOutput struct {
}
func (c *Client) addOperationListQueueTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpListQueueTags{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpListQueueTags{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListQueueTags{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListQueueTags{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListQueueTags"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -99,12 +104,18 @@ func (c *Client) addOperationListQueueTagsMiddlewares(stack *middleware.Stack, o
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpListQueueTagsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueueTags(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -114,6 +125,9 @@ func (c *Client) addOperationListQueueTagsMiddlewares(stack *middleware.Stack, o
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -121,7 +135,6 @@ func newServiceMetadataMiddleware_opListQueueTags(region string) *awsmiddleware.
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "ListQueueTags",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go
index 2e853b7f..5f580999 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go
@@ -6,7 +6,6 @@ import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
@@ -16,13 +15,12 @@ import (
// QueueNamePrefix parameter, only queues with a name that begins with the
// specified value are returned. The listQueues methods supports pagination. Set
// parameter MaxResults in the request to specify the maximum number of results to
-// be returned in the response. If you do not set MaxResults, the response includes
-// a maximum of 1,000 results. If you set MaxResults and there are additional
-// results to display, the response includes a value for NextToken. Use NextToken
-// as a parameter in your next request to listQueues to receive the next page of
-// results. Cross-account permissions don't apply to this action. For more
-// information, see Grant cross-account permissions to a role and a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// be returned in the response. If you do not set MaxResults , the response
+// includes a maximum of 1,000 results. If you set MaxResults and there are
+// additional results to display, the response includes a value for NextToken . Use
+// NextToken as a parameter in your next request to listQueues to receive the next
+// page of results. Cross-account permissions don't apply to this action. For more
+// information, see Grant cross-account permissions to a role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
// in the Amazon SQS Developer Guide.
func (c *Client) ListQueues(ctx context.Context, params *ListQueuesInput, optFns ...func(*Options)) (*ListQueuesOutput, error) {
if params == nil {
@@ -39,7 +37,6 @@ func (c *Client) ListQueues(ctx context.Context, params *ListQueuesInput, optFns
return out, nil
}
-//
type ListQueuesInput struct {
// Maximum number of results to include in the response. Value range is 1 to 1000.
@@ -76,42 +73,49 @@ type ListQueuesOutput struct {
}
func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpListQueues{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpListQueues{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListQueues{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListQueues{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListQueues"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -120,9 +124,15 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueues(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -132,6 +142,9 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -229,7 +242,6 @@ func newServiceMetadataMiddleware_opListQueues(region string) *awsmiddleware.Reg
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "ListQueues",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go
index 703e04b5..aafbf945 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go
@@ -4,19 +4,19 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Deletes the messages in a queue specified by the QueueURL parameter. When you
-// use the PurgeQueue action, you can't retrieve any messages deleted from a queue.
-// The message deletion process takes up to 60 seconds. We recommend waiting for 60
-// seconds regardless of your queue's size. Messages sent to the queue before you
-// call PurgeQueue might be received but are deleted within the next minute.
-// Messages sent to the queue after you call PurgeQueue might be deleted while the
-// queue is being purged.
+// Deletes available messages in a queue (including in-flight messages) specified
+// by the QueueURL parameter. When you use the PurgeQueue action, you can't
+// retrieve any messages deleted from a queue. The message deletion process takes
+// up to 60 seconds. We recommend waiting for 60 seconds regardless of your queue's
+// size. Messages sent to the queue before you call PurgeQueue might be received
+// but are deleted within the next minute. Messages sent to the queue after you
+// call PurgeQueue might be deleted while the queue is being purged.
func (c *Client) PurgeQueue(ctx context.Context, params *PurgeQueueInput, optFns ...func(*Options)) (*PurgeQueueOutput, error) {
if params == nil {
params = &PurgeQueueInput{}
@@ -32,7 +32,6 @@ func (c *Client) PurgeQueue(ctx context.Context, params *PurgeQueueInput, optFns
return out, nil
}
-//
type PurgeQueueInput struct {
// The URL of the queue from which the PurgeQueue action deletes messages. Queue
@@ -52,42 +51,49 @@ type PurgeQueueOutput struct {
}
func (c *Client) addOperationPurgeQueueMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpPurgeQueue{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpPurgeQueue{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPurgeQueue{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpPurgeQueue{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PurgeQueue"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -96,12 +102,18 @@ func (c *Client) addOperationPurgeQueueMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpPurgeQueueValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurgeQueue(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -111,6 +123,9 @@ func (c *Client) addOperationPurgeQueueMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -118,7 +133,6 @@ func newServiceMetadataMiddleware_opPurgeQueue(region string) *awsmiddleware.Reg
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "PurgeQueue",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go
index 37726c7a..6c27d6a7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go
@@ -4,8 +4,8 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
@@ -13,43 +13,30 @@ import (
// Retrieves one or more messages (up to 10), from the specified queue. Using the
// WaitTimeSeconds parameter enables long-poll support. For more information, see
-// Amazon SQS Long Polling
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html)
+// Amazon SQS Long Polling (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html)
// in the Amazon SQS Developer Guide. Short poll is the default behavior where a
// weighted random set of machines is sampled on a ReceiveMessage call. Thus, only
// the messages on the sampled machines are returned. If the number of messages in
// the queue is small (fewer than 1,000), you most likely get fewer messages than
-// you requested per ReceiveMessage call. If the number of messages in the queue is
-// extremely small, you might not receive any messages in a particular
+// you requested per ReceiveMessage call. If the number of messages in the queue
+// is extremely small, you might not receive any messages in a particular
// ReceiveMessage response. If this happens, repeat the request. For each message
// returned, the response includes the following:
+// - The message body.
+// - An MD5 digest of the message body. For information about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt)
+// .
+// - The MessageId you received when you sent the message to the queue.
+// - The receipt handle.
+// - The message attributes.
+// - An MD5 digest of the message attributes.
//
-// * The message body.
-//
-// * An MD5
-// digest of the message body. For information about MD5, see RFC1321
-// (https://www.ietf.org/rfc/rfc1321.txt).
-//
-// * The MessageId you received when you
-// sent the message to the queue.
-//
-// * The receipt handle.
-//
-// * The message
-// attributes.
-//
-// * An MD5 digest of the message attributes.
-//
-// The receipt handle is
-// the identifier you must provide when deleting the message. For more information,
-// see Queue and Message Identifiers
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html)
+// The receipt handle is the identifier you must provide when deleting the
+// message. For more information, see Queue and Message Identifiers (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html)
// in the Amazon SQS Developer Guide. You can provide the VisibilityTimeout
// parameter in your request. The parameter is applied to the messages that Amazon
// SQS returns in the response. If you don't include the parameter, the overall
// visibility timeout for the queue is used for the returned messages. For more
-// information, see Visibility Timeout
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
+// information, see Visibility Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
// in the Amazon SQS Developer Guide. A message that isn't deleted or a message
// whose visibility isn't extended before the visibility timeout expires counts as
// a failed receive. Depending on the configuration of the queue, the message might
@@ -71,90 +58,61 @@ func (c *Client) ReceiveMessage(ctx context.Context, params *ReceiveMessageInput
return out, nil
}
-//
type ReceiveMessageInput struct {
- // The URL of the Amazon SQS queue from which messages are received. Queue URLs and
- // names are case-sensitive.
+ // The URL of the Amazon SQS queue from which messages are received. Queue URLs
+ // and names are case-sensitive.
//
// This member is required.
QueueUrl *string
// A list of attributes that need to be returned along with each message. These
// attributes include:
- //
- // * All – Returns all values.
- //
- // *
- // ApproximateFirstReceiveTimestamp – Returns the time the message was first
- // received from the queue (epoch time (http://en.wikipedia.org/wiki/Unix_time) in
- // milliseconds).
- //
- // * ApproximateReceiveCount – Returns the number of times a
- // message has been received across all queues but not deleted.
- //
- // * AWSTraceHeader –
- // Returns the X-Ray trace header string.
- //
- // * SenderId
- //
- // * For an IAM user, returns
- // the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.
- //
- // * For an IAM role, returns
- // the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.
- //
- // * SentTimestamp
- // – Returns the time the message was sent to the queue (epoch time
- // (http://en.wikipedia.org/wiki/Unix_time) in milliseconds).
- //
- // *
- // SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned
- // encryption keys. Only one server-side encryption option is supported per queue
- // (e.g. SSE-KMS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
- // or SSE-SQS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)).
- //
- // *
- // MessageDeduplicationId – Returns the value provided by the producer that calls
- // the SendMessage action.
- //
- // * MessageGroupId – Returns the value provided by the
- // producer that calls the SendMessage action. Messages with the same
- // MessageGroupId are returned in sequence.
- //
- // * SequenceNumber – Returns the value
- // provided by Amazon SQS.
+ // - All – Returns all values.
+ // - ApproximateFirstReceiveTimestamp – Returns the time the message was first
+ // received from the queue ( epoch time (http://en.wikipedia.org/wiki/Unix_time)
+ // in milliseconds).
+ // - ApproximateReceiveCount – Returns the number of times a message has been
+ // received across all queues but not deleted.
+ // - AWSTraceHeader – Returns the X-Ray trace header string.
+ // - SenderId
+ // - For a user, returns the user ID, for example ABCDEFGHI1JKLMNOPQ23R .
+ // - For an IAM role, returns the IAM role ID, for example
+ // ABCDE1F2GH3I4JK5LMNOP:i-a123b456 .
+ // - SentTimestamp – Returns the time the message was sent to the queue ( epoch
+ // time (http://en.wikipedia.org/wiki/Unix_time) in milliseconds).
+ // - SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned
+ // encryption keys. Only one server-side encryption option is supported per queue
+ // (for example, SSE-KMS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
+ // or SSE-SQS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)
+ // ).
+ // - MessageDeduplicationId – Returns the value provided by the producer that
+ // calls the SendMessage action.
+ // - MessageGroupId – Returns the value provided by the producer that calls the
+ // SendMessage action. Messages with the same MessageGroupId are returned in
+ // sequence.
+ // - SequenceNumber – Returns the value provided by Amazon SQS.
AttributeNames []types.QueueAttributeName
- // The maximum number of messages to return. Amazon SQS never returns more messages
- // than this value (however, fewer messages might be returned). Valid values: 1 to
- // 10. Default: 1.
+ // The maximum number of messages to return. Amazon SQS never returns more
+ // messages than this value (however, fewer messages might be returned). Valid
+ // values: 1 to 10. Default: 1.
MaxNumberOfMessages int32
// The name of the message attribute, where N is the index.
- //
- // * The name can contain
- // alphanumeric characters and the underscore (_), hyphen (-), and period (.).
- //
- // *
- // The name is case-sensitive and must be unique among all attribute names for the
- // message.
- //
- // * The name must not start with AWS-reserved prefixes such as AWS. or
- // Amazon. (or any casing variants).
- //
- // * The name must not start or end with a
- // period (.), and it should not have periods in succession (..).
- //
- // * The name can
- // be up to 256 characters long.
- //
- // When using ReceiveMessage, you can send a list of
- // attribute names to receive, or you can return all of the attributes by
- // specifying All or . in your request. You can also use all message attributes
- // starting with a prefix, for example bar..
+ // - The name can contain alphanumeric characters and the underscore ( _ ),
+ // hyphen ( - ), and period ( . ).
+ // - The name is case-sensitive and must be unique among all attribute names for
+ // the message.
+ // - The name must not start with AWS-reserved prefixes such as AWS. or Amazon.
+ // (or any casing variants).
+ // - The name must not start or end with a period ( . ), and it should not have
+ // periods in succession ( .. ).
+ // - The name can be up to 256 characters long.
+ // When using ReceiveMessage , you can send a list of attribute names to receive,
+ // or you can return all of the attributes by specifying All or .* in your
+ // request. You can also use all message attributes starting with a prefix, for
+ // example bar.* .
MessageAttributeNames []string
// This parameter applies only to FIFO (first-in-first-out) queues. The token used
@@ -163,53 +121,39 @@ type ReceiveMessageInput struct {
// is possible to retry the same action with an identical ReceiveRequestAttemptId
// to retrieve the same set of messages, even if their visibility timeout has not
// yet expired.
- //
- // * You can use ReceiveRequestAttemptId only for 5 minutes after a
- // ReceiveMessage action.
- //
- // * When you set FifoQueue, a caller of the ReceiveMessage
- // action can provide a ReceiveRequestAttemptId explicitly.
- //
- // * If a caller of the
- // ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS
- // generates a ReceiveRequestAttemptId.
- //
- // * It is possible to retry the
- // ReceiveMessage action with the same ReceiveRequestAttemptId if none of the
- // messages have been modified (deleted or had their visibility changes).
- //
- // * During
- // a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId
- // return the same messages and receipt handles. If a retry occurs within the
- // deduplication interval, it resets the visibility timeout. For more information,
- // see Visibility Timeout
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
- // in the Amazon SQS Developer Guide. If a caller of the ReceiveMessage action
- // still processes messages when the visibility timeout expires and messages become
- // visible, another worker consuming from the same queue can receive the same
- // messages and therefore process duplicates. Also, if a consumer whose message
- // processing time is longer than the visibility timeout tries to delete the
- // processed messages, the action fails with an error. To mitigate this effect,
- // ensure that your application observes a safe threshold before the visibility
- // timeout expires and extend the visibility timeout as necessary.
- //
- // * While
- // messages with a particular MessageGroupId are invisible, no more messages
- // belonging to the same MessageGroupId are returned until the visibility timeout
- // expires. You can still receive messages with another MessageGroupId as long as
- // it is also visible.
- //
- // * If a caller of ReceiveMessage can't track the
- // ReceiveRequestAttemptId, no retries work until the original visibility timeout
- // expires. As a result, delays might occur but the messages in the queue remain in
- // a strict order.
- //
- // The maximum length of ReceiveRequestAttemptId is 128
- // characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z,
- // A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices
- // of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request
- // Parameter
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html)
+ // - You can use ReceiveRequestAttemptId only for 5 minutes after a
+ // ReceiveMessage action.
+ // - When you set FifoQueue , a caller of the ReceiveMessage action can provide a
+ // ReceiveRequestAttemptId explicitly.
+ // - If a caller of the ReceiveMessage action doesn't provide a
+ // ReceiveRequestAttemptId , Amazon SQS generates a ReceiveRequestAttemptId .
+ // - It is possible to retry the ReceiveMessage action with the same
+ // ReceiveRequestAttemptId if none of the messages have been modified (deleted or
+ // had their visibility changes).
+ // - During a visibility timeout, subsequent calls with the same
+ // ReceiveRequestAttemptId return the same messages and receipt handles. If a
+ // retry occurs within the deduplication interval, it resets the visibility
+ // timeout. For more information, see Visibility Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
+ // in the Amazon SQS Developer Guide. If a caller of the ReceiveMessage action
+ // still processes messages when the visibility timeout expires and messages become
+ // visible, another worker consuming from the same queue can receive the same
+ // messages and therefore process duplicates. Also, if a consumer whose message
+ // processing time is longer than the visibility timeout tries to delete the
+ // processed messages, the action fails with an error. To mitigate this effect,
+ // ensure that your application observes a safe threshold before the visibility
+ // timeout expires and extend the visibility timeout as necessary.
+ // - While messages with a particular MessageGroupId are invisible, no more
+ // messages belonging to the same MessageGroupId are returned until the
+ // visibility timeout expires. You can still receive messages with another
+ // MessageGroupId as long as it is also visible.
+ // - If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId , no
+ // retries work until the original visibility timeout expires. As a result, delays
+ // might occur but the messages in the queue remain in a strict order.
+ // The maximum length of ReceiveRequestAttemptId is 128 characters.
+ // ReceiveRequestAttemptId can contain alphanumeric characters ( a-z , A-Z , 0-9 )
+ // and punctuation ( !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ). For best practices of
+ // using ReceiveRequestAttemptId , see Using the ReceiveRequestAttemptId Request
+ // Parameter (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html)
// in the Amazon SQS Developer Guide.
ReceiveRequestAttemptId *string
@@ -219,14 +163,12 @@ type ReceiveMessageInput struct {
// The duration (in seconds) for which the call waits for a message to arrive in
// the queue before returning. If a message is available, the call returns sooner
- // than WaitTimeSeconds. If no messages are available and the wait time expires,
+ // than WaitTimeSeconds . If no messages are available and the wait time expires,
// the call returns successfully with an empty list of messages. To avoid HTTP
// errors, ensure that the HTTP response timeout for ReceiveMessage requests is
// longer than the WaitTimeSeconds parameter. For example, with the Java SDK, you
- // can set HTTP transport settings using the NettyNioAsyncHttpClient
- // (https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html)
- // for asynchronous clients, or the ApacheHttpClient
- // (https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html)
+ // can set HTTP transport settings using the NettyNioAsyncHttpClient (https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html)
+ // for asynchronous clients, or the ApacheHttpClient (https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html)
// for synchronous clients.
WaitTimeSeconds int32
@@ -246,42 +188,49 @@ type ReceiveMessageOutput struct {
}
func (c *Client) addOperationReceiveMessageMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpReceiveMessage{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpReceiveMessage{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpReceiveMessage{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpReceiveMessage{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ReceiveMessage"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -290,12 +239,21 @@ func (c *Client) addOperationReceiveMessageMiddlewares(stack *middleware.Stack,
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addValidateReceiveMessageChecksum(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpReceiveMessageValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReceiveMessage(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -305,6 +263,9 @@ func (c *Client) addOperationReceiveMessageMiddlewares(stack *middleware.Stack,
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -312,7 +273,6 @@ func newServiceMetadataMiddleware_opReceiveMessage(region string) *awsmiddleware
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "ReceiveMessage",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go
index 62733564..8bf0fe6a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go
@@ -4,26 +4,21 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Revokes any permissions in the queue policy that matches the specified Label
// parameter.
-//
-// * Only the owner of a queue can remove permissions from it.
-//
-// *
-// Cross-account permissions don't apply to this action. For more information, see
-// Grant cross-account permissions to a role and a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
-// in the Amazon SQS Developer Guide.
-//
-// * To remove the ability to change queue
-// permissions, you must deny permission to the AddPermission, RemovePermission,
-// and SetQueueAttributes actions in your IAM policy.
+// - Only the owner of a queue can remove permissions from it.
+// - Cross-account permissions don't apply to this action. For more information,
+// see Grant cross-account permissions to a role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// in the Amazon SQS Developer Guide.
+// - To remove the ability to change queue permissions, you must deny permission
+// to the AddPermission , RemovePermission , and SetQueueAttributes actions in
+// your IAM policy.
func (c *Client) RemovePermission(ctx context.Context, params *RemovePermissionInput, optFns ...func(*Options)) (*RemovePermissionOutput, error) {
if params == nil {
params = &RemovePermissionInput{}
@@ -39,7 +34,6 @@ func (c *Client) RemovePermission(ctx context.Context, params *RemovePermissionI
return out, nil
}
-//
type RemovePermissionInput struct {
// The identification of the permission to remove. This is the label added using
@@ -65,42 +59,49 @@ type RemovePermissionOutput struct {
}
func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpRemovePermission{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpRemovePermission{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemovePermission{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpRemovePermission{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RemovePermission"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -109,12 +110,18 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpRemovePermissionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemovePermission(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -124,6 +131,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -131,7 +141,6 @@ func newServiceMetadataMiddleware_opRemovePermission(region string) *awsmiddlewa
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "RemovePermission",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go
index c96fe9b2..4dffc501 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go
@@ -4,18 +4,18 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Delivers a message to the specified queue. A message can include only XML, JSON,
-// and unformatted text. The following Unicode characters are allowed: #x9 | #xA |
-// #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF Any characters not
-// included in this list will be rejected. For more information, see the W3C
-// specification for characters (http://www.w3.org/TR/REC-xml/#charsets).
+// Delivers a message to the specified queue. A message can include only XML,
+// JSON, and unformatted text. The following Unicode characters are allowed: #x9 |
+// #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF Any
+// characters not included in this list will be rejected. For more information, see
+// the W3C specification for characters (http://www.w3.org/TR/REC-xml/#charsets) .
func (c *Client) SendMessage(ctx context.Context, params *SendMessageInput, optFns ...func(*Options)) (*SendMessageOutput, error) {
if params == nil {
params = &SendMessageInput{}
@@ -31,21 +31,20 @@ func (c *Client) SendMessage(ctx context.Context, params *SendMessageInput, optF
return out, nil
}
-//
type SendMessageInput struct {
// The message to send. The minimum size is one character. The maximum size is 256
- // KB. A message can include only XML, JSON, and unformatted text. The following
+ // KiB. A message can include only XML, JSON, and unformatted text. The following
// Unicode characters are allowed: #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to
// #xFFFD | #x10000 to #x10FFFF Any characters not included in this list will be
- // rejected. For more information, see the W3C specification for characters
- // (http://www.w3.org/TR/REC-xml/#charsets).
+ // rejected. For more information, see the W3C specification for characters (http://www.w3.org/TR/REC-xml/#charsets)
+ // .
//
// This member is required.
MessageBody *string
- // The URL of the Amazon SQS queue to which a message is sent. Queue URLs and names
- // are case-sensitive.
+ // The URL of the Amazon SQS queue to which a message is sent. Queue URLs and
+ // names are case-sensitive.
//
// This member is required.
QueueUrl *string
@@ -54,13 +53,12 @@ type SendMessageInput struct {
// values: 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds
// value become available for processing after the delay period is finished. If you
// don't specify a value, the default value for the queue applies. When you set
- // FifoQueue, you can't set DelaySeconds per message. You can set this parameter
+ // FifoQueue , you can't set DelaySeconds per message. You can set this parameter
// only on a queue level.
DelaySeconds int32
- // Each message attribute consists of a Name, Type, and Value. For more
- // information, see Amazon SQS message attributes
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
+ // Each message attribute consists of a Name , Type , and Value . For more
+ // information, see Amazon SQS message attributes (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
// in the Amazon SQS Developer Guide.
MessageAttributes map[string]types.MessageAttributeValue
@@ -68,51 +66,36 @@ type SendMessageInput struct {
// for deduplication of sent messages. If a message with a particular
// MessageDeduplicationId is sent successfully, any messages sent with the same
// MessageDeduplicationId are accepted successfully but aren't delivered during the
- // 5-minute deduplication interval. For more information, see Exactly-once
- // processing
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
+ // 5-minute deduplication interval. For more information, see Exactly-once
+ // processing (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
// in the Amazon SQS Developer Guide.
- //
- // * Every message must have a unique
- // MessageDeduplicationId,
- //
- // * You may provide a MessageDeduplicationId
- // explicitly.
- //
- // * If you aren't able to provide a MessageDeduplicationId and you
- // enable ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash
- // to generate the MessageDeduplicationId using the body of the message (but not
- // the attributes of the message).
- //
- // * If you don't provide a MessageDeduplicationId
- // and the queue doesn't have ContentBasedDeduplication set, the action fails with
- // an error.
- //
- // * If the queue has ContentBasedDeduplication set, your
- // MessageDeduplicationId overrides the generated one.
- //
- // * When
- // ContentBasedDeduplication is in effect, messages with identical content sent
- // within the deduplication interval are treated as duplicates and only one copy of
- // the message is delivered.
- //
- // * If you send one message with
- // ContentBasedDeduplication enabled and then another message with a
- // MessageDeduplicationId that is the same as the one generated for the first
- // MessageDeduplicationId, the two messages are treated as duplicates and only one
- // copy of the message is delivered.
- //
- // The MessageDeduplicationId is available to
- // the consumer of the message (this can be useful for troubleshooting delivery
- // issues). If a message is sent successfully but the acknowledgement is lost and
- // the message is resent with the same MessageDeduplicationId after the
- // deduplication interval, Amazon SQS can't detect duplicate messages. Amazon SQS
- // continues to keep track of the message deduplication ID even after the message
- // is received and deleted. The maximum length of MessageDeduplicationId is 128
- // characters. MessageDeduplicationId can contain alphanumeric characters (a-z,
- // A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices
- // of using MessageDeduplicationId, see Using the MessageDeduplicationId Property
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html)
+ // - Every message must have a unique MessageDeduplicationId ,
+ // - You may provide a MessageDeduplicationId explicitly.
+ // - If you aren't able to provide a MessageDeduplicationId and you enable
+ // ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to
+ // generate the MessageDeduplicationId using the body of the message (but not the
+ // attributes of the message).
+ // - If you don't provide a MessageDeduplicationId and the queue doesn't have
+ // ContentBasedDeduplication set, the action fails with an error.
+ // - If the queue has ContentBasedDeduplication set, your MessageDeduplicationId
+ // overrides the generated one.
+ // - When ContentBasedDeduplication is in effect, messages with identical content
+ // sent within the deduplication interval are treated as duplicates and only one
+ // copy of the message is delivered.
+ // - If you send one message with ContentBasedDeduplication enabled and then
+ // another message with a MessageDeduplicationId that is the same as the one
+ // generated for the first MessageDeduplicationId , the two messages are treated
+ // as duplicates and only one copy of the message is delivered.
+ // The MessageDeduplicationId is available to the consumer of the message (this
+ // can be useful for troubleshooting delivery issues). If a message is sent
+ // successfully but the acknowledgement is lost and the message is resent with the
+ // same MessageDeduplicationId after the deduplication interval, Amazon SQS can't
+ // detect duplicate messages. Amazon SQS continues to keep track of the message
+ // deduplication ID even after the message is received and deleted. The maximum
+ // length of MessageDeduplicationId is 128 characters. MessageDeduplicationId can
+ // contain alphanumeric characters ( a-z , A-Z , 0-9 ) and punctuation (
+ // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ). For best practices of using
+ // MessageDeduplicationId , see Using the MessageDeduplicationId Property (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html)
// in the Amazon SQS Developer Guide.
MessageDeduplicationId *string
@@ -124,33 +107,25 @@ type SendMessageInput struct {
// values (for example, session data for multiple users). In this scenario,
// multiple consumers can process the queue, but the session data of each user is
// processed in a FIFO fashion.
- //
- // * You must associate a non-empty MessageGroupId
- // with a message. If you don't provide a MessageGroupId, the action fails.
- //
- // *
- // ReceiveMessage might return messages with multiple MessageGroupId values. For
- // each MessageGroupId, the messages are sorted by time sent. The caller can't
- // specify a MessageGroupId.
- //
- // The length of MessageGroupId is 128 characters. Valid
- // values: alphanumeric characters and punctuation
- // (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using MessageGroupId,
- // see Using the MessageGroupId Property
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html)
+ // - You must associate a non-empty MessageGroupId with a message. If you don't
+ // provide a MessageGroupId , the action fails.
+ // - ReceiveMessage might return messages with multiple MessageGroupId values.
+ // For each MessageGroupId , the messages are sorted by time sent. The caller
+ // can't specify a MessageGroupId .
+ // The length of MessageGroupId is 128 characters. Valid values: alphanumeric
+ // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) . For best
+ // practices of using MessageGroupId , see Using the MessageGroupId Property (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html)
// in the Amazon SQS Developer Guide. MessageGroupId is required for FIFO queues.
// You can't use it for Standard queues.
MessageGroupId *string
// The message system attribute to send. Each message system attribute consists of
- // a Name, Type, and Value.
- //
- // * Currently, the only supported message system
- // attribute is AWSTraceHeader. Its type must be String and its value must be a
- // correctly formatted X-Ray trace header string.
- //
- // * The size of a message system
- // attribute doesn't count towards the total size of a message.
+ // a Name , Type , and Value .
+ // - Currently, the only supported message system attribute is AWSTraceHeader .
+ // Its type must be String and its value must be a correctly formatted X-Ray
+ // trace header string.
+ // - The size of a message system attribute doesn't count towards the total size
+ // of a message.
MessageSystemAttributes map[string]types.MessageSystemAttributeValue
noSmithyDocumentSerde
@@ -162,13 +137,13 @@ type SendMessageOutput struct {
// An MD5 digest of the non-URL-encoded message attribute string. You can use this
// attribute to verify that Amazon SQS received the message correctly. Amazon SQS
// URL-decodes the message before creating the MD5 digest. For information about
- // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).
+ // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt) .
MD5OfMessageAttributes *string
// An MD5 digest of the non-URL-encoded message body string. You can use this
// attribute to verify that Amazon SQS received the message correctly. Amazon SQS
// URL-decodes the message before creating the MD5 digest. For information about
- // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).
+ // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt) .
MD5OfMessageBody *string
// An MD5 digest of the non-URL-encoded message system attribute string. You can
@@ -176,16 +151,15 @@ type SendMessageOutput struct {
// Amazon SQS URL-decodes the message before creating the MD5 digest.
MD5OfMessageSystemAttributes *string
- // An attribute containing the MessageId of the message sent to the queue. For more
- // information, see Queue and Message Identifiers
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html)
+ // An attribute containing the MessageId of the message sent to the queue. For
+ // more information, see Queue and Message Identifiers (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html)
// in the Amazon SQS Developer Guide.
MessageId *string
// This parameter applies only to FIFO (first-in-first-out) queues. The large,
// non-consecutive number that Amazon SQS assigns to each message. The length of
// SequenceNumber is 128 bits. SequenceNumber continues to increase for a
- // particular MessageGroupId.
+ // particular MessageGroupId .
SequenceNumber *string
// Metadata pertaining to the operation's result.
@@ -195,42 +169,49 @@ type SendMessageOutput struct {
}
func (c *Client) addOperationSendMessageMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpSendMessage{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpSendMessage{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendMessage{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSendMessage{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "SendMessage"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -239,12 +220,21 @@ func (c *Client) addOperationSendMessageMiddlewares(stack *middleware.Stack, opt
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addValidateSendMessageChecksum(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpSendMessageValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendMessage(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -254,6 +244,9 @@ func (c *Client) addOperationSendMessageMiddlewares(stack *middleware.Stack, opt
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -261,7 +254,6 @@ func newServiceMetadataMiddleware_opSendMessage(region string) *awsmiddleware.Re
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "SendMessage",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go
index eec3a925..3323bfe0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go
@@ -4,32 +4,29 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Delivers up to ten messages to the specified queue. This is a batch version of
-// SendMessage. For a FIFO queue, multiple messages within a single batch are
-// enqueued in the order they are sent. The result of sending each message is
-// reported individually in the response. Because the batch request can result in a
-// combination of successful and unsuccessful actions, you should check for batch
-// errors even when the call returns an HTTP status code of 200. The maximum
-// allowed individual message size and the maximum total payload size (the sum of
-// the individual lengths of all of the batched messages) are both 256 KB (262,144
-// bytes). A message can include only XML, JSON, and unformatted text. The
-// following Unicode characters are allowed: #x9 | #xA | #xD | #x20 to #xD7FF |
-// #xE000 to #xFFFD | #x10000 to #x10FFFF Any characters not included in this list
-// will be rejected. For more information, see the W3C specification for characters
-// (http://www.w3.org/TR/REC-xml/#charsets). If you don't specify the DelaySeconds
-// parameter for an entry, Amazon SQS uses the default value for the queue. Some
-// actions take lists of parameters. These lists are specified using the param.n
-// notation. Values of n are integers starting from 1. For example, a parameter
-// list with two elements looks like this: &AttributeName.1=first
-//
-// &AttributeName.2=second
+// You can use SendMessageBatch to send up to 10 messages to the specified queue
+// by assigning either identical or different values to each message (or by not
+// assigning values at all). This is a batch version of SendMessage . For a FIFO
+// queue, multiple messages within a single batch are enqueued in the order they
+// are sent. The result of sending each message is reported individually in the
+// response. Because the batch request can result in a combination of successful
+// and unsuccessful actions, you should check for batch errors even when the call
+// returns an HTTP status code of 200 . The maximum allowed individual message size
+// and the maximum total payload size (the sum of the individual lengths of all of
+// the batched messages) are both 256 KiB (262,144 bytes). A message can include
+// only XML, JSON, and unformatted text. The following Unicode characters are
+// allowed: #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to
+// #x10FFFF Any characters not included in this list will be rejected. For more
+// information, see the W3C specification for characters (http://www.w3.org/TR/REC-xml/#charsets)
+// . If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses
+// the default value for the queue.
func (c *Client) SendMessageBatch(ctx context.Context, params *SendMessageBatchInput, optFns ...func(*Options)) (*SendMessageBatchOutput, error) {
if params == nil {
params = &SendMessageBatchInput{}
@@ -45,7 +42,6 @@ func (c *Client) SendMessageBatch(ctx context.Context, params *SendMessageBatchI
return out, nil
}
-//
type SendMessageBatchInput struct {
// A list of SendMessageBatchRequestEntry items.
@@ -67,8 +63,8 @@ type SendMessageBatchInput struct {
// BatchResultErrorEntry tag if the message fails.
type SendMessageBatchOutput struct {
- // A list of BatchResultErrorEntry items with error details about each message that
- // can't be enqueued.
+ // A list of BatchResultErrorEntry items with error details about each message
+ // that can't be enqueued.
//
// This member is required.
Failed []types.BatchResultErrorEntry
@@ -85,42 +81,49 @@ type SendMessageBatchOutput struct {
}
func (c *Client) addOperationSendMessageBatchMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpSendMessageBatch{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpSendMessageBatch{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendMessageBatch{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSendMessageBatch{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "SendMessageBatch"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -129,12 +132,21 @@ func (c *Client) addOperationSendMessageBatchMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addValidateSendMessageBatchChecksum(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpSendMessageBatchValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendMessageBatch(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -144,6 +156,9 @@ func (c *Client) addOperationSendMessageBatchMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -151,7 +166,6 @@ func newServiceMetadataMiddleware_opSendMessageBatch(region string) *awsmiddlewa
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "SendMessageBatch",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go
index 95b58905..7700ca72 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go
@@ -4,8 +4,8 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
@@ -13,21 +13,19 @@ import (
// Sets the value of one or more queue attributes. When you change a queue's
// attributes, the change can take up to 60 seconds for most of the attributes to
// propagate throughout the Amazon SQS system. Changes made to the
-// MessageRetentionPeriod attribute can take up to 15 minutes.
-//
-// * In the future,
-// new attributes might be added. If you write code that calls this action, we
-// recommend that you structure your code so that it can handle new attributes
-// gracefully.
-//
-// * Cross-account permissions don't apply to this action. For more
-// information, see Grant cross-account permissions to a role and a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
-// in the Amazon SQS Developer Guide.
-//
-// * To remove the ability to change queue
-// permissions, you must deny permission to the AddPermission, RemovePermission,
-// and SetQueueAttributes actions in your IAM policy.
+// MessageRetentionPeriod attribute can take up to 15 minutes and will impact
+// existing messages in the queue potentially causing them to be expired and
+// deleted if the MessageRetentionPeriod is reduced below the age of existing
+// messages.
+// - In the future, new attributes might be added. If you write code that calls
+// this action, we recommend that you structure your code so that it can handle new
+// attributes gracefully.
+// - Cross-account permissions don't apply to this action. For more information,
+// see Grant cross-account permissions to a role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// in the Amazon SQS Developer Guide.
+// - To remove the ability to change queue permissions, you must deny permission
+// to the AddPermission , RemovePermission , and SetQueueAttributes actions in
+// your IAM policy.
func (c *Client) SetQueueAttributes(ctx context.Context, params *SetQueueAttributesInput, optFns ...func(*Options)) (*SetQueueAttributesOutput, error) {
if params == nil {
params = &SetQueueAttributesInput{}
@@ -43,162 +41,124 @@ func (c *Client) SetQueueAttributes(ctx context.Context, params *SetQueueAttribu
return out, nil
}
-//
type SetQueueAttributesInput struct {
// A map of attributes to set. The following lists the names, descriptions, and
// values of the special request parameters that the SetQueueAttributes action
// uses:
- //
- // * DelaySeconds – The length of time, in seconds, for which the delivery
- // of all messages in the queue is delayed. Valid values: An integer from 0 to 900
- // (15 minutes). Default: 0.
- //
- // * MaximumMessageSize – The limit of how many bytes a
- // message can contain before Amazon SQS rejects it. Valid values: An integer from
- // 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256
- // KiB).
- //
- // * MessageRetentionPeriod – The length of time, in seconds, for which
- // Amazon SQS retains a message. Valid values: An integer representing seconds,
- // from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days).
- //
- // * Policy
- // – The queue's policy. A valid Amazon Web Services policy. For more information
- // about policy structure, see Overview of Amazon Web Services IAM Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) in the
- // Identity and Access Management User Guide.
- //
- // * ReceiveMessageWaitTimeSeconds –
- // The length of time, in seconds, for which a ReceiveMessage action waits for a
- // message to arrive. Valid values: An integer from 0 to 20 (seconds). Default:
- // 0.
- //
- // * RedrivePolicy – The string that includes the parameters for the
- // dead-letter queue functionality of the source queue as a JSON object. For more
- // information about the redrive policy and dead-letter queues, see Using Amazon
- // SQS Dead-Letter Queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
- // in the Amazon SQS Developer Guide.
- //
- // * deadLetterTargetArn – The Amazon Resource
- // Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the
- // value of maxReceiveCount is exceeded.
- //
- // * maxReceiveCount – The number of times a
- // message is delivered to the source queue before being moved to the dead-letter
- // queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a
- // queue, Amazon SQS moves the message to the dead-letter-queue.
- //
- // The dead-letter
- // queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter
- // queue of a standard queue must also be a standard queue.
- //
- // * VisibilityTimeout –
- // The visibility timeout for the queue, in seconds. Valid values: An integer from
- // 0 to 43,200 (12 hours). Default: 30. For more information about the visibility
- // timeout, see Visibility Timeout
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
- // in the Amazon SQS Developer Guide.
- //
- // The following attributes apply only to
- // server-side-encryption
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html):
- //
- // *
- // KmsMasterKeyId – The ID of an Amazon Web Services managed customer master key
- // (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms).
- // While the alias of the AWS-managed CMK for Amazon SQS is always alias/aws/sqs,
- // the alias of a custom CMK can, for example, be alias/MyAlias . For more
- // examples, see KeyId
- // (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters)
- // in the Key Management Service API Reference.
- //
- // * KmsDataKeyReusePeriodSeconds –
- // The length of time, in seconds, for which Amazon SQS can reuse a data key
- // (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys)
- // to encrypt or decrypt messages before calling KMS again. An integer representing
- // seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default:
- // 300 (5 minutes). A shorter time period provides better security but results in
- // more calls to KMS which might incur charges after Free Tier. For more
- // information, see How Does the Data Key Reuse Period Work?
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work).
- //
- // *
- // SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned
- // encryption keys. Only one server-side encryption option is supported per queue
- // (e.g. SSE-KMS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
- // or SSE-SQS
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)).
- //
- // The
- // following attribute applies only to FIFO (first-in-first-out) queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html):
- //
- // *
- // ContentBasedDeduplication – Enables content-based deduplication. For more
- // information, see Exactly-once processing
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
- // in the Amazon SQS Developer Guide. Note the following:
- //
- // * Every message must
- // have a unique MessageDeduplicationId.
- //
- // * You may provide a
- // MessageDeduplicationId explicitly.
- //
- // * If you aren't able to provide a
- // MessageDeduplicationId and you enable ContentBasedDeduplication for your queue,
- // Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId using the
- // body of the message (but not the attributes of the message).
- //
- // * If you don't
- // provide a MessageDeduplicationId and the queue doesn't have
- // ContentBasedDeduplication set, the action fails with an error.
- //
- // * If the queue
- // has ContentBasedDeduplication set, your MessageDeduplicationId overrides the
- // generated one.
- //
- // * When ContentBasedDeduplication is in effect, messages with
- // identical content sent within the deduplication interval are treated as
- // duplicates and only one copy of the message is delivered.
- //
- // * If you send one
- // message with ContentBasedDeduplication enabled and then another message with a
- // MessageDeduplicationId that is the same as the one generated for the first
- // MessageDeduplicationId, the two messages are treated as duplicates and only one
- // copy of the message is delivered.
- //
- // The following attributes apply only to high
- // throughput for FIFO queues
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html):
- //
- // *
- // DeduplicationScope – Specifies whether message deduplication occurs at the
- // message group or queue level. Valid values are messageGroup and queue.
- //
- // *
- // FifoThroughputLimit – Specifies whether the FIFO queue throughput quota applies
- // to the entire queue or per message group. Valid values are perQueue and
- // perMessageGroupId. The perMessageGroupId value is allowed only when the value
- // for DeduplicationScope is messageGroup.
- //
- // To enable high throughput for FIFO
- // queues, do the following:
- //
- // * Set DeduplicationScope to messageGroup.
- //
- // * Set
- // FifoThroughputLimit to perMessageGroupId.
- //
- // If you set these attributes to
- // anything other than the values shown for enabling high throughput, normal
- // throughput is in effect and deduplication occurs as specified. For information
- // on throughput quotas, see Quotas related to messages
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html)
+ // - DelaySeconds – The length of time, in seconds, for which the delivery of all
+ // messages in the queue is delayed. Valid values: An integer from 0 to 900 (15
+ // minutes). Default: 0.
+ // - MaximumMessageSize – The limit of how many bytes a message can contain
+ // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB)
+ // up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).
+ // - MessageRetentionPeriod – The length of time, in seconds, for which Amazon
+ // SQS retains a message. Valid values: An integer representing seconds, from 60 (1
+ // minute) to 1,209,600 (14 days). Default: 345,600 (4 days). When you change a
+ // queue's attributes, the change can take up to 60 seconds for most of the
+ // attributes to propagate throughout the Amazon SQS system. Changes made to the
+ // MessageRetentionPeriod attribute can take up to 15 minutes and will impact
+ // existing messages in the queue potentially causing them to be expired and
+ // deleted if the MessageRetentionPeriod is reduced below the age of existing
+ // messages.
+ // - Policy – The queue's policy. A valid Amazon Web Services policy. For more
+ // information about policy structure, see Overview of Amazon Web Services IAM
+ // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html)
+ // in the Identity and Access Management User Guide.
+ // - ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for which a
+ // ReceiveMessage action waits for a message to arrive. Valid values: An integer
+ // from 0 to 20 (seconds). Default: 0.
+ // - VisibilityTimeout – The visibility timeout for the queue, in seconds. Valid
+ // values: An integer from 0 to 43,200 (12 hours). Default: 30. For more
+ // information about the visibility timeout, see Visibility Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
+ // in the Amazon SQS Developer Guide.
+ // The following attributes apply only to dead-letter queues: (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+ // - RedrivePolicy – The string that includes the parameters for the dead-letter
+ // queue functionality of the source queue as a JSON object. The parameters are as
+ // follows:
+ // - deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter
+ // queue to which Amazon SQS moves messages after the value of maxReceiveCount is
+ // exceeded.
+ // - maxReceiveCount – The number of times a message is delivered to the source
+ // queue before being moved to the dead-letter queue. Default: 10. When the
+ // ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS
+ // moves the message to the dead-letter-queue.
+ // - RedriveAllowPolicy – The string that includes the parameters for the
+ // permissions for the dead-letter queue redrive permission and which source queues
+ // can specify dead-letter queues as a JSON object. The parameters are as follows:
+ // - redrivePermission – The permission type that defines which source queues can
+ // specify the current queue as the dead-letter queue. Valid values are:
+ // - allowAll – (Default) Any source queues in this Amazon Web Services account
+ // in the same Region can specify this queue as the dead-letter queue.
+ // - denyAll – No source queues can specify this queue as the dead-letter queue.
+ // - byQueue – Only queues specified by the sourceQueueArns parameter can specify
+ // this queue as the dead-letter queue.
+ // - sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that
+ // can specify this queue as the dead-letter queue and redrive messages. You can
+ // specify this parameter only when the redrivePermission parameter is set to
+ // byQueue . You can specify up to 10 source queue ARNs. To allow more than 10
+ // source queues to specify dead-letter queues, set the redrivePermission
+ // parameter to allowAll .
+ // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the
+ // dead-letter queue of a standard queue must also be a standard queue. The
+ // following attributes apply only to server-side-encryption (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html)
+ // :
+ // - KmsMasterKeyId – The ID of an Amazon Web Services managed customer master
+ // key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms)
+ // . While the alias of the AWS-managed CMK for Amazon SQS is always
+ // alias/aws/sqs , the alias of a custom CMK can, for example, be alias/MyAlias
+ // . For more examples, see KeyId (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters)
+ // in the Key Management Service API Reference.
+ // - KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for which
+ // Amazon SQS can reuse a data key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys)
+ // to encrypt or decrypt messages before calling KMS again. An integer representing
+ // seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default:
+ // 300 (5 minutes). A shorter time period provides better security but results in
+ // more calls to KMS which might incur charges after Free Tier. For more
+ // information, see How Does the Data Key Reuse Period Work? (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work)
+ // .
+ // - SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned
+ // encryption keys. Only one server-side encryption option is supported per queue
+ // (for example, SSE-KMS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html)
+ // or SSE-SQS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)
+ // ).
+ // The following attribute applies only to FIFO (first-in-first-out) queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html)
+ // :
+ // - ContentBasedDeduplication – Enables content-based deduplication. For more
+ // information, see Exactly-once processing (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
+ // in the Amazon SQS Developer Guide. Note the following:
+ // - Every message must have a unique MessageDeduplicationId .
+ // - You may provide a MessageDeduplicationId explicitly.
+ // - If you aren't able to provide a MessageDeduplicationId and you enable
+ // ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to
+ // generate the MessageDeduplicationId using the body of the message (but not the
+ // attributes of the message).
+ // - If you don't provide a MessageDeduplicationId and the queue doesn't have
+ // ContentBasedDeduplication set, the action fails with an error.
+ // - If the queue has ContentBasedDeduplication set, your MessageDeduplicationId
+ // overrides the generated one.
+ // - When ContentBasedDeduplication is in effect, messages with identical content
+ // sent within the deduplication interval are treated as duplicates and only one
+ // copy of the message is delivered.
+ // - If you send one message with ContentBasedDeduplication enabled and then
+ // another message with a MessageDeduplicationId that is the same as the one
+ // generated for the first MessageDeduplicationId , the two messages are treated
+ // as duplicates and only one copy of the message is delivered.
+ // The following attributes apply only to high throughput for FIFO queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html)
+ // :
+ // - DeduplicationScope – Specifies whether message deduplication occurs at the
+ // message group or queue level. Valid values are messageGroup and queue .
+ // - FifoThroughputLimit – Specifies whether the FIFO queue throughput quota
+ // applies to the entire queue or per message group. Valid values are perQueue
+ // and perMessageGroupId . The perMessageGroupId value is allowed only when the
+ // value for DeduplicationScope is messageGroup .
+ // To enable high throughput for FIFO queues, do the following:
+ // - Set DeduplicationScope to messageGroup .
+ // - Set FifoThroughputLimit to perMessageGroupId .
+ // If you set these attributes to anything other than the values shown for
+ // enabling high throughput, normal throughput is in effect and deduplication
+ // occurs as specified. For information on throughput quotas, see Quotas related
+ // to messages (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html)
// in the Amazon SQS Developer Guide.
//
// This member is required.
@@ -221,42 +181,49 @@ type SetQueueAttributesOutput struct {
}
func (c *Client) addOperationSetQueueAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpSetQueueAttributes{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpSetQueueAttributes{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetQueueAttributes{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSetQueueAttributes{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "SetQueueAttributes"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -265,12 +232,18 @@ func (c *Client) addOperationSetQueueAttributesMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpSetQueueAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetQueueAttributes(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -280,6 +253,9 @@ func (c *Client) addOperationSetQueueAttributesMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -287,7 +263,6 @@ func newServiceMetadataMiddleware_opSetQueueAttributes(region string) *awsmiddle
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "SetQueueAttributes",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_StartMessageMoveTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_StartMessageMoveTask.go
new file mode 100644
index 00000000..9acd8457
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_StartMessageMoveTask.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sqs
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Starts an asynchronous task to move messages from a specified source queue to a
+// specified destination queue.
+// - This action is currently limited to supporting message redrive from queues
+// that are configured as dead-letter queues (DLQs) (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+// of other Amazon SQS queues only. Non-SQS queue sources of dead-letter queues,
+// such as Lambda or Amazon SNS topics, are currently not supported.
+// - In dead-letter queues redrive context, the StartMessageMoveTask the source
+// queue is the DLQ, while the destination queue can be the original source queue
+// (from which the messages were driven to the dead-letter-queue), or a custom
+// destination queue.
+// - Currently, only standard queues support redrive. FIFO queues don't support
+// redrive.
+// - Only one active message movement task is supported per queue at any given
+// time.
+func (c *Client) StartMessageMoveTask(ctx context.Context, params *StartMessageMoveTaskInput, optFns ...func(*Options)) (*StartMessageMoveTaskOutput, error) {
+ if params == nil {
+ params = &StartMessageMoveTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StartMessageMoveTask", params, optFns, c.addOperationStartMessageMoveTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StartMessageMoveTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StartMessageMoveTaskInput struct {
+
+ // The ARN of the queue that contains the messages to be moved to another queue.
+ // Currently, only ARNs of dead-letter queues (DLQs) whose sources are other Amazon
+ // SQS queues are accepted. DLQs whose sources are non-SQS queues, such as Lambda
+ // or Amazon SNS topics, are not currently supported.
+ //
+ // This member is required.
+ SourceArn *string
+
+ // The ARN of the queue that receives the moved messages. You can use this field
+ // to specify the destination queue where you would like to redrive messages. If
+ // this field is left blank, the messages will be redriven back to their respective
+ // original source queues.
+ DestinationArn *string
+
+ // The number of messages to be moved per second (the message movement rate). You
+ // can use this field to define a fixed message movement rate. The maximum value
+ // for messages per second is 500. If this field is left blank, the system will
+ // optimize the rate based on the queue message backlog size, which may vary
+ // throughout the duration of the message movement task.
+ MaxNumberOfMessagesPerSecond *int32
+
+ noSmithyDocumentSerde
+}
+
+type StartMessageMoveTaskOutput struct {
+
+ // An identifier associated with a message movement task. You can use this
+ // identifier to cancel a specified message movement task using the
+ // CancelMessageMoveTask action.
+ TaskHandle *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStartMessageMoveTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpStartMessageMoveTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpStartMessageMoveTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "StartMessageMoveTask"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpStartMessageMoveTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartMessageMoveTask(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opStartMessageMoveTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "StartMessageMoveTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go
index 50be1bcf..3f07bf4b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go
@@ -4,36 +4,27 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Add cost allocation tags to the specified Amazon SQS queue. For an overview, see
-// Tagging Your Amazon SQS Queues
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
+// Add cost allocation tags to the specified Amazon SQS queue. For an overview,
+// see Tagging Your Amazon SQS Queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
// in the Amazon SQS Developer Guide. When you use queue tags, keep the following
// guidelines in mind:
+// - Adding more than 50 tags to a queue isn't recommended.
+// - Tags don't have any semantic meaning. Amazon SQS interprets tags as
+// character strings.
+// - Tags are case-sensitive.
+// - A new tag with a key identical to that of an existing tag overwrites the
+// existing tag.
//
-// * Adding more than 50 tags to a queue isn't recommended.
-//
-// *
-// Tags don't have any semantic meaning. Amazon SQS interprets tags as character
-// strings.
-//
-// * Tags are case-sensitive.
-//
-// * A new tag with a key identical to that
-// of an existing tag overwrites the existing tag.
-//
-// For a full list of tag
-// restrictions, see Quotas related to queues
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues)
+// For a full list of tag restrictions, see Quotas related to queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues)
// in the Amazon SQS Developer Guide. Cross-account permissions don't apply to this
// action. For more information, see Grant cross-account permissions to a role and
-// a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
// in the Amazon SQS Developer Guide.
func (c *Client) TagQueue(ctx context.Context, params *TagQueueInput, optFns ...func(*Options)) (*TagQueueOutput, error) {
if params == nil {
@@ -73,42 +64,49 @@ type TagQueueOutput struct {
}
func (c *Client) addOperationTagQueueMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpTagQueue{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpTagQueue{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagQueue{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpTagQueue{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "TagQueue"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -117,12 +115,18 @@ func (c *Client) addOperationTagQueueMiddlewares(stack *middleware.Stack, option
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpTagQueueValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagQueue(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -132,6 +136,9 @@ func (c *Client) addOperationTagQueueMiddlewares(stack *middleware.Stack, option
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -139,7 +146,6 @@ func newServiceMetadataMiddleware_opTagQueue(region string) *awsmiddleware.Regis
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "TagQueue",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go
index 45e8c888..563d8ac8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go
@@ -4,19 +4,17 @@ package sqs
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Remove cost allocation tags from the specified Amazon SQS queue. For an
-// overview, see Tagging Your Amazon SQS Queues
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
+// overview, see Tagging Your Amazon SQS Queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html)
// in the Amazon SQS Developer Guide. Cross-account permissions don't apply to this
// action. For more information, see Grant cross-account permissions to a role and
-// a user name
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
+// a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name)
// in the Amazon SQS Developer Guide.
func (c *Client) UntagQueue(ctx context.Context, params *UntagQueueInput, optFns ...func(*Options)) (*UntagQueueOutput, error) {
if params == nil {
@@ -56,42 +54,49 @@ type UntagQueueOutput struct {
}
func (c *Client) addOperationUntagQueueMiddlewares(stack *middleware.Stack, options Options) (err error) {
- err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagQueue{}, middleware.After)
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpUntagQueue{}, middleware.After)
if err != nil {
return err
}
- err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagQueue{}, middleware.After)
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUntagQueue{}, middleware.After)
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UntagQueue"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -100,12 +105,18 @@ func (c *Client) addOperationUntagQueueMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpUntagQueueValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagQueue(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -115,6 +126,9 @@ func (c *Client) addOperationUntagQueueMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -122,7 +136,6 @@ func newServiceMetadataMiddleware_opUntagQueue(region string) *awsmiddleware.Reg
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sqs",
OperationName: "UntagQueue",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/auth.go
new file mode 100644
index 00000000..22607b3f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/auth.go
@@ -0,0 +1,284 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sqs
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) {
+ params.Region = options.Region
+}
+
+type setLegacyContextSigningOptionsMiddleware struct {
+}
+
+func (*setLegacyContextSigningOptionsMiddleware) ID() string {
+ return "setLegacyContextSigningOptions"
+}
+
+func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
+ }
+ }
+
+ if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
+}
+
+type withAnonymous struct {
+ resolver AuthSchemeResolver
+}
+
+var _ AuthSchemeResolver = (*withAnonymous)(nil)
+
+func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ opts = append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ })
+ return opts, nil
+}
+
+func wrapWithAnonymousAuth(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &withAnonymous{
+ resolver: options.AuthSchemeResolver,
+ }
+}
+
+// AuthResolverParameters contains the set of inputs necessary for auth scheme
+// resolution.
+type AuthResolverParameters struct {
+ // The name of the operation being invoked.
+ Operation string
+
+ // The region in which the operation is being invoked.
+ Region string
+}
+
+func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters {
+ params := &AuthResolverParameters{
+ Operation: operation,
+ }
+
+ bindAuthParamsRegion(params, input, options)
+
+ return params
+}
+
+// AuthSchemeResolver returns a set of possible authentication options for an
+// operation.
+type AuthSchemeResolver interface {
+ ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
+}
+
+type defaultAuthSchemeResolver struct{}
+
+var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
+
+func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ if overrides, ok := operationAuthOptions[params.Operation]; ok {
+ return overrides(params), nil
+ }
+ return serviceAuthOptions(params), nil
+}
+
+var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{}
+
+func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "sqs")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ return props
+ }(),
+ },
+ }
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options)
+ options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
+ }
+
+ scheme, ok := m.selectScheme(options)
+ if !ok {
+ return out, metadata, fmt.Errorf("could not select an auth scheme")
+ }
+
+ ctx = setResolvedAuthScheme(ctx, scheme)
+ return next.HandleFinalize(ctx, in)
+}
+
+func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
+ for _, option := range options {
+ if option.SchemeID == smithyauth.SchemeIDAnonymous {
+ return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
+ }
+
+ for _, scheme := range m.options.AuthSchemes {
+ if scheme.SchemeID() != option.SchemeID {
+ continue
+ }
+
+ if scheme.IdentityResolver(m.options) != nil {
+ return newResolvedAuthScheme(scheme, option), true
+ }
+ }
+ }
+
+ return nil, false
+}
+
+type resolvedAuthSchemeKey struct{}
+
+type resolvedAuthScheme struct {
+ Scheme smithyhttp.AuthScheme
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
+ return &resolvedAuthScheme{
+ Scheme: scheme,
+ IdentityProperties: option.IdentityProperties,
+ SignerProperties: option.SignerProperties,
+ }
+}
+
+func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
+ return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
+}
+
+func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
+ v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
+ return v
+}
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ resolver := rscheme.Scheme.IdentityResolver(m.options)
+ if resolver == nil {
+ return out, metadata, fmt.Errorf("no identity resolver")
+ }
+
+ identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties)
+ if err != nil {
+ return out, metadata, fmt.Errorf("get identity: %w", err)
+ }
+
+ ctx = setIdentity(ctx, identity)
+ return next.HandleFinalize(ctx, in)
+}
+
+type identityKey struct{}
+
+func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
+ return middleware.WithStackValue(ctx, identityKey{}, identity)
+}
+
+func getIdentity(ctx context.Context) smithyauth.Identity {
+ v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
+ return v
+}
+
+type signRequestMiddleware struct {
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ identity := getIdentity(ctx)
+ if identity == nil {
+ return out, metadata, fmt.Errorf("no identity")
+ }
+
+ signer := rscheme.Scheme.Signer()
+ if signer == nil {
+ return out, metadata, fmt.Errorf("no signer")
+ }
+
+ if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil {
+ return out, metadata, fmt.Errorf("sign request: %w", err)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/cust_checksum_validation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/cust_checksum_validation.go
new file mode 100644
index 00000000..a16d005d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/cust_checksum_validation.go
@@ -0,0 +1,234 @@
+package sqs
+
+import (
+ "context"
+ "crypto/md5"
+ "encoding/hex"
+ "fmt"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ sqstypes "github.com/aws/aws-sdk-go-v2/service/sqs/types"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// addValidateSendMessageChecksum adds the ValidateMessageChecksum middleware
+// to the stack configured for the SendMessage Operation.
+func addValidateSendMessageChecksum(stack *middleware.Stack, o Options) error {
+ return addValidateMessageChecksum(stack, o, validateSendMessageChecksum)
+}
+
+// validateSendMessageChecksum validates the SendMessage operation's input
+// message payload MD5 checksum matches that returned by the API.
+//
+// The input and output types must match the SendMessage operation.
+func validateSendMessageChecksum(input, output interface{}) error {
+ in, ok := input.(*SendMessageInput)
+ if !ok {
+ return fmt.Errorf("wrong input type, expect %T, got %T", in, input)
+ }
+ out, ok := output.(*SendMessageOutput)
+ if !ok {
+ return fmt.Errorf("wrong output type, expect %T, got %T", out, output)
+ }
+
+ // Nothing to validate if the members aren't populated.
+ if in.MessageBody == nil || out.MD5OfMessageBody == nil {
+ return nil
+ }
+
+ if err := validateMessageChecksum(*in.MessageBody, *out.MD5OfMessageBody); err != nil {
+ return messageChecksumError{
+ MessageID: aws.ToString(out.MessageId),
+ Err: err,
+ }
+ }
+ return nil
+}
+
+// addValidateSendMessageBatchChecksum adds the ValidateMessagechecksum
+// middleware to the stack configured for the SendMessageBatch operation.
+func addValidateSendMessageBatchChecksum(stack *middleware.Stack, o Options) error {
+ return addValidateMessageChecksum(stack, o, validateSendMessageBatchChecksum)
+}
+
+// validateSendMessageBatchChecksum validates the SendMessageBatch operation's
+// input messages body MD5 checksum matches those returned by the API.
+//
+// The input and output types must match the SendMessageBatch operation.
+func validateSendMessageBatchChecksum(input, output interface{}) error {
+ in, ok := input.(*SendMessageBatchInput)
+ if !ok {
+ return fmt.Errorf("wrong input type, expect %T, got %T", in, input)
+ }
+ out, ok := output.(*SendMessageBatchOutput)
+ if !ok {
+ return fmt.Errorf("wrong output type, expect %T, got %T", out, output)
+ }
+
+ outEntries := map[string]sqstypes.SendMessageBatchResultEntry{}
+ for _, e := range out.Successful {
+ outEntries[*e.Id] = e
+ }
+
+ var failedMessageErrs []messageChecksumError
+ for _, inEntry := range in.Entries {
+ outEntry, ok := outEntries[*inEntry.Id]
+ // Nothing to validate if the members aren't populated.
+ if !ok || inEntry.MessageBody == nil || outEntry.MD5OfMessageBody == nil {
+ continue
+ }
+
+ if err := validateMessageChecksum(*inEntry.MessageBody, *outEntry.MD5OfMessageBody); err != nil {
+ failedMessageErrs = append(failedMessageErrs, messageChecksumError{
+ MessageID: aws.ToString(outEntry.MessageId),
+ Err: err,
+ })
+ }
+ }
+
+ if len(failedMessageErrs) != 0 {
+ return batchMessageChecksumError{
+ Errs: failedMessageErrs,
+ }
+ }
+
+ return nil
+}
+
+// addValidateReceiveMessageChecksum adds the ValidateMessagechecksum
+// middleware to the stack configured for the ReceiveMessage operation.
+func addValidateReceiveMessageChecksum(stack *middleware.Stack, o Options) error {
+ return addValidateMessageChecksum(stack, o, validateReceiveMessageChecksum)
+}
+
+// validateReceiveMessageChecksum validates the ReceiveMessage operation's
+// input messages body MD5 checksum matches those returned by the API.
+//
+// The input and output types must match the ReceiveMessage operation.
+func validateReceiveMessageChecksum(_, output interface{}) error {
+ out, ok := output.(*ReceiveMessageOutput)
+ if !ok {
+ return fmt.Errorf("wrong output type, expect %T, got %T", out, output)
+ }
+
+ var failedMessageErrs []messageChecksumError
+ for _, msg := range out.Messages {
+ // Nothing to validate if the members aren't populated.
+ if msg.Body == nil || msg.MD5OfBody == nil {
+ continue
+ }
+
+ if err := validateMessageChecksum(*msg.Body, *msg.MD5OfBody); err != nil {
+ failedMessageErrs = append(failedMessageErrs, messageChecksumError{
+ MessageID: aws.ToString(msg.MessageId),
+ Err: err,
+ })
+ }
+ }
+
+ if len(failedMessageErrs) != 0 {
+ return batchMessageChecksumError{
+ Errs: failedMessageErrs,
+ }
+ }
+
+ return nil
+}
+
+// messageChecksumValidator provides the function signature for the operation's
+// validator.
+type messageChecksumValidator func(input, output interface{}) error
+
+// addValidateMessageChecksum adds the ValidateMessageChecksum middleware to
+// the stack with the passed in validator specified.
+func addValidateMessageChecksum(stack *middleware.Stack, o Options, validate messageChecksumValidator) error {
+ if o.DisableMessageChecksumValidation {
+ return nil
+ }
+
+ m := validateMessageChecksumMiddleware{
+ validate: validate,
+ }
+ err := stack.Initialize.Add(m, middleware.Before)
+ if err != nil {
+ return fmt.Errorf("failed to add %s middleware, %w", m.ID(), err)
+ }
+
+ return nil
+}
+
+// validateMessageChecksumMiddleware provides the Initialize middleware for
+// validating an operation's message checksum is validate. Needs to b
+// configured with the operation's validator.
+type validateMessageChecksumMiddleware struct {
+ validate messageChecksumValidator
+}
+
+// ID returns the Middleware ID.
+func (validateMessageChecksumMiddleware) ID() string { return "SQSValidateMessageChecksum" }
+
+// HandleInitialize implements the InitializeMiddleware interface providing a
+// middleware that will validate an operation's message checksum based on
+// calling the validate member.
+func (m validateMessageChecksumMiddleware) HandleInitialize(
+ ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ out middleware.InitializeOutput, meta middleware.Metadata, err error,
+) {
+ out, meta, err = next.HandleInitialize(ctx, input)
+ if err != nil {
+ return out, meta, err
+ }
+
+ err = m.validate(input.Parameters, out.Result)
+ if err != nil {
+ return out, meta, fmt.Errorf("message checksum validation failed, %w", err)
+ }
+
+ return out, meta, nil
+}
+
+// validateMessageChecksum compares the MD5 checksums of value parameter with
+// the expected MD5 value. Returns an error if the computed checksum does not
+// match the expected value.
+func validateMessageChecksum(value, expect string) error {
+ msum := md5.Sum([]byte(value))
+ sum := hex.EncodeToString(msum[:])
+ if sum != expect {
+ return fmt.Errorf("expected MD5 checksum %s, got %s", expect, sum)
+ }
+
+ return nil
+}
+
+// messageChecksumError provides an error type for invalid message checksums.
+type messageChecksumError struct {
+ MessageID string
+ Err error
+}
+
+func (e messageChecksumError) Error() string {
+ prefix := "message"
+ if e.MessageID != "" {
+ prefix += " " + e.MessageID
+ }
+ return fmt.Sprintf("%s has invalid checksum, %v", prefix, e.Err.Error())
+}
+
+// batchMessageChecksumError provides an error type for a collection of invalid
+// message checksum errors.
+type batchMessageChecksumError struct {
+ Errs []messageChecksumError
+}
+
+func (e batchMessageChecksumError) Error() string {
+ var w strings.Builder
+ fmt.Fprintf(&w, "message checksum errors")
+
+ for _, err := range e.Errs {
+ fmt.Fprintf(&w, "\n\t%s", err.Error())
+ }
+
+ return w.String()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go
index f5d654de..cecf9816 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go
@@ -6,31 +6,28 @@ import (
"bytes"
"context"
"encoding/base64"
- "encoding/xml"
+ "encoding/json"
"fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
smithy "github.com/aws/smithy-go"
- smithyxml "github.com/aws/smithy-go/encoding/xml"
smithyio "github.com/aws/smithy-go/io"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
"io"
"io/ioutil"
- "strconv"
"strings"
)
-type awsAwsquery_deserializeOpAddPermission struct {
+type awsAwsjson10_deserializeOpAddPermission struct {
}
-func (*awsAwsquery_deserializeOpAddPermission) ID() string {
+func (*awsAwsjson10_deserializeOpAddPermission) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpAddPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpAddPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -44,7 +41,7 @@ func (m *awsAwsquery_deserializeOpAddPermission) HandleDeserialize(ctx context.C
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorAddPermission(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorAddPermission(response, &metadata)
}
output := &AddPermissionOutput{}
out.Result = output
@@ -58,7 +55,7 @@ func (m *awsAwsquery_deserializeOpAddPermission) HandleDeserialize(ctx context.C
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorAddPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorAddPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -68,25 +65,56 @@ func awsAwsquery_deserializeOpErrorAddPermission(response *smithyhttp.Response,
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
case strings.EqualFold("OverLimit", errorCode):
- return awsAwsquery_deserializeErrorOverLimit(response, errorBody)
+ return awsAwsjson10_deserializeErrorOverLimit(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -96,14 +124,14 @@ func awsAwsquery_deserializeOpErrorAddPermission(response *smithyhttp.Response,
}
}
-type awsAwsquery_deserializeOpChangeMessageVisibility struct {
+type awsAwsjson10_deserializeOpCancelMessageMoveTask struct {
}
-func (*awsAwsquery_deserializeOpChangeMessageVisibility) ID() string {
+func (*awsAwsjson10_deserializeOpCancelMessageMoveTask) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpChangeMessageVisibility) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpCancelMessageMoveTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -117,21 +145,43 @@ func (m *awsAwsquery_deserializeOpChangeMessageVisibility) HandleDeserialize(ctx
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorChangeMessageVisibility(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorCancelMessageMoveTask(response, &metadata)
}
- output := &ChangeMessageVisibilityOutput{}
+ output := &CancelMessageMoveTaskOutput{}
out.Result = output
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson10_deserializeOpDocumentCancelMessageMoveTaskOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
}
+ return out, metadata, err
}
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorChangeMessageVisibility(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorCancelMessageMoveTask(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -141,28 +191,53 @@ func awsAwsquery_deserializeOpErrorChangeMessageVisibility(response *smithyhttp.
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.MessageNotInflight", errorCode):
- return awsAwsquery_deserializeErrorMessageNotInflight(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
- case strings.EqualFold("ReceiptHandleIsInvalid", errorCode):
- return awsAwsquery_deserializeErrorReceiptHandleIsInvalid(response, errorBody)
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -172,14 +247,14 @@ func awsAwsquery_deserializeOpErrorChangeMessageVisibility(response *smithyhttp.
}
}
-type awsAwsquery_deserializeOpChangeMessageVisibilityBatch struct {
+type awsAwsjson10_deserializeOpChangeMessageVisibility struct {
}
-func (*awsAwsquery_deserializeOpChangeMessageVisibilityBatch) ID() string {
+func (*awsAwsjson10_deserializeOpChangeMessageVisibility) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpChangeMessageVisibilityBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpChangeMessageVisibility) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -193,31 +268,126 @@ func (m *awsAwsquery_deserializeOpChangeMessageVisibilityBatch) HandleDeserializ
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorChangeMessageVisibilityBatch(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorChangeMessageVisibility(response, &metadata)
}
- output := &ChangeMessageVisibilityBatchOutput{}
+ output := &ChangeMessageVisibilityOutput{}
out.Result = output
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson10_deserializeOpErrorChangeMessageVisibility(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
+ err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("MessageNotInflight", errorCode):
+ return awsAwsjson10_deserializeErrorMessageNotInflight(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("ReceiptHandleIsInvalid", errorCode):
+ return awsAwsjson10_deserializeErrorReceiptHandleIsInvalid(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
+ default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
}
+}
+
+type awsAwsjson10_deserializeOpChangeMessageVisibilityBatch struct {
+}
+
+func (*awsAwsjson10_deserializeOpChangeMessageVisibilityBatch) ID() string {
+ return "OperationDeserializer"
+}
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("ChangeMessageVisibilityBatchResult")
+func (m *awsAwsjson10_deserializeOpChangeMessageVisibilityBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson10_deserializeOpErrorChangeMessageVisibilityBatch(response, &metadata)
+ }
+ output := &ChangeMessageVisibilityBatchOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -227,8 +397,7 @@ func (m *awsAwsquery_deserializeOpChangeMessageVisibilityBatch) HandleDeserializ
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentChangeMessageVisibilityBatchOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentChangeMessageVisibilityBatchOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -242,7 +411,7 @@ func (m *awsAwsquery_deserializeOpChangeMessageVisibilityBatch) HandleDeserializ
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorChangeMessageVisibilityBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorChangeMessageVisibilityBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -252,34 +421,65 @@ func awsAwsquery_deserializeOpErrorChangeMessageVisibilityBatch(response *smithy
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.BatchEntryIdsNotDistinct", errorCode):
- return awsAwsquery_deserializeErrorBatchEntryIdsNotDistinct(response, errorBody)
+ case strings.EqualFold("BatchEntryIdsNotDistinct", errorCode):
+ return awsAwsjson10_deserializeErrorBatchEntryIdsNotDistinct(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.EmptyBatchRequest", errorCode):
- return awsAwsquery_deserializeErrorEmptyBatchRequest(response, errorBody)
+ case strings.EqualFold("EmptyBatchRequest", errorCode):
+ return awsAwsjson10_deserializeErrorEmptyBatchRequest(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.InvalidBatchEntryId", errorCode):
- return awsAwsquery_deserializeErrorInvalidBatchEntryId(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.TooManyEntriesInBatchRequest", errorCode):
- return awsAwsquery_deserializeErrorTooManyEntriesInBatchRequest(response, errorBody)
+ case strings.EqualFold("InvalidBatchEntryId", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidBatchEntryId(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("TooManyEntriesInBatchRequest", errorCode):
+ return awsAwsjson10_deserializeErrorTooManyEntriesInBatchRequest(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -289,14 +489,14 @@ func awsAwsquery_deserializeOpErrorChangeMessageVisibilityBatch(response *smithy
}
}
-type awsAwsquery_deserializeOpCreateQueue struct {
+type awsAwsjson10_deserializeOpCreateQueue struct {
}
-func (*awsAwsquery_deserializeOpCreateQueue) ID() string {
+func (*awsAwsjson10_deserializeOpCreateQueue) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpCreateQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpCreateQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -310,31 +510,19 @@ func (m *awsAwsquery_deserializeOpCreateQueue) HandleDeserialize(ctx context.Con
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorCreateQueue(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorCreateQueue(response, &metadata)
}
output := &CreateQueueOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("CreateQueueResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -344,8 +532,7 @@ func (m *awsAwsquery_deserializeOpCreateQueue) HandleDeserialize(ctx context.Con
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentCreateQueueOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentCreateQueueOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -359,7 +546,7 @@ func (m *awsAwsquery_deserializeOpCreateQueue) HandleDeserialize(ctx context.Con
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorCreateQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorCreateQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -369,28 +556,62 @@ func awsAwsquery_deserializeOpErrorCreateQueue(response *smithyhttp.Response, me
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.QueueDeletedRecently", errorCode):
- return awsAwsquery_deserializeErrorQueueDeletedRecently(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
- case strings.EqualFold("QueueAlreadyExists", errorCode):
- return awsAwsquery_deserializeErrorQueueNameExists(response, errorBody)
+ case strings.EqualFold("InvalidAttributeName", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAttributeName(response, errorBody)
+
+ case strings.EqualFold("InvalidAttributeValue", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAttributeValue(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDeletedRecently", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDeletedRecently(response, errorBody)
+
+ case strings.EqualFold("QueueNameExists", errorCode):
+ return awsAwsjson10_deserializeErrorQueueNameExists(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -400,14 +621,14 @@ func awsAwsquery_deserializeOpErrorCreateQueue(response *smithyhttp.Response, me
}
}
-type awsAwsquery_deserializeOpDeleteMessage struct {
+type awsAwsjson10_deserializeOpDeleteMessage struct {
}
-func (*awsAwsquery_deserializeOpDeleteMessage) ID() string {
+func (*awsAwsjson10_deserializeOpDeleteMessage) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpDeleteMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpDeleteMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -421,7 +642,7 @@ func (m *awsAwsquery_deserializeOpDeleteMessage) HandleDeserialize(ctx context.C
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorDeleteMessage(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorDeleteMessage(response, &metadata)
}
output := &DeleteMessageOutput{}
out.Result = output
@@ -435,7 +656,7 @@ func (m *awsAwsquery_deserializeOpDeleteMessage) HandleDeserialize(ctx context.C
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorDeleteMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorDeleteMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -445,28 +666,59 @@ func awsAwsquery_deserializeOpErrorDeleteMessage(response *smithyhttp.Response,
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
case strings.EqualFold("InvalidIdFormat", errorCode):
- return awsAwsquery_deserializeErrorInvalidIdFormat(response, errorBody)
+ return awsAwsjson10_deserializeErrorInvalidIdFormat(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
case strings.EqualFold("ReceiptHandleIsInvalid", errorCode):
- return awsAwsquery_deserializeErrorReceiptHandleIsInvalid(response, errorBody)
+ return awsAwsjson10_deserializeErrorReceiptHandleIsInvalid(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -476,14 +728,14 @@ func awsAwsquery_deserializeOpErrorDeleteMessage(response *smithyhttp.Response,
}
}
-type awsAwsquery_deserializeOpDeleteMessageBatch struct {
+type awsAwsjson10_deserializeOpDeleteMessageBatch struct {
}
-func (*awsAwsquery_deserializeOpDeleteMessageBatch) ID() string {
+func (*awsAwsjson10_deserializeOpDeleteMessageBatch) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpDeleteMessageBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpDeleteMessageBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -497,31 +749,19 @@ func (m *awsAwsquery_deserializeOpDeleteMessageBatch) HandleDeserialize(ctx cont
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorDeleteMessageBatch(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorDeleteMessageBatch(response, &metadata)
}
output := &DeleteMessageBatchOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("DeleteMessageBatchResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -531,8 +771,7 @@ func (m *awsAwsquery_deserializeOpDeleteMessageBatch) HandleDeserialize(ctx cont
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentDeleteMessageBatchOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentDeleteMessageBatchOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -546,7 +785,7 @@ func (m *awsAwsquery_deserializeOpDeleteMessageBatch) HandleDeserialize(ctx cont
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorDeleteMessageBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorDeleteMessageBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -556,34 +795,65 @@ func awsAwsquery_deserializeOpErrorDeleteMessageBatch(response *smithyhttp.Respo
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.BatchEntryIdsNotDistinct", errorCode):
- return awsAwsquery_deserializeErrorBatchEntryIdsNotDistinct(response, errorBody)
+ case strings.EqualFold("BatchEntryIdsNotDistinct", errorCode):
+ return awsAwsjson10_deserializeErrorBatchEntryIdsNotDistinct(response, errorBody)
+
+ case strings.EqualFold("EmptyBatchRequest", errorCode):
+ return awsAwsjson10_deserializeErrorEmptyBatchRequest(response, errorBody)
+
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.EmptyBatchRequest", errorCode):
- return awsAwsquery_deserializeErrorEmptyBatchRequest(response, errorBody)
+ case strings.EqualFold("InvalidBatchEntryId", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidBatchEntryId(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.InvalidBatchEntryId", errorCode):
- return awsAwsquery_deserializeErrorInvalidBatchEntryId(response, errorBody)
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.TooManyEntriesInBatchRequest", errorCode):
- return awsAwsquery_deserializeErrorTooManyEntriesInBatchRequest(response, errorBody)
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("TooManyEntriesInBatchRequest", errorCode):
+ return awsAwsjson10_deserializeErrorTooManyEntriesInBatchRequest(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -593,14 +863,14 @@ func awsAwsquery_deserializeOpErrorDeleteMessageBatch(response *smithyhttp.Respo
}
}
-type awsAwsquery_deserializeOpDeleteQueue struct {
+type awsAwsjson10_deserializeOpDeleteQueue struct {
}
-func (*awsAwsquery_deserializeOpDeleteQueue) ID() string {
+func (*awsAwsjson10_deserializeOpDeleteQueue) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -614,7 +884,7 @@ func (m *awsAwsquery_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Con
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorDeleteQueue(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorDeleteQueue(response, &metadata)
}
output := &DeleteQueueOutput{}
out.Result = output
@@ -628,7 +898,7 @@ func (m *awsAwsquery_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Con
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -638,22 +908,53 @@ func awsAwsquery_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, me
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
- }
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -663,14 +964,14 @@ func awsAwsquery_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, me
}
}
-type awsAwsquery_deserializeOpGetQueueAttributes struct {
+type awsAwsjson10_deserializeOpGetQueueAttributes struct {
}
-func (*awsAwsquery_deserializeOpGetQueueAttributes) ID() string {
+func (*awsAwsjson10_deserializeOpGetQueueAttributes) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpGetQueueAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpGetQueueAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -684,31 +985,19 @@ func (m *awsAwsquery_deserializeOpGetQueueAttributes) HandleDeserialize(ctx cont
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorGetQueueAttributes(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorGetQueueAttributes(response, &metadata)
}
output := &GetQueueAttributesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("GetQueueAttributesResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -718,8 +1007,7 @@ func (m *awsAwsquery_deserializeOpGetQueueAttributes) HandleDeserialize(ctx cont
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentGetQueueAttributesOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentGetQueueAttributesOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -733,7 +1021,7 @@ func (m *awsAwsquery_deserializeOpGetQueueAttributes) HandleDeserialize(ctx cont
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorGetQueueAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorGetQueueAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -743,25 +1031,56 @@ func awsAwsquery_deserializeOpErrorGetQueueAttributes(response *smithyhttp.Respo
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
case strings.EqualFold("InvalidAttributeName", errorCode):
- return awsAwsquery_deserializeErrorInvalidAttributeName(response, errorBody)
+ return awsAwsjson10_deserializeErrorInvalidAttributeName(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -771,14 +1090,14 @@ func awsAwsquery_deserializeOpErrorGetQueueAttributes(response *smithyhttp.Respo
}
}
-type awsAwsquery_deserializeOpGetQueueUrl struct {
+type awsAwsjson10_deserializeOpGetQueueUrl struct {
}
-func (*awsAwsquery_deserializeOpGetQueueUrl) ID() string {
+func (*awsAwsjson10_deserializeOpGetQueueUrl) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpGetQueueUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpGetQueueUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -792,31 +1111,19 @@ func (m *awsAwsquery_deserializeOpGetQueueUrl) HandleDeserialize(ctx context.Con
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorGetQueueUrl(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorGetQueueUrl(response, &metadata)
}
output := &GetQueueUrlOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("GetQueueUrlResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -826,8 +1133,7 @@ func (m *awsAwsquery_deserializeOpGetQueueUrl) HandleDeserialize(ctx context.Con
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentGetQueueUrlOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentGetQueueUrlOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -841,7 +1147,7 @@ func (m *awsAwsquery_deserializeOpGetQueueUrl) HandleDeserialize(ctx context.Con
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorGetQueueUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorGetQueueUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -851,25 +1157,53 @@ func awsAwsquery_deserializeOpErrorGetQueueUrl(response *smithyhttp.Response, me
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.NonExistentQueue", errorCode):
- return awsAwsquery_deserializeErrorQueueDoesNotExist(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -879,14 +1213,14 @@ func awsAwsquery_deserializeOpErrorGetQueueUrl(response *smithyhttp.Response, me
}
}
-type awsAwsquery_deserializeOpListDeadLetterSourceQueues struct {
+type awsAwsjson10_deserializeOpListDeadLetterSourceQueues struct {
}
-func (*awsAwsquery_deserializeOpListDeadLetterSourceQueues) ID() string {
+func (*awsAwsjson10_deserializeOpListDeadLetterSourceQueues) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpListDeadLetterSourceQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpListDeadLetterSourceQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -900,31 +1234,19 @@ func (m *awsAwsquery_deserializeOpListDeadLetterSourceQueues) HandleDeserialize(
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorListDeadLetterSourceQueues(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorListDeadLetterSourceQueues(response, &metadata)
}
output := &ListDeadLetterSourceQueuesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("ListDeadLetterSourceQueuesResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -934,8 +1256,7 @@ func (m *awsAwsquery_deserializeOpListDeadLetterSourceQueues) HandleDeserialize(
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentListDeadLetterSourceQueuesOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentListDeadLetterSourceQueuesOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -949,7 +1270,7 @@ func (m *awsAwsquery_deserializeOpListDeadLetterSourceQueues) HandleDeserialize(
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorListDeadLetterSourceQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorListDeadLetterSourceQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -959,25 +1280,53 @@ func awsAwsquery_deserializeOpErrorListDeadLetterSourceQueues(response *smithyht
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.NonExistentQueue", errorCode):
- return awsAwsquery_deserializeErrorQueueDoesNotExist(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -987,14 +1336,14 @@ func awsAwsquery_deserializeOpErrorListDeadLetterSourceQueues(response *smithyht
}
}
-type awsAwsquery_deserializeOpListQueues struct {
+type awsAwsjson10_deserializeOpListMessageMoveTasks struct {
}
-func (*awsAwsquery_deserializeOpListQueues) ID() string {
+func (*awsAwsjson10_deserializeOpListMessageMoveTasks) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpListQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpListMessageMoveTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1008,31 +1357,19 @@ func (m *awsAwsquery_deserializeOpListQueues) HandleDeserialize(ctx context.Cont
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorListQueues(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorListMessageMoveTasks(response, &metadata)
}
- output := &ListQueuesOutput{}
+ output := &ListMessageMoveTasksOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("ListQueuesResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -1042,8 +1379,7 @@ func (m *awsAwsquery_deserializeOpListQueues) HandleDeserialize(ctx context.Cont
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentListQueuesOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentListMessageMoveTasksOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -1057,7 +1393,7 @@ func (m *awsAwsquery_deserializeOpListQueues) HandleDeserialize(ctx context.Cont
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorListQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorListMessageMoveTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1067,22 +1403,53 @@ func awsAwsquery_deserializeOpErrorListQueues(response *smithyhttp.Response, met
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1092,14 +1459,14 @@ func awsAwsquery_deserializeOpErrorListQueues(response *smithyhttp.Response, met
}
}
-type awsAwsquery_deserializeOpListQueueTags struct {
+type awsAwsjson10_deserializeOpListQueues struct {
}
-func (*awsAwsquery_deserializeOpListQueueTags) ID() string {
+func (*awsAwsjson10_deserializeOpListQueues) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpListQueueTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpListQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1113,31 +1480,19 @@ func (m *awsAwsquery_deserializeOpListQueueTags) HandleDeserialize(ctx context.C
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorListQueueTags(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorListQueues(response, &metadata)
}
- output := &ListQueueTagsOutput{}
+ output := &ListQueuesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("ListQueueTagsResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -1147,8 +1502,7 @@ func (m *awsAwsquery_deserializeOpListQueueTags) HandleDeserialize(ctx context.C
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentListQueueTagsOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentListQueuesOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -1162,7 +1516,7 @@ func (m *awsAwsquery_deserializeOpListQueueTags) HandleDeserialize(ctx context.C
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorListQueueTags(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorListQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1172,98 +1526,50 @@ func awsAwsquery_deserializeOpErrorListQueueTags(response *smithyhttp.Response,
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
- if err != nil {
- return err
- }
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
- }
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
- }
- errorBody.Seek(0, io.SeekStart)
- switch {
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsquery_deserializeOpPurgeQueue struct {
-}
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
-func (*awsAwsquery_deserializeOpPurgeQueue) ID() string {
- return "OperationDeserializer"
-}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
-func (m *awsAwsquery_deserializeOpPurgeQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
- return out, metadata, err
- }
-
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorPurgeQueue(response, &metadata)
- }
- output := &PurgeQueueOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
}
- }
-
- return out, metadata, err
-}
-
-func awsAwsquery_deserializeOpErrorPurgeQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
- if err != nil {
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.NonExistentQueue", errorCode):
- return awsAwsquery_deserializeErrorQueueDoesNotExist(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.PurgeQueueInProgress", errorCode):
- return awsAwsquery_deserializeErrorPurgeQueueInProgress(response, errorBody)
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1273,14 +1579,14 @@ func awsAwsquery_deserializeOpErrorPurgeQueue(response *smithyhttp.Response, met
}
}
-type awsAwsquery_deserializeOpReceiveMessage struct {
+type awsAwsjson10_deserializeOpListQueueTags struct {
}
-func (*awsAwsquery_deserializeOpReceiveMessage) ID() string {
+func (*awsAwsjson10_deserializeOpListQueueTags) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpReceiveMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpListQueueTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1294,31 +1600,19 @@ func (m *awsAwsquery_deserializeOpReceiveMessage) HandleDeserialize(ctx context.
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorReceiveMessage(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorListQueueTags(response, &metadata)
}
- output := &ReceiveMessageOutput{}
+ output := &ListQueueTagsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("ReceiveMessageResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -1328,8 +1622,7 @@ func (m *awsAwsquery_deserializeOpReceiveMessage) HandleDeserialize(ctx context.
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentReceiveMessageOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentListQueueTagsOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -1343,7 +1636,7 @@ func (m *awsAwsquery_deserializeOpReceiveMessage) HandleDeserialize(ctx context.
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorReceiveMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorListQueueTags(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1353,25 +1646,53 @@ func awsAwsquery_deserializeOpErrorReceiveMessage(response *smithyhttp.Response,
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("OverLimit", errorCode):
- return awsAwsquery_deserializeErrorOverLimit(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1381,14 +1702,14 @@ func awsAwsquery_deserializeOpErrorReceiveMessage(response *smithyhttp.Response,
}
}
-type awsAwsquery_deserializeOpRemovePermission struct {
+type awsAwsjson10_deserializeOpPurgeQueue struct {
}
-func (*awsAwsquery_deserializeOpRemovePermission) ID() string {
+func (*awsAwsjson10_deserializeOpPurgeQueue) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpRemovePermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpPurgeQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1402,9 +1723,9 @@ func (m *awsAwsquery_deserializeOpRemovePermission) HandleDeserialize(ctx contex
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorRemovePermission(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorPurgeQueue(response, &metadata)
}
- output := &RemovePermissionOutput{}
+ output := &PurgeQueueOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
@@ -1416,7 +1737,7 @@ func (m *awsAwsquery_deserializeOpRemovePermission) HandleDeserialize(ctx contex
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorRemovePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorPurgeQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1426,22 +1747,56 @@ func awsAwsquery_deserializeOpErrorRemovePermission(response *smithyhttp.Respons
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
- if err != nil {
- return err
- }
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
}
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("PurgeQueueInProgress", errorCode):
+ return awsAwsjson10_deserializeErrorPurgeQueueInProgress(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1451,14 +1806,14 @@ func awsAwsquery_deserializeOpErrorRemovePermission(response *smithyhttp.Respons
}
}
-type awsAwsquery_deserializeOpSendMessage struct {
+type awsAwsjson10_deserializeOpReceiveMessage struct {
}
-func (*awsAwsquery_deserializeOpSendMessage) ID() string {
+func (*awsAwsjson10_deserializeOpReceiveMessage) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpSendMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpReceiveMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1472,31 +1827,19 @@ func (m *awsAwsquery_deserializeOpSendMessage) HandleDeserialize(ctx context.Con
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorSendMessage(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorReceiveMessage(response, &metadata)
}
- output := &SendMessageOutput{}
+ output := &ReceiveMessageOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("SendMessageResult")
- if err != nil {
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
@@ -1506,8 +1849,7 @@ func (m *awsAwsquery_deserializeOpSendMessage) HandleDeserialize(ctx context.Con
return out, metadata, err
}
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentSendMessageOutput(&output, decoder)
+ err = awsAwsjson10_deserializeOpDocumentReceiveMessageOutput(&output, shape)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -1521,7 +1863,7 @@ func (m *awsAwsquery_deserializeOpSendMessage) HandleDeserialize(ctx context.Con
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorSendMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorReceiveMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1531,28 +1873,77 @@ func awsAwsquery_deserializeOpErrorSendMessage(response *smithyhttp.Response, me
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.UnsupportedOperation", errorCode):
- return awsAwsquery_deserializeErrorUnsupportedOperation(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
- case strings.EqualFold("InvalidMessageContents", errorCode):
- return awsAwsquery_deserializeErrorInvalidMessageContents(response, errorBody)
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("KmsAccessDenied", errorCode):
+ return awsAwsjson10_deserializeErrorKmsAccessDenied(response, errorBody)
+
+ case strings.EqualFold("KmsDisabled", errorCode):
+ return awsAwsjson10_deserializeErrorKmsDisabled(response, errorBody)
+
+ case strings.EqualFold("KmsInvalidKeyUsage", errorCode):
+ return awsAwsjson10_deserializeErrorKmsInvalidKeyUsage(response, errorBody)
+
+ case strings.EqualFold("KmsInvalidState", errorCode):
+ return awsAwsjson10_deserializeErrorKmsInvalidState(response, errorBody)
+
+ case strings.EqualFold("KmsNotFound", errorCode):
+ return awsAwsjson10_deserializeErrorKmsNotFound(response, errorBody)
+
+ case strings.EqualFold("KmsOptInRequired", errorCode):
+ return awsAwsjson10_deserializeErrorKmsOptInRequired(response, errorBody)
+
+ case strings.EqualFold("KmsThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorKmsThrottled(response, errorBody)
+
+ case strings.EqualFold("OverLimit", errorCode):
+ return awsAwsjson10_deserializeErrorOverLimit(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1562,14 +1953,14 @@ func awsAwsquery_deserializeOpErrorSendMessage(response *smithyhttp.Response, me
}
}
-type awsAwsquery_deserializeOpSendMessageBatch struct {
+type awsAwsjson10_deserializeOpRemovePermission struct {
}
-func (*awsAwsquery_deserializeOpSendMessageBatch) ID() string {
+func (*awsAwsjson10_deserializeOpRemovePermission) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpSendMessageBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpRemovePermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1583,56 +1974,21 @@ func (m *awsAwsquery_deserializeOpSendMessageBatch) HandleDeserialize(ctx contex
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorSendMessageBatch(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorRemovePermission(response, &metadata)
}
- output := &SendMessageBatchOutput{}
+ output := &RemovePermissionOutput{}
out.Result = output
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
- body := io.TeeReader(response.Body, ringBuffer)
- rootDecoder := xml.NewDecoder(body)
- t, err := smithyxml.FetchRootElement(rootDecoder)
- if err == io.EOF {
- return out, metadata, nil
- }
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- t, err = decoder.GetElement("SendMessageBatchResult")
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- err = awsAwsquery_deserializeOpDocumentSendMessageBatchOutput(&output, decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
+ Err: fmt.Errorf("failed to discard response body, %w", err),
}
- return out, metadata, err
}
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorSendMessageBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorRemovePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1642,40 +1998,53 @@ func awsAwsquery_deserializeOpErrorSendMessageBatch(response *smithyhttp.Respons
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("AWS.SimpleQueueService.BatchEntryIdsNotDistinct", errorCode):
- return awsAwsquery_deserializeErrorBatchEntryIdsNotDistinct(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.BatchRequestTooLong", errorCode):
- return awsAwsquery_deserializeErrorBatchRequestTooLong(response, errorBody)
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.EmptyBatchRequest", errorCode):
- return awsAwsquery_deserializeErrorEmptyBatchRequest(response, errorBody)
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.InvalidBatchEntryId", errorCode):
- return awsAwsquery_deserializeErrorInvalidBatchEntryId(response, errorBody)
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
- case strings.EqualFold("AWS.SimpleQueueService.TooManyEntriesInBatchRequest", errorCode):
- return awsAwsquery_deserializeErrorTooManyEntriesInBatchRequest(response, errorBody)
-
- case strings.EqualFold("AWS.SimpleQueueService.UnsupportedOperation", errorCode):
- return awsAwsquery_deserializeErrorUnsupportedOperation(response, errorBody)
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1685,14 +2054,14 @@ func awsAwsquery_deserializeOpErrorSendMessageBatch(response *smithyhttp.Respons
}
}
-type awsAwsquery_deserializeOpSetQueueAttributes struct {
+type awsAwsjson10_deserializeOpSendMessage struct {
}
-func (*awsAwsquery_deserializeOpSetQueueAttributes) ID() string {
+func (*awsAwsjson10_deserializeOpSendMessage) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpSetQueueAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpSendMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1706,21 +2075,43 @@ func (m *awsAwsquery_deserializeOpSetQueueAttributes) HandleDeserialize(ctx cont
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorSetQueueAttributes(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorSendMessage(response, &metadata)
}
- output := &SetQueueAttributesOutput{}
+ output := &SendMessageOutput{}
out.Result = output
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
}
+ return out, metadata, err
+ }
+
+ err = awsAwsjson10_deserializeOpDocumentSendMessageOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
}
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorSetQueueAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorSendMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1730,25 +2121,77 @@ func awsAwsquery_deserializeOpErrorSetQueueAttributes(response *smithyhttp.Respo
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
- case strings.EqualFold("InvalidAttributeName", errorCode):
- return awsAwsquery_deserializeErrorInvalidAttributeName(response, errorBody)
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidMessageContents", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidMessageContents(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("KmsAccessDenied", errorCode):
+ return awsAwsjson10_deserializeErrorKmsAccessDenied(response, errorBody)
+
+ case strings.EqualFold("KmsDisabled", errorCode):
+ return awsAwsjson10_deserializeErrorKmsDisabled(response, errorBody)
+
+ case strings.EqualFold("KmsInvalidKeyUsage", errorCode):
+ return awsAwsjson10_deserializeErrorKmsInvalidKeyUsage(response, errorBody)
+
+ case strings.EqualFold("KmsInvalidState", errorCode):
+ return awsAwsjson10_deserializeErrorKmsInvalidState(response, errorBody)
+
+ case strings.EqualFold("KmsNotFound", errorCode):
+ return awsAwsjson10_deserializeErrorKmsNotFound(response, errorBody)
+
+ case strings.EqualFold("KmsOptInRequired", errorCode):
+ return awsAwsjson10_deserializeErrorKmsOptInRequired(response, errorBody)
+
+ case strings.EqualFold("KmsThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorKmsThrottled(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1758,14 +2201,14 @@ func awsAwsquery_deserializeOpErrorSetQueueAttributes(response *smithyhttp.Respo
}
}
-type awsAwsquery_deserializeOpTagQueue struct {
+type awsAwsjson10_deserializeOpSendMessageBatch struct {
}
-func (*awsAwsquery_deserializeOpTagQueue) ID() string {
+func (*awsAwsjson10_deserializeOpSendMessageBatch) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpTagQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpSendMessageBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1779,21 +2222,43 @@ func (m *awsAwsquery_deserializeOpTagQueue) HandleDeserialize(ctx context.Contex
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorTagQueue(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorSendMessageBatch(response, &metadata)
}
- output := &TagQueueOutput{}
+ output := &SendMessageBatchOutput{}
out.Result = output
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson10_deserializeOpDocumentSendMessageBatchOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
}
+ return out, metadata, err
}
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorTagQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorSendMessageBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1803,22 +2268,89 @@ func awsAwsquery_deserializeOpErrorTagQueue(response *smithyhttp.Response, metad
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("BatchEntryIdsNotDistinct", errorCode):
+ return awsAwsjson10_deserializeErrorBatchEntryIdsNotDistinct(response, errorBody)
+
+ case strings.EqualFold("BatchRequestTooLong", errorCode):
+ return awsAwsjson10_deserializeErrorBatchRequestTooLong(response, errorBody)
+
+ case strings.EqualFold("EmptyBatchRequest", errorCode):
+ return awsAwsjson10_deserializeErrorEmptyBatchRequest(response, errorBody)
+
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidBatchEntryId", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidBatchEntryId(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("KmsAccessDenied", errorCode):
+ return awsAwsjson10_deserializeErrorKmsAccessDenied(response, errorBody)
+
+ case strings.EqualFold("KmsDisabled", errorCode):
+ return awsAwsjson10_deserializeErrorKmsDisabled(response, errorBody)
+
+ case strings.EqualFold("KmsInvalidKeyUsage", errorCode):
+ return awsAwsjson10_deserializeErrorKmsInvalidKeyUsage(response, errorBody)
+
+ case strings.EqualFold("KmsInvalidState", errorCode):
+ return awsAwsjson10_deserializeErrorKmsInvalidState(response, errorBody)
+
+ case strings.EqualFold("KmsNotFound", errorCode):
+ return awsAwsjson10_deserializeErrorKmsNotFound(response, errorBody)
+
+ case strings.EqualFold("KmsOptInRequired", errorCode):
+ return awsAwsjson10_deserializeErrorKmsOptInRequired(response, errorBody)
+
+ case strings.EqualFold("KmsThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorKmsThrottled(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("TooManyEntriesInBatchRequest", errorCode):
+ return awsAwsjson10_deserializeErrorTooManyEntriesInBatchRequest(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1828,14 +2360,14 @@ func awsAwsquery_deserializeOpErrorTagQueue(response *smithyhttp.Response, metad
}
}
-type awsAwsquery_deserializeOpUntagQueue struct {
+type awsAwsjson10_deserializeOpSetQueueAttributes struct {
}
-func (*awsAwsquery_deserializeOpUntagQueue) ID() string {
+func (*awsAwsjson10_deserializeOpSetQueueAttributes) ID() string {
return "OperationDeserializer"
}
-func (m *awsAwsquery_deserializeOpUntagQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsAwsjson10_deserializeOpSetQueueAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -1849,9 +2381,9 @@ func (m *awsAwsquery_deserializeOpUntagQueue) HandleDeserialize(ctx context.Cont
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsquery_deserializeOpErrorUntagQueue(response, &metadata)
+ return out, metadata, awsAwsjson10_deserializeOpErrorSetQueueAttributes(response, &metadata)
}
- output := &UntagQueueOutput{}
+ output := &SetQueueAttributesOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
@@ -1863,7 +2395,7 @@ func (m *awsAwsquery_deserializeOpUntagQueue) HandleDeserialize(ctx context.Cont
return out, metadata, err
}
-func awsAwsquery_deserializeOpErrorUntagQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsAwsjson10_deserializeOpErrorSetQueueAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -1873,22 +2405,62 @@ func awsAwsquery_deserializeOpErrorUntagQueue(response *smithyhttp.Response, met
errorCode := "UnknownError"
errorMessage := errorCode
- errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
return err
}
- if reqID := errorComponents.RequestID; len(reqID) != 0 {
- awsmiddleware.SetRequestIDMetadata(metadata, reqID)
- }
- if len(errorComponents.Code) != 0 {
- errorCode = errorComponents.Code
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
}
- if len(errorComponents.Message) != 0 {
- errorMessage = errorComponents.Message
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
}
- errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidAttributeName", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAttributeName(response, errorBody)
+
+ case strings.EqualFold("InvalidAttributeValue", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAttributeValue(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("OverLimit", errorCode):
+ return awsAwsjson10_deserializeErrorOverLimit(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
@@ -1898,825 +2470,2558 @@ func awsAwsquery_deserializeOpErrorUntagQueue(response *smithyhttp.Response, met
}
}
-func awsAwsquery_deserializeErrorBatchEntryIdsNotDistinct(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.BatchEntryIdsNotDistinct{}
- return output
+type awsAwsjson10_deserializeOpStartMessageMoveTask struct {
}
-func awsAwsquery_deserializeErrorBatchRequestTooLong(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.BatchRequestTooLong{}
- return output
+func (*awsAwsjson10_deserializeOpStartMessageMoveTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson10_deserializeOpStartMessageMoveTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson10_deserializeOpErrorStartMessageMoveTask(response, &metadata)
+ }
+ output := &StartMessageMoveTaskOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson10_deserializeOpDocumentStartMessageMoveTaskOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson10_deserializeOpErrorStartMessageMoveTask(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
+ default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson10_deserializeOpTagQueue struct {
+}
+
+func (*awsAwsjson10_deserializeOpTagQueue) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson10_deserializeOpTagQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson10_deserializeOpErrorTagQueue(response, &metadata)
+ }
+ output := &TagQueueOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson10_deserializeOpErrorTagQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
+ default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson10_deserializeOpUntagQueue struct {
+}
+
+func (*awsAwsjson10_deserializeOpUntagQueue) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson10_deserializeOpUntagQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson10_deserializeOpErrorUntagQueue(response, &metadata)
+ }
+ output := &UntagQueueOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson10_deserializeOpErrorUntagQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidAddress", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidAddress(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurity", errorCode):
+ return awsAwsjson10_deserializeErrorInvalidSecurity(response, errorBody)
+
+ case strings.EqualFold("QueueDoesNotExist", errorCode):
+ return awsAwsjson10_deserializeErrorQueueDoesNotExist(response, errorBody)
+
+ case strings.EqualFold("RequestThrottled", errorCode):
+ return awsAwsjson10_deserializeErrorRequestThrottled(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperation", errorCode):
+ return awsAwsjson10_deserializeErrorUnsupportedOperation(response, errorBody)
+
+ default:
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ errorCode = awsQueryErrorCode
+ }
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsAwsjson10_deserializeErrorBatchEntryIdsNotDistinct(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.BatchEntryIdsNotDistinct{}
+ err := awsAwsjson10_deserializeDocumentBatchEntryIdsNotDistinct(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorBatchRequestTooLong(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.BatchRequestTooLong{}
+ err := awsAwsjson10_deserializeDocumentBatchRequestTooLong(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorEmptyBatchRequest(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.EmptyBatchRequest{}
+ err := awsAwsjson10_deserializeDocumentEmptyBatchRequest(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorInvalidAddress(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidAddress{}
+ err := awsAwsjson10_deserializeDocumentInvalidAddress(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorInvalidAttributeName(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidAttributeName{}
+ err := awsAwsjson10_deserializeDocumentInvalidAttributeName(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorInvalidAttributeValue(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidAttributeValue{}
+ err := awsAwsjson10_deserializeDocumentInvalidAttributeValue(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorInvalidBatchEntryId(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidBatchEntryId{}
+ err := awsAwsjson10_deserializeDocumentInvalidBatchEntryId(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorInvalidIdFormat(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidIdFormat{}
+ err := awsAwsjson10_deserializeDocumentInvalidIdFormat(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorInvalidMessageContents(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidMessageContents{}
+ err := awsAwsjson10_deserializeDocumentInvalidMessageContents(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorInvalidSecurity(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidSecurity{}
+ err := awsAwsjson10_deserializeDocumentInvalidSecurity(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorKmsAccessDenied(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KmsAccessDenied{}
+ err := awsAwsjson10_deserializeDocumentKmsAccessDenied(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorKmsDisabled(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KmsDisabled{}
+ err := awsAwsjson10_deserializeDocumentKmsDisabled(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorKmsInvalidKeyUsage(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KmsInvalidKeyUsage{}
+ err := awsAwsjson10_deserializeDocumentKmsInvalidKeyUsage(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorKmsInvalidState(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KmsInvalidState{}
+ err := awsAwsjson10_deserializeDocumentKmsInvalidState(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorKmsNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KmsNotFound{}
+ err := awsAwsjson10_deserializeDocumentKmsNotFound(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorKmsOptInRequired(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KmsOptInRequired{}
+ err := awsAwsjson10_deserializeDocumentKmsOptInRequired(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorKmsThrottled(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KmsThrottled{}
+ err := awsAwsjson10_deserializeDocumentKmsThrottled(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorMessageNotInflight(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.MessageNotInflight{}
+ err := awsAwsjson10_deserializeDocumentMessageNotInflight(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorOverLimit(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.OverLimit{}
+ err := awsAwsjson10_deserializeDocumentOverLimit(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorPurgeQueueInProgress(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.PurgeQueueInProgress{}
+ err := awsAwsjson10_deserializeDocumentPurgeQueueInProgress(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorQueueDeletedRecently(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.QueueDeletedRecently{}
+ err := awsAwsjson10_deserializeDocumentQueueDeletedRecently(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorQueueDoesNotExist(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.QueueDoesNotExist{}
+ err := awsAwsjson10_deserializeDocumentQueueDoesNotExist(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorQueueNameExists(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.QueueNameExists{}
+ err := awsAwsjson10_deserializeDocumentQueueNameExists(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorReceiptHandleIsInvalid(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.ReceiptHandleIsInvalid{}
+ err := awsAwsjson10_deserializeDocumentReceiptHandleIsInvalid(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorRequestThrottled(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.RequestThrottled{}
+ err := awsAwsjson10_deserializeDocumentRequestThrottled(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
}
-func awsAwsquery_deserializeErrorEmptyBatchRequest(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.EmptyBatchRequest{}
- return output
-}
+func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.ResourceNotFoundException{}
+ err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorTooManyEntriesInBatchRequest(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.TooManyEntriesInBatchRequest{}
+ err := awsAwsjson10_deserializeDocumentTooManyEntriesInBatchRequest(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeErrorUnsupportedOperation(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.UnsupportedOperation{}
+ err := awsAwsjson10_deserializeDocumentUnsupportedOperation(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ awsQueryErrorCode := getAwsQueryErrorCode(response)
+ if awsQueryErrorCode != "" {
+ output.ErrorCodeOverride = &awsQueryErrorCode
+ }
+ return output
+}
+
+func awsAwsjson10_deserializeDocumentBatchEntryIdsNotDistinct(v **types.BatchEntryIdsNotDistinct, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.BatchEntryIdsNotDistinct
+ if *v == nil {
+ sv = &types.BatchEntryIdsNotDistinct{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson10_deserializeDocumentBatchRequestTooLong(v **types.BatchRequestTooLong, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.BatchRequestTooLong
+ if *v == nil {
+ sv = &types.BatchRequestTooLong{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
-func awsAwsquery_deserializeErrorInvalidAttributeName(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.InvalidAttributeName{}
- return output
+ }
+ }
+ *v = sv
+ return nil
}
-func awsAwsquery_deserializeErrorInvalidBatchEntryId(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.InvalidBatchEntryId{}
- return output
-}
+func awsAwsjson10_deserializeDocumentBatchResultErrorEntry(v **types.BatchResultErrorEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
-func awsAwsquery_deserializeErrorInvalidIdFormat(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.InvalidIdFormat{}
- return output
-}
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
-func awsAwsquery_deserializeErrorInvalidMessageContents(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.InvalidMessageContents{}
- return output
-}
+ var sv *types.BatchResultErrorEntry
+ if *v == nil {
+ sv = &types.BatchResultErrorEntry{}
+ } else {
+ sv = *v
+ }
-func awsAwsquery_deserializeErrorMessageNotInflight(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.MessageNotInflight{}
- return output
-}
+ for key, value := range shape {
+ switch key {
+ case "Code":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Code = ptr.String(jtv)
+ }
-func awsAwsquery_deserializeErrorOverLimit(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.OverLimit{}
- return output
-}
+ case "Id":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Id = ptr.String(jtv)
+ }
-func awsAwsquery_deserializeErrorPurgeQueueInProgress(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.PurgeQueueInProgress{}
- return output
-}
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
-func awsAwsquery_deserializeErrorQueueDeletedRecently(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.QueueDeletedRecently{}
- return output
-}
+ case "SenderFault":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
+ }
+ sv.SenderFault = jtv
+ }
-func awsAwsquery_deserializeErrorQueueDoesNotExist(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.QueueDoesNotExist{}
- return output
-}
+ default:
+ _, _ = key, value
-func awsAwsquery_deserializeErrorQueueNameExists(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.QueueNameExists{}
- return output
+ }
+ }
+ *v = sv
+ return nil
}
-func awsAwsquery_deserializeErrorReceiptHandleIsInvalid(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ReceiptHandleIsInvalid{}
- return output
-}
+func awsAwsjson10_deserializeDocumentBatchResultErrorEntryList(v *[]types.BatchResultErrorEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
-func awsAwsquery_deserializeErrorTooManyEntriesInBatchRequest(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.TooManyEntriesInBatchRequest{}
- return output
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.BatchResultErrorEntry
+ if *v == nil {
+ cv = []types.BatchResultErrorEntry{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.BatchResultErrorEntry
+ destAddr := &col
+ if err := awsAwsjson10_deserializeDocumentBatchResultErrorEntry(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
}
-func awsAwsquery_deserializeErrorUnsupportedOperation(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.UnsupportedOperation{}
- return output
+func awsAwsjson10_deserializeDocumentBinaryList(v *[][]byte, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv [][]byte
+ if *v == nil {
+ cv = [][]byte{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col []byte
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Binary to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode Binary, %w", err)
+ }
+ col = dv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
}
-func awsAwsquery_deserializeDocumentBatchEntryIdsNotDistinct(v **types.BatchEntryIdsNotDistinct, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentChangeMessageVisibilityBatchResultEntry(v **types.ChangeMessageVisibilityBatchResultEntry, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.BatchEntryIdsNotDistinct
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ChangeMessageVisibilityBatchResultEntry
if *v == nil {
- sv = &types.BatchEntryIdsNotDistinct{}
+ sv = &types.ChangeMessageVisibilityBatchResultEntry{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "Id":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Id = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentBatchRequestTooLong(v **types.BatchRequestTooLong, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentChangeMessageVisibilityBatchResultEntryList(v *[]types.ChangeMessageVisibilityBatchResultEntry, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.BatchRequestTooLong
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.ChangeMessageVisibilityBatchResultEntry
if *v == nil {
- sv = &types.BatchRequestTooLong{}
+ cv = []types.ChangeMessageVisibilityBatchResultEntry{}
} else {
- sv = *v
+ cv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
+ for _, value := range shape {
+ var col types.ChangeMessageVisibilityBatchResultEntry
+ destAddr := &col
+ if err := awsAwsjson10_deserializeDocumentChangeMessageVisibilityBatchResultEntry(&destAddr, value); err != nil {
return err
}
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson10_deserializeDocumentDeleteMessageBatchResultEntry(v **types.DeleteMessageBatchResultEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.DeleteMessageBatchResultEntry
+ if *v == nil {
+ sv = &types.DeleteMessageBatchResultEntry{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Id":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Id = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentBatchResultErrorEntry(v **types.BatchResultErrorEntry, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentDeleteMessageBatchResultEntryList(v *[]types.DeleteMessageBatchResultEntry, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.BatchResultErrorEntry
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.DeleteMessageBatchResultEntry
if *v == nil {
- sv = &types.BatchResultErrorEntry{}
+ cv = []types.DeleteMessageBatchResultEntry{}
} else {
- sv = *v
+ cv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
+ for _, value := range shape {
+ var col types.DeleteMessageBatchResultEntry
+ destAddr := &col
+ if err := awsAwsjson10_deserializeDocumentDeleteMessageBatchResultEntry(&destAddr, value); err != nil {
return err
}
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Code", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Code = ptr.String(xtv)
- }
+ col = *destAddr
+ cv = append(cv, col)
- case strings.EqualFold("Id", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Id = ptr.String(xtv)
- }
+ }
+ *v = cv
+ return nil
+}
- case strings.EqualFold("Message", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Message = ptr.String(xtv)
- }
+func awsAwsjson10_deserializeDocumentEmptyBatchRequest(v **types.EmptyBatchRequest, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
- case strings.EqualFold("SenderFault", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv, err := strconv.ParseBool(string(val))
- if err != nil {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val)
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EmptyBatchRequest
+ if *v == nil {
+ sv = &types.EmptyBatchRequest{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
}
- sv.SenderFault = xtv
+ sv.Message = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentBatchResultErrorEntryList(v *[]types.BatchResultErrorEntry, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentInvalidAddress(v **types.InvalidAddress, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv []types.BatchResultErrorEntry
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidAddress
if *v == nil {
- sv = make([]types.BatchResultErrorEntry, 0)
+ sv = &types.InvalidAddress{}
} else {
sv = *v
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("member", t.Name.Local):
- var col types.BatchResultErrorEntry
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &col
- if err := awsAwsquery_deserializeDocumentBatchResultErrorEntry(&destAddr, nodeDecoder); err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
- col = *destAddr
- sv = append(sv, col)
default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson10_deserializeDocumentInvalidAttributeName(v **types.InvalidAttributeName, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidAttributeName
+ if *v == nil {
+ sv = &types.InvalidAttributeName{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentBatchResultErrorEntryListUnwrapped(v *[]types.BatchResultErrorEntry, decoder smithyxml.NodeDecoder) error {
- var sv []types.BatchResultErrorEntry
+func awsAwsjson10_deserializeDocumentInvalidAttributeValue(v **types.InvalidAttributeValue, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidAttributeValue
if *v == nil {
- sv = make([]types.BatchResultErrorEntry, 0)
+ sv = &types.InvalidAttributeValue{}
} else {
sv = *v
}
- switch {
- default:
- var mv types.BatchResultErrorEntry
- t := decoder.StartEl
- _ = t
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &mv
- if err := awsAwsquery_deserializeDocumentBatchResultErrorEntry(&destAddr, nodeDecoder); err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
}
- mv = *destAddr
- sv = append(sv, mv)
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentBinaryList(v *[][]byte, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentInvalidBatchEntryId(v **types.InvalidBatchEntryId, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv [][]byte
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidBatchEntryId
if *v == nil {
- sv = make([][]byte, 0)
+ sv = &types.InvalidBatchEntryId{}
} else {
sv = *v
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- decoder = memberDecoder
- switch {
- case strings.EqualFold("BinaryListValue", t.Name.Local):
- var col []byte
- var data string
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- data = xtv
- }
- col, err = base64.StdEncoding.DecodeString(data)
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
- sv = append(sv, col)
default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentBinaryListUnwrapped(v *[][]byte, decoder smithyxml.NodeDecoder) error {
- var sv [][]byte
+func awsAwsjson10_deserializeDocumentInvalidIdFormat(v **types.InvalidIdFormat, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidIdFormat
if *v == nil {
- sv = make([][]byte, 0)
+ sv = &types.InvalidIdFormat{}
} else {
sv = *v
}
- switch {
- default:
- var mv []byte
- t := decoder.StartEl
- _ = t
- var data string
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- data = xtv
- }
- mv, err = base64.StdEncoding.DecodeString(data)
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ default:
+ _, _ = key, value
+
}
- sv = append(sv, mv)
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentChangeMessageVisibilityBatchResultEntry(v **types.ChangeMessageVisibilityBatchResultEntry, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentInvalidMessageContents(v **types.InvalidMessageContents, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.ChangeMessageVisibilityBatchResultEntry
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidMessageContents
if *v == nil {
- sv = &types.ChangeMessageVisibilityBatchResultEntry{}
+ sv = &types.InvalidMessageContents{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Id", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Id = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentChangeMessageVisibilityBatchResultEntryList(v *[]types.ChangeMessageVisibilityBatchResultEntry, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentInvalidSecurity(v **types.InvalidSecurity, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv []types.ChangeMessageVisibilityBatchResultEntry
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidSecurity
if *v == nil {
- sv = make([]types.ChangeMessageVisibilityBatchResultEntry, 0)
+ sv = &types.InvalidSecurity{}
} else {
sv = *v
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("member", t.Name.Local):
- var col types.ChangeMessageVisibilityBatchResultEntry
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &col
- if err := awsAwsquery_deserializeDocumentChangeMessageVisibilityBatchResultEntry(&destAddr, nodeDecoder); err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
- col = *destAddr
- sv = append(sv, col)
default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentChangeMessageVisibilityBatchResultEntryListUnwrapped(v *[]types.ChangeMessageVisibilityBatchResultEntry, decoder smithyxml.NodeDecoder) error {
- var sv []types.ChangeMessageVisibilityBatchResultEntry
+func awsAwsjson10_deserializeDocumentKmsAccessDenied(v **types.KmsAccessDenied, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KmsAccessDenied
if *v == nil {
- sv = make([]types.ChangeMessageVisibilityBatchResultEntry, 0)
+ sv = &types.KmsAccessDenied{}
} else {
sv = *v
}
- switch {
- default:
- var mv types.ChangeMessageVisibilityBatchResultEntry
- t := decoder.StartEl
- _ = t
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &mv
- if err := awsAwsquery_deserializeDocumentChangeMessageVisibilityBatchResultEntry(&destAddr, nodeDecoder); err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
}
- mv = *destAddr
- sv = append(sv, mv)
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentDeleteMessageBatchResultEntry(v **types.DeleteMessageBatchResultEntry, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentKmsDisabled(v **types.KmsDisabled, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.DeleteMessageBatchResultEntry
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KmsDisabled
if *v == nil {
- sv = &types.DeleteMessageBatchResultEntry{}
+ sv = &types.KmsDisabled{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Id", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Id = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentDeleteMessageBatchResultEntryList(v *[]types.DeleteMessageBatchResultEntry, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentKmsInvalidKeyUsage(v **types.KmsInvalidKeyUsage, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv []types.DeleteMessageBatchResultEntry
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KmsInvalidKeyUsage
if *v == nil {
- sv = make([]types.DeleteMessageBatchResultEntry, 0)
+ sv = &types.KmsInvalidKeyUsage{}
} else {
sv = *v
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("member", t.Name.Local):
- var col types.DeleteMessageBatchResultEntry
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &col
- if err := awsAwsquery_deserializeDocumentDeleteMessageBatchResultEntry(&destAddr, nodeDecoder); err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
- col = *destAddr
- sv = append(sv, col)
default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentDeleteMessageBatchResultEntryListUnwrapped(v *[]types.DeleteMessageBatchResultEntry, decoder smithyxml.NodeDecoder) error {
- var sv []types.DeleteMessageBatchResultEntry
+func awsAwsjson10_deserializeDocumentKmsInvalidState(v **types.KmsInvalidState, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KmsInvalidState
if *v == nil {
- sv = make([]types.DeleteMessageBatchResultEntry, 0)
+ sv = &types.KmsInvalidState{}
} else {
sv = *v
}
- switch {
- default:
- var mv types.DeleteMessageBatchResultEntry
- t := decoder.StartEl
- _ = t
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &mv
- if err := awsAwsquery_deserializeDocumentDeleteMessageBatchResultEntry(&destAddr, nodeDecoder); err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
}
- mv = *destAddr
- sv = append(sv, mv)
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentEmptyBatchRequest(v **types.EmptyBatchRequest, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentKmsNotFound(v **types.KmsNotFound, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.EmptyBatchRequest
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KmsNotFound
if *v == nil {
- sv = &types.EmptyBatchRequest{}
+ sv = &types.KmsNotFound{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentInvalidAttributeName(v **types.InvalidAttributeName, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentKmsOptInRequired(v **types.KmsOptInRequired, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.InvalidAttributeName
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KmsOptInRequired
if *v == nil {
- sv = &types.InvalidAttributeName{}
+ sv = &types.KmsOptInRequired{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentInvalidBatchEntryId(v **types.InvalidBatchEntryId, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentKmsThrottled(v **types.KmsThrottled, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.InvalidBatchEntryId
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KmsThrottled
if *v == nil {
- sv = &types.InvalidBatchEntryId{}
+ sv = &types.KmsThrottled{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentInvalidIdFormat(v **types.InvalidIdFormat, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentListMessageMoveTasksResultEntry(v **types.ListMessageMoveTasksResultEntry, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.InvalidIdFormat
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ListMessageMoveTasksResultEntry
if *v == nil {
- sv = &types.InvalidIdFormat{}
+ sv = &types.ListMessageMoveTasksResultEntry{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "ApproximateNumberOfMessagesMoved":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ApproximateNumberOfMessagesMoved = i64
+ }
+
+ case "ApproximateNumberOfMessagesToMove":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NullableLong to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ApproximateNumberOfMessagesToMove = ptr.Int64(i64)
+ }
+
+ case "DestinationArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.DestinationArn = ptr.String(jtv)
+ }
+
+ case "FailureReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.FailureReason = ptr.String(jtv)
+ }
+
+ case "MaxNumberOfMessagesPerSecond":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NullableInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaxNumberOfMessagesPerSecond = ptr.Int32(int32(i64))
}
+ case "SourceArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.SourceArn = ptr.String(jtv)
+ }
+
+ case "StartedTimestamp":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.StartedTimestamp = i64
+ }
+
+ case "Status":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Status = ptr.String(jtv)
+ }
+
+ case "TaskHandle":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.TaskHandle = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentInvalidMessageContents(v **types.InvalidMessageContents, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentListMessageMoveTasksResultEntryList(v *[]types.ListMessageMoveTasksResultEntry, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.InvalidMessageContents
- if *v == nil {
- sv = &types.InvalidMessageContents{}
- } else {
- sv = *v
+ if value == nil {
+ return nil
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.ListMessageMoveTasksResultEntry
+ if *v == nil {
+ cv = []types.ListMessageMoveTasksResultEntry{}
+ } else {
+ cv = *v
+ }
+ for _, value := range shape {
+ var col types.ListMessageMoveTasksResultEntry
+ destAddr := &col
+ if err := awsAwsjson10_deserializeDocumentListMessageMoveTasksResultEntry(&destAddr, value); err != nil {
+ return err
}
- decoder = originalDecoder
+ col = *destAddr
+ cv = append(cv, col)
+
}
- *v = sv
+ *v = cv
return nil
}
-func awsAwsquery_deserializeDocumentMessage(v **types.Message, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentMessage(v **types.Message, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *types.Message
if *v == nil {
sv = &types.Message{}
@@ -2724,112 +5029,85 @@ func awsAwsquery_deserializeDocumentMessage(v **types.Message, decoder smithyxml
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Attribute", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentMessageSystemAttributeMapUnwrapped(&sv.Attributes, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "Attributes":
+ if err := awsAwsjson10_deserializeDocumentMessageSystemAttributeMap(&sv.Attributes, value); err != nil {
return err
}
- case strings.EqualFold("Body", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Body = ptr.String(xtv)
+ case "Body":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Body = ptr.String(jtv)
}
- case strings.EqualFold("MD5OfBody", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfBody = ptr.String(xtv)
+ case "MD5OfBody":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfBody = ptr.String(jtv)
}
- case strings.EqualFold("MD5OfMessageAttributes", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfMessageAttributes = ptr.String(xtv)
+ case "MD5OfMessageAttributes":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfMessageAttributes = ptr.String(jtv)
}
- case strings.EqualFold("MessageAttribute", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentMessageBodyAttributeMapUnwrapped(&sv.MessageAttributes, nodeDecoder); err != nil {
+ case "MessageAttributes":
+ if err := awsAwsjson10_deserializeDocumentMessageBodyAttributeMap(&sv.MessageAttributes, value); err != nil {
return err
}
- case strings.EqualFold("MessageId", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MessageId = ptr.String(xtv)
+ case "MessageId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MessageId = ptr.String(jtv)
}
- case strings.EqualFold("ReceiptHandle", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.ReceiptHandle = ptr.String(xtv)
+ case "ReceiptHandle":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ReceiptHandle = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentMessageAttributeValue(v **types.MessageAttributeValue, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentMessageAttributeValue(v **types.MessageAttributeValue, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *types.MessageAttributeValue
if *v == nil {
sv = &types.MessageAttributeValue{}
@@ -2837,253 +5115,140 @@ func awsAwsquery_deserializeDocumentMessageAttributeValue(v **types.MessageAttri
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("BinaryListValue", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentBinaryListUnwrapped(&sv.BinaryListValues, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "BinaryListValues":
+ if err := awsAwsjson10_deserializeDocumentBinaryList(&sv.BinaryListValues, value); err != nil {
return err
}
- case strings.EqualFold("BinaryValue", t.Name.Local):
- var data string
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- data = xtv
- }
- sv.BinaryValue, err = base64.StdEncoding.DecodeString(data)
- if err != nil {
- return err
+ case "BinaryValue":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Binary to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode Binary, %w", err)
+ }
+ sv.BinaryValue = dv
}
- case strings.EqualFold("DataType", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.DataType = ptr.String(xtv)
+ case "DataType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.DataType = ptr.String(jtv)
}
- case strings.EqualFold("StringListValue", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentStringListUnwrapped(&sv.StringListValues, nodeDecoder); err != nil {
+ case "StringListValues":
+ if err := awsAwsjson10_deserializeDocumentStringList(&sv.StringListValues, value); err != nil {
return err
}
- case strings.EqualFold("StringValue", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.StringValue = ptr.String(xtv)
+ case "StringValue":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StringValue = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentMessageBodyAttributeMap(v *map[string]types.MessageAttributeValue, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentMessageBodyAttributeMap(v *map[string]types.MessageAttributeValue, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv map[string]types.MessageAttributeValue
- if *v == nil {
- sv = make(map[string]types.MessageAttributeValue, 0)
- } else {
- sv = *v
+ if value == nil {
+ return nil
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("entry", t.Name.Local):
- entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentMessageBodyAttributeMapUnwrapped(&sv, entryDecoder); err != nil {
- return err
- }
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
-
- }
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
}
- *v = sv
- return nil
-}
-func awsAwsquery_deserializeDocumentMessageBodyAttributeMapUnwrapped(v *map[string]types.MessageAttributeValue, decoder smithyxml.NodeDecoder) error {
- var sv map[string]types.MessageAttributeValue
+ var mv map[string]types.MessageAttributeValue
if *v == nil {
- sv = make(map[string]types.MessageAttributeValue, 0)
+ mv = map[string]types.MessageAttributeValue{}
} else {
- sv = *v
+ mv = *v
}
- var ek string
- var ev types.MessageAttributeValue
- for {
- t, done, err := decoder.Token()
- if err != nil {
+ for key, value := range shape {
+ var parsedVal types.MessageAttributeValue
+ mapVar := parsedVal
+ destAddr := &mapVar
+ if err := awsAwsjson10_deserializeDocumentMessageAttributeValue(&destAddr, value); err != nil {
return err
}
- if done {
- sv[ek] = ev
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Name", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- ek = xtv
- }
-
- case strings.EqualFold("Value", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- mapVar := ev
- destAddr := &mapVar
- if err := awsAwsquery_deserializeDocumentMessageAttributeValue(&destAddr, nodeDecoder); err != nil {
- return err
- }
- ev = *destAddr
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ parsedVal = *destAddr
+ mv[key] = parsedVal
- }
- decoder = originalDecoder
}
- *v = sv
+ *v = mv
return nil
}
-func awsAwsquery_deserializeDocumentMessageList(v *[]types.Message, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentMessageList(v *[]types.Message, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv []types.Message
- if *v == nil {
- sv = make([]types.Message, 0)
- } else {
- sv = *v
+ if value == nil {
+ return nil
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("member", t.Name.Local):
- var col types.Message
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &col
- if err := awsAwsquery_deserializeDocumentMessage(&destAddr, nodeDecoder); err != nil {
- return err
- }
- col = *destAddr
- sv = append(sv, col)
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
-
- }
- decoder = originalDecoder
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
}
- *v = sv
- return nil
-}
-func awsAwsquery_deserializeDocumentMessageListUnwrapped(v *[]types.Message, decoder smithyxml.NodeDecoder) error {
- var sv []types.Message
+ var cv []types.Message
if *v == nil {
- sv = make([]types.Message, 0)
+ cv = []types.Message{}
} else {
- sv = *v
+ cv = *v
}
- switch {
- default:
- var mv types.Message
- t := decoder.StartEl
- _ = t
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &mv
- if err := awsAwsquery_deserializeDocumentMessage(&destAddr, nodeDecoder); err != nil {
+ for _, value := range shape {
+ var col types.Message
+ destAddr := &col
+ if err := awsAwsjson10_deserializeDocumentMessage(&destAddr, value); err != nil {
return err
}
- mv = *destAddr
- sv = append(sv, mv)
+ col = *destAddr
+ cv = append(cv, col)
+
}
- *v = sv
+ *v = cv
return nil
}
-func awsAwsquery_deserializeDocumentMessageNotInflight(v **types.MessageNotInflight, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentMessageNotInflight(v **types.MessageNotInflight, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *types.MessageNotInflight
if *v == nil {
sv = &types.MessageNotInflight{}
@@ -3091,133 +5256,66 @@ func awsAwsquery_deserializeDocumentMessageNotInflight(v **types.MessageNotInfli
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
+ for key, value := range shape {
+ switch key {
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentMessageSystemAttributeMap(v *map[string]string, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentMessageSystemAttributeMap(v *map[string]string, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv map[string]string
- if *v == nil {
- sv = make(map[string]string, 0)
- } else {
- sv = *v
+ if value == nil {
+ return nil
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("entry", t.Name.Local):
- entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentMessageSystemAttributeMapUnwrapped(&sv, entryDecoder); err != nil {
- return err
- }
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
-
- }
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
}
- *v = sv
- return nil
-}
-func awsAwsquery_deserializeDocumentMessageSystemAttributeMapUnwrapped(v *map[string]string, decoder smithyxml.NodeDecoder) error {
- var sv map[string]string
+ var mv map[string]string
if *v == nil {
- sv = make(map[string]string, 0)
+ mv = map[string]string{}
} else {
- sv = *v
+ mv = *v
}
- var ek types.MessageSystemAttributeName
- var ev string
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- sv[string(ek)] = ev
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Name", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- ek = types.MessageSystemAttributeName(xtv)
- }
-
- case strings.EqualFold("Value", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- ev = xtv
- }
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ var parsedVal string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
-
+ parsedVal = jtv
}
- decoder = originalDecoder
+ mv[key] = parsedVal
+
}
- *v = sv
+ *v = mv
return nil
}
-func awsAwsquery_deserializeDocumentOverLimit(v **types.OverLimit, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentOverLimit(v **types.OverLimit, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *types.OverLimit
if *v == nil {
sv = &types.OverLimit{}
@@ -3225,35 +5323,39 @@ func awsAwsquery_deserializeDocumentOverLimit(v **types.OverLimit, decoder smith
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentPurgeQueueInProgress(v **types.PurgeQueueInProgress, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentPurgeQueueInProgress(v **types.PurgeQueueInProgress, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *types.PurgeQueueInProgress
if *v == nil {
sv = &types.PurgeQueueInProgress{}
@@ -3261,357 +5363,351 @@ func awsAwsquery_deserializeDocumentPurgeQueueInProgress(v **types.PurgeQueueInP
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentQueueAttributeMap(v *map[string]string, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentQueueAttributeMap(v *map[string]string, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv map[string]string
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var mv map[string]string
if *v == nil {
- sv = make(map[string]string, 0)
+ mv = map[string]string{}
} else {
- sv = *v
+ mv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("entry", t.Name.Local):
- entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentQueueAttributeMapUnwrapped(&sv, entryDecoder); err != nil {
- return err
- }
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ var parsedVal string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
-
+ parsedVal = jtv
}
+ mv[key] = parsedVal
+
}
- *v = sv
+ *v = mv
return nil
}
-func awsAwsquery_deserializeDocumentQueueAttributeMapUnwrapped(v *map[string]string, decoder smithyxml.NodeDecoder) error {
- var sv map[string]string
+func awsAwsjson10_deserializeDocumentQueueDeletedRecently(v **types.QueueDeletedRecently, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.QueueDeletedRecently
if *v == nil {
- sv = make(map[string]string, 0)
+ sv = &types.QueueDeletedRecently{}
} else {
sv = *v
}
- var ek types.QueueAttributeName
- var ev string
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- sv[string(ek)] = ev
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Name", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- ek = types.QueueAttributeName(xtv)
- }
-
- case strings.EqualFold("Value", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- ev = xtv
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentQueueDeletedRecently(v **types.QueueDeletedRecently, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentQueueDoesNotExist(v **types.QueueDoesNotExist, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.QueueDeletedRecently
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.QueueDoesNotExist
if *v == nil {
- sv = &types.QueueDeletedRecently{}
+ sv = &types.QueueDoesNotExist{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentQueueDoesNotExist(v **types.QueueDoesNotExist, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentQueueNameExists(v **types.QueueNameExists, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.QueueDoesNotExist
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.QueueNameExists
if *v == nil {
- sv = &types.QueueDoesNotExist{}
+ sv = &types.QueueNameExists{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentQueueNameExists(v **types.QueueNameExists, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentQueueUrlList(v *[]string, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.QueueNameExists
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
if *v == nil {
- sv = &types.QueueNameExists{}
+ cv = []string{}
} else {
- sv = *v
+ cv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
-
+ col = jtv
}
- decoder = originalDecoder
+ cv = append(cv, col)
+
}
- *v = sv
+ *v = cv
return nil
}
-func awsAwsquery_deserializeDocumentQueueUrlList(v *[]string, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentReceiptHandleIsInvalid(v **types.ReceiptHandleIsInvalid, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv []string
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ReceiptHandleIsInvalid
if *v == nil {
- sv = make([]string, 0)
+ sv = &types.ReceiptHandleIsInvalid{}
} else {
sv = *v
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- decoder = memberDecoder
- switch {
- case strings.EqualFold("member", t.Name.Local):
- var col string
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- col = xtv
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
- sv = append(sv, col)
default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentQueueUrlListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
- var sv []string
+func awsAwsjson10_deserializeDocumentRequestThrottled(v **types.RequestThrottled, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RequestThrottled
if *v == nil {
- sv = make([]string, 0)
+ sv = &types.RequestThrottled{}
} else {
sv = *v
}
- switch {
- default:
- var mv string
- t := decoder.StartEl
- _ = t
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- mv = xtv
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
}
- sv = append(sv, mv)
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentReceiptHandleIsInvalid(v **types.ReceiptHandleIsInvalid, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.ReceiptHandleIsInvalid
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ResourceNotFoundException
if *v == nil {
- sv = &types.ReceiptHandleIsInvalid{}
+ sv = &types.ResourceNotFoundException{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentSendMessageBatchResultEntry(v **types.SendMessageBatchResultEntry, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentSendMessageBatchResultEntry(v **types.SendMessageBatchResultEntry, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *types.SendMessageBatchResultEntry
if *v == nil {
sv = &types.SendMessageBatchResultEntry{}
@@ -3619,431 +5715,314 @@ func awsAwsquery_deserializeDocumentSendMessageBatchResultEntry(v **types.SendMe
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Id", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Id = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "Id":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Id = ptr.String(jtv)
}
- case strings.EqualFold("MD5OfMessageAttributes", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfMessageAttributes = ptr.String(xtv)
+ case "MD5OfMessageAttributes":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfMessageAttributes = ptr.String(jtv)
}
- case strings.EqualFold("MD5OfMessageBody", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfMessageBody = ptr.String(xtv)
+ case "MD5OfMessageBody":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfMessageBody = ptr.String(jtv)
}
- case strings.EqualFold("MD5OfMessageSystemAttributes", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfMessageSystemAttributes = ptr.String(xtv)
+ case "MD5OfMessageSystemAttributes":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfMessageSystemAttributes = ptr.String(jtv)
}
- case strings.EqualFold("MessageId", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MessageId = ptr.String(xtv)
+ case "MessageId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MessageId = ptr.String(jtv)
}
- case strings.EqualFold("SequenceNumber", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.SequenceNumber = ptr.String(xtv)
+ case "SequenceNumber":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.SequenceNumber = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentSendMessageBatchResultEntryList(v *[]types.SendMessageBatchResultEntry, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeDocumentSendMessageBatchResultEntryList(v *[]types.SendMessageBatchResultEntry, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv []types.SendMessageBatchResultEntry
- if *v == nil {
- sv = make([]types.SendMessageBatchResultEntry, 0)
- } else {
- sv = *v
+ if value == nil {
+ return nil
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("member", t.Name.Local):
- var col types.SendMessageBatchResultEntry
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &col
- if err := awsAwsquery_deserializeDocumentSendMessageBatchResultEntry(&destAddr, nodeDecoder); err != nil {
- return err
- }
- col = *destAddr
- sv = append(sv, col)
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
-
- }
- decoder = originalDecoder
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
}
- *v = sv
- return nil
-}
-func awsAwsquery_deserializeDocumentSendMessageBatchResultEntryListUnwrapped(v *[]types.SendMessageBatchResultEntry, decoder smithyxml.NodeDecoder) error {
- var sv []types.SendMessageBatchResultEntry
+ var cv []types.SendMessageBatchResultEntry
if *v == nil {
- sv = make([]types.SendMessageBatchResultEntry, 0)
+ cv = []types.SendMessageBatchResultEntry{}
} else {
- sv = *v
+ cv = *v
}
- switch {
- default:
- var mv types.SendMessageBatchResultEntry
- t := decoder.StartEl
- _ = t
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- destAddr := &mv
- if err := awsAwsquery_deserializeDocumentSendMessageBatchResultEntry(&destAddr, nodeDecoder); err != nil {
+ for _, value := range shape {
+ var col types.SendMessageBatchResultEntry
+ destAddr := &col
+ if err := awsAwsjson10_deserializeDocumentSendMessageBatchResultEntry(&destAddr, value); err != nil {
return err
}
- mv = *destAddr
- sv = append(sv, mv)
+ col = *destAddr
+ cv = append(cv, col)
+
}
- *v = sv
+ *v = cv
return nil
}
-func awsAwsquery_deserializeDocumentStringList(v *[]string, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentStringList(v *[]string, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv []string
- if *v == nil {
- sv = make([]string, 0)
- } else {
- sv = *v
+ if value == nil {
+ return nil
}
- originalDecoder := decoder
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- decoder = memberDecoder
- switch {
- case strings.EqualFold("StringListValue", t.Name.Local):
- var col string
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- col = xtv
- }
- sv = append(sv, col)
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
-
- }
- decoder = originalDecoder
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
}
- *v = sv
- return nil
-}
-func awsAwsquery_deserializeDocumentStringListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
- var sv []string
+ var cv []string
if *v == nil {
- sv = make([]string, 0)
+ cv = []string{}
} else {
- sv = *v
+ cv = *v
}
- switch {
- default:
- var mv string
- t := decoder.StartEl
- _ = t
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- mv = xtv
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ col = jtv
}
- sv = append(sv, mv)
+ cv = append(cv, col)
+
}
- *v = sv
+ *v = cv
return nil
}
-func awsAwsquery_deserializeDocumentTagMap(v *map[string]string, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentTagMap(v *map[string]string, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv map[string]string
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var mv map[string]string
if *v == nil {
- sv = make(map[string]string, 0)
+ mv = map[string]string{}
} else {
- sv = *v
+ mv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- switch {
- case strings.EqualFold("entry", t.Name.Local):
- entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentTagMapUnwrapped(&sv, entryDecoder); err != nil {
- return err
- }
-
- default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ var parsedVal string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
}
-
+ parsedVal = jtv
}
+ mv[key] = parsedVal
+
}
- *v = sv
+ *v = mv
return nil
}
-func awsAwsquery_deserializeDocumentTagMapUnwrapped(v *map[string]string, decoder smithyxml.NodeDecoder) error {
- var sv map[string]string
+func awsAwsjson10_deserializeDocumentTooManyEntriesInBatchRequest(v **types.TooManyEntriesInBatchRequest, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.TooManyEntriesInBatchRequest
if *v == nil {
- sv = make(map[string]string, 0)
+ sv = &types.TooManyEntriesInBatchRequest{}
} else {
sv = *v
}
- var ek string
- var ev string
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- sv[ek] = ev
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Key", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- ek = xtv
- }
-
- case strings.EqualFold("Value", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- ev = xtv
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
default:
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentTooManyEntriesInBatchRequest(v **types.TooManyEntriesInBatchRequest, decoder smithyxml.NodeDecoder) error {
+
+func awsAwsjson10_deserializeDocumentUnsupportedOperation(v **types.UnsupportedOperation, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.TooManyEntriesInBatchRequest
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnsupportedOperation
if *v == nil {
- sv = &types.TooManyEntriesInBatchRequest{}
+ sv = &types.UnsupportedOperation{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeDocumentUnsupportedOperation(v **types.UnsupportedOperation, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentCancelMessageMoveTaskOutput(v **CancelMessageMoveTaskOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.UnsupportedOperation
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CancelMessageMoveTaskOutput
if *v == nil {
- sv = &types.UnsupportedOperation{}
+ sv = &CancelMessageMoveTaskOutput{}
} else {
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ for key, value := range shape {
+ switch key {
+ case "ApproximateNumberOfMessagesMoved":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ApproximateNumberOfMessagesMoved = i64
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentChangeMessageVisibilityBatchOutput(v **ChangeMessageVisibilityBatchOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentChangeMessageVisibilityBatchOutput(v **ChangeMessageVisibilityBatchOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *ChangeMessageVisibilityBatchOutput
if *v == nil {
sv = &ChangeMessageVisibilityBatchOutput{}
@@ -4051,47 +6030,40 @@ func awsAwsquery_deserializeOpDocumentChangeMessageVisibilityBatchOutput(v **Cha
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("BatchResultErrorEntry", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentBatchResultErrorEntryListUnwrapped(&sv.Failed, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "Failed":
+ if err := awsAwsjson10_deserializeDocumentBatchResultErrorEntryList(&sv.Failed, value); err != nil {
return err
}
- case strings.EqualFold("ChangeMessageVisibilityBatchResultEntry", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentChangeMessageVisibilityBatchResultEntryListUnwrapped(&sv.Successful, nodeDecoder); err != nil {
+ case "Successful":
+ if err := awsAwsjson10_deserializeDocumentChangeMessageVisibilityBatchResultEntryList(&sv.Successful, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentCreateQueueOutput(v **CreateQueueOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentCreateQueueOutput(v **CreateQueueOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *CreateQueueOutput
if *v == nil {
sv = &CreateQueueOutput{}
@@ -4099,48 +6071,39 @@ func awsAwsquery_deserializeOpDocumentCreateQueueOutput(v **CreateQueueOutput, d
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("QueueUrl", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.QueueUrl = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "QueueUrl":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.QueueUrl = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentDeleteMessageBatchOutput(v **DeleteMessageBatchOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentDeleteMessageBatchOutput(v **DeleteMessageBatchOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *DeleteMessageBatchOutput
if *v == nil {
sv = &DeleteMessageBatchOutput{}
@@ -4148,47 +6111,40 @@ func awsAwsquery_deserializeOpDocumentDeleteMessageBatchOutput(v **DeleteMessage
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("BatchResultErrorEntry", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentBatchResultErrorEntryListUnwrapped(&sv.Failed, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "Failed":
+ if err := awsAwsjson10_deserializeDocumentBatchResultErrorEntryList(&sv.Failed, value); err != nil {
return err
}
- case strings.EqualFold("DeleteMessageBatchResultEntry", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentDeleteMessageBatchResultEntryListUnwrapped(&sv.Successful, nodeDecoder); err != nil {
+ case "Successful":
+ if err := awsAwsjson10_deserializeDocumentDeleteMessageBatchResultEntryList(&sv.Successful, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentGetQueueAttributesOutput(v **GetQueueAttributesOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentGetQueueAttributesOutput(v **GetQueueAttributesOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *GetQueueAttributesOutput
if *v == nil {
sv = &GetQueueAttributesOutput{}
@@ -4196,41 +6152,35 @@ func awsAwsquery_deserializeOpDocumentGetQueueAttributesOutput(v **GetQueueAttri
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Attribute", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentQueueAttributeMapUnwrapped(&sv.Attributes, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "Attributes":
+ if err := awsAwsjson10_deserializeDocumentQueueAttributeMap(&sv.Attributes, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentGetQueueUrlOutput(v **GetQueueUrlOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentGetQueueUrlOutput(v **GetQueueUrlOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *GetQueueUrlOutput
if *v == nil {
sv = &GetQueueUrlOutput{}
@@ -4238,48 +6188,39 @@ func awsAwsquery_deserializeOpDocumentGetQueueUrlOutput(v **GetQueueUrlOutput, d
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("QueueUrl", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.QueueUrl = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "QueueUrl":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.QueueUrl = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentListDeadLetterSourceQueuesOutput(v **ListDeadLetterSourceQueuesOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentListDeadLetterSourceQueuesOutput(v **ListDeadLetterSourceQueuesOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *ListDeadLetterSourceQueuesOutput
if *v == nil {
sv = &ListDeadLetterSourceQueuesOutput{}
@@ -4287,54 +6228,80 @@ func awsAwsquery_deserializeOpDocumentListDeadLetterSourceQueuesOutput(v **ListD
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("NextToken", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.NextToken = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "NextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Token to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
}
- case strings.EqualFold("QueueUrl", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentQueueUrlListUnwrapped(&sv.QueueUrls, nodeDecoder); err != nil {
+ case "queueUrls":
+ if err := awsAwsjson10_deserializeDocumentQueueUrlList(&sv.QueueUrls, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson10_deserializeOpDocumentListMessageMoveTasksOutput(v **ListMessageMoveTasksOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListMessageMoveTasksOutput
+ if *v == nil {
+ sv = &ListMessageMoveTasksOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Results":
+ if err := awsAwsjson10_deserializeDocumentListMessageMoveTasksResultEntryList(&sv.Results, value); err != nil {
return err
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentListQueuesOutput(v **ListQueuesOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentListQueuesOutput(v **ListQueuesOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *ListQueuesOutput
if *v == nil {
sv = &ListQueuesOutput{}
@@ -4342,54 +6309,44 @@ func awsAwsquery_deserializeOpDocumentListQueuesOutput(v **ListQueuesOutput, dec
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("NextToken", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.NextToken = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "NextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Token to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
}
- case strings.EqualFold("QueueUrl", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentQueueUrlListUnwrapped(&sv.QueueUrls, nodeDecoder); err != nil {
+ case "QueueUrls":
+ if err := awsAwsjson10_deserializeDocumentQueueUrlList(&sv.QueueUrls, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentListQueueTagsOutput(v **ListQueueTagsOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentListQueueTagsOutput(v **ListQueueTagsOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *ListQueueTagsOutput
if *v == nil {
sv = &ListQueueTagsOutput{}
@@ -4397,41 +6354,35 @@ func awsAwsquery_deserializeOpDocumentListQueueTagsOutput(v **ListQueueTagsOutpu
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Tag", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentTagMapUnwrapped(&sv.Tags, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "Tags":
+ if err := awsAwsjson10_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentReceiveMessageOutput(v **ReceiveMessageOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentReceiveMessageOutput(v **ReceiveMessageOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *ReceiveMessageOutput
if *v == nil {
sv = &ReceiveMessageOutput{}
@@ -4439,41 +6390,35 @@ func awsAwsquery_deserializeOpDocumentReceiveMessageOutput(v **ReceiveMessageOut
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("Message", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentMessageListUnwrapped(&sv.Messages, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "Messages":
+ if err := awsAwsjson10_deserializeDocumentMessageList(&sv.Messages, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentSendMessageBatchOutput(v **SendMessageBatchOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentSendMessageBatchOutput(v **SendMessageBatchOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *SendMessageBatchOutput
if *v == nil {
sv = &SendMessageBatchOutput{}
@@ -4481,47 +6426,40 @@ func awsAwsquery_deserializeOpDocumentSendMessageBatchOutput(v **SendMessageBatc
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("BatchResultErrorEntry", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentBatchResultErrorEntryListUnwrapped(&sv.Failed, nodeDecoder); err != nil {
+ for key, value := range shape {
+ switch key {
+ case "Failed":
+ if err := awsAwsjson10_deserializeDocumentBatchResultErrorEntryList(&sv.Failed, value); err != nil {
return err
}
- case strings.EqualFold("SendMessageBatchResultEntry", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsAwsquery_deserializeDocumentSendMessageBatchResultEntryListUnwrapped(&sv.Successful, nodeDecoder); err != nil {
+ case "Successful":
+ if err := awsAwsjson10_deserializeDocumentSendMessageBatchResultEntryList(&sv.Successful, value); err != nil {
return err
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
- }
+ _, _ = key, value
}
- decoder = originalDecoder
}
*v = sv
return nil
}
-func awsAwsquery_deserializeOpDocumentSendMessageOutput(v **SendMessageOutput, decoder smithyxml.NodeDecoder) error {
+func awsAwsjson10_deserializeOpDocumentSendMessageOutput(v **SendMessageOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
var sv *SendMessageOutput
if *v == nil {
sv = &SendMessageOutput{}
@@ -4529,92 +6467,137 @@ func awsAwsquery_deserializeOpDocumentSendMessageOutput(v **SendMessageOutput, d
sv = *v
}
- for {
- t, done, err := decoder.Token()
- if err != nil {
- return err
- }
- if done {
- break
- }
- originalDecoder := decoder
- decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
- switch {
- case strings.EqualFold("MD5OfMessageAttributes", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfMessageAttributes = ptr.String(xtv)
+ for key, value := range shape {
+ switch key {
+ case "MD5OfMessageAttributes":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfMessageAttributes = ptr.String(jtv)
}
- case strings.EqualFold("MD5OfMessageBody", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfMessageBody = ptr.String(xtv)
+ case "MD5OfMessageBody":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfMessageBody = ptr.String(jtv)
}
- case strings.EqualFold("MD5OfMessageSystemAttributes", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MD5OfMessageSystemAttributes = ptr.String(xtv)
+ case "MD5OfMessageSystemAttributes":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MD5OfMessageSystemAttributes = ptr.String(jtv)
}
- case strings.EqualFold("MessageId", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.MessageId = ptr.String(xtv)
+ case "MessageId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.MessageId = ptr.String(jtv)
}
- case strings.EqualFold("SequenceNumber", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.SequenceNumber = ptr.String(xtv)
+ case "SequenceNumber":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.SequenceNumber = ptr.String(jtv)
}
default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson10_deserializeOpDocumentStartMessageMoveTaskOutput(v **StartMessageMoveTaskOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *StartMessageMoveTaskOutput
+ if *v == nil {
+ sv = &StartMessageMoveTaskOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "TaskHandle":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.TaskHandle = ptr.String(jtv)
}
+ default:
+ _, _ = key, value
+
}
- decoder = originalDecoder
}
*v = sv
return nil
}
+
+type protocolErrorInfo struct {
+ Type string `json:"__type"`
+ Message string
+ Code any // nonstandard for awsjson but some services do present the type here
+}
+
+func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) {
+ var errInfo protocolErrorInfo
+ if err := decoder.Decode(&errInfo); err != nil {
+ if err == io.EOF {
+ return errInfo, nil
+ }
+ return errInfo, err
+ }
+
+ return errInfo, nil
+}
+
+func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) {
+ if len(headerType) != 0 {
+ return headerType, true
+ } else if len(bodyInfo.Type) != 0 {
+ return bodyInfo.Type, true
+ } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 {
+ return code, true
+ }
+ return "", false
+}
+func getAwsQueryErrorCode(response *smithyhttp.Response) string {
+ queryCodeHeader := response.Header.Get("x-amzn-query-error")
+ if queryCodeHeader != "" {
+ queryCodeParts := strings.Split(queryCodeHeader, ";")
+ if len(queryCodeParts) == 2 {
+ return queryCodeParts[0]
+ }
+ }
+ return ""
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/doc.go
index e3af956c..e3bfe76d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/doc.go
@@ -7,46 +7,21 @@
// highly-scalable hosted queue for storing messages as they travel between
// applications or microservices. Amazon SQS moves data between distributed
// application components and helps you decouple these components. For information
-// on the permissions you need to use this API, see Identity and access management
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-authentication-and-access-control.html)
-// in the Amazon SQS Developer Guide. You can use Amazon Web Services SDKs
-// (http://aws.amazon.com/tools/#sdk) to access Amazon SQS using your favorite
-// programming language. The SDKs perform tasks such as the following
-// automatically:
-//
-// * Cryptographically sign your service requests
-//
-// * Retry
-// requests
-//
-// * Handle error responses
+// on the permissions you need to use this API, see Identity and access management (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-authentication-and-access-control.html)
+// in the Amazon SQS Developer Guide. You can use Amazon Web Services SDKs (http://aws.amazon.com/tools/#sdk)
+// to access Amazon SQS using your favorite programming language. The SDKs perform
+// tasks such as the following automatically:
+// - Cryptographically sign your service requests
+// - Retry requests
+// - Handle error responses
//
// Additional information
-//
-// * Amazon SQS Product
-// Page (http://aws.amazon.com/sqs/)
-//
-// * Amazon SQS Developer Guide
-//
-// * Making API
-// Requests
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html)
-//
-// *
-// Amazon SQS Message Attributes
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
-//
-// *
-// Amazon SQS Dead-Letter Queues
-// (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
-//
-// *
-// Amazon SQS in the Command Line Interface
-// (http://docs.aws.amazon.com/cli/latest/reference/sqs/index.html)
-//
-// * Amazon Web
-// Services General Reference
-//
-// * Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#sqs_region)
+// - Amazon SQS Product Page (http://aws.amazon.com/sqs/)
+// - Amazon SQS Developer Guide
+// - Making API Requests (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html)
+// - Amazon SQS Message Attributes (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
+// - Amazon SQS Dead-Letter Queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html)
+// - Amazon SQS in the Command Line Interface (http://docs.aws.amazon.com/cli/latest/reference/sqs/index.html)
+// - Amazon Web Services General Reference
+// - Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#sqs_region)
package sqs
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go
index 2e74d231..7c6bb020 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go
@@ -8,10 +8,18 @@ import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
internalendpoints "github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
"net/url"
+ "os"
"strings"
)
@@ -39,13 +47,6 @@ func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointRe
return fn(region, options)
}
-func resolveDefaultEndpointConfiguration(o *Options) {
- if o.EndpointResolver != nil {
- return
- }
- o.EndpointResolver = NewDefaultEndpointResolver()
-}
-
// EndpointResolverFromURL returns an EndpointResolver configured using the
// provided endpoint url. By default, the resolved endpoint resolver uses the
// client region as signing region, and the endpoint source is set to
@@ -79,6 +80,10 @@ func (*ResolveEndpoint) ID() string {
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
@@ -94,6 +99,11 @@ func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.Ser
var endpoint aws.Endpoint
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
}
@@ -129,27 +139,10 @@ func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
type wrappedEndpointResolver struct {
awsResolver aws.EndpointResolverWithOptions
- resolver EndpointResolver
}
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- if w.awsResolver == nil {
- goto fallback
- }
- endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
- if err == nil {
- return endpoint, nil
- }
-
- if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
- return endpoint, err
- }
-
-fallback:
- if w.resolver == nil {
- return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
- }
- return w.resolver.ResolveEndpoint(region, options)
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
}
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
@@ -160,12 +153,13 @@ func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, opti
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
-// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
-// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
-// fallbackResolver for resolution.
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
//
-// fallbackResolver must not be nil
-func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
@@ -176,7 +170,6 @@ func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptio
return &wrappedEndpointResolver{
awsResolver: resolver,
- resolver: fallbackResolver,
}
}
@@ -198,3 +191,345 @@ func finalizeClientEndpointResolverOptions(options *Options) {
}
}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+func resolveBaseEndpoint(cfg aws.Config, o *Options) {
+ if cfg.BaseEndpoint != nil {
+ o.BaseEndpoint = cfg.BaseEndpoint
+ }
+
+ _, g := os.LookupEnv("AWS_ENDPOINT_URL")
+ _, s := os.LookupEnv("AWS_ENDPOINT_URL_SQS")
+
+ if g && !s {
+ return
+ }
+
+ value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "SQS", cfg.ConfigSources)
+ if found && err == nil {
+ o.BaseEndpoint = &value
+ }
+}
+
+func bindRegion(region string) *string {
+ if region == "" {
+ return nil
+ }
+ return aws.String(endpoints.MapFIPSRegion(region))
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+ return p
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseDualStack := *params.UseDualStack
+ _UseFIPS := *params.UseFIPS
+
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
+ }
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
+ }
+ uriString := _Endpoint
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sqs-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
+ }
+ }
+ if _UseFIPS == true {
+ if _PartitionResult.SupportsFIPS == true {
+ if _PartitionResult.Name == "aws-us-gov" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sqs.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sqs-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
+ }
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sqs.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sqs.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
+}
+
+type endpointParamsBinder interface {
+ bindEndpointParams(*EndpointParameters)
+}
+
+func bindEndpointParams(input interface{}, options Options) *EndpointParameters {
+ params := &EndpointParameters{}
+
+ params.Region = bindRegion(options.Region)
+ params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
+ params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
+ params.Endpoint = options.BaseEndpoint
+
+ if b, ok := input.(endpointParamsBinder); ok {
+ b.bindEndpointParams(params)
+ }
+
+ return params
+}
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.options.EndpointResolverV2 == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := bindEndpointParams(getOperationInput(ctx), m.options)
+ endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
+ endpt.URI.RawPath = endpt.URI.Path
+ }
+ req.URL.Scheme = endpt.URI.Scheme
+ req.URL.Host = endpt.URI.Host
+ req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
+ req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
+ for k := range endpt.Headers {
+ req.Header.Set(k, endpt.Headers.Get(k))
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
+ for _, o := range opts {
+ rscheme.SignerProperties.SetAll(&o.SignerProperties)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/generated.json
index 03747e15..9e150dde 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/generated.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/generated.json
@@ -9,6 +9,7 @@
"api_client.go",
"api_client_test.go",
"api_op_AddPermission.go",
+ "api_op_CancelMessageMoveTask.go",
"api_op_ChangeMessageVisibility.go",
"api_op_ChangeMessageVisibilityBatch.go",
"api_op_CreateQueue.go",
@@ -18,6 +19,7 @@
"api_op_GetQueueAttributes.go",
"api_op_GetQueueUrl.go",
"api_op_ListDeadLetterSourceQueues.go",
+ "api_op_ListMessageMoveTasks.go",
"api_op_ListQueueTags.go",
"api_op_ListQueues.go",
"api_op_PurgeQueue.go",
@@ -26,16 +28,22 @@
"api_op_SendMessage.go",
"api_op_SendMessageBatch.go",
"api_op_SetQueueAttributes.go",
+ "api_op_StartMessageMoveTask.go",
"api_op_TagQueue.go",
"api_op_UntagQueue.go",
+ "auth.go",
"deserializers.go",
"doc.go",
"endpoints.go",
+ "endpoints_config_test.go",
+ "endpoints_test.go",
"generated.json",
"internal/endpoints/endpoints.go",
"internal/endpoints/endpoints_test.go",
+ "options.go",
"protocol_test.go",
"serializers.go",
+ "snapshot_test.go",
"types/enums.go",
"types/errors.go",
"types/types.go",
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go
index ad88175c..44d268c4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go
@@ -3,4 +3,4 @@
package sqs
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.18.3"
+const goModuleVersion = "1.31.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go
index 3423cd86..fa0e231c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go
@@ -89,13 +89,17 @@ var partitionRegexp = struct {
AwsCn *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
AwsUsGov *regexp.Regexp
}{
- Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
}
@@ -153,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ap-south-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-1",
}: endpoints.Endpoint{},
@@ -162,18 +169,30 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ap-southeast-3",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-south-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
@@ -219,6 +238,12 @@ var defaultPartitions = endpoints.Partitions{
},
Deprecated: aws.TrueTernary,
},
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
@@ -363,6 +388,48 @@ var defaultPartitions = endpoints.Partitions{
}: endpoints.Endpoint{},
},
},
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sqs-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sqs.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sqs-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sqs.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ },
{
ID: "aws-us-gov",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/options.go
new file mode 100644
index 00000000..ce3b7c08
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/options.go
@@ -0,0 +1,221 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sqs
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+)
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // Allows you to disable the client's validation of response message checksums.
+ // Enabled by default. Used by SendMessage, SendMessageBatch, and ReceiveMessage.
+ DisableMessageChecksumValidation bool
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
+ // endpoint, set the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service operation. This should be
+ // used over the deprecated EndpointResolver.
+ EndpointResolverV2 EndpointResolverV2
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. If specified in an operation call's
+ // functional options with a value that is different than the constructed client's
+ // Options, the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // The auth scheme resolver which determines how to authenticate for each
+ // operation.
+ AuthSchemeResolver AuthSchemeResolver
+
+ // The list of auth schemes supported by the client.
+ AuthSchemes []smithyhttp.AuthScheme
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+
+func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
+ if schemeID == "aws.auth#sigv4" {
+ return getSigV4IdentityResolver(o)
+ }
+ if schemeID == "smithy.api#noAuth" {
+ return &smithyauth.AnonymousIdentityResolver{}
+ }
+ return nil
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
+ }
+ return nil
+}
+
+// WithSigV4SigningName applies an override to the authentication workflow to
+// use the given signing name for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing name from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningName(name string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+// WithSigV4SigningRegion applies an override to the authentication workflow to
+// use the given signing region for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningRegion(region string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func ignoreAnonymousAuth(options *Options) {
+ if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
+ options.Credentials = nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go
index c8426da4..ddac08da 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go
@@ -6,24 +6,23 @@ import (
"bytes"
"context"
"fmt"
- "github.com/aws/aws-sdk-go-v2/aws/protocol/query"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/encoding/httpbinding"
+ smithyjson "github.com/aws/smithy-go/encoding/json"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"path"
- "sort"
)
-type awsAwsquery_serializeOpAddPermission struct {
+type awsAwsjson10_serializeOpAddPermission struct {
}
-func (*awsAwsquery_serializeOpAddPermission) ID() string {
+func (*awsAwsjson10_serializeOpAddPermission) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpAddPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpAddPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -51,24 +50,70 @@ func (m *awsAwsquery_serializeOpAddPermission) HandleSerialize(ctx context.Conte
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.AddPermission")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("AddPermission")
- body.Key("Version").String("2012-11-05")
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentAddPermissionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
- if err := awsAwsquery_serializeOpDocumentAddPermissionInput(input, bodyEncoder.Value); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson10_serializeOpCancelMessageMoveTask struct {
+}
+
+func (*awsAwsjson10_serializeOpCancelMessageMoveTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson10_serializeOpCancelMessageMoveTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CancelMessageMoveTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.CancelMessageMoveTask")
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentCancelMessageMoveTaskInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -80,14 +125,14 @@ func (m *awsAwsquery_serializeOpAddPermission) HandleSerialize(ctx context.Conte
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpChangeMessageVisibility struct {
+type awsAwsjson10_serializeOpChangeMessageVisibility struct {
}
-func (*awsAwsquery_serializeOpChangeMessageVisibility) ID() string {
+func (*awsAwsjson10_serializeOpChangeMessageVisibility) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpChangeMessageVisibility) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpChangeMessageVisibility) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -115,24 +160,15 @@ func (m *awsAwsquery_serializeOpChangeMessageVisibility) HandleSerialize(ctx con
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("ChangeMessageVisibility")
- body.Key("Version").String("2012-11-05")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.ChangeMessageVisibility")
- if err := awsAwsquery_serializeOpDocumentChangeMessageVisibilityInput(input, bodyEncoder.Value); err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentChangeMessageVisibilityInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -144,14 +180,14 @@ func (m *awsAwsquery_serializeOpChangeMessageVisibility) HandleSerialize(ctx con
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpChangeMessageVisibilityBatch struct {
+type awsAwsjson10_serializeOpChangeMessageVisibilityBatch struct {
}
-func (*awsAwsquery_serializeOpChangeMessageVisibilityBatch) ID() string {
+func (*awsAwsjson10_serializeOpChangeMessageVisibilityBatch) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpChangeMessageVisibilityBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpChangeMessageVisibilityBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -179,24 +215,15 @@ func (m *awsAwsquery_serializeOpChangeMessageVisibilityBatch) HandleSerialize(ct
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.ChangeMessageVisibilityBatch")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("ChangeMessageVisibilityBatch")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentChangeMessageVisibilityBatchInput(input, bodyEncoder.Value); err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentChangeMessageVisibilityBatchInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -208,14 +235,14 @@ func (m *awsAwsquery_serializeOpChangeMessageVisibilityBatch) HandleSerialize(ct
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpCreateQueue struct {
+type awsAwsjson10_serializeOpCreateQueue struct {
}
-func (*awsAwsquery_serializeOpCreateQueue) ID() string {
+func (*awsAwsjson10_serializeOpCreateQueue) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpCreateQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpCreateQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -243,24 +270,15 @@ func (m *awsAwsquery_serializeOpCreateQueue) HandleSerialize(ctx context.Context
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("CreateQueue")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentCreateQueueInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.CreateQueue")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentCreateQueueInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -272,14 +290,14 @@ func (m *awsAwsquery_serializeOpCreateQueue) HandleSerialize(ctx context.Context
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpDeleteMessage struct {
+type awsAwsjson10_serializeOpDeleteMessage struct {
}
-func (*awsAwsquery_serializeOpDeleteMessage) ID() string {
+func (*awsAwsjson10_serializeOpDeleteMessage) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpDeleteMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpDeleteMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -307,24 +325,15 @@ func (m *awsAwsquery_serializeOpDeleteMessage) HandleSerialize(ctx context.Conte
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("DeleteMessage")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentDeleteMessageInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.DeleteMessage")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentDeleteMessageInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -336,14 +345,14 @@ func (m *awsAwsquery_serializeOpDeleteMessage) HandleSerialize(ctx context.Conte
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpDeleteMessageBatch struct {
+type awsAwsjson10_serializeOpDeleteMessageBatch struct {
}
-func (*awsAwsquery_serializeOpDeleteMessageBatch) ID() string {
+func (*awsAwsjson10_serializeOpDeleteMessageBatch) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpDeleteMessageBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpDeleteMessageBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -371,24 +380,15 @@ func (m *awsAwsquery_serializeOpDeleteMessageBatch) HandleSerialize(ctx context.
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("DeleteMessageBatch")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentDeleteMessageBatchInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.DeleteMessageBatch")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentDeleteMessageBatchInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -400,14 +400,14 @@ func (m *awsAwsquery_serializeOpDeleteMessageBatch) HandleSerialize(ctx context.
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpDeleteQueue struct {
+type awsAwsjson10_serializeOpDeleteQueue struct {
}
-func (*awsAwsquery_serializeOpDeleteQueue) ID() string {
+func (*awsAwsjson10_serializeOpDeleteQueue) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpDeleteQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpDeleteQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -435,24 +435,15 @@ func (m *awsAwsquery_serializeOpDeleteQueue) HandleSerialize(ctx context.Context
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.DeleteQueue")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("DeleteQueue")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentDeleteQueueInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentDeleteQueueInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -464,14 +455,14 @@ func (m *awsAwsquery_serializeOpDeleteQueue) HandleSerialize(ctx context.Context
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpGetQueueAttributes struct {
+type awsAwsjson10_serializeOpGetQueueAttributes struct {
}
-func (*awsAwsquery_serializeOpGetQueueAttributes) ID() string {
+func (*awsAwsjson10_serializeOpGetQueueAttributes) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpGetQueueAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpGetQueueAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -499,24 +490,15 @@ func (m *awsAwsquery_serializeOpGetQueueAttributes) HandleSerialize(ctx context.
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.GetQueueAttributes")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("GetQueueAttributes")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentGetQueueAttributesInput(input, bodyEncoder.Value); err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentGetQueueAttributesInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -528,14 +510,14 @@ func (m *awsAwsquery_serializeOpGetQueueAttributes) HandleSerialize(ctx context.
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpGetQueueUrl struct {
+type awsAwsjson10_serializeOpGetQueueUrl struct {
}
-func (*awsAwsquery_serializeOpGetQueueUrl) ID() string {
+func (*awsAwsjson10_serializeOpGetQueueUrl) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpGetQueueUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpGetQueueUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -563,24 +545,15 @@ func (m *awsAwsquery_serializeOpGetQueueUrl) HandleSerialize(ctx context.Context
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("GetQueueUrl")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentGetQueueUrlInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.GetQueueUrl")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentGetQueueUrlInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -592,14 +565,14 @@ func (m *awsAwsquery_serializeOpGetQueueUrl) HandleSerialize(ctx context.Context
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpListDeadLetterSourceQueues struct {
+type awsAwsjson10_serializeOpListDeadLetterSourceQueues struct {
}
-func (*awsAwsquery_serializeOpListDeadLetterSourceQueues) ID() string {
+func (*awsAwsjson10_serializeOpListDeadLetterSourceQueues) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpListDeadLetterSourceQueues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpListDeadLetterSourceQueues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -627,24 +600,70 @@ func (m *awsAwsquery_serializeOpListDeadLetterSourceQueues) HandleSerialize(ctx
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.ListDeadLetterSourceQueues")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("ListDeadLetterSourceQueues")
- body.Key("Version").String("2012-11-05")
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentListDeadLetterSourceQueuesInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
- if err := awsAwsquery_serializeOpDocumentListDeadLetterSourceQueuesInput(input, bodyEncoder.Value); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson10_serializeOpListMessageMoveTasks struct {
+}
+
+func (*awsAwsjson10_serializeOpListMessageMoveTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson10_serializeOpListMessageMoveTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListMessageMoveTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.ListMessageMoveTasks")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentListMessageMoveTasksInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -656,14 +675,14 @@ func (m *awsAwsquery_serializeOpListDeadLetterSourceQueues) HandleSerialize(ctx
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpListQueues struct {
+type awsAwsjson10_serializeOpListQueues struct {
}
-func (*awsAwsquery_serializeOpListQueues) ID() string {
+func (*awsAwsjson10_serializeOpListQueues) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpListQueues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpListQueues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -691,24 +710,15 @@ func (m *awsAwsquery_serializeOpListQueues) HandleSerialize(ctx context.Context,
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("ListQueues")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentListQueuesInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.ListQueues")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentListQueuesInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -720,14 +730,14 @@ func (m *awsAwsquery_serializeOpListQueues) HandleSerialize(ctx context.Context,
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpListQueueTags struct {
+type awsAwsjson10_serializeOpListQueueTags struct {
}
-func (*awsAwsquery_serializeOpListQueueTags) ID() string {
+func (*awsAwsjson10_serializeOpListQueueTags) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpListQueueTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpListQueueTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -755,24 +765,15 @@ func (m *awsAwsquery_serializeOpListQueueTags) HandleSerialize(ctx context.Conte
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("ListQueueTags")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentListQueueTagsInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.ListQueueTags")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentListQueueTagsInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -784,14 +785,14 @@ func (m *awsAwsquery_serializeOpListQueueTags) HandleSerialize(ctx context.Conte
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpPurgeQueue struct {
+type awsAwsjson10_serializeOpPurgeQueue struct {
}
-func (*awsAwsquery_serializeOpPurgeQueue) ID() string {
+func (*awsAwsjson10_serializeOpPurgeQueue) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpPurgeQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpPurgeQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -819,24 +820,15 @@ func (m *awsAwsquery_serializeOpPurgeQueue) HandleSerialize(ctx context.Context,
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.PurgeQueue")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("PurgeQueue")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentPurgeQueueInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentPurgeQueueInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -848,14 +840,14 @@ func (m *awsAwsquery_serializeOpPurgeQueue) HandleSerialize(ctx context.Context,
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpReceiveMessage struct {
+type awsAwsjson10_serializeOpReceiveMessage struct {
}
-func (*awsAwsquery_serializeOpReceiveMessage) ID() string {
+func (*awsAwsjson10_serializeOpReceiveMessage) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpReceiveMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpReceiveMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -883,24 +875,15 @@ func (m *awsAwsquery_serializeOpReceiveMessage) HandleSerialize(ctx context.Cont
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.ReceiveMessage")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("ReceiveMessage")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentReceiveMessageInput(input, bodyEncoder.Value); err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentReceiveMessageInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -912,14 +895,14 @@ func (m *awsAwsquery_serializeOpReceiveMessage) HandleSerialize(ctx context.Cont
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpRemovePermission struct {
+type awsAwsjson10_serializeOpRemovePermission struct {
}
-func (*awsAwsquery_serializeOpRemovePermission) ID() string {
+func (*awsAwsjson10_serializeOpRemovePermission) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpRemovePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpRemovePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -947,24 +930,15 @@ func (m *awsAwsquery_serializeOpRemovePermission) HandleSerialize(ctx context.Co
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("RemovePermission")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentRemovePermissionInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.RemovePermission")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentRemovePermissionInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -976,14 +950,14 @@ func (m *awsAwsquery_serializeOpRemovePermission) HandleSerialize(ctx context.Co
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpSendMessage struct {
+type awsAwsjson10_serializeOpSendMessage struct {
}
-func (*awsAwsquery_serializeOpSendMessage) ID() string {
+func (*awsAwsjson10_serializeOpSendMessage) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpSendMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpSendMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -1011,24 +985,15 @@ func (m *awsAwsquery_serializeOpSendMessage) HandleSerialize(ctx context.Context
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.SendMessage")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("SendMessage")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentSendMessageInput(input, bodyEncoder.Value); err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentSendMessageInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1040,14 +1005,14 @@ func (m *awsAwsquery_serializeOpSendMessage) HandleSerialize(ctx context.Context
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpSendMessageBatch struct {
+type awsAwsjson10_serializeOpSendMessageBatch struct {
}
-func (*awsAwsquery_serializeOpSendMessageBatch) ID() string {
+func (*awsAwsjson10_serializeOpSendMessageBatch) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpSendMessageBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpSendMessageBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -1075,24 +1040,15 @@ func (m *awsAwsquery_serializeOpSendMessageBatch) HandleSerialize(ctx context.Co
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
-
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("SendMessageBatch")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentSendMessageBatchInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.SendMessageBatch")
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentSendMessageBatchInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1104,14 +1060,14 @@ func (m *awsAwsquery_serializeOpSendMessageBatch) HandleSerialize(ctx context.Co
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpSetQueueAttributes struct {
+type awsAwsjson10_serializeOpSetQueueAttributes struct {
}
-func (*awsAwsquery_serializeOpSetQueueAttributes) ID() string {
+func (*awsAwsjson10_serializeOpSetQueueAttributes) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpSetQueueAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpSetQueueAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -1139,24 +1095,70 @@ func (m *awsAwsquery_serializeOpSetQueueAttributes) HandleSerialize(ctx context.
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.SetQueueAttributes")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("SetQueueAttributes")
- body.Key("Version").String("2012-11-05")
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentSetQueueAttributesInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
- if err := awsAwsquery_serializeOpDocumentSetQueueAttributesInput(input, bodyEncoder.Value); err != nil {
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson10_serializeOpStartMessageMoveTask struct {
+}
+
+func (*awsAwsjson10_serializeOpStartMessageMoveTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson10_serializeOpStartMessageMoveTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
- err = bodyEncoder.Encode()
+ input, ok := in.Parameters.(*StartMessageMoveTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.StartMessageMoveTask")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentStartMessageMoveTaskInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1168,14 +1170,14 @@ func (m *awsAwsquery_serializeOpSetQueueAttributes) HandleSerialize(ctx context.
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpTagQueue struct {
+type awsAwsjson10_serializeOpTagQueue struct {
}
-func (*awsAwsquery_serializeOpTagQueue) ID() string {
+func (*awsAwsjson10_serializeOpTagQueue) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpTagQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpTagQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -1203,24 +1205,15 @@ func (m *awsAwsquery_serializeOpTagQueue) HandleSerialize(ctx context.Context, i
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.TagQueue")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("TagQueue")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentTagQueueInput(input, bodyEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- err = bodyEncoder.Encode()
- if err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentTagQueueInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1232,14 +1225,14 @@ func (m *awsAwsquery_serializeOpTagQueue) HandleSerialize(ctx context.Context, i
return next.HandleSerialize(ctx, in)
}
-type awsAwsquery_serializeOpUntagQueue struct {
+type awsAwsjson10_serializeOpUntagQueue struct {
}
-func (*awsAwsquery_serializeOpUntagQueue) ID() string {
+func (*awsAwsjson10_serializeOpUntagQueue) ID() string {
return "OperationSerializer"
}
-func (m *awsAwsquery_serializeOpUntagQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+func (m *awsAwsjson10_serializeOpUntagQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
@@ -1267,24 +1260,15 @@ func (m *awsAwsquery_serializeOpUntagQueue) HandleSerialize(ctx context.Context,
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSQS.UntagQueue")
- bodyWriter := bytes.NewBuffer(nil)
- bodyEncoder := query.NewEncoder(bodyWriter)
- body := bodyEncoder.Object()
- body.Key("Action").String("UntagQueue")
- body.Key("Version").String("2012-11-05")
-
- if err := awsAwsquery_serializeOpDocumentUntagQueueInput(input, bodyEncoder.Value); err != nil {
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentUntagQueueInput(input, jsonEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
- err = bodyEncoder.Encode()
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -1295,11 +1279,9 @@ func (m *awsAwsquery_serializeOpUntagQueue) HandleSerialize(ctx context.Context,
return next.HandleSerialize(ctx, in)
}
-func awsAwsquery_serializeDocumentActionNameList(v []string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentActionNameList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
@@ -1308,11 +1290,9 @@ func awsAwsquery_serializeDocumentActionNameList(v []string, value query.Value)
return nil
}
-func awsAwsquery_serializeDocumentAttributeNameList(v []types.QueueAttributeName, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentAttributeNameList(v []types.QueueAttributeName, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
@@ -1321,11 +1301,9 @@ func awsAwsquery_serializeDocumentAttributeNameList(v []types.QueueAttributeName
return nil
}
-func awsAwsquery_serializeDocumentAWSAccountIdList(v []string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentAWSAccountIdList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
@@ -1334,96 +1312,88 @@ func awsAwsquery_serializeDocumentAWSAccountIdList(v []string, value query.Value
return nil
}
-func awsAwsquery_serializeDocumentBinaryList(v [][]byte, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("BinaryListValue")
+func awsAwsjson10_serializeDocumentBinaryList(v [][]byte, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
+ av := array.Value()
if vv := v[i]; vv == nil {
continue
}
- av := array.Value()
av.Base64EncodeBytes(v[i])
}
return nil
}
-func awsAwsquery_serializeDocumentChangeMessageVisibilityBatchRequestEntry(v *types.ChangeMessageVisibilityBatchRequestEntry, value query.Value) error {
+func awsAwsjson10_serializeDocumentChangeMessageVisibilityBatchRequestEntry(v *types.ChangeMessageVisibilityBatchRequestEntry, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Id != nil {
- objectKey := object.Key("Id")
- objectKey.String(*v.Id)
+ ok := object.Key("Id")
+ ok.String(*v.Id)
}
if v.ReceiptHandle != nil {
- objectKey := object.Key("ReceiptHandle")
- objectKey.String(*v.ReceiptHandle)
+ ok := object.Key("ReceiptHandle")
+ ok.String(*v.ReceiptHandle)
}
if v.VisibilityTimeout != 0 {
- objectKey := object.Key("VisibilityTimeout")
- objectKey.Integer(v.VisibilityTimeout)
+ ok := object.Key("VisibilityTimeout")
+ ok.Integer(v.VisibilityTimeout)
}
return nil
}
-func awsAwsquery_serializeDocumentChangeMessageVisibilityBatchRequestEntryList(v []types.ChangeMessageVisibilityBatchRequestEntry, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentChangeMessageVisibilityBatchRequestEntryList(v []types.ChangeMessageVisibilityBatchRequestEntry, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
- if err := awsAwsquery_serializeDocumentChangeMessageVisibilityBatchRequestEntry(&v[i], av); err != nil {
+ if err := awsAwsjson10_serializeDocumentChangeMessageVisibilityBatchRequestEntry(&v[i], av); err != nil {
return err
}
}
return nil
}
-func awsAwsquery_serializeDocumentDeleteMessageBatchRequestEntry(v *types.DeleteMessageBatchRequestEntry, value query.Value) error {
+func awsAwsjson10_serializeDocumentDeleteMessageBatchRequestEntry(v *types.DeleteMessageBatchRequestEntry, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Id != nil {
- objectKey := object.Key("Id")
- objectKey.String(*v.Id)
+ ok := object.Key("Id")
+ ok.String(*v.Id)
}
if v.ReceiptHandle != nil {
- objectKey := object.Key("ReceiptHandle")
- objectKey.String(*v.ReceiptHandle)
+ ok := object.Key("ReceiptHandle")
+ ok.String(*v.ReceiptHandle)
}
return nil
}
-func awsAwsquery_serializeDocumentDeleteMessageBatchRequestEntryList(v []types.DeleteMessageBatchRequestEntry, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentDeleteMessageBatchRequestEntryList(v []types.DeleteMessageBatchRequestEntry, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
- if err := awsAwsquery_serializeDocumentDeleteMessageBatchRequestEntry(&v[i], av); err != nil {
+ if err := awsAwsjson10_serializeDocumentDeleteMessageBatchRequestEntry(&v[i], av); err != nil {
return err
}
}
return nil
}
-func awsAwsquery_serializeDocumentMessageAttributeNameList(v []string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentMessageAttributeNameList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
@@ -1432,180 +1402,156 @@ func awsAwsquery_serializeDocumentMessageAttributeNameList(v []string, value que
return nil
}
-func awsAwsquery_serializeDocumentMessageAttributeValue(v *types.MessageAttributeValue, value query.Value) error {
+func awsAwsjson10_serializeDocumentMessageAttributeValue(v *types.MessageAttributeValue, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.BinaryListValues != nil {
- objectKey := object.FlatKey("BinaryListValue")
- if err := awsAwsquery_serializeDocumentBinaryList(v.BinaryListValues, objectKey); err != nil {
+ ok := object.Key("BinaryListValues")
+ if err := awsAwsjson10_serializeDocumentBinaryList(v.BinaryListValues, ok); err != nil {
return err
}
}
if v.BinaryValue != nil {
- objectKey := object.Key("BinaryValue")
- objectKey.Base64EncodeBytes(v.BinaryValue)
+ ok := object.Key("BinaryValue")
+ ok.Base64EncodeBytes(v.BinaryValue)
}
if v.DataType != nil {
- objectKey := object.Key("DataType")
- objectKey.String(*v.DataType)
+ ok := object.Key("DataType")
+ ok.String(*v.DataType)
}
if v.StringListValues != nil {
- objectKey := object.FlatKey("StringListValue")
- if err := awsAwsquery_serializeDocumentStringList(v.StringListValues, objectKey); err != nil {
+ ok := object.Key("StringListValues")
+ if err := awsAwsjson10_serializeDocumentStringList(v.StringListValues, ok); err != nil {
return err
}
}
if v.StringValue != nil {
- objectKey := object.Key("StringValue")
- objectKey.String(*v.StringValue)
+ ok := object.Key("StringValue")
+ ok.String(*v.StringValue)
}
return nil
}
-func awsAwsquery_serializeDocumentMessageBodyAttributeMap(v map[string]types.MessageAttributeValue, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- object := value.Map("Name", "Value")
+func awsAwsjson10_serializeDocumentMessageBodyAttributeMap(v map[string]types.MessageAttributeValue, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
- keys := make([]string, 0, len(v))
for key := range v {
- keys = append(keys, key)
- }
- sort.Strings(keys)
-
- for _, key := range keys {
om := object.Key(key)
mapVar := v[key]
- if err := awsAwsquery_serializeDocumentMessageAttributeValue(&mapVar, om); err != nil {
+ if err := awsAwsjson10_serializeDocumentMessageAttributeValue(&mapVar, om); err != nil {
return err
}
}
return nil
}
-func awsAwsquery_serializeDocumentMessageBodySystemAttributeMap(v map[string]types.MessageSystemAttributeValue, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- object := value.Map("Name", "Value")
+func awsAwsjson10_serializeDocumentMessageBodySystemAttributeMap(v map[string]types.MessageSystemAttributeValue, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
- keys := make([]string, 0, len(v))
for key := range v {
- keys = append(keys, key)
- }
- sort.Strings(keys)
-
- for _, key := range keys {
om := object.Key(key)
mapVar := v[key]
- if err := awsAwsquery_serializeDocumentMessageSystemAttributeValue(&mapVar, om); err != nil {
+ if err := awsAwsjson10_serializeDocumentMessageSystemAttributeValue(&mapVar, om); err != nil {
return err
}
}
return nil
}
-func awsAwsquery_serializeDocumentMessageSystemAttributeValue(v *types.MessageSystemAttributeValue, value query.Value) error {
+func awsAwsjson10_serializeDocumentMessageSystemAttributeValue(v *types.MessageSystemAttributeValue, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.BinaryListValues != nil {
- objectKey := object.FlatKey("BinaryListValue")
- if err := awsAwsquery_serializeDocumentBinaryList(v.BinaryListValues, objectKey); err != nil {
+ ok := object.Key("BinaryListValues")
+ if err := awsAwsjson10_serializeDocumentBinaryList(v.BinaryListValues, ok); err != nil {
return err
}
}
if v.BinaryValue != nil {
- objectKey := object.Key("BinaryValue")
- objectKey.Base64EncodeBytes(v.BinaryValue)
+ ok := object.Key("BinaryValue")
+ ok.Base64EncodeBytes(v.BinaryValue)
}
if v.DataType != nil {
- objectKey := object.Key("DataType")
- objectKey.String(*v.DataType)
+ ok := object.Key("DataType")
+ ok.String(*v.DataType)
}
if v.StringListValues != nil {
- objectKey := object.FlatKey("StringListValue")
- if err := awsAwsquery_serializeDocumentStringList(v.StringListValues, objectKey); err != nil {
+ ok := object.Key("StringListValues")
+ if err := awsAwsjson10_serializeDocumentStringList(v.StringListValues, ok); err != nil {
return err
}
}
if v.StringValue != nil {
- objectKey := object.Key("StringValue")
- objectKey.String(*v.StringValue)
+ ok := object.Key("StringValue")
+ ok.String(*v.StringValue)
}
return nil
}
-func awsAwsquery_serializeDocumentQueueAttributeMap(v map[string]string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- object := value.Map("Name", "Value")
+func awsAwsjson10_serializeDocumentQueueAttributeMap(v map[string]string, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
- keys := make([]string, 0, len(v))
for key := range v {
- keys = append(keys, key)
- }
- sort.Strings(keys)
-
- for _, key := range keys {
om := object.Key(key)
om.String(v[key])
}
return nil
}
-func awsAwsquery_serializeDocumentSendMessageBatchRequestEntry(v *types.SendMessageBatchRequestEntry, value query.Value) error {
+func awsAwsjson10_serializeDocumentSendMessageBatchRequestEntry(v *types.SendMessageBatchRequestEntry, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.DelaySeconds != 0 {
- objectKey := object.Key("DelaySeconds")
- objectKey.Integer(v.DelaySeconds)
+ ok := object.Key("DelaySeconds")
+ ok.Integer(v.DelaySeconds)
}
if v.Id != nil {
- objectKey := object.Key("Id")
- objectKey.String(*v.Id)
+ ok := object.Key("Id")
+ ok.String(*v.Id)
}
if v.MessageAttributes != nil {
- objectKey := object.FlatKey("MessageAttribute")
- if err := awsAwsquery_serializeDocumentMessageBodyAttributeMap(v.MessageAttributes, objectKey); err != nil {
+ ok := object.Key("MessageAttributes")
+ if err := awsAwsjson10_serializeDocumentMessageBodyAttributeMap(v.MessageAttributes, ok); err != nil {
return err
}
}
if v.MessageBody != nil {
- objectKey := object.Key("MessageBody")
- objectKey.String(*v.MessageBody)
+ ok := object.Key("MessageBody")
+ ok.String(*v.MessageBody)
}
if v.MessageDeduplicationId != nil {
- objectKey := object.Key("MessageDeduplicationId")
- objectKey.String(*v.MessageDeduplicationId)
+ ok := object.Key("MessageDeduplicationId")
+ ok.String(*v.MessageDeduplicationId)
}
if v.MessageGroupId != nil {
- objectKey := object.Key("MessageGroupId")
- objectKey.String(*v.MessageGroupId)
+ ok := object.Key("MessageGroupId")
+ ok.String(*v.MessageGroupId)
}
if v.MessageSystemAttributes != nil {
- objectKey := object.FlatKey("MessageSystemAttribute")
- if err := awsAwsquery_serializeDocumentMessageBodySystemAttributeMap(v.MessageSystemAttributes, objectKey); err != nil {
+ ok := object.Key("MessageSystemAttributes")
+ if err := awsAwsjson10_serializeDocumentMessageBodySystemAttributeMap(v.MessageSystemAttributes, ok); err != nil {
return err
}
}
@@ -1613,26 +1559,22 @@ func awsAwsquery_serializeDocumentSendMessageBatchRequestEntry(v *types.SendMess
return nil
}
-func awsAwsquery_serializeDocumentSendMessageBatchRequestEntryList(v []types.SendMessageBatchRequestEntry, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentSendMessageBatchRequestEntryList(v []types.SendMessageBatchRequestEntry, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
- if err := awsAwsquery_serializeDocumentSendMessageBatchRequestEntry(&v[i], av); err != nil {
+ if err := awsAwsjson10_serializeDocumentSendMessageBatchRequestEntry(&v[i], av); err != nil {
return err
}
}
return nil
}
-func awsAwsquery_serializeDocumentStringList(v []string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("StringListValue")
+func awsAwsjson10_serializeDocumentStringList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
@@ -1641,11 +1583,9 @@ func awsAwsquery_serializeDocumentStringList(v []string, value query.Value) erro
return nil
}
-func awsAwsquery_serializeDocumentTagKeyList(v []string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- array := value.Array("member")
+func awsAwsjson10_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
for i := range v {
av := array.Value()
@@ -1654,116 +1594,120 @@ func awsAwsquery_serializeDocumentTagKeyList(v []string, value query.Value) erro
return nil
}
-func awsAwsquery_serializeDocumentTagMap(v map[string]string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
- object := value.Map("Key", "Value")
+func awsAwsjson10_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
- keys := make([]string, 0, len(v))
for key := range v {
- keys = append(keys, key)
- }
- sort.Strings(keys)
-
- for _, key := range keys {
om := object.Key(key)
om.String(v[key])
}
return nil
}
-func awsAwsquery_serializeOpDocumentAddPermissionInput(v *AddPermissionInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentAddPermissionInput(v *AddPermissionInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Actions != nil {
- objectKey := object.FlatKey("ActionName")
- if err := awsAwsquery_serializeDocumentActionNameList(v.Actions, objectKey); err != nil {
+ ok := object.Key("Actions")
+ if err := awsAwsjson10_serializeDocumentActionNameList(v.Actions, ok); err != nil {
return err
}
}
if v.AWSAccountIds != nil {
- objectKey := object.FlatKey("AWSAccountId")
- if err := awsAwsquery_serializeDocumentAWSAccountIdList(v.AWSAccountIds, objectKey); err != nil {
+ ok := object.Key("AWSAccountIds")
+ if err := awsAwsjson10_serializeDocumentAWSAccountIdList(v.AWSAccountIds, ok); err != nil {
return err
}
}
if v.Label != nil {
- objectKey := object.Key("Label")
- objectKey.String(*v.Label)
+ ok := object.Key("Label")
+ ok.String(*v.Label)
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentChangeMessageVisibilityBatchInput(v *ChangeMessageVisibilityBatchInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentCancelMessageMoveTaskInput(v *CancelMessageMoveTaskInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
+
+ if v.TaskHandle != nil {
+ ok := object.Key("TaskHandle")
+ ok.String(*v.TaskHandle)
+ }
+
+ return nil
+}
+
+func awsAwsjson10_serializeOpDocumentChangeMessageVisibilityBatchInput(v *ChangeMessageVisibilityBatchInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
if v.Entries != nil {
- objectKey := object.FlatKey("ChangeMessageVisibilityBatchRequestEntry")
- if err := awsAwsquery_serializeDocumentChangeMessageVisibilityBatchRequestEntryList(v.Entries, objectKey); err != nil {
+ ok := object.Key("Entries")
+ if err := awsAwsjson10_serializeDocumentChangeMessageVisibilityBatchRequestEntryList(v.Entries, ok); err != nil {
return err
}
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentChangeMessageVisibilityInput(v *ChangeMessageVisibilityInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentChangeMessageVisibilityInput(v *ChangeMessageVisibilityInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
if v.ReceiptHandle != nil {
- objectKey := object.Key("ReceiptHandle")
- objectKey.String(*v.ReceiptHandle)
+ ok := object.Key("ReceiptHandle")
+ ok.String(*v.ReceiptHandle)
}
{
- objectKey := object.Key("VisibilityTimeout")
- objectKey.Integer(v.VisibilityTimeout)
+ ok := object.Key("VisibilityTimeout")
+ ok.Integer(v.VisibilityTimeout)
}
return nil
}
-func awsAwsquery_serializeOpDocumentCreateQueueInput(v *CreateQueueInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentCreateQueueInput(v *CreateQueueInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Attributes != nil {
- objectKey := object.FlatKey("Attribute")
- if err := awsAwsquery_serializeDocumentQueueAttributeMap(v.Attributes, objectKey); err != nil {
+ ok := object.Key("Attributes")
+ if err := awsAwsjson10_serializeDocumentQueueAttributeMap(v.Attributes, ok); err != nil {
return err
}
}
if v.QueueName != nil {
- objectKey := object.Key("QueueName")
- objectKey.String(*v.QueueName)
+ ok := object.Key("QueueName")
+ ok.String(*v.QueueName)
}
if v.Tags != nil {
- objectKey := object.FlatKey("Tag")
- if err := awsAwsquery_serializeDocumentTagMap(v.Tags, objectKey); err != nil {
+ ok := object.Key("tags")
+ if err := awsAwsjson10_serializeDocumentTagMap(v.Tags, ok); err != nil {
return err
}
}
@@ -1771,317 +1715,356 @@ func awsAwsquery_serializeOpDocumentCreateQueueInput(v *CreateQueueInput, value
return nil
}
-func awsAwsquery_serializeOpDocumentDeleteMessageBatchInput(v *DeleteMessageBatchInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentDeleteMessageBatchInput(v *DeleteMessageBatchInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Entries != nil {
- objectKey := object.FlatKey("DeleteMessageBatchRequestEntry")
- if err := awsAwsquery_serializeDocumentDeleteMessageBatchRequestEntryList(v.Entries, objectKey); err != nil {
+ ok := object.Key("Entries")
+ if err := awsAwsjson10_serializeDocumentDeleteMessageBatchRequestEntryList(v.Entries, ok); err != nil {
return err
}
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentDeleteMessageInput(v *DeleteMessageInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentDeleteMessageInput(v *DeleteMessageInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
if v.ReceiptHandle != nil {
- objectKey := object.Key("ReceiptHandle")
- objectKey.String(*v.ReceiptHandle)
+ ok := object.Key("ReceiptHandle")
+ ok.String(*v.ReceiptHandle)
}
return nil
}
-func awsAwsquery_serializeOpDocumentDeleteQueueInput(v *DeleteQueueInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentDeleteQueueInput(v *DeleteQueueInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentGetQueueAttributesInput(v *GetQueueAttributesInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentGetQueueAttributesInput(v *GetQueueAttributesInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.AttributeNames != nil {
- objectKey := object.FlatKey("AttributeName")
- if err := awsAwsquery_serializeDocumentAttributeNameList(v.AttributeNames, objectKey); err != nil {
+ ok := object.Key("AttributeNames")
+ if err := awsAwsjson10_serializeDocumentAttributeNameList(v.AttributeNames, ok); err != nil {
return err
}
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentGetQueueUrlInput(v *GetQueueUrlInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentGetQueueUrlInput(v *GetQueueUrlInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueName != nil {
- objectKey := object.Key("QueueName")
- objectKey.String(*v.QueueName)
+ ok := object.Key("QueueName")
+ ok.String(*v.QueueName)
}
if v.QueueOwnerAWSAccountId != nil {
- objectKey := object.Key("QueueOwnerAWSAccountId")
- objectKey.String(*v.QueueOwnerAWSAccountId)
+ ok := object.Key("QueueOwnerAWSAccountId")
+ ok.String(*v.QueueOwnerAWSAccountId)
}
return nil
}
-func awsAwsquery_serializeOpDocumentListDeadLetterSourceQueuesInput(v *ListDeadLetterSourceQueuesInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentListDeadLetterSourceQueuesInput(v *ListDeadLetterSourceQueuesInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.MaxResults != nil {
- objectKey := object.Key("MaxResults")
- objectKey.Integer(*v.MaxResults)
+ ok := object.Key("MaxResults")
+ ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
- objectKey := object.Key("NextToken")
- objectKey.String(*v.NextToken)
+ ok := object.Key("NextToken")
+ ok.String(*v.NextToken)
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentListQueuesInput(v *ListQueuesInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentListMessageMoveTasksInput(v *ListMessageMoveTasksInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.MaxResults != nil {
- objectKey := object.Key("MaxResults")
- objectKey.Integer(*v.MaxResults)
+ ok := object.Key("MaxResults")
+ ok.Integer(*v.MaxResults)
+ }
+
+ if v.SourceArn != nil {
+ ok := object.Key("SourceArn")
+ ok.String(*v.SourceArn)
+ }
+
+ return nil
+}
+
+func awsAwsjson10_serializeOpDocumentListQueuesInput(v *ListQueuesInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.MaxResults != nil {
+ ok := object.Key("MaxResults")
+ ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
- objectKey := object.Key("NextToken")
- objectKey.String(*v.NextToken)
+ ok := object.Key("NextToken")
+ ok.String(*v.NextToken)
}
if v.QueueNamePrefix != nil {
- objectKey := object.Key("QueueNamePrefix")
- objectKey.String(*v.QueueNamePrefix)
+ ok := object.Key("QueueNamePrefix")
+ ok.String(*v.QueueNamePrefix)
}
return nil
}
-func awsAwsquery_serializeOpDocumentListQueueTagsInput(v *ListQueueTagsInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentListQueueTagsInput(v *ListQueueTagsInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentPurgeQueueInput(v *PurgeQueueInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentPurgeQueueInput(v *PurgeQueueInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentReceiveMessageInput(v *ReceiveMessageInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentReceiveMessageInput(v *ReceiveMessageInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.AttributeNames != nil {
- objectKey := object.FlatKey("AttributeName")
- if err := awsAwsquery_serializeDocumentAttributeNameList(v.AttributeNames, objectKey); err != nil {
+ ok := object.Key("AttributeNames")
+ if err := awsAwsjson10_serializeDocumentAttributeNameList(v.AttributeNames, ok); err != nil {
return err
}
}
if v.MaxNumberOfMessages != 0 {
- objectKey := object.Key("MaxNumberOfMessages")
- objectKey.Integer(v.MaxNumberOfMessages)
+ ok := object.Key("MaxNumberOfMessages")
+ ok.Integer(v.MaxNumberOfMessages)
}
if v.MessageAttributeNames != nil {
- objectKey := object.FlatKey("MessageAttributeName")
- if err := awsAwsquery_serializeDocumentMessageAttributeNameList(v.MessageAttributeNames, objectKey); err != nil {
+ ok := object.Key("MessageAttributeNames")
+ if err := awsAwsjson10_serializeDocumentMessageAttributeNameList(v.MessageAttributeNames, ok); err != nil {
return err
}
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
if v.ReceiveRequestAttemptId != nil {
- objectKey := object.Key("ReceiveRequestAttemptId")
- objectKey.String(*v.ReceiveRequestAttemptId)
+ ok := object.Key("ReceiveRequestAttemptId")
+ ok.String(*v.ReceiveRequestAttemptId)
}
if v.VisibilityTimeout != 0 {
- objectKey := object.Key("VisibilityTimeout")
- objectKey.Integer(v.VisibilityTimeout)
+ ok := object.Key("VisibilityTimeout")
+ ok.Integer(v.VisibilityTimeout)
}
if v.WaitTimeSeconds != 0 {
- objectKey := object.Key("WaitTimeSeconds")
- objectKey.Integer(v.WaitTimeSeconds)
+ ok := object.Key("WaitTimeSeconds")
+ ok.Integer(v.WaitTimeSeconds)
}
return nil
}
-func awsAwsquery_serializeOpDocumentRemovePermissionInput(v *RemovePermissionInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentRemovePermissionInput(v *RemovePermissionInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Label != nil {
- objectKey := object.Key("Label")
- objectKey.String(*v.Label)
+ ok := object.Key("Label")
+ ok.String(*v.Label)
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentSendMessageBatchInput(v *SendMessageBatchInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentSendMessageBatchInput(v *SendMessageBatchInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Entries != nil {
- objectKey := object.FlatKey("SendMessageBatchRequestEntry")
- if err := awsAwsquery_serializeDocumentSendMessageBatchRequestEntryList(v.Entries, objectKey); err != nil {
+ ok := object.Key("Entries")
+ if err := awsAwsjson10_serializeDocumentSendMessageBatchRequestEntryList(v.Entries, ok); err != nil {
return err
}
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentSendMessageInput(v *SendMessageInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentSendMessageInput(v *SendMessageInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.DelaySeconds != 0 {
- objectKey := object.Key("DelaySeconds")
- objectKey.Integer(v.DelaySeconds)
+ ok := object.Key("DelaySeconds")
+ ok.Integer(v.DelaySeconds)
}
if v.MessageAttributes != nil {
- objectKey := object.FlatKey("MessageAttribute")
- if err := awsAwsquery_serializeDocumentMessageBodyAttributeMap(v.MessageAttributes, objectKey); err != nil {
+ ok := object.Key("MessageAttributes")
+ if err := awsAwsjson10_serializeDocumentMessageBodyAttributeMap(v.MessageAttributes, ok); err != nil {
return err
}
}
if v.MessageBody != nil {
- objectKey := object.Key("MessageBody")
- objectKey.String(*v.MessageBody)
+ ok := object.Key("MessageBody")
+ ok.String(*v.MessageBody)
}
if v.MessageDeduplicationId != nil {
- objectKey := object.Key("MessageDeduplicationId")
- objectKey.String(*v.MessageDeduplicationId)
+ ok := object.Key("MessageDeduplicationId")
+ ok.String(*v.MessageDeduplicationId)
}
if v.MessageGroupId != nil {
- objectKey := object.Key("MessageGroupId")
- objectKey.String(*v.MessageGroupId)
+ ok := object.Key("MessageGroupId")
+ ok.String(*v.MessageGroupId)
}
if v.MessageSystemAttributes != nil {
- objectKey := object.FlatKey("MessageSystemAttribute")
- if err := awsAwsquery_serializeDocumentMessageBodySystemAttributeMap(v.MessageSystemAttributes, objectKey); err != nil {
+ ok := object.Key("MessageSystemAttributes")
+ if err := awsAwsjson10_serializeDocumentMessageBodySystemAttributeMap(v.MessageSystemAttributes, ok); err != nil {
return err
}
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
return nil
}
-func awsAwsquery_serializeOpDocumentSetQueueAttributesInput(v *SetQueueAttributesInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentSetQueueAttributesInput(v *SetQueueAttributesInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.Attributes != nil {
- objectKey := object.FlatKey("Attribute")
- if err := awsAwsquery_serializeDocumentQueueAttributeMap(v.Attributes, objectKey); err != nil {
+ ok := object.Key("Attributes")
+ if err := awsAwsjson10_serializeDocumentQueueAttributeMap(v.Attributes, ok); err != nil {
return err
}
}
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
+ }
+
+ return nil
+}
+
+func awsAwsjson10_serializeOpDocumentStartMessageMoveTaskInput(v *StartMessageMoveTaskInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DestinationArn != nil {
+ ok := object.Key("DestinationArn")
+ ok.String(*v.DestinationArn)
+ }
+
+ if v.MaxNumberOfMessagesPerSecond != nil {
+ ok := object.Key("MaxNumberOfMessagesPerSecond")
+ ok.Integer(*v.MaxNumberOfMessagesPerSecond)
+ }
+
+ if v.SourceArn != nil {
+ ok := object.Key("SourceArn")
+ ok.String(*v.SourceArn)
}
return nil
}
-func awsAwsquery_serializeOpDocumentTagQueueInput(v *TagQueueInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentTagQueueInput(v *TagQueueInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
if v.Tags != nil {
- objectKey := object.FlatKey("Tag")
- if err := awsAwsquery_serializeDocumentTagMap(v.Tags, objectKey); err != nil {
+ ok := object.Key("Tags")
+ if err := awsAwsjson10_serializeDocumentTagMap(v.Tags, ok); err != nil {
return err
}
}
@@ -2089,18 +2072,18 @@ func awsAwsquery_serializeOpDocumentTagQueueInput(v *TagQueueInput, value query.
return nil
}
-func awsAwsquery_serializeOpDocumentUntagQueueInput(v *UntagQueueInput, value query.Value) error {
+func awsAwsjson10_serializeOpDocumentUntagQueueInput(v *UntagQueueInput, value smithyjson.Value) error {
object := value.Object()
- _ = object
+ defer object.Close()
if v.QueueUrl != nil {
- objectKey := object.Key("QueueUrl")
- objectKey.String(*v.QueueUrl)
+ ok := object.Key("QueueUrl")
+ ok.String(*v.QueueUrl)
}
if v.TagKeys != nil {
- objectKey := object.FlatKey("TagKey")
- if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
+ ok := object.Key("TagKeys")
+ if err := awsAwsjson10_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil {
return err
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/enums.go
index a34481e8..dbdc81c1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/enums.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/enums.go
@@ -14,6 +14,7 @@ const (
MessageSystemAttributeNameMessageDeduplicationId MessageSystemAttributeName = "MessageDeduplicationId"
MessageSystemAttributeNameMessageGroupId MessageSystemAttributeName = "MessageGroupId"
MessageSystemAttributeNameAWSTraceHeader MessageSystemAttributeName = "AWSTraceHeader"
+ MessageSystemAttributeNameDeadLetterQueueSourceArn MessageSystemAttributeName = "DeadLetterQueueSourceArn"
)
// Values returns all known values for MessageSystemAttributeName. Note that this
@@ -29,6 +30,7 @@ func (MessageSystemAttributeName) Values() []MessageSystemAttributeName {
"MessageDeduplicationId",
"MessageGroupId",
"AWSTraceHeader",
+ "DeadLetterQueueSourceArn",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/errors.go
index c2559dca..436fae9c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/errors.go
@@ -7,10 +7,12 @@ import (
smithy "github.com/aws/smithy-go"
)
-// Two or more batch entries in the request have the same Id.
+// Two or more batch entries in the request have the same Id .
type BatchEntryIdsNotDistinct struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -24,7 +26,10 @@ func (e *BatchEntryIdsNotDistinct) ErrorMessage() string {
return *e.Message
}
func (e *BatchEntryIdsNotDistinct) ErrorCode() string {
- return "AWS.SimpleQueueService.BatchEntryIdsNotDistinct"
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "BatchEntryIdsNotDistinct"
+ }
+ return *e.ErrorCodeOverride
}
func (e *BatchEntryIdsNotDistinct) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
@@ -32,6 +37,8 @@ func (e *BatchEntryIdsNotDistinct) ErrorFault() smithy.ErrorFault { return smith
type BatchRequestTooLong struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -44,13 +51,20 @@ func (e *BatchRequestTooLong) ErrorMessage() string {
}
return *e.Message
}
-func (e *BatchRequestTooLong) ErrorCode() string { return "AWS.SimpleQueueService.BatchRequestTooLong" }
+func (e *BatchRequestTooLong) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "BatchRequestTooLong"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *BatchRequestTooLong) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The batch request doesn't contain any entries.
type EmptyBatchRequest struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -63,13 +77,46 @@ func (e *EmptyBatchRequest) ErrorMessage() string {
}
return *e.Message
}
-func (e *EmptyBatchRequest) ErrorCode() string { return "AWS.SimpleQueueService.EmptyBatchRequest" }
+func (e *EmptyBatchRequest) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EmptyBatchRequest"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *EmptyBatchRequest) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+// The accountId is invalid.
+type InvalidAddress struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidAddress) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidAddress) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidAddress) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidAddress"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidAddress) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
// The specified attribute doesn't exist.
type InvalidAttributeName struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -82,13 +129,46 @@ func (e *InvalidAttributeName) ErrorMessage() string {
}
return *e.Message
}
-func (e *InvalidAttributeName) ErrorCode() string { return "InvalidAttributeName" }
+func (e *InvalidAttributeName) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidAttributeName"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *InvalidAttributeName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+// A queue attribute value is invalid.
+type InvalidAttributeValue struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidAttributeValue) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidAttributeValue) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidAttributeValue) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidAttributeValue"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidAttributeValue) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
// The Id of a batch entry in a batch request doesn't abide by the specification.
type InvalidBatchEntryId struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -101,13 +181,20 @@ func (e *InvalidBatchEntryId) ErrorMessage() string {
}
return *e.Message
}
-func (e *InvalidBatchEntryId) ErrorCode() string { return "AWS.SimpleQueueService.InvalidBatchEntryId" }
+func (e *InvalidBatchEntryId) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidBatchEntryId"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *InvalidBatchEntryId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified receipt handle isn't valid for the current version.
type InvalidIdFormat struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -120,13 +207,20 @@ func (e *InvalidIdFormat) ErrorMessage() string {
}
return *e.Message
}
-func (e *InvalidIdFormat) ErrorCode() string { return "InvalidIdFormat" }
+func (e *InvalidIdFormat) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidIdFormat"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *InvalidIdFormat) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The message contains characters outside the allowed set.
type InvalidMessageContents struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -139,13 +233,234 @@ func (e *InvalidMessageContents) ErrorMessage() string {
}
return *e.Message
}
-func (e *InvalidMessageContents) ErrorCode() string { return "InvalidMessageContents" }
+func (e *InvalidMessageContents) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidMessageContents"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *InvalidMessageContents) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+// When the request to a queue is not HTTPS and SigV4.
+type InvalidSecurity struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidSecurity) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidSecurity) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidSecurity) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidSecurity"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidSecurity) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The caller doesn't have the required KMS access.
+type KmsAccessDenied struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KmsAccessDenied) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KmsAccessDenied) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KmsAccessDenied) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KmsAccessDenied"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KmsAccessDenied) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was denied due to request throttling.
+type KmsDisabled struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KmsDisabled) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KmsDisabled) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KmsDisabled) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KmsDisabled"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KmsDisabled) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected for one of the following reasons:
+// - The KeyUsage value of the KMS key is incompatible with the API operation.
+// - The encryption algorithm or signing algorithm specified for the operation
+// is incompatible with the type of key material in the KMS key (KeySpec).
+type KmsInvalidKeyUsage struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KmsInvalidKeyUsage) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KmsInvalidKeyUsage) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KmsInvalidKeyUsage) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KmsInvalidKeyUsage"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KmsInvalidKeyUsage) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the state of the specified resource is not
+// valid for this request.
+type KmsInvalidState struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KmsInvalidState) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KmsInvalidState) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KmsInvalidState) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KmsInvalidState"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KmsInvalidState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified entity or resource could not be
+// found.
+type KmsNotFound struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KmsNotFound) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KmsNotFound) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KmsNotFound) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KmsNotFound"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KmsNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified key policy isn't syntactically
+// or semantically correct.
+type KmsOptInRequired struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KmsOptInRequired) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KmsOptInRequired) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KmsOptInRequired) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KmsOptInRequired"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KmsOptInRequired) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Amazon Web Services KMS throttles requests for the following conditions.
+type KmsThrottled struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KmsThrottled) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KmsThrottled) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KmsThrottled) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KmsThrottled"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KmsThrottled) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
// The specified message isn't in flight.
type MessageNotInflight struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -158,16 +473,23 @@ func (e *MessageNotInflight) ErrorMessage() string {
}
return *e.Message
}
-func (e *MessageNotInflight) ErrorCode() string { return "AWS.SimpleQueueService.MessageNotInflight" }
+func (e *MessageNotInflight) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "MessageNotInflight"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *MessageNotInflight) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified action violates a limit. For example, ReceiveMessage returns this
-// error if the maximum number of inflight messages is reached and AddPermission
+// error if the maximum number of in flight messages is reached and AddPermission
// returns this error if the maximum number of permissions for the queue is
// reached.
type OverLimit struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -180,7 +502,12 @@ func (e *OverLimit) ErrorMessage() string {
}
return *e.Message
}
-func (e *OverLimit) ErrorCode() string { return "OverLimit" }
+func (e *OverLimit) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "OverLimit"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *OverLimit) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the specified queue previously received a PurgeQueue request
@@ -189,6 +516,8 @@ func (e *OverLimit) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
type PurgeQueueInProgress struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -202,7 +531,10 @@ func (e *PurgeQueueInProgress) ErrorMessage() string {
return *e.Message
}
func (e *PurgeQueueInProgress) ErrorCode() string {
- return "AWS.SimpleQueueService.PurgeQueueInProgress"
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "PurgeQueueInProgress"
+ }
+ return *e.ErrorCodeOverride
}
func (e *PurgeQueueInProgress) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
@@ -211,6 +543,8 @@ func (e *PurgeQueueInProgress) ErrorFault() smithy.ErrorFault { return smithy.Fa
type QueueDeletedRecently struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -224,7 +558,10 @@ func (e *QueueDeletedRecently) ErrorMessage() string {
return *e.Message
}
func (e *QueueDeletedRecently) ErrorCode() string {
- return "AWS.SimpleQueueService.QueueDeletedRecently"
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "QueueDeletedRecently"
+ }
+ return *e.ErrorCodeOverride
}
func (e *QueueDeletedRecently) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
@@ -232,6 +569,8 @@ func (e *QueueDeletedRecently) ErrorFault() smithy.ErrorFault { return smithy.Fa
type QueueDoesNotExist struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -244,15 +583,22 @@ func (e *QueueDoesNotExist) ErrorMessage() string {
}
return *e.Message
}
-func (e *QueueDoesNotExist) ErrorCode() string { return "AWS.SimpleQueueService.NonExistentQueue" }
+func (e *QueueDoesNotExist) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "QueueDoesNotExist"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *QueueDoesNotExist) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-// A queue with this name already exists. Amazon SQS returns this error only if the
-// request includes attributes whose values differ from those of the existing
+// A queue with this name already exists. Amazon SQS returns this error only if
+// the request includes attributes whose values differ from those of the existing
// queue.
type QueueNameExists struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -265,13 +611,20 @@ func (e *QueueNameExists) ErrorMessage() string {
}
return *e.Message
}
-func (e *QueueNameExists) ErrorCode() string { return "QueueAlreadyExists" }
+func (e *QueueNameExists) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "QueueNameExists"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *QueueNameExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified receipt handle isn't valid.
type ReceiptHandleIsInvalid struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -284,13 +637,81 @@ func (e *ReceiptHandleIsInvalid) ErrorMessage() string {
}
return *e.Message
}
-func (e *ReceiptHandleIsInvalid) ErrorCode() string { return "ReceiptHandleIsInvalid" }
+func (e *ReceiptHandleIsInvalid) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ReceiptHandleIsInvalid"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *ReceiptHandleIsInvalid) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+// The request was denied due to request throttling.
+// - The rate of requests per second exceeds the Amazon Web Services KMS request
+// quota for an account and Region.
+// - A burst or sustained high rate of requests to change the state of the same
+// KMS key. This condition is often known as a "hot key."
+// - Requests for operations on KMS keys in a Amazon Web Services CloudHSM key
+// store might be throttled at a lower-than-expected rate when the Amazon Web
+// Services CloudHSM cluster associated with the Amazon Web Services CloudHSM key
+// store is processing numerous commands, including those unrelated to the Amazon
+// Web Services CloudHSM key store.
+type RequestThrottled struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *RequestThrottled) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *RequestThrottled) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *RequestThrottled) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "RequestThrottled"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *RequestThrottled) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// One or more specified resources don't exist.
+type ResourceNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ResourceNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
// The batch request contains more entries than permissible.
type TooManyEntriesInBatchRequest struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -304,7 +725,10 @@ func (e *TooManyEntriesInBatchRequest) ErrorMessage() string {
return *e.Message
}
func (e *TooManyEntriesInBatchRequest) ErrorCode() string {
- return "AWS.SimpleQueueService.TooManyEntriesInBatchRequest"
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "TooManyEntriesInBatchRequest"
+ }
+ return *e.ErrorCodeOverride
}
func (e *TooManyEntriesInBatchRequest) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
@@ -312,6 +736,8 @@ func (e *TooManyEntriesInBatchRequest) ErrorFault() smithy.ErrorFault { return s
type UnsupportedOperation struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -325,6 +751,9 @@ func (e *UnsupportedOperation) ErrorMessage() string {
return *e.Message
}
func (e *UnsupportedOperation) ErrorCode() string {
- return "AWS.SimpleQueueService.UnsupportedOperation"
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "UnsupportedOperation"
+ }
+ return *e.ErrorCodeOverride
}
func (e *UnsupportedOperation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/types.go
index c5f10b4b..7bda19bc 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/types/types.go
@@ -31,22 +31,13 @@ type BatchResultErrorEntry struct {
noSmithyDocumentSerde
}
-// Encloses a receipt handle and an entry id for each message in
-// ChangeMessageVisibilityBatch. All of the following list parameters must be
-// prefixed with ChangeMessageVisibilityBatchRequestEntry.n, where n is an integer
-// value starting with 1. For example, a parameter list for this action might look
-// like this:
-// &ChangeMessageVisibilityBatchRequestEntry.1.Id=change_visibility_msg_2
-//
-// &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=your_receipt_handle
-//
-//
-// &ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45
+// Encloses a receipt handle and an entry ID for each message in
+// ChangeMessageVisibilityBatch .
type ChangeMessageVisibilityBatchRequestEntry struct {
- // An identifier for this particular receipt handle used to communicate the result.
- // The Ids of a batch request need to be unique within a request. This identifier
- // can have up to 80 characters. The following characters are accepted:
+ // An identifier for this particular receipt handle used to communicate the
+ // result. The Id s of a batch request need to be unique within a request. This
+ // identifier can have up to 80 characters. The following characters are accepted:
// alphanumeric characters, hyphens(-), and underscores (_).
//
// This member is required.
@@ -63,7 +54,7 @@ type ChangeMessageVisibilityBatchRequestEntry struct {
noSmithyDocumentSerde
}
-// Encloses the Id of an entry in ChangeMessageVisibilityBatch.
+// Encloses the Id of an entry in ChangeMessageVisibilityBatch .
type ChangeMessageVisibilityBatchResultEntry struct {
// Represents a message whose visibility timeout has been changed successfully.
@@ -77,8 +68,8 @@ type ChangeMessageVisibilityBatchResultEntry struct {
// Encloses a receipt handle and an identifier for it.
type DeleteMessageBatchRequestEntry struct {
- // An identifier for this particular receipt handle. This is used to communicate
- // the result. The Ids of a batch request need to be unique within a request. This
+ // The identifier for this particular receipt handle. This is used to communicate
+ // the result. The Id s of a batch request need to be unique within a request. This
// identifier can have up to 80 characters. The following characters are accepted:
// alphanumeric characters, hyphens(-), and underscores (_).
//
@@ -93,7 +84,7 @@ type DeleteMessageBatchRequestEntry struct {
noSmithyDocumentSerde
}
-// Encloses the Id of an entry in DeleteMessageBatch.
+// Encloses the Id of an entry in DeleteMessageBatch .
type DeleteMessageBatchResultEntry struct {
// Represents a successfully deleted message.
@@ -104,31 +95,63 @@ type DeleteMessageBatchResultEntry struct {
noSmithyDocumentSerde
}
+// Contains the details of a message movement task.
+type ListMessageMoveTasksResultEntry struct {
+
+ // The approximate number of messages already moved to the destination queue.
+ ApproximateNumberOfMessagesMoved int64
+
+ // The number of messages to be moved from the source queue. This number is
+ // obtained at the time of starting the message movement task.
+ ApproximateNumberOfMessagesToMove *int64
+
+ // The ARN of the destination queue if it has been specified in the
+ // StartMessageMoveTask request. If a DestinationArn has not been specified in the
+ // StartMessageMoveTask request, this field value will be NULL.
+ DestinationArn *string
+
+ // The task failure reason (only included if the task status is FAILED).
+ FailureReason *string
+
+ // The number of messages to be moved per second (the message movement rate), if
+ // it has been specified in the StartMessageMoveTask request. If a
+ // MaxNumberOfMessagesPerSecond has not been specified in the StartMessageMoveTask
+ // request, this field value will be NULL.
+ MaxNumberOfMessagesPerSecond *int32
+
+ // The ARN of the queue that contains the messages to be moved to another queue.
+ SourceArn *string
+
+ // The timestamp of starting the message movement task.
+ StartedTimestamp int64
+
+ // The status of the message movement task. Possible values are: RUNNING,
+ // COMPLETED, CANCELLING, CANCELLED, and FAILED.
+ Status *string
+
+ // An identifier associated with a message movement task. When this field is
+ // returned in the response of the ListMessageMoveTasks action, it is only
+ // populated for tasks that are in RUNNING status.
+ TaskHandle *string
+
+ noSmithyDocumentSerde
+}
+
// An Amazon SQS message.
type Message struct {
// A map of the attributes requested in ReceiveMessage to their respective values.
// Supported attributes:
- //
- // * ApproximateReceiveCount
- //
- // *
- // ApproximateFirstReceiveTimestamp
- //
- // * MessageDeduplicationId
- //
- // * MessageGroupId
- //
- // *
- // SenderId
- //
- // * SentTimestamp
- //
- // * SequenceNumber
- //
- // ApproximateFirstReceiveTimestamp
- // and SentTimestamp are each returned as an integer representing the epoch time
- // (http://en.wikipedia.org/wiki/Unix_time) in milliseconds.
+ // - ApproximateReceiveCount
+ // - ApproximateFirstReceiveTimestamp
+ // - MessageDeduplicationId
+ // - MessageGroupId
+ // - SenderId
+ // - SentTimestamp
+ // - SequenceNumber
+ // ApproximateFirstReceiveTimestamp and SentTimestamp are each returned as an
+ // integer representing the epoch time (http://en.wikipedia.org/wiki/Unix_time) in
+ // milliseconds.
Attributes map[string]string
// The message's contents (not URL-encoded).
@@ -140,16 +163,15 @@ type Message struct {
// An MD5 digest of the non-URL-encoded message attribute string. You can use this
// attribute to verify that Amazon SQS received the message correctly. Amazon SQS
// URL-decodes the message before creating the MD5 digest. For information about
- // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).
+ // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt) .
MD5OfMessageAttributes *string
- // Each message attribute consists of a Name, Type, and Value. For more
- // information, see Amazon SQS message attributes
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
+ // Each message attribute consists of a Name , Type , and Value . For more
+ // information, see Amazon SQS message attributes (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
// in the Amazon SQS Developer Guide.
MessageAttributes map[string]MessageAttributeValue
- // A unique identifier for the message. A MessageIdis considered unique across all
+ // A unique identifier for the message. A MessageId is considered unique across all
// Amazon Web Services accounts for an extended period of time.
MessageId *string
@@ -163,15 +185,15 @@ type Message struct {
// The user-specified message attribute value. For string data types, the Value
// attribute has the same restrictions on the content as the message body. For more
-// information, see SendMessage.Name, type, value and the message body must not be
-// empty or null. All parts of the message attribute, including Name, Type, and
-// Value, are part of the message size restriction (256 KB or 262,144 bytes).
+// information, see SendMessage . Name , type , value and the message body must
+// not be empty or null. All parts of the message attribute, including Name , Type
+// , and Value , are part of the message size restriction (256 KiB or 262,144
+// bytes).
type MessageAttributeValue struct {
- // Amazon SQS supports the following logical data types: String, Number, and
- // Binary. For the Number data type, you must use StringValue. You can also append
- // custom labels. For more information, see Amazon SQS Message Attributes
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
+ // Amazon SQS supports the following logical data types: String , Number , and
+ // Binary . For the Number data type, you must use StringValue . You can also
+ // append custom labels. For more information, see Amazon SQS Message Attributes (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
// in the Amazon SQS Developer Guide.
//
// This member is required.
@@ -188,8 +210,8 @@ type MessageAttributeValue struct {
StringListValues []string
// Strings are Unicode with UTF-8 binary encoding. For a list of code values, see
- // ASCII Printable Characters
- // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
+ // ASCII Printable Characters (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters)
+ // .
StringValue *string
noSmithyDocumentSerde
@@ -197,14 +219,13 @@ type MessageAttributeValue struct {
// The user-specified message system attribute value. For string data types, the
// Value attribute has the same restrictions on the content as the message body.
-// For more information, see SendMessage.Name, type, value and the message body
-// must not be empty or null.
+// For more information, see SendMessage . Name , type , value and the message
+// body must not be empty or null.
type MessageSystemAttributeValue struct {
- // Amazon SQS supports the following logical data types: String, Number, and
- // Binary. For the Number data type, you must use StringValue. You can also append
- // custom labels. For more information, see Amazon SQS Message Attributes
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
+ // Amazon SQS supports the following logical data types: String , Number , and
+ // Binary . For the Number data type, you must use StringValue . You can also
+ // append custom labels. For more information, see Amazon SQS Message Attributes (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
// in the Amazon SQS Developer Guide.
//
// This member is required.
@@ -221,18 +242,18 @@ type MessageSystemAttributeValue struct {
StringListValues []string
// Strings are Unicode with UTF-8 binary encoding. For a list of code values, see
- // ASCII Printable Characters
- // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
+ // ASCII Printable Characters (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters)
+ // .
StringValue *string
noSmithyDocumentSerde
}
-// Contains the details of a single Amazon SQS message along with an Id.
+// Contains the details of a single Amazon SQS message along with an Id .
type SendMessageBatchRequestEntry struct {
- // An identifier for a message in this batch used to communicate the result. The
- // Ids of a batch request need to be unique within a request. This identifier can
+ // An identifier for a message in this batch used to communicate the result. The Id
+ // s of a batch request need to be unique within a request. This identifier can
// have up to 80 characters. The following characters are accepted: alphanumeric
// characters, hyphens(-), and underscores (_).
//
@@ -248,13 +269,12 @@ type SendMessageBatchRequestEntry struct {
// values: 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds
// value become available for processing after the delay period is finished. If you
// don't specify a value, the default value for the queue is applied. When you set
- // FifoQueue, you can't set DelaySeconds per message. You can set this parameter
+ // FifoQueue , you can't set DelaySeconds per message. You can set this parameter
// only on a queue level.
DelaySeconds int32
- // Each message attribute consists of a Name, Type, and Value. For more
- // information, see Amazon SQS message attributes
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
+ // Each message attribute consists of a Name , Type , and Value . For more
+ // information, see Amazon SQS message attributes (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes)
// in the Amazon SQS Developer Guide.
MessageAttributes map[string]MessageAttributeValue
@@ -262,51 +282,36 @@ type SendMessageBatchRequestEntry struct {
// for deduplication of messages within a 5-minute minimum deduplication interval.
// If a message with a particular MessageDeduplicationId is sent successfully,
// subsequent messages with the same MessageDeduplicationId are accepted
- // successfully but aren't delivered. For more information, see Exactly-once
- // processing
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
+ // successfully but aren't delivered. For more information, see Exactly-once
+ // processing (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
// in the Amazon SQS Developer Guide.
- //
- // * Every message must have a unique
- // MessageDeduplicationId,
- //
- // * You may provide a MessageDeduplicationId
- // explicitly.
- //
- // * If you aren't able to provide a MessageDeduplicationId and you
- // enable ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash
- // to generate the MessageDeduplicationId using the body of the message (but not
- // the attributes of the message).
- //
- // * If you don't provide a MessageDeduplicationId
- // and the queue doesn't have ContentBasedDeduplication set, the action fails with
- // an error.
- //
- // * If the queue has ContentBasedDeduplication set, your
- // MessageDeduplicationId overrides the generated one.
- //
- // * When
- // ContentBasedDeduplication is in effect, messages with identical content sent
- // within the deduplication interval are treated as duplicates and only one copy of
- // the message is delivered.
- //
- // * If you send one message with
- // ContentBasedDeduplication enabled and then another message with a
- // MessageDeduplicationId that is the same as the one generated for the first
- // MessageDeduplicationId, the two messages are treated as duplicates and only one
- // copy of the message is delivered.
- //
- // The MessageDeduplicationId is available to
- // the consumer of the message (this can be useful for troubleshooting delivery
- // issues). If a message is sent successfully but the acknowledgement is lost and
- // the message is resent with the same MessageDeduplicationId after the
- // deduplication interval, Amazon SQS can't detect duplicate messages. Amazon SQS
- // continues to keep track of the message deduplication ID even after the message
- // is received and deleted. The length of MessageDeduplicationId is 128 characters.
- // MessageDeduplicationId can contain alphanumeric characters (a-z, A-Z, 0-9) and
- // punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using
- // MessageDeduplicationId, see Using the MessageDeduplicationId Property
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html)
+ // - Every message must have a unique MessageDeduplicationId ,
+ // - You may provide a MessageDeduplicationId explicitly.
+ // - If you aren't able to provide a MessageDeduplicationId and you enable
+ // ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to
+ // generate the MessageDeduplicationId using the body of the message (but not the
+ // attributes of the message).
+ // - If you don't provide a MessageDeduplicationId and the queue doesn't have
+ // ContentBasedDeduplication set, the action fails with an error.
+ // - If the queue has ContentBasedDeduplication set, your MessageDeduplicationId
+ // overrides the generated one.
+ // - When ContentBasedDeduplication is in effect, messages with identical content
+ // sent within the deduplication interval are treated as duplicates and only one
+ // copy of the message is delivered.
+ // - If you send one message with ContentBasedDeduplication enabled and then
+ // another message with a MessageDeduplicationId that is the same as the one
+ // generated for the first MessageDeduplicationId , the two messages are treated
+ // as duplicates and only one copy of the message is delivered.
+ // The MessageDeduplicationId is available to the consumer of the message (this
+ // can be useful for troubleshooting delivery issues). If a message is sent
+ // successfully but the acknowledgement is lost and the message is resent with the
+ // same MessageDeduplicationId after the deduplication interval, Amazon SQS can't
+ // detect duplicate messages. Amazon SQS continues to keep track of the message
+ // deduplication ID even after the message is received and deleted. The length of
+ // MessageDeduplicationId is 128 characters. MessageDeduplicationId can contain
+ // alphanumeric characters ( a-z , A-Z , 0-9 ) and punctuation (
+ // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ). For best practices of using
+ // MessageDeduplicationId , see Using the MessageDeduplicationId Property (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html)
// in the Amazon SQS Developer Guide.
MessageDeduplicationId *string
@@ -318,39 +323,31 @@ type SendMessageBatchRequestEntry struct {
// values (for example, session data for multiple users). In this scenario,
// multiple consumers can process the queue, but the session data of each user is
// processed in a FIFO fashion.
- //
- // * You must associate a non-empty MessageGroupId
- // with a message. If you don't provide a MessageGroupId, the action fails.
- //
- // *
- // ReceiveMessage might return messages with multiple MessageGroupId values. For
- // each MessageGroupId, the messages are sorted by time sent. The caller can't
- // specify a MessageGroupId.
- //
- // The length of MessageGroupId is 128 characters. Valid
- // values: alphanumeric characters and punctuation
- // (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using MessageGroupId,
- // see Using the MessageGroupId Property
- // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html)
+ // - You must associate a non-empty MessageGroupId with a message. If you don't
+ // provide a MessageGroupId , the action fails.
+ // - ReceiveMessage might return messages with multiple MessageGroupId values.
+ // For each MessageGroupId , the messages are sorted by time sent. The caller
+ // can't specify a MessageGroupId .
+ // The length of MessageGroupId is 128 characters. Valid values: alphanumeric
+ // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) . For best
+ // practices of using MessageGroupId , see Using the MessageGroupId Property (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html)
// in the Amazon SQS Developer Guide. MessageGroupId is required for FIFO queues.
// You can't use it for Standard queues.
MessageGroupId *string
- // The message system attribute to send Each message system attribute consists of a
- // Name, Type, and Value.
- //
- // * Currently, the only supported message system attribute
- // is AWSTraceHeader. Its type must be String and its value must be a correctly
- // formatted X-Ray trace header string.
- //
- // * The size of a message system attribute
- // doesn't count towards the total size of a message.
+ // The message system attribute to send Each message system attribute consists of
+ // a Name , Type , and Value .
+ // - Currently, the only supported message system attribute is AWSTraceHeader .
+ // Its type must be String and its value must be a correctly formatted X-Ray
+ // trace header string.
+ // - The size of a message system attribute doesn't count towards the total size
+ // of a message.
MessageSystemAttributes map[string]MessageSystemAttributeValue
noSmithyDocumentSerde
}
-// Encloses a MessageId for a successfully-enqueued message in a SendMessageBatch.
+// Encloses a MessageId for a successfully-enqueued message in a SendMessageBatch .
type SendMessageBatchResultEntry struct {
// An identifier for the message in this batch.
@@ -361,7 +358,7 @@ type SendMessageBatchResultEntry struct {
// An MD5 digest of the non-URL-encoded message body string. You can use this
// attribute to verify that Amazon SQS received the message correctly. Amazon SQS
// URL-decodes the message before creating the MD5 digest. For information about
- // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).
+ // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt) .
//
// This member is required.
MD5OfMessageBody *string
@@ -374,19 +371,19 @@ type SendMessageBatchResultEntry struct {
// An MD5 digest of the non-URL-encoded message attribute string. You can use this
// attribute to verify that Amazon SQS received the message correctly. Amazon SQS
// URL-decodes the message before creating the MD5 digest. For information about
- // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).
+ // MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt) .
MD5OfMessageAttributes *string
// An MD5 digest of the non-URL-encoded message system attribute string. You can
// use this attribute to verify that Amazon SQS received the message correctly.
// Amazon SQS URL-decodes the message before creating the MD5 digest. For
- // information about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).
+ // information about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt) .
MD5OfMessageSystemAttributes *string
// This parameter applies only to FIFO (first-in-first-out) queues. The large,
// non-consecutive number that Amazon SQS assigns to each message. The length of
// SequenceNumber is 128 bits. As SequenceNumber continues to increase for a
- // particular MessageGroupId.
+ // particular MessageGroupId .
SequenceNumber *string
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/validators.go
index 47597805..de8f1b0e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/validators.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/validators.go
@@ -30,6 +30,26 @@ func (m *validateOpAddPermission) HandleInitialize(ctx context.Context, in middl
return next.HandleInitialize(ctx, in)
}
+type validateOpCancelMessageMoveTask struct {
+}
+
+func (*validateOpCancelMessageMoveTask) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCancelMessageMoveTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CancelMessageMoveTaskInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCancelMessageMoveTaskInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpChangeMessageVisibilityBatch struct {
}
@@ -210,6 +230,26 @@ func (m *validateOpListDeadLetterSourceQueues) HandleInitialize(ctx context.Cont
return next.HandleInitialize(ctx, in)
}
+type validateOpListMessageMoveTasks struct {
+}
+
+func (*validateOpListMessageMoveTasks) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListMessageMoveTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListMessageMoveTasksInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListMessageMoveTasksInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpListQueueTags struct {
}
@@ -350,6 +390,26 @@ func (m *validateOpSetQueueAttributes) HandleInitialize(ctx context.Context, in
return next.HandleInitialize(ctx, in)
}
+type validateOpStartMessageMoveTask struct {
+}
+
+func (*validateOpStartMessageMoveTask) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpStartMessageMoveTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*StartMessageMoveTaskInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpStartMessageMoveTaskInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpTagQueue struct {
}
@@ -394,6 +454,10 @@ func addOpAddPermissionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAddPermission{}, middleware.After)
}
+func addOpCancelMessageMoveTaskValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCancelMessageMoveTask{}, middleware.After)
+}
+
func addOpChangeMessageVisibilityBatchValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpChangeMessageVisibilityBatch{}, middleware.After)
}
@@ -430,6 +494,10 @@ func addOpListDeadLetterSourceQueuesValidationMiddleware(stack *middleware.Stack
return stack.Initialize.Add(&validateOpListDeadLetterSourceQueues{}, middleware.After)
}
+func addOpListMessageMoveTasksValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListMessageMoveTasks{}, middleware.After)
+}
+
func addOpListQueueTagsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListQueueTags{}, middleware.After)
}
@@ -458,6 +526,10 @@ func addOpSetQueueAttributesValidationMiddleware(stack *middleware.Stack) error
return stack.Initialize.Add(&validateOpSetQueueAttributes{}, middleware.After)
}
+func addOpStartMessageMoveTaskValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpStartMessageMoveTask{}, middleware.After)
+}
+
func addOpTagQueueValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpTagQueue{}, middleware.After)
}
@@ -671,6 +743,21 @@ func validateOpAddPermissionInput(v *AddPermissionInput) error {
}
}
+func validateOpCancelMessageMoveTaskInput(v *CancelMessageMoveTaskInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CancelMessageMoveTaskInput"}
+ if v.TaskHandle == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TaskHandle"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpChangeMessageVisibilityBatchInput(v *ChangeMessageVisibilityBatchInput) error {
if v == nil {
return nil
@@ -826,6 +913,21 @@ func validateOpListDeadLetterSourceQueuesInput(v *ListDeadLetterSourceQueuesInpu
}
}
+func validateOpListMessageMoveTasksInput(v *ListMessageMoveTasksInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListMessageMoveTasksInput"}
+ if v.SourceArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("SourceArn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpListQueueTagsInput(v *ListQueueTagsInput) error {
if v == nil {
return nil
@@ -957,6 +1059,21 @@ func validateOpSetQueueAttributesInput(v *SetQueueAttributesInput) error {
}
}
+func validateOpStartMessageMoveTaskInput(v *StartMessageMoveTaskInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StartMessageMoveTaskInput"}
+ if v.SourceArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("SourceArn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpTagQueueInput(v *TagQueueInput) error {
if v == nil {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
index 0bfbcf6d..f1d8b9ca 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
@@ -1,3 +1,307 @@
+# v1.20.2 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.1 (2024-02-23)
+
+* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.0 (2024-02-22)
+
+* **Feature**: Add middleware stack snapshot tests.
+
+# v1.19.2 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.1 (2024-02-20)
+
+* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
+
+# v1.19.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.7 (2024-01-18)
+
+* No change notes available for this release.
+
+# v1.18.6 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.5 (2023-12-08)
+
+* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
+
+# v1.18.4 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.3 (2023-12-06)
+
+* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
+
+# v1.18.2 (2023-12-01)
+
+* **Bug Fix**: Correct wrapping of errors in authentication workflow.
+* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.1 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.0 (2023-11-29)
+
+* **Feature**: Expose Options() accessor on service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.4 (2023-11-28)
+
+* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
+
+# v1.17.3 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.2 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2023-10-02)
+
+* **Feature**: Fix FIPS Endpoints in aws-us-gov.
+
+# v1.14.1 (2023-09-22)
+
+* No change notes available for this release.
+
+# v1.14.0 (2023-09-18)
+
+* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service.
+* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field.
+
+# v1.13.6 (2023-08-31)
+
+* No change notes available for this release.
+
+# v1.13.5 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.4 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.3 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.13.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.14 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.13 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.12 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.12.11 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.10 (2023-05-04)
+
+* No change notes available for this release.
+
+# v1.12.9 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.12.7 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.5 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.4 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.12.3 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.2 (2023-02-15)
+
+* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
+* **Bug Fix**: Correct error type parsing for restJson services.
+
+# v1.12.1 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.11.28 (2022-12-20)
+
+* No change notes available for this release.
+
+# v1.11.27 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.26 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.25 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.24 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.23 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.22 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.21 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.20 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.19 (2022-08-30)
+
+* **Documentation**: Documentation updates for the AWS IAM Identity Center Portal CLI Reference.
+
+# v1.11.18 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.17 (2022-08-15)
+
+* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+
+# v1.11.16 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.15 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.14 (2022-08-08)
+
+* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.13 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.12 (2022-07-11)
+
+* No change notes available for this release.
+
+# v1.11.11 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.10 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.9 (2022-06-16)
+
+* No change notes available for this release.
+
+# v1.11.8 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.7 (2022-05-26)
+
+* No change notes available for this release.
+
+# v1.11.6 (2022-05-25)
+
+* No change notes available for this release.
+
+# v1.11.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.11.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
index 7bb06984..fff45773 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
@@ -4,12 +4,15 @@ package sso
import (
"context"
+ "fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/defaults"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
smithy "github.com/aws/smithy-go"
smithydocument "github.com/aws/smithy-go/document"
@@ -45,128 +48,48 @@ func New(options Options, optFns ...func(*Options)) *Client {
resolveHTTPSignerV4(&options)
- resolveDefaultEndpointConfiguration(&options)
+ resolveEndpointResolverV2(&options)
+
+ resolveAuthSchemeResolver(&options)
for _, fn := range optFns {
fn(&options)
}
- client := &Client{
- options: options,
- }
-
- return client
-}
-
-type Options struct {
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- APIOptions []func(*middleware.Stack) error
-
- // Configures the events that will be sent to the configured logger.
- ClientLogMode aws.ClientLogMode
-
- // The credentials object to use when signing requests.
- Credentials aws.CredentialsProvider
-
- // The configuration DefaultsMode that the SDK should use when constructing the
- // clients initial default settings.
- DefaultsMode aws.DefaultsMode
-
- // The endpoint options to be used when attempting to resolve an endpoint.
- EndpointOptions EndpointResolverOptions
-
- // The service endpoint resolver.
- EndpointResolver EndpointResolver
-
- // Signature Version 4 (SigV4) Signer
- HTTPSignerV4 HTTPSignerV4
-
- // The logger writer interface to write logging messages to.
- Logger logging.Logger
+ finalizeRetryMaxAttempts(&options)
- // The region to send requests to. (Required)
- Region string
+ ignoreAnonymousAuth(&options)
- // RetryMaxAttempts specifies the maximum number attempts an API client will call
- // an operation that fails with a retryable error. A value of 0 is ignored, and
- // will not be used to configure the API client created default retryer, or modify
- // per operation call's retry max attempts. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. If specified in an operation call's functional
- // options with a value that is different than the constructed client's Options,
- // the Client's Retryer will be wrapped to use the operation's specific
- // RetryMaxAttempts value.
- RetryMaxAttempts int
+ wrapWithAnonymousAuth(&options)
- // RetryMode specifies the retry mode the API client will be created with, if
- // Retryer option is not also specified. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. Currently does not support per operation call
- // overrides, may in the future.
- RetryMode aws.RetryMode
+ resolveAuthSchemes(&options)
- // Retryer guides how HTTP requests should be retried in case of recoverable
- // failures. When nil the API client will use a default retryer. The kind of
- // default retry created by the API client can be changed with the RetryMode
- // option.
- Retryer aws.Retryer
-
- // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
- // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
- // should not populate this structure programmatically, or rely on the values here
- // within your applications.
- RuntimeEnvironment aws.RuntimeEnvironment
-
- // The initial DefaultsMode used when the client options were constructed. If the
- // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
- // value was at that point in time. Currently does not support per operation call
- // overrides, may in the future.
- resolvedDefaultsMode aws.DefaultsMode
-
- // The HTTP client to invoke API calls with. Defaults to client's default HTTP
- // implementation if nil.
- HTTPClient HTTPClient
-}
-
-// WithAPIOptions returns a functional option for setting the Client's APIOptions
-// option.
-func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, optFns...)
+ client := &Client{
+ options: options,
}
-}
-// WithEndpointResolver returns a functional option for setting the Client's
-// EndpointResolver option.
-func WithEndpointResolver(v EndpointResolver) func(*Options) {
- return func(o *Options) {
- o.EndpointResolver = v
- }
+ return client
}
-type HTTPClient interface {
- Do(*http.Request) (*http.Response, error)
+// Options returns a copy of the client configuration.
+//
+// Callers SHOULD NOT perform mutations on any inner structures within client
+// config. Config overrides should instead be made on a per-operation basis through
+// functional options.
+func (c *Client) Options() Options {
+ return c.options.Copy()
}
-// Copy creates a clone where the APIOptions list is deep copied.
-func (o Options) Copy() Options {
- to := o
- to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
- copy(to.APIOptions, o.APIOptions)
-
- return to
-}
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
ctx = middleware.ClearStackValues(ctx)
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
options := c.options.Copy()
+
for _, fn := range optFns {
fn(&options)
}
- finalizeRetryMaxAttemptOptions(&options, *c)
+ finalizeOperationRetryMaxAttempts(&options, *c)
finalizeClientEndpointResolverOptions(&options)
@@ -194,8 +117,89 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
return result, metadata, err
}
+type operationInputKey struct{}
+
+func setOperationInput(ctx context.Context, input interface{}) context.Context {
+ return middleware.WithStackValue(ctx, operationInputKey{}, input)
+}
+
+func getOperationInput(ctx context.Context) interface{} {
+ return middleware.GetStackValue(ctx, operationInputKey{})
+}
+
+type setOperationInputMiddleware struct {
+}
+
+func (*setOperationInputMiddleware) ID() string {
+ return "setOperationInput"
+}
+
+func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = setOperationInput(ctx, in.Parameters)
+ return next.HandleSerialize(ctx, in)
+}
+
+func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %v", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %v", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
+func resolveAuthSchemeResolver(options *Options) {
+ if options.AuthSchemeResolver == nil {
+ options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
+ }
+}
+
+func resolveAuthSchemes(options *Options) {
+ if options.AuthSchemes == nil {
+ options.AuthSchemes = []smithyhttp.AuthScheme{
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ }
+ }
+}
+
type noSmithyDocumentSerde = smithydocument.NoSerde
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -233,6 +237,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
APIOptions: cfg.APIOptions,
Logger: cfg.Logger,
ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
@@ -240,6 +245,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
resolveAWSEndpointResolver(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
+ resolveBaseEndpoint(cfg, &opts)
return New(opts, optFns...)
}
@@ -331,7 +337,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
o.RetryMaxAttempts = cfg.RetryMaxAttempts
}
-func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+func finalizeRetryMaxAttempts(o *Options) {
+ if o.RetryMaxAttempts == 0 {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
return
}
@@ -343,20 +357,39 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
return
}
- o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
}
-func addClientUserAgent(stack *middleware.Stack) error {
- return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sso", goModuleVersion)(stack)
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sso", goModuleVersion)
+ if len(options.AppID) > 0 {
+ ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
+ }
+
+ return nil
}
-func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
- mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
- CredentialsProvider: o.Credentials,
- Signer: o.HTTPSignerV4,
- LogSigning: o.ClientLogMode.IsSigning(),
- })
- return stack.Finalize.Add(mw, middleware.After)
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
+ id := (*awsmiddleware.RequestUserAgent)(nil).ID()
+ mw, ok := stack.Build.Get(id)
+ if !ok {
+ mw = awsmiddleware.NewRequestUserAgent()
+ if err := stack.Build.Add(mw, middleware.After); err != nil {
+ return nil, err
+ }
+ }
+
+ ua, ok := mw.(*awsmiddleware.RequestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
+ }
+
+ return ua, nil
}
type HTTPSignerV4 interface {
@@ -377,12 +410,48 @@ func newDefaultV4Signer(o Options) *v4.Signer {
})
}
-func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
- mo := retry.AddRetryMiddlewaresOptions{
- Retryer: o.Retryer,
- LogRetryAttempts: o.ClientLogMode.IsRetries(),
+func addClientRequestID(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
+}
+
+func addComputeContentLength(stack *middleware.Stack) error {
+ return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
+}
+
+func addRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
+}
+
+func addRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
+}
+func addStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
+}
+
+func addUnsignedPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addComputePayloadSHA256(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addContentSHA256Header(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
+}
+
+func addRetry(stack *middleware.Stack, o Options) error {
+ attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
+ m.LogAttempts = o.ClientLogMode.IsRetries()
+ })
+ if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ return err
+ }
+ if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
+ return err
}
- return retry.AddRetryMiddlewares(stack, mo)
+ return nil
}
// resolves dual-stack endpoint configuration
@@ -415,12 +484,18 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
return nil
}
+func addRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
+}
+
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
- return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+ return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
+
}
func addResponseErrorMiddleware(stack *middleware.Stack) error {
- return awshttp.AddResponseErrorMiddleware(stack)
+ return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+
}
func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
@@ -431,3 +506,32 @@ func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
}, middleware.After)
}
+
+type disableHTTPSMiddleware struct {
+ DisableHTTPS bool
+}
+
+func (*disableHTTPSMiddleware) ID() string {
+ return "disableHTTPS"
+}
+
+func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Finalize.Insert(&disableHTTPSMiddleware{
+ DisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "ResolveEndpointV2", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
index 85556599..4b21e8b0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
@@ -4,14 +4,15 @@ package sso
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/service/sso/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns the STS short-term credentials for a given role name that is assigned to
-// the user.
+// Returns the STS short-term credentials for a given role name that is assigned
+// to the user.
func (c *Client) GetRoleCredentials(ctx context.Context, params *GetRoleCredentialsInput, optFns ...func(*Options)) (*GetRoleCredentialsOutput, error) {
if params == nil {
params = &GetRoleCredentialsInput{}
@@ -30,9 +31,8 @@ func (c *Client) GetRoleCredentials(ctx context.Context, params *GetRoleCredenti
type GetRoleCredentialsInput struct {
// The token issued by the CreateToken API call. For more information, see
- // CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
+ // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
//
// This member is required.
AccessToken *string
@@ -62,6 +62,9 @@ type GetRoleCredentialsOutput struct {
}
func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRoleCredentials{}, middleware.After)
if err != nil {
return err
@@ -70,28 +73,35 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetRoleCredentials"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -100,12 +110,18 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRoleCredentials(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -115,6 +131,9 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
index 1923c4a9..e44da697 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
@@ -30,9 +30,8 @@ func (c *Client) ListAccountRoles(ctx context.Context, params *ListAccountRolesI
type ListAccountRolesInput struct {
// The token issued by the CreateToken API call. For more information, see
- // CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
+ // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
//
// This member is required.
AccessToken *string
@@ -68,6 +67,9 @@ type ListAccountRolesOutput struct {
}
func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccountRoles{}, middleware.After)
if err != nil {
return err
@@ -76,28 +78,35 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccountRoles"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -106,12 +115,18 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpListAccountRolesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountRoles(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -121,6 +136,9 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
index c76f6ca3..2d7add06 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
@@ -12,9 +12,9 @@ import (
)
// Lists all AWS accounts assigned to the user. These AWS accounts are assigned by
-// the administrator of the account. For more information, see Assign User Access
-// (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
-// in the AWS SSO User Guide. This operation returns a paginated response.
+// the administrator of the account. For more information, see Assign User Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
+// in the IAM Identity Center User Guide. This operation returns a paginated
+// response.
func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, optFns ...func(*Options)) (*ListAccountsOutput, error) {
if params == nil {
params = &ListAccountsInput{}
@@ -33,9 +33,8 @@ func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, op
type ListAccountsInput struct {
// The token issued by the CreateToken API call. For more information, see
- // CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
+ // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
//
// This member is required.
AccessToken *string
@@ -66,6 +65,9 @@ type ListAccountsOutput struct {
}
func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccounts{}, middleware.After)
if err != nil {
return err
@@ -74,28 +76,35 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccounts"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -104,12 +113,18 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpListAccountsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -119,6 +134,9 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
index cbc72877..3ee682d1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
@@ -4,12 +4,24 @@ package sso
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Removes the client- and server-side session that is associated with the user.
+// Removes the locally stored SSO tokens from the client-side cache and sends an
+// API call to the IAM Identity Center service to invalidate the corresponding
+// server-side IAM Identity Center sign in session. If a user uses IAM Identity
+// Center to access the AWS CLI, the user’s IAM Identity Center sign in session is
+// used to obtain an IAM session, as specified in the corresponding IAM Identity
+// Center permission set. More specifically, IAM Identity Center assumes an IAM
+// role in the target account on behalf of the user, and the corresponding
+// temporary AWS credentials are returned to the client. After user logout, any
+// existing IAM role sessions that were created by using IAM Identity Center
+// permission sets continue based on the duration configured in the permission set.
+// For more information, see User authentications (https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html)
+// in the IAM Identity Center User Guide.
func (c *Client) Logout(ctx context.Context, params *LogoutInput, optFns ...func(*Options)) (*LogoutOutput, error) {
if params == nil {
params = &LogoutInput{}
@@ -28,9 +40,8 @@ func (c *Client) Logout(ctx context.Context, params *LogoutInput, optFns ...func
type LogoutInput struct {
// The token issued by the CreateToken API call. For more information, see
- // CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
+ // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
//
// This member is required.
AccessToken *string
@@ -46,6 +57,9 @@ type LogoutOutput struct {
}
func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsRestjson1_serializeOpLogout{}, middleware.After)
if err != nil {
return err
@@ -54,28 +68,35 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "Logout"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -84,12 +105,18 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpLogoutValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLogout(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -99,6 +126,9 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go
new file mode 100644
index 00000000..3b28e825
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go
@@ -0,0 +1,308 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) {
+ params.Region = options.Region
+}
+
+type setLegacyContextSigningOptionsMiddleware struct {
+}
+
+func (*setLegacyContextSigningOptionsMiddleware) ID() string {
+ return "setLegacyContextSigningOptions"
+}
+
+func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
+ }
+ }
+
+ if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
+}
+
+type withAnonymous struct {
+ resolver AuthSchemeResolver
+}
+
+var _ AuthSchemeResolver = (*withAnonymous)(nil)
+
+func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ opts = append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ })
+ return opts, nil
+}
+
+func wrapWithAnonymousAuth(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &withAnonymous{
+ resolver: options.AuthSchemeResolver,
+ }
+}
+
+// AuthResolverParameters contains the set of inputs necessary for auth scheme
+// resolution.
+type AuthResolverParameters struct {
+ // The name of the operation being invoked.
+ Operation string
+
+ // The region in which the operation is being invoked.
+ Region string
+}
+
+func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters {
+ params := &AuthResolverParameters{
+ Operation: operation,
+ }
+
+ bindAuthParamsRegion(params, input, options)
+
+ return params
+}
+
+// AuthSchemeResolver returns a set of possible authentication options for an
+// operation.
+type AuthSchemeResolver interface {
+ ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
+}
+
+type defaultAuthSchemeResolver struct{}
+
+var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
+
+func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ if overrides, ok := operationAuthOptions[params.Operation]; ok {
+ return overrides(params), nil
+ }
+ return serviceAuthOptions(params), nil
+}
+
+var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{
+ "GetRoleCredentials": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+
+ "ListAccountRoles": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+
+ "ListAccounts": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+
+ "Logout": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+}
+
+func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "awsssoportal")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ return props
+ }(),
+ },
+ }
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options)
+ options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
+ }
+
+ scheme, ok := m.selectScheme(options)
+ if !ok {
+ return out, metadata, fmt.Errorf("could not select an auth scheme")
+ }
+
+ ctx = setResolvedAuthScheme(ctx, scheme)
+ return next.HandleFinalize(ctx, in)
+}
+
+func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
+ for _, option := range options {
+ if option.SchemeID == smithyauth.SchemeIDAnonymous {
+ return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
+ }
+
+ for _, scheme := range m.options.AuthSchemes {
+ if scheme.SchemeID() != option.SchemeID {
+ continue
+ }
+
+ if scheme.IdentityResolver(m.options) != nil {
+ return newResolvedAuthScheme(scheme, option), true
+ }
+ }
+ }
+
+ return nil, false
+}
+
+type resolvedAuthSchemeKey struct{}
+
+type resolvedAuthScheme struct {
+ Scheme smithyhttp.AuthScheme
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
+ return &resolvedAuthScheme{
+ Scheme: scheme,
+ IdentityProperties: option.IdentityProperties,
+ SignerProperties: option.SignerProperties,
+ }
+}
+
+func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
+ return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
+}
+
+func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
+ v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
+ return v
+}
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ resolver := rscheme.Scheme.IdentityResolver(m.options)
+ if resolver == nil {
+ return out, metadata, fmt.Errorf("no identity resolver")
+ }
+
+ identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties)
+ if err != nil {
+ return out, metadata, fmt.Errorf("get identity: %w", err)
+ }
+
+ ctx = setIdentity(ctx, identity)
+ return next.HandleFinalize(ctx, in)
+}
+
+type identityKey struct{}
+
+func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
+ return middleware.WithStackValue(ctx, identityKey{}, identity)
+}
+
+func getIdentity(ctx context.Context) smithyauth.Identity {
+ v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
+ return v
+}
+
+type signRequestMiddleware struct {
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ identity := getIdentity(ctx)
+ if identity == nil {
+ return out, metadata, fmt.Errorf("no identity")
+ }
+
+ signer := rscheme.Scheme.Signer()
+ if signer == nil {
+ return out, metadata, fmt.Errorf("no signer")
+ }
+
+ if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil {
+ return out, metadata, fmt.Errorf("sign request: %w", err)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
index 6a1851da..8bba205f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
@@ -86,9 +86,9 @@ func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Resp
errorCode := "UnknownError"
errorMessage := errorCode
- code := response.Header.Get("X-Amzn-ErrorType")
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
}
var buff [1024]byte
@@ -97,7 +97,7 @@ func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Resp
body := io.TeeReader(errorBody, ringBuffer)
decoder := json.NewDecoder(body)
decoder.UseNumber()
- code, message, err := restjson.GetErrorInfo(decoder)
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -109,8 +109,8 @@ func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Resp
}
errorBody.Seek(0, io.SeekStart)
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
}
if len(message) != 0 {
errorMessage = message
@@ -242,9 +242,9 @@ func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Respon
errorCode := "UnknownError"
errorMessage := errorCode
- code := response.Header.Get("X-Amzn-ErrorType")
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
}
var buff [1024]byte
@@ -253,7 +253,7 @@ func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Respon
body := io.TeeReader(errorBody, ringBuffer)
decoder := json.NewDecoder(body)
decoder.UseNumber()
- code, message, err := restjson.GetErrorInfo(decoder)
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -265,8 +265,8 @@ func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Respon
}
errorBody.Seek(0, io.SeekStart)
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
}
if len(message) != 0 {
errorMessage = message
@@ -407,9 +407,9 @@ func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response,
errorCode := "UnknownError"
errorMessage := errorCode
- code := response.Header.Get("X-Amzn-ErrorType")
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
}
var buff [1024]byte
@@ -418,7 +418,7 @@ func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response,
body := io.TeeReader(errorBody, ringBuffer)
decoder := json.NewDecoder(body)
decoder.UseNumber()
- code, message, err := restjson.GetErrorInfo(decoder)
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -430,8 +430,8 @@ func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response,
}
errorBody.Seek(0, io.SeekStart)
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
}
if len(message) != 0 {
errorMessage = message
@@ -550,9 +550,9 @@ func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metada
errorCode := "UnknownError"
errorMessage := errorCode
- code := response.Header.Get("X-Amzn-ErrorType")
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
}
var buff [1024]byte
@@ -561,7 +561,7 @@ func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metada
body := io.TeeReader(errorBody, ringBuffer)
decoder := json.NewDecoder(body)
decoder.UseNumber()
- code, message, err := restjson.GetErrorInfo(decoder)
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -573,8 +573,8 @@ func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metada
}
errorBody.Seek(0, io.SeekStart)
- if len(code) != 0 {
- errorCode = restjson.SanitizeErrorCode(code)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
}
if len(message) != 0 {
errorMessage = message
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go
index c5d03d8e..59456d5d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go
@@ -3,18 +3,19 @@
// Package sso provides the API client, operations, and parameter types for AWS
// Single Sign-On.
//
-// AWS Single Sign-On Portal is a web service that makes it easy for you to assign
-// user access to AWS SSO resources such as the user portal. Users can get AWS
-// account applications and roles assigned to them and get federated into the
-// application. For general information about AWS SSO, see What is AWS Single
-// Sign-On?
-// (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the
-// AWS SSO User Guide. This API reference guide describes the AWS SSO Portal
-// operations that you can call programatically and includes detailed information
-// on data types and errors. AWS provides SDKs that consist of libraries and sample
-// code for various programming languages and platforms, such as Java, Ruby, .Net,
-// iOS, or Android. The SDKs provide a convenient way to create programmatic access
-// to AWS SSO and other AWS services. For more information about the AWS SDKs,
-// including how to download and install them, see Tools for Amazon Web Services
-// (http://aws.amazon.com/tools/).
+// AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web
+// service that makes it easy for you to assign user access to IAM Identity Center
+// resources such as the AWS access portal. Users can get AWS account applications
+// and roles assigned to them and get federated into the application. Although AWS
+// Single Sign-On was renamed, the sso and identitystore API namespaces will
+// continue to retain their original name for backward compatibility purposes. For
+// more information, see IAM Identity Center rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed)
+// . This reference guide describes the IAM Identity Center Portal operations that
+// you can call programatically and includes detailed information on data types and
+// errors. AWS provides SDKs that consist of libraries and sample code for various
+// programming languages and platforms, such as Java, Ruby, .Net, iOS, or Android.
+// The SDKs provide a convenient way to create programmatic access to IAM Identity
+// Center and other AWS services. For more information about the AWS SDKs,
+// including how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/)
+// .
package sso
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go
index 43c06f11..76521eec 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go
@@ -8,10 +8,18 @@ import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
internalendpoints "github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
"net/url"
+ "os"
"strings"
)
@@ -39,13 +47,6 @@ func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointRe
return fn(region, options)
}
-func resolveDefaultEndpointConfiguration(o *Options) {
- if o.EndpointResolver != nil {
- return
- }
- o.EndpointResolver = NewDefaultEndpointResolver()
-}
-
// EndpointResolverFromURL returns an EndpointResolver configured using the
// provided endpoint url. By default, the resolved endpoint resolver uses the
// client region as signing region, and the endpoint source is set to
@@ -79,6 +80,10 @@ func (*ResolveEndpoint) ID() string {
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
@@ -94,6 +99,11 @@ func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.Ser
var endpoint aws.Endpoint
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
}
@@ -129,27 +139,10 @@ func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
type wrappedEndpointResolver struct {
awsResolver aws.EndpointResolverWithOptions
- resolver EndpointResolver
}
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- if w.awsResolver == nil {
- goto fallback
- }
- endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
- if err == nil {
- return endpoint, nil
- }
-
- if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
- return endpoint, err
- }
-
-fallback:
- if w.resolver == nil {
- return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
- }
- return w.resolver.ResolveEndpoint(region, options)
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
}
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
@@ -160,12 +153,13 @@ func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, opti
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
-// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
-// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
-// fallbackResolver for resolution.
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
//
-// fallbackResolver must not be nil
-func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
@@ -176,7 +170,6 @@ func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptio
return &wrappedEndpointResolver{
awsResolver: resolver,
- resolver: fallbackResolver,
}
}
@@ -198,3 +191,345 @@ func finalizeClientEndpointResolverOptions(options *Options) {
}
}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+func resolveBaseEndpoint(cfg aws.Config, o *Options) {
+ if cfg.BaseEndpoint != nil {
+ o.BaseEndpoint = cfg.BaseEndpoint
+ }
+
+ _, g := os.LookupEnv("AWS_ENDPOINT_URL")
+ _, s := os.LookupEnv("AWS_ENDPOINT_URL_SSO")
+
+ if g && !s {
+ return
+ }
+
+ value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "SSO", cfg.ConfigSources)
+ if found && err == nil {
+ o.BaseEndpoint = &value
+ }
+}
+
+func bindRegion(region string) *string {
+ if region == "" {
+ return nil
+ }
+ return aws.String(endpoints.MapFIPSRegion(region))
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+ return p
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseDualStack := *params.UseDualStack
+ _UseFIPS := *params.UseFIPS
+
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
+ }
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
+ }
+ uriString := _Endpoint
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://portal.sso-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
+ }
+ }
+ if _UseFIPS == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if "aws-us-gov" == _PartitionResult.Name {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://portal.sso.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://portal.sso-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
+ }
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://portal.sso.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://portal.sso.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
+}
+
+type endpointParamsBinder interface {
+ bindEndpointParams(*EndpointParameters)
+}
+
+func bindEndpointParams(input interface{}, options Options) *EndpointParameters {
+ params := &EndpointParameters{}
+
+ params.Region = bindRegion(options.Region)
+ params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
+ params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
+ params.Endpoint = options.BaseEndpoint
+
+ if b, ok := input.(endpointParamsBinder); ok {
+ b.bindEndpointParams(params)
+ }
+
+ return params
+}
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.options.EndpointResolverV2 == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := bindEndpointParams(getOperationInput(ctx), m.options)
+ endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
+ endpt.URI.RawPath = endpt.URI.Path
+ }
+ req.URL.Scheme = endpt.URI.Scheme
+ req.URL.Host = endpt.URI.Host
+ req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
+ req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
+ for k := range endpt.Headers {
+ req.Header.Set(k, endpt.Headers.Get(k))
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
+ for _, o := range opts {
+ rscheme.SignerProperties.SetAll(&o.SignerProperties)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json
index 5be0e34c..936253d7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json
@@ -12,14 +12,19 @@
"api_op_ListAccountRoles.go",
"api_op_ListAccounts.go",
"api_op_Logout.go",
+ "auth.go",
"deserializers.go",
"doc.go",
"endpoints.go",
+ "endpoints_config_test.go",
+ "endpoints_test.go",
"generated.json",
"internal/endpoints/endpoints.go",
"internal/endpoints/endpoints_test.go",
+ "options.go",
"protocol_test.go",
"serializers.go",
+ "snapshot_test.go",
"types/errors.go",
"types/types.go",
"validators.go"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
index a60df062..f4cc5c93 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
@@ -3,4 +3,4 @@
package sso
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.11.3"
+const goModuleVersion = "1.20.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
index c8d16899..c8f7c09e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
@@ -89,13 +89,17 @@ var partitionRegexp = struct {
AwsCn *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
AwsUsGov *regexp.Regexp
}{
- Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
}
@@ -135,6 +139,22 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.Aws,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.af-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-east-1",
+ },
+ },
endpoints.EndpointKey{
Region: "ap-northeast-1",
}: endpoints.Endpoint{
@@ -151,6 +171,14 @@ var defaultPartitions = endpoints.Partitions{
Region: "ap-northeast-2",
},
},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-northeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
endpoints.EndpointKey{
Region: "ap-south-1",
}: endpoints.Endpoint{
@@ -175,6 +203,14 @@ var defaultPartitions = endpoints.Partitions{
Region: "ap-southeast-2",
},
},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-southeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{
@@ -191,6 +227,14 @@ var defaultPartitions = endpoints.Partitions{
Region: "eu-central-1",
},
},
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-central-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-2",
+ },
+ },
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{
@@ -199,6 +243,14 @@ var defaultPartitions = endpoints.Partitions{
Region: "eu-north-1",
},
},
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-south-1",
+ },
+ },
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{
@@ -223,6 +275,30 @@ var defaultPartitions = endpoints.Partitions{
Region: "eu-west-3",
},
},
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.il-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.me-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.me-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-south-1",
+ },
+ },
endpoints.EndpointKey{
Region: "sa-east-1",
}: endpoints.Endpoint{
@@ -247,6 +323,14 @@ var defaultPartitions = endpoints.Partitions{
Region: "us-east-2",
},
},
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.us-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-1",
+ },
+ },
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{
@@ -291,6 +375,24 @@ var defaultPartitions = endpoints.Partitions{
},
RegionRegex: partitionRegexp.AwsCn,
IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.cn-north-1.amazonaws.com.cn",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
},
{
ID: "aws-iso",
@@ -334,6 +436,48 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
},
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ },
{
ID: "aws-us-gov",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go
new file mode 100644
index 00000000..5dee7e53
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go
@@ -0,0 +1,217 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+)
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
+ // endpoint, set the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service operation. This should be
+ // used over the deprecated EndpointResolver.
+ EndpointResolverV2 EndpointResolverV2
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. If specified in an operation call's
+ // functional options with a value that is different than the constructed client's
+ // Options, the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // The auth scheme resolver which determines how to authenticate for each
+ // operation.
+ AuthSchemeResolver AuthSchemeResolver
+
+ // The list of auth schemes supported by the client.
+ AuthSchemes []smithyhttp.AuthScheme
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+
+func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
+ if schemeID == "aws.auth#sigv4" {
+ return getSigV4IdentityResolver(o)
+ }
+ if schemeID == "smithy.api#noAuth" {
+ return &smithyauth.AnonymousIdentityResolver{}
+ }
+ return nil
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
+ }
+ return nil
+}
+
+// WithSigV4SigningName applies an override to the authentication workflow to
+// use the given signing name for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing name from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningName(name string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+// WithSigV4SigningRegion applies an override to the authentication workflow to
+// use the given signing region for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningRegion(region string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func ignoreAnonymousAuth(options *Options) {
+ if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
+ options.Credentials = nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go
index 29e32081..02e31411 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go
@@ -36,7 +36,14 @@ func (m *awsRestjson1_serializeOpGetRoleCredentials) HandleSerialize(ctx context
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -98,7 +105,14 @@ func (m *awsRestjson1_serializeOpListAccountRoles) HandleSerialize(ctx context.C
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -164,7 +178,14 @@ func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Conte
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
@@ -226,7 +247,14 @@ func (m *awsRestjson1_serializeOpLogout) HandleSerialize(ctx context.Context, in
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
- restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go
index 1401d585..e97a126e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go
@@ -12,6 +12,8 @@ import (
type InvalidRequestException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -24,13 +26,20 @@ func (e *InvalidRequestException) ErrorMessage() string {
}
return *e.Message
}
-func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" }
+func (e *InvalidRequestException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidRequestException"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified resource doesn't exist.
type ResourceNotFoundException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -43,7 +52,12 @@ func (e *ResourceNotFoundException) ErrorMessage() string {
}
return *e.Message
}
-func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" }
+func (e *ResourceNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ResourceNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the request is being made too frequently and is more than what
@@ -51,6 +65,8 @@ func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smit
type TooManyRequestsException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -63,7 +79,12 @@ func (e *TooManyRequestsException) ErrorMessage() string {
}
return *e.Message
}
-func (e *TooManyRequestsException) ErrorCode() string { return "TooManyRequestsException" }
+func (e *TooManyRequestsException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "TooManyRequestsException"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the request is not authorized. This can happen due to an invalid
@@ -71,6 +92,8 @@ func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smith
type UnauthorizedException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -83,5 +106,10 @@ func (e *UnauthorizedException) ErrorMessage() string {
}
return *e.Message
}
-func (e *UnauthorizedException) ErrorCode() string { return "UnauthorizedException" }
+func (e *UnauthorizedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "UnauthorizedException"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go
index 051056b7..8dc02296 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go
@@ -26,8 +26,7 @@ type RoleCredentials struct {
// The identifier used for the temporary security credentials. For more
// information, see Using Temporary Security Credentials to Request Access to AWS
- // Resources
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
+ // Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the AWS IAM User Guide.
AccessKeyId *string
@@ -35,14 +34,12 @@ type RoleCredentials struct {
Expiration int64
// The key that is used to sign the request. For more information, see Using
- // Temporary Security Credentials to Request Access to AWS Resources
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
+ // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the AWS IAM User Guide.
SecretAccessKey *string
// The token used for temporary credentials. For more information, see Using
- // Temporary Security Credentials to Request Access to AWS Resources
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
+ // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the AWS IAM User Guide.
SessionToken *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
new file mode 100644
index 00000000..25afc9b3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
@@ -0,0 +1,399 @@
+# v1.23.2 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.1 (2024-02-23)
+
+* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.0 (2024-02-22)
+
+* **Feature**: Add middleware stack snapshot tests.
+
+# v1.22.2 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.22.1 (2024-02-20)
+
+* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
+
+# v1.22.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.7 (2024-01-16)
+
+* No change notes available for this release.
+
+# v1.21.6 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.5 (2023-12-08)
+
+* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
+
+# v1.21.4 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.3 (2023-12-06)
+
+* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
+
+# v1.21.2 (2023-12-01)
+
+* **Bug Fix**: Correct wrapping of errors in authentication workflow.
+* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.1 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.0 (2023-11-29)
+
+* **Feature**: Expose Options() accessor on service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.3 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.2 (2023-11-28)
+
+* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
+
+# v1.20.1 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.0 (2023-11-17)
+
+* **Feature**: Adding support for `sso-oauth:CreateTokenWithIAM`.
+
+# v1.19.2 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.1 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.3 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2023-09-22)
+
+* No change notes available for this release.
+
+# v1.17.0 (2023-09-20)
+
+* **Feature**: Update FIPS endpoints in aws-us-gov.
+
+# v1.16.0 (2023-09-18)
+
+* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service.
+* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field.
+
+# v1.15.6 (2023-09-05)
+
+* No change notes available for this release.
+
+# v1.15.5 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.4 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.3 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.15.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.14 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.13 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.12 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.14.11 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.10 (2023-05-04)
+
+* No change notes available for this release.
+
+# v1.14.9 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.8 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.14.7 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.6 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.5 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.4 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.14.3 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.2 (2023-02-15)
+
+* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
+* **Bug Fix**: Correct error type parsing for restJson services.
+
+# v1.14.1 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.13.11 (2022-12-19)
+
+* No change notes available for this release.
+
+# v1.13.10 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.9 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.8 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.7 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.6 (2022-09-30)
+
+* **Documentation**: Documentation updates for the IAM Identity Center OIDC CLI Reference.
+
+# v1.13.5 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.4 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.3 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.2 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.1 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2022-08-25)
+
+* **Feature**: Updated required request parameters on IAM Identity Center's OIDC CreateToken action.
+
+# v1.12.14 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.13 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.12 (2022-08-08)
+
+* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.11 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.10 (2022-07-11)
+
+* No change notes available for this release.
+
+# v1.12.9 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.7 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2022-05-27)
+
+* No change notes available for this release.
+
+# v1.12.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2022-02-24)
+
+* **Feature**: API client updated
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2022-01-07)
+
+* **Feature**: API client updated
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.2 (2021-12-02)
+
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-10-11)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-09-17)
+
+* **Feature**: Updated API client and endpoints to latest revision.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-08-27)
+
+* **Feature**: Updated API model to latest revision.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
new file mode 100644
index 00000000..8dc643bb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
@@ -0,0 +1,537 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/defaults"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ smithy "github.com/aws/smithy-go"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net"
+ "net/http"
+ "time"
+)
+
+const ServiceID = "SSO OIDC"
+const ServiceAPIVersion = "2019-06-10"
+
+// Client provides the API client to make operations call for AWS SSO OIDC.
+type Client struct {
+ options Options
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ setResolvedDefaultsMode(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveEndpointResolverV2(&options)
+
+ resolveAuthSchemeResolver(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeRetryMaxAttempts(&options)
+
+ ignoreAnonymousAuth(&options)
+
+ wrapWithAnonymousAuth(&options)
+
+ resolveAuthSchemes(&options)
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+// Options returns a copy of the client configuration.
+//
+// Callers SHOULD NOT perform mutations on any inner structures within client
+// config. Config overrides should instead be made on a per-operation basis through
+// functional options.
+func (c *Client) Options() Options {
+ return c.options.Copy()
+}
+
+func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
+ ctx = middleware.ClearStackValues(ctx)
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeOperationRetryMaxAttempts(&options, *c)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, metadata, err = handler.Handle(ctx, params)
+ if err != nil {
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+ return result, metadata, err
+}
+
+type operationInputKey struct{}
+
+func setOperationInput(ctx context.Context, input interface{}) context.Context {
+ return middleware.WithStackValue(ctx, operationInputKey{}, input)
+}
+
+func getOperationInput(ctx context.Context) interface{} {
+ return middleware.GetStackValue(ctx, operationInputKey{})
+}
+
+type setOperationInputMiddleware struct {
+}
+
+func (*setOperationInputMiddleware) ID() string {
+ return "setOperationInput"
+}
+
+func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = setOperationInput(ctx, in.Parameters)
+ return next.HandleSerialize(ctx, in)
+}
+
+func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %v", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %v", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
+func resolveAuthSchemeResolver(options *Options) {
+ if options.AuthSchemeResolver == nil {
+ options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
+ }
+}
+
+func resolveAuthSchemes(options *Options) {
+ if options.AuthSchemes == nil {
+ options.AuthSchemes = []smithyhttp.AuthScheme{
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ }
+ }
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+func setResolvedDefaultsMode(o *Options) {
+ if len(o.resolvedDefaultsMode) > 0 {
+ return
+ }
+
+ var mode aws.DefaultsMode
+ mode.SetFromString(string(o.DefaultsMode))
+
+ if mode == aws.DefaultsModeAuto {
+ mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
+ }
+
+ o.resolvedDefaultsMode = mode
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSRetryMaxAttempts(cfg, &opts)
+ resolveAWSRetryMode(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ resolveBaseEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ var buildable *awshttp.BuildableClient
+
+ if o.HTTPClient != nil {
+ var ok bool
+ buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return
+ }
+ } else {
+ buildable = awshttp.NewBuildableClient()
+ }
+
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
+ if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
+ dialer.Timeout = dialerTimeout
+ }
+ })
+
+ buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
+ if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
+ transport.TLSHandshakeTimeout = tlsHandshakeTimeout
+ }
+ })
+ }
+
+ o.HTTPClient = buildable
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+
+ if len(o.RetryMode) == 0 {
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ o.RetryMode = modeConfig.RetryMode
+ }
+ }
+ if len(o.RetryMode) == 0 {
+ o.RetryMode = aws.RetryModeStandard
+ }
+
+ var standardOptions []func(*retry.StandardOptions)
+ if v := o.RetryMaxAttempts; v != 0 {
+ standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
+ so.MaxAttempts = v
+ })
+ }
+
+ switch o.RetryMode {
+ case aws.RetryModeAdaptive:
+ var adaptiveOptions []func(*retry.AdaptiveModeOptions)
+ if len(standardOptions) != 0 {
+ adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
+ ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
+ })
+ }
+ o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
+
+ default:
+ o.Retryer = retry.NewStandard(standardOptions...)
+ }
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSRetryMode(cfg aws.Config, o *Options) {
+ if len(cfg.RetryMode) == 0 {
+ return
+ }
+ o.RetryMode = cfg.RetryMode
+}
+func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
+ if cfg.RetryMaxAttempts == 0 {
+ return
+ }
+ o.RetryMaxAttempts = cfg.RetryMaxAttempts
+}
+
+func finalizeRetryMaxAttempts(o *Options) {
+ if o.RetryMaxAttempts == 0 {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
+ if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
+}
+
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssooidc", goModuleVersion)
+ if len(options.AppID) > 0 {
+ ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
+ }
+
+ return nil
+}
+
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
+ id := (*awsmiddleware.RequestUserAgent)(nil).ID()
+ mw, ok := stack.Build.Get(id)
+ if !ok {
+ mw = awsmiddleware.NewRequestUserAgent()
+ if err := stack.Build.Add(mw, middleware.After); err != nil {
+ return nil, err
+ }
+ }
+
+ ua, ok := mw.(*awsmiddleware.RequestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
+ }
+
+ return ua, nil
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ })
+}
+
+func addClientRequestID(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
+}
+
+func addComputeContentLength(stack *middleware.Stack) error {
+ return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
+}
+
+func addRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
+}
+
+func addRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
+}
+func addStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
+}
+
+func addUnsignedPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addComputePayloadSHA256(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addContentSHA256Header(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
+}
+
+func addRetry(stack *middleware.Stack, o Options) error {
+ attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
+ m.LogAttempts = o.ClientLogMode.IsRetries()
+ })
+ if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ return err
+ }
+ if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
+ return err
+ }
+ return nil
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func addRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
+
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
+
+type disableHTTPSMiddleware struct {
+ DisableHTTPS bool
+}
+
+func (*disableHTTPSMiddleware) ID() string {
+ return "disableHTTPS"
+}
+
+func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Finalize.Insert(&disableHTTPSMiddleware{
+ DisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "ResolveEndpointV2", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
new file mode 100644
index 00000000..63f1eeb1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
@@ -0,0 +1,203 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates and returns access and refresh tokens for clients that are
+// authenticated using client secrets. The access token can be used to fetch
+// short-term credentials for the assigned AWS accounts or to access application
+// APIs using bearer authentication.
+func (c *Client) CreateToken(ctx context.Context, params *CreateTokenInput, optFns ...func(*Options)) (*CreateTokenOutput, error) {
+ if params == nil {
+ params = &CreateTokenInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateToken", params, optFns, c.addOperationCreateTokenMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTokenOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTokenInput struct {
+
+ // The unique identifier string for the client or application. This value comes
+ // from the result of the RegisterClient API.
+ //
+ // This member is required.
+ ClientId *string
+
+ // A secret string generated for the client. This value should come from the
+ // persisted result of the RegisterClient API.
+ //
+ // This member is required.
+ ClientSecret *string
+
+ // Supports the following OAuth grant types: Device Code and Refresh Token.
+ // Specify either of the following values, depending on the grant type that you
+ // want: * Device Code - urn:ietf:params:oauth:grant-type:device_code * Refresh
+ // Token - refresh_token For information about how to obtain the device code, see
+ // the StartDeviceAuthorization topic.
+ //
+ // This member is required.
+ GrantType *string
+
+ // Used only when calling this API for the Authorization Code grant type. The
+ // short-term code is used to identify this authorization request. This grant type
+ // is currently unsupported for the CreateToken API.
+ Code *string
+
+ // Used only when calling this API for the Device Code grant type. This short-term
+ // code is used to identify this authorization request. This comes from the result
+ // of the StartDeviceAuthorization API.
+ DeviceCode *string
+
+ // Used only when calling this API for the Authorization Code grant type. This
+ // value specifies the location of the client or application that has registered to
+ // receive the authorization code.
+ RedirectUri *string
+
+ // Used only when calling this API for the Refresh Token grant type. This token is
+ // used to refresh short-term tokens, such as the access token, that might expire.
+ // For more information about the features and limitations of the current IAM
+ // Identity Center OIDC implementation, see Considerations for Using this Guide in
+ // the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html)
+ // .
+ RefreshToken *string
+
+ // The list of scopes for which authorization is requested. The access token that
+ // is issued is limited to the scopes that are granted. If this value is not
+ // specified, IAM Identity Center authorizes all scopes that are configured for the
+ // client during the call to RegisterClient .
+ Scope []string
+
+ noSmithyDocumentSerde
+}
+
+type CreateTokenOutput struct {
+
+ // A bearer token to access AWS accounts and applications assigned to a user.
+ AccessToken *string
+
+ // Indicates the time in seconds when an access token will expire.
+ ExpiresIn int32
+
+ // The idToken is not implemented or supported. For more information about the
+ // features and limitations of the current IAM Identity Center OIDC implementation,
+ // see Considerations for Using this Guide in the IAM Identity Center OIDC API
+ // Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html)
+ // . A JSON Web Token (JWT) that identifies who is associated with the issued
+ // access token.
+ IdToken *string
+
+ // A token that, if present, can be used to refresh a previously issued access
+ // token that might have expired. For more information about the features and
+ // limitations of the current IAM Identity Center OIDC implementation, see
+ // Considerations for Using this Guide in the IAM Identity Center OIDC API
+ // Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html)
+ // .
+ RefreshToken *string
+
+ // Used to notify the client that the returned token is an access token. The
+ // supported token type is Bearer .
+ TokenType *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateToken"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpCreateTokenValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateToken(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateToken(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateToken",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
new file mode 100644
index 00000000..63409538
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
@@ -0,0 +1,229 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates and returns access and refresh tokens for clients and applications that
+// are authenticated using IAM entities. The access token can be used to fetch
+// short-term credentials for the assigned AWS accounts or to access application
+// APIs using bearer authentication.
+func (c *Client) CreateTokenWithIAM(ctx context.Context, params *CreateTokenWithIAMInput, optFns ...func(*Options)) (*CreateTokenWithIAMOutput, error) {
+ if params == nil {
+ params = &CreateTokenWithIAMInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTokenWithIAM", params, optFns, c.addOperationCreateTokenWithIAMMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTokenWithIAMOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTokenWithIAMInput struct {
+
+ // The unique identifier string for the client or application. This value is an
+ // application ARN that has OAuth grants configured.
+ //
+ // This member is required.
+ ClientId *string
+
+ // Supports the following OAuth grant types: Authorization Code, Refresh Token,
+ // JWT Bearer, and Token Exchange. Specify one of the following values, depending
+ // on the grant type that you want: * Authorization Code - authorization_code *
+ // Refresh Token - refresh_token * JWT Bearer -
+ // urn:ietf:params:oauth:grant-type:jwt-bearer * Token Exchange -
+ // urn:ietf:params:oauth:grant-type:token-exchange
+ //
+ // This member is required.
+ GrantType *string
+
+ // Used only when calling this API for the JWT Bearer grant type. This value
+ // specifies the JSON Web Token (JWT) issued by a trusted token issuer. To
+ // authorize a trusted token issuer, configure the JWT Bearer GrantOptions for the
+ // application.
+ Assertion *string
+
+ // Used only when calling this API for the Authorization Code grant type. This
+ // short-term code is used to identify this authorization request. The code is
+ // obtained through a redirect from IAM Identity Center to a redirect URI persisted
+ // in the Authorization Code GrantOptions for the application.
+ Code *string
+
+ // Used only when calling this API for the Authorization Code grant type. This
+ // value specifies the location of the client or application that has registered to
+ // receive the authorization code.
+ RedirectUri *string
+
+ // Used only when calling this API for the Refresh Token grant type. This token is
+ // used to refresh short-term tokens, such as the access token, that might expire.
+ // For more information about the features and limitations of the current IAM
+ // Identity Center OIDC implementation, see Considerations for Using this Guide in
+ // the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html)
+ // .
+ RefreshToken *string
+
+ // Used only when calling this API for the Token Exchange grant type. This value
+ // specifies the type of token that the requester can receive. The following values
+ // are supported: * Access Token - urn:ietf:params:oauth:token-type:access_token *
+ // Refresh Token - urn:ietf:params:oauth:token-type:refresh_token
+ RequestedTokenType *string
+
+ // The list of scopes for which authorization is requested. The access token that
+ // is issued is limited to the scopes that are granted. If the value is not
+ // specified, IAM Identity Center authorizes all scopes configured for the
+ // application, including the following default scopes: openid , aws ,
+ // sts:identity_context .
+ Scope []string
+
+ // Used only when calling this API for the Token Exchange grant type. This value
+ // specifies the subject of the exchange. The value of the subject token must be an
+ // access token issued by IAM Identity Center to a different client or application.
+ // The access token must have authorized scopes that indicate the requested
+ // application as a target audience.
+ SubjectToken *string
+
+ // Used only when calling this API for the Token Exchange grant type. This value
+ // specifies the type of token that is passed as the subject of the exchange. The
+ // following value is supported: * Access Token -
+ // urn:ietf:params:oauth:token-type:access_token
+ SubjectTokenType *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateTokenWithIAMOutput struct {
+
+ // A bearer token to access AWS accounts and applications assigned to a user.
+ AccessToken *string
+
+ // Indicates the time in seconds when an access token will expire.
+ ExpiresIn int32
+
+ // A JSON Web Token (JWT) that identifies the user associated with the issued
+ // access token.
+ IdToken *string
+
+ // Indicates the type of tokens that are issued by IAM Identity Center. The
+ // following values are supported: * Access Token -
+ // urn:ietf:params:oauth:token-type:access_token * Refresh Token -
+ // urn:ietf:params:oauth:token-type:refresh_token
+ IssuedTokenType *string
+
+ // A token that, if present, can be used to refresh a previously issued access
+ // token that might have expired. For more information about the features and
+ // limitations of the current IAM Identity Center OIDC implementation, see
+ // Considerations for Using this Guide in the IAM Identity Center OIDC API
+ // Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html)
+ // .
+ RefreshToken *string
+
+ // The list of scopes for which authorization is granted. The access token that is
+ // issued is limited to the scopes that are granted.
+ Scope []string
+
+ // Used to notify the requester that the returned token is an access token. The
+ // supported token type is Bearer .
+ TokenType *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTokenWithIAM{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTokenWithIAM{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTokenWithIAM"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpCreateTokenWithIAMValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTokenWithIAM(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateTokenWithIAM(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateTokenWithIAM",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
new file mode 100644
index 00000000..09f016ec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
@@ -0,0 +1,161 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Registers a client with IAM Identity Center. This allows clients to initiate
+// device authorization. The output should be persisted for reuse through many
+// authentication requests.
+func (c *Client) RegisterClient(ctx context.Context, params *RegisterClientInput, optFns ...func(*Options)) (*RegisterClientOutput, error) {
+ if params == nil {
+ params = &RegisterClientInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RegisterClient", params, optFns, c.addOperationRegisterClientMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RegisterClientOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RegisterClientInput struct {
+
+ // The friendly name of the client.
+ //
+ // This member is required.
+ ClientName *string
+
+ // The type of client. The service supports only public as a client type. Anything
+ // other than public will be rejected by the service.
+ //
+ // This member is required.
+ ClientType *string
+
+ // The list of scopes that are defined by the client. Upon authorization, this
+ // list is used to restrict permissions when granting an access token.
+ Scopes []string
+
+ noSmithyDocumentSerde
+}
+
+type RegisterClientOutput struct {
+
+ // An endpoint that the client can use to request authorization.
+ AuthorizationEndpoint *string
+
+ // The unique identifier string for each client. This client uses this identifier
+ // to get authenticated by the service in subsequent calls.
+ ClientId *string
+
+ // Indicates the time at which the clientId and clientSecret were issued.
+ ClientIdIssuedAt int64
+
+ // A secret string generated for the client. The client will use this string to
+ // get authenticated by the service in subsequent calls.
+ ClientSecret *string
+
+ // Indicates the time at which the clientId and clientSecret will become invalid.
+ ClientSecretExpiresAt int64
+
+ // An endpoint that the client can use to create tokens.
+ TokenEndpoint *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterClient{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterClient{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterClient"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpRegisterClientValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterClient(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRegisterClient(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "RegisterClient",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
new file mode 100644
index 00000000..c568805b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
@@ -0,0 +1,169 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Initiates device authorization by requesting a pair of verification codes from
+// the authorization service.
+func (c *Client) StartDeviceAuthorization(ctx context.Context, params *StartDeviceAuthorizationInput, optFns ...func(*Options)) (*StartDeviceAuthorizationOutput, error) {
+ if params == nil {
+ params = &StartDeviceAuthorizationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StartDeviceAuthorization", params, optFns, c.addOperationStartDeviceAuthorizationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StartDeviceAuthorizationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StartDeviceAuthorizationInput struct {
+
+ // The unique identifier string for the client that is registered with IAM
+ // Identity Center. This value should come from the persisted result of the
+ // RegisterClient API operation.
+ //
+ // This member is required.
+ ClientId *string
+
+ // A secret string that is generated for the client. This value should come from
+ // the persisted result of the RegisterClient API operation.
+ //
+ // This member is required.
+ ClientSecret *string
+
+ // The URL for the Amazon Web Services access portal. For more information, see
+ // Using the Amazon Web Services access portal (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html)
+ // in the IAM Identity Center User Guide.
+ //
+ // This member is required.
+ StartUrl *string
+
+ noSmithyDocumentSerde
+}
+
+type StartDeviceAuthorizationOutput struct {
+
+ // The short-lived code that is used by the device when polling for a session
+ // token.
+ DeviceCode *string
+
+ // Indicates the number of seconds in which the verification code will become
+ // invalid.
+ ExpiresIn int32
+
+ // Indicates the number of seconds the client must wait between attempts when
+ // polling for a session.
+ Interval int32
+
+ // A one-time user verification code. This is needed to authorize an in-use device.
+ UserCode *string
+
+ // The URI of the verification page that takes the userCode to authorize the
+ // device.
+ VerificationUri *string
+
+ // An alternate URL that the client can use to automatically launch a browser.
+ // This process skips the manual step in which the user visits the verification
+ // page and enters their code.
+ VerificationUriComplete *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDeviceAuthorization{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartDeviceAuthorization{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "StartDeviceAuthorization"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDeviceAuthorization(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opStartDeviceAuthorization(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "StartDeviceAuthorization",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go
new file mode 100644
index 00000000..40b3becb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go
@@ -0,0 +1,302 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) {
+ params.Region = options.Region
+}
+
+type setLegacyContextSigningOptionsMiddleware struct {
+}
+
+func (*setLegacyContextSigningOptionsMiddleware) ID() string {
+ return "setLegacyContextSigningOptions"
+}
+
+func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
+ }
+ }
+
+ if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
+}
+
+type withAnonymous struct {
+ resolver AuthSchemeResolver
+}
+
+var _ AuthSchemeResolver = (*withAnonymous)(nil)
+
+func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ opts = append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ })
+ return opts, nil
+}
+
+func wrapWithAnonymousAuth(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &withAnonymous{
+ resolver: options.AuthSchemeResolver,
+ }
+}
+
+// AuthResolverParameters contains the set of inputs necessary for auth scheme
+// resolution.
+type AuthResolverParameters struct {
+ // The name of the operation being invoked.
+ Operation string
+
+ // The region in which the operation is being invoked.
+ Region string
+}
+
+func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters {
+ params := &AuthResolverParameters{
+ Operation: operation,
+ }
+
+ bindAuthParamsRegion(params, input, options)
+
+ return params
+}
+
+// AuthSchemeResolver returns a set of possible authentication options for an
+// operation.
+type AuthSchemeResolver interface {
+ ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
+}
+
+type defaultAuthSchemeResolver struct{}
+
+var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
+
+func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ if overrides, ok := operationAuthOptions[params.Operation]; ok {
+ return overrides(params), nil
+ }
+ return serviceAuthOptions(params), nil
+}
+
+var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{
+ "CreateToken": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+
+ "RegisterClient": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+
+ "StartDeviceAuthorization": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+}
+
+func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "sso-oauth")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ return props
+ }(),
+ },
+ }
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options)
+ options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
+ }
+
+ scheme, ok := m.selectScheme(options)
+ if !ok {
+ return out, metadata, fmt.Errorf("could not select an auth scheme")
+ }
+
+ ctx = setResolvedAuthScheme(ctx, scheme)
+ return next.HandleFinalize(ctx, in)
+}
+
+func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
+ for _, option := range options {
+ if option.SchemeID == smithyauth.SchemeIDAnonymous {
+ return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
+ }
+
+ for _, scheme := range m.options.AuthSchemes {
+ if scheme.SchemeID() != option.SchemeID {
+ continue
+ }
+
+ if scheme.IdentityResolver(m.options) != nil {
+ return newResolvedAuthScheme(scheme, option), true
+ }
+ }
+ }
+
+ return nil, false
+}
+
+type resolvedAuthSchemeKey struct{}
+
+type resolvedAuthScheme struct {
+ Scheme smithyhttp.AuthScheme
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
+ return &resolvedAuthScheme{
+ Scheme: scheme,
+ IdentityProperties: option.IdentityProperties,
+ SignerProperties: option.SignerProperties,
+ }
+}
+
+func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
+ return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
+}
+
+func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
+ v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
+ return v
+}
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ resolver := rscheme.Scheme.IdentityResolver(m.options)
+ if resolver == nil {
+ return out, metadata, fmt.Errorf("no identity resolver")
+ }
+
+ identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties)
+ if err != nil {
+ return out, metadata, fmt.Errorf("get identity: %w", err)
+ }
+
+ ctx = setIdentity(ctx, identity)
+ return next.HandleFinalize(ctx, in)
+}
+
+type identityKey struct{}
+
+func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
+ return middleware.WithStackValue(ctx, identityKey{}, identity)
+}
+
+func getIdentity(ctx context.Context) smithyauth.Identity {
+ v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
+ return v
+}
+
+type signRequestMiddleware struct {
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ identity := getIdentity(ctx)
+ if identity == nil {
+ return out, metadata, fmt.Errorf("no identity")
+ }
+
+ signer := rscheme.Scheme.Signer()
+ if signer == nil {
+ return out, metadata, fmt.Errorf("no signer")
+ }
+
+ if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil {
+ return out, metadata, fmt.Errorf("sign request: %w", err)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
new file mode 100644
index 00000000..76a1160e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
@@ -0,0 +1,2066 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
+ "github.com/aws/aws-sdk-go-v2/service/ssooidc/types"
+ smithy "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "strings"
+)
+
+type awsRestjson1_deserializeOpCreateToken struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateToken) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateToken(response, &metadata)
+ }
+ output := &CreateTokenOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateTokenOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("AccessDeniedException", errorCode):
+ return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("AuthorizationPendingException", errorCode):
+ return awsRestjson1_deserializeErrorAuthorizationPendingException(response, errorBody)
+
+ case strings.EqualFold("ExpiredTokenException", errorCode):
+ return awsRestjson1_deserializeErrorExpiredTokenException(response, errorBody)
+
+ case strings.EqualFold("InternalServerException", errorCode):
+ return awsRestjson1_deserializeErrorInternalServerException(response, errorBody)
+
+ case strings.EqualFold("InvalidClientException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidGrantException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("InvalidScopeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody)
+
+ case strings.EqualFold("SlowDownException", errorCode):
+ return awsRestjson1_deserializeErrorSlowDownException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedClientException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedGrantTypeException", errorCode):
+ return awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateTokenOutput(v **CreateTokenOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateTokenOutput
+ if *v == nil {
+ sv = &CreateTokenOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "accessToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AccessToken to be of type string, got %T instead", value)
+ }
+ sv.AccessToken = ptr.String(jtv)
+ }
+
+ case "expiresIn":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ExpiresIn = int32(i64)
+ }
+
+ case "idToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected IdToken to be of type string, got %T instead", value)
+ }
+ sv.IdToken = ptr.String(jtv)
+ }
+
+ case "refreshToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value)
+ }
+ sv.RefreshToken = ptr.String(jtv)
+ }
+
+ case "tokenType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TokenType to be of type string, got %T instead", value)
+ }
+ sv.TokenType = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpCreateTokenWithIAM struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateTokenWithIAM) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateTokenWithIAM) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateTokenWithIAM(response, &metadata)
+ }
+ output := &CreateTokenWithIAMOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateTokenWithIAMOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateTokenWithIAM(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("AccessDeniedException", errorCode):
+ return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("AuthorizationPendingException", errorCode):
+ return awsRestjson1_deserializeErrorAuthorizationPendingException(response, errorBody)
+
+ case strings.EqualFold("ExpiredTokenException", errorCode):
+ return awsRestjson1_deserializeErrorExpiredTokenException(response, errorBody)
+
+ case strings.EqualFold("InternalServerException", errorCode):
+ return awsRestjson1_deserializeErrorInternalServerException(response, errorBody)
+
+ case strings.EqualFold("InvalidClientException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidGrantException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestRegionException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestRegionException(response, errorBody)
+
+ case strings.EqualFold("InvalidScopeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody)
+
+ case strings.EqualFold("SlowDownException", errorCode):
+ return awsRestjson1_deserializeErrorSlowDownException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedClientException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedGrantTypeException", errorCode):
+ return awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateTokenWithIAMOutput(v **CreateTokenWithIAMOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateTokenWithIAMOutput
+ if *v == nil {
+ sv = &CreateTokenWithIAMOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "accessToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AccessToken to be of type string, got %T instead", value)
+ }
+ sv.AccessToken = ptr.String(jtv)
+ }
+
+ case "expiresIn":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ExpiresIn = int32(i64)
+ }
+
+ case "idToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected IdToken to be of type string, got %T instead", value)
+ }
+ sv.IdToken = ptr.String(jtv)
+ }
+
+ case "issuedTokenType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TokenTypeURI to be of type string, got %T instead", value)
+ }
+ sv.IssuedTokenType = ptr.String(jtv)
+ }
+
+ case "refreshToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value)
+ }
+ sv.RefreshToken = ptr.String(jtv)
+ }
+
+ case "scope":
+ if err := awsRestjson1_deserializeDocumentScopes(&sv.Scope, value); err != nil {
+ return err
+ }
+
+ case "tokenType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TokenType to be of type string, got %T instead", value)
+ }
+ sv.TokenType = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpRegisterClient struct {
+}
+
+func (*awsRestjson1_deserializeOpRegisterClient) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorRegisterClient(response, &metadata)
+ }
+ output := &RegisterClientOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentRegisterClientOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorRegisterClient(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InternalServerException", errorCode):
+ return awsRestjson1_deserializeErrorInternalServerException(response, errorBody)
+
+ case strings.EqualFold("InvalidClientMetadataException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidClientMetadataException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("InvalidScopeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentRegisterClientOutput(v **RegisterClientOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *RegisterClientOutput
+ if *v == nil {
+ sv = &RegisterClientOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "authorizationEndpoint":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.AuthorizationEndpoint = ptr.String(jtv)
+ }
+
+ case "clientId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ClientId to be of type string, got %T instead", value)
+ }
+ sv.ClientId = ptr.String(jtv)
+ }
+
+ case "clientIdIssuedAt":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LongTimeStampType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ClientIdIssuedAt = i64
+ }
+
+ case "clientSecret":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ClientSecret to be of type string, got %T instead", value)
+ }
+ sv.ClientSecret = ptr.String(jtv)
+ }
+
+ case "clientSecretExpiresAt":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LongTimeStampType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ClientSecretExpiresAt = i64
+ }
+
+ case "tokenEndpoint":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.TokenEndpoint = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpStartDeviceAuthorization struct {
+}
+
+func (*awsRestjson1_deserializeOpStartDeviceAuthorization) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorStartDeviceAuthorization(response, &metadata)
+ }
+ output := &StartDeviceAuthorizationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentStartDeviceAuthorizationOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorStartDeviceAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InternalServerException", errorCode):
+ return awsRestjson1_deserializeErrorInternalServerException(response, errorBody)
+
+ case strings.EqualFold("InvalidClientException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("SlowDownException", errorCode):
+ return awsRestjson1_deserializeErrorSlowDownException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedClientException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentStartDeviceAuthorizationOutput(v **StartDeviceAuthorizationOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *StartDeviceAuthorizationOutput
+ if *v == nil {
+ sv = &StartDeviceAuthorizationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "deviceCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DeviceCode to be of type string, got %T instead", value)
+ }
+ sv.DeviceCode = ptr.String(jtv)
+ }
+
+ case "expiresIn":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ExpiresIn = int32(i64)
+ }
+
+ case "interval":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected IntervalInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Interval = int32(i64)
+ }
+
+ case "userCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected UserCode to be of type string, got %T instead", value)
+ }
+ sv.UserCode = ptr.String(jtv)
+ }
+
+ case "verificationUri":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.VerificationUri = ptr.String(jtv)
+ }
+
+ case "verificationUriComplete":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.VerificationUriComplete = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.AccessDeniedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorAuthorizationPendingException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.AuthorizationPendingException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentAuthorizationPendingException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ExpiredTokenException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentExpiredTokenException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InternalServerException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidClientException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidClientException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidClientMetadataException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidClientMetadataException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidClientMetadataException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidGrantException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidGrantException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidGrantException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidRequestException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidRequestRegionException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidRequestRegionException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidRequestRegionException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidScopeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidScopeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidScopeException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorSlowDownException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.SlowDownException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentSlowDownException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorUnauthorizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.UnauthorizedClientException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentUnauthorizedClientException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.UnsupportedGrantTypeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentUnsupportedGrantTypeException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AccessDeniedException
+ if *v == nil {
+ sv = &types.AccessDeniedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAuthorizationPendingException(v **types.AuthorizationPendingException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AuthorizationPendingException
+ if *v == nil {
+ sv = &types.AuthorizationPendingException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ExpiredTokenException
+ if *v == nil {
+ sv = &types.ExpiredTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InternalServerException
+ if *v == nil {
+ sv = &types.InternalServerException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidClientException(v **types.InvalidClientException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidClientException
+ if *v == nil {
+ sv = &types.InvalidClientException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidClientMetadataException(v **types.InvalidClientMetadataException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidClientMetadataException
+ if *v == nil {
+ sv = &types.InvalidClientMetadataException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidGrantException(v **types.InvalidGrantException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidGrantException
+ if *v == nil {
+ sv = &types.InvalidGrantException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidRequestException
+ if *v == nil {
+ sv = &types.InvalidRequestException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidRequestRegionException(v **types.InvalidRequestRegionException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidRequestRegionException
+ if *v == nil {
+ sv = &types.InvalidRequestRegionException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "endpoint":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Location to be of type string, got %T instead", value)
+ }
+ sv.Endpoint = ptr.String(jtv)
+ }
+
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ case "region":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Region to be of type string, got %T instead", value)
+ }
+ sv.Region = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidScopeException(v **types.InvalidScopeException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidScopeException
+ if *v == nil {
+ sv = &types.InvalidScopeException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentScopes(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Scope to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSlowDownException(v **types.SlowDownException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SlowDownException
+ if *v == nil {
+ sv = &types.SlowDownException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.UnauthorizedClientException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnauthorizedClientException
+ if *v == nil {
+ sv = &types.UnauthorizedClientException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentUnsupportedGrantTypeException(v **types.UnsupportedGrantTypeException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnsupportedGrantTypeException
+ if *v == nil {
+ sv = &types.UnsupportedGrantTypeException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
new file mode 100644
index 00000000..53cd4f55
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
@@ -0,0 +1,38 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package ssooidc provides the API client, operations, and parameter types for
+// AWS SSO OIDC.
+//
+// IAM Identity Center OpenID Connect (OIDC) is a web service that enables a
+// client (such as CLI or a native application) to register with IAM Identity
+// Center. The service also enables the client to fetch the user’s access token
+// upon successful authentication and authorization with IAM Identity Center. IAM
+// Identity Center uses the sso and identitystore API namespaces. Considerations
+// for Using This Guide Before you begin using this guide, we recommend that you
+// first review the following important information about how the IAM Identity
+// Center OIDC service works.
+// - The IAM Identity Center OIDC service currently implements only the portions
+// of the OAuth 2.0 Device Authorization Grant standard (
+// https://tools.ietf.org/html/rfc8628 (https://tools.ietf.org/html/rfc8628) )
+// that are necessary to enable single sign-on authentication with the CLI.
+// - With older versions of the CLI, the service only emits OIDC access tokens,
+// so to obtain a new token, users must explicitly re-authenticate. To access the
+// OIDC flow that supports token refresh and doesn’t require re-authentication,
+// update to the latest CLI version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with
+// support for OIDC token refresh and configurable IAM Identity Center session
+// durations. For more information, see Configure Amazon Web Services access
+// portal session duration (https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html)
+// .
+// - The access tokens provided by this service grant access to all Amazon Web
+// Services account entitlements assigned to an IAM Identity Center user, not just
+// a particular application.
+// - The documentation in this guide does not describe the mechanism to convert
+// the access token into Amazon Web Services Auth (“sigv4”) credentials for use
+// with IAM-protected Amazon Web Services service endpoints. For more information,
+// see GetRoleCredentials (https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html)
+// in the IAM Identity Center Portal API Reference Guide.
+//
+// For general information about IAM Identity Center, see What is IAM Identity
+// Center? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)
+// in the IAM Identity Center User Guide.
+package ssooidc
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go
new file mode 100644
index 00000000..94e835e7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go
@@ -0,0 +1,535 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "net/url"
+ "os"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "sso-oauth"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
+//
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+func resolveBaseEndpoint(cfg aws.Config, o *Options) {
+ if cfg.BaseEndpoint != nil {
+ o.BaseEndpoint = cfg.BaseEndpoint
+ }
+
+ _, g := os.LookupEnv("AWS_ENDPOINT_URL")
+ _, s := os.LookupEnv("AWS_ENDPOINT_URL_SSO_OIDC")
+
+ if g && !s {
+ return
+ }
+
+ value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "SSO OIDC", cfg.ConfigSources)
+ if found && err == nil {
+ o.BaseEndpoint = &value
+ }
+}
+
+func bindRegion(region string) *string {
+ if region == "" {
+ return nil
+ }
+ return aws.String(endpoints.MapFIPSRegion(region))
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+ return p
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseDualStack := *params.UseDualStack
+ _UseFIPS := *params.UseFIPS
+
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
+ }
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
+ }
+ uriString := _Endpoint
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://oidc-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
+ }
+ }
+ if _UseFIPS == true {
+ if _PartitionResult.SupportsFIPS == true {
+ if _PartitionResult.Name == "aws-us-gov" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://oidc.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://oidc-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
+ }
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://oidc.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://oidc.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
+}
+
+type endpointParamsBinder interface {
+ bindEndpointParams(*EndpointParameters)
+}
+
+func bindEndpointParams(input interface{}, options Options) *EndpointParameters {
+ params := &EndpointParameters{}
+
+ params.Region = bindRegion(options.Region)
+ params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
+ params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
+ params.Endpoint = options.BaseEndpoint
+
+ if b, ok := input.(endpointParamsBinder); ok {
+ b.bindEndpointParams(params)
+ }
+
+ return params
+}
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.options.EndpointResolverV2 == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := bindEndpointParams(getOperationInput(ctx), m.options)
+ endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
+ endpt.URI.RawPath = endpt.URI.Path
+ }
+ req.URL.Scheme = endpt.URI.Scheme
+ req.URL.Host = endpt.URI.Host
+ req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
+ req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
+ for k := range endpt.Headers {
+ req.Header.Set(k, endpt.Headers.Get(k))
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
+ for _, o := range opts {
+ rscheme.SignerProperties.SetAll(&o.SignerProperties)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json
new file mode 100644
index 00000000..b2a52633
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json
@@ -0,0 +1,35 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/smithy-go": "v1.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_client_test.go",
+ "api_op_CreateToken.go",
+ "api_op_CreateTokenWithIAM.go",
+ "api_op_RegisterClient.go",
+ "api_op_StartDeviceAuthorization.go",
+ "auth.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "endpoints_config_test.go",
+ "endpoints_test.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "options.go",
+ "protocol_test.go",
+ "serializers.go",
+ "snapshot_test.go",
+ "types/errors.go",
+ "types/types.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/ssooidc",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
new file mode 100644
index 00000000..256069c9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package ssooidc
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.23.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
new file mode 100644
index 00000000..cbd77fd2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
@@ -0,0 +1,534 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver SSO OIDC endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.af-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-northeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-northeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-northeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-southeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-southeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-southeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ca-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-central-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-north-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-west-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.il-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.me-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.me-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.sa-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.cn-north-1.amazonaws.com.cn",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go
new file mode 100644
index 00000000..b964e7e1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go
@@ -0,0 +1,217 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+)
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
+ // endpoint, set the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service operation. This should be
+ // used over the deprecated EndpointResolver.
+ EndpointResolverV2 EndpointResolverV2
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. If specified in an operation call's
+ // functional options with a value that is different than the constructed client's
+ // Options, the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // The auth scheme resolver which determines how to authenticate for each
+ // operation.
+ AuthSchemeResolver AuthSchemeResolver
+
+ // The list of auth schemes supported by the client.
+ AuthSchemes []smithyhttp.AuthScheme
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+
+func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
+ if schemeID == "aws.auth#sigv4" {
+ return getSigV4IdentityResolver(o)
+ }
+ if schemeID == "smithy.api#noAuth" {
+ return &smithyauth.AnonymousIdentityResolver{}
+ }
+ return nil
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
+ }
+ return nil
+}
+
+// WithSigV4SigningName applies an override to the authentication workflow to
+// use the given signing name for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing name from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningName(name string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+// WithSigV4SigningRegion applies an override to the authentication workflow to
+// use the given signing region for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningRegion(region string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func ignoreAnonymousAuth(options *Options) {
+ if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
+ options.Credentials = nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go
new file mode 100644
index 00000000..754218b7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go
@@ -0,0 +1,431 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ smithyjson "github.com/aws/smithy-go/encoding/json"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+type awsRestjson1_serializeOpCreateToken struct {
+}
+
+func (*awsRestjson1_serializeOpCreateToken) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateTokenInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/token")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateTokenInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateTokenInput(v *CreateTokenInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateTokenInput(v *CreateTokenInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ClientId != nil {
+ ok := object.Key("clientId")
+ ok.String(*v.ClientId)
+ }
+
+ if v.ClientSecret != nil {
+ ok := object.Key("clientSecret")
+ ok.String(*v.ClientSecret)
+ }
+
+ if v.Code != nil {
+ ok := object.Key("code")
+ ok.String(*v.Code)
+ }
+
+ if v.DeviceCode != nil {
+ ok := object.Key("deviceCode")
+ ok.String(*v.DeviceCode)
+ }
+
+ if v.GrantType != nil {
+ ok := object.Key("grantType")
+ ok.String(*v.GrantType)
+ }
+
+ if v.RedirectUri != nil {
+ ok := object.Key("redirectUri")
+ ok.String(*v.RedirectUri)
+ }
+
+ if v.RefreshToken != nil {
+ ok := object.Key("refreshToken")
+ ok.String(*v.RefreshToken)
+ }
+
+ if v.Scope != nil {
+ ok := object.Key("scope")
+ if err := awsRestjson1_serializeDocumentScopes(v.Scope, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpCreateTokenWithIAM struct {
+}
+
+func (*awsRestjson1_serializeOpCreateTokenWithIAM) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateTokenWithIAM) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateTokenWithIAMInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/token?aws_iam=t")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateTokenWithIAMInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateTokenWithIAMInput(v *CreateTokenWithIAMInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateTokenWithIAMInput(v *CreateTokenWithIAMInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Assertion != nil {
+ ok := object.Key("assertion")
+ ok.String(*v.Assertion)
+ }
+
+ if v.ClientId != nil {
+ ok := object.Key("clientId")
+ ok.String(*v.ClientId)
+ }
+
+ if v.Code != nil {
+ ok := object.Key("code")
+ ok.String(*v.Code)
+ }
+
+ if v.GrantType != nil {
+ ok := object.Key("grantType")
+ ok.String(*v.GrantType)
+ }
+
+ if v.RedirectUri != nil {
+ ok := object.Key("redirectUri")
+ ok.String(*v.RedirectUri)
+ }
+
+ if v.RefreshToken != nil {
+ ok := object.Key("refreshToken")
+ ok.String(*v.RefreshToken)
+ }
+
+ if v.RequestedTokenType != nil {
+ ok := object.Key("requestedTokenType")
+ ok.String(*v.RequestedTokenType)
+ }
+
+ if v.Scope != nil {
+ ok := object.Key("scope")
+ if err := awsRestjson1_serializeDocumentScopes(v.Scope, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.SubjectToken != nil {
+ ok := object.Key("subjectToken")
+ ok.String(*v.SubjectToken)
+ }
+
+ if v.SubjectTokenType != nil {
+ ok := object.Key("subjectTokenType")
+ ok.String(*v.SubjectTokenType)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpRegisterClient struct {
+}
+
+func (*awsRestjson1_serializeOpRegisterClient) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpRegisterClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RegisterClientInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/client/register")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentRegisterClientInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsRegisterClientInput(v *RegisterClientInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentRegisterClientInput(v *RegisterClientInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ClientName != nil {
+ ok := object.Key("clientName")
+ ok.String(*v.ClientName)
+ }
+
+ if v.ClientType != nil {
+ ok := object.Key("clientType")
+ ok.String(*v.ClientType)
+ }
+
+ if v.Scopes != nil {
+ ok := object.Key("scopes")
+ if err := awsRestjson1_serializeDocumentScopes(v.Scopes, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpStartDeviceAuthorization struct {
+}
+
+func (*awsRestjson1_serializeOpStartDeviceAuthorization) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpStartDeviceAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*StartDeviceAuthorizationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/device_authorization")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ClientId != nil {
+ ok := object.Key("clientId")
+ ok.String(*v.ClientId)
+ }
+
+ if v.ClientSecret != nil {
+ ok := object.Key("clientSecret")
+ ok.String(*v.ClientSecret)
+ }
+
+ if v.StartUrl != nil {
+ ok := object.Key("startUrl")
+ ok.String(*v.StartUrl)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentScopes(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go
new file mode 100644
index 00000000..86b62049
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go
@@ -0,0 +1,398 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// You do not have sufficient access to perform this action.
+type AccessDeniedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *AccessDeniedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *AccessDeniedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *AccessDeniedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "AccessDeniedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that a request to authorize a client with an access user session
+// token is pending.
+type AuthorizationPendingException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *AuthorizationPendingException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *AuthorizationPendingException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *AuthorizationPendingException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "AuthorizationPendingException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *AuthorizationPendingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the token issued by the service is expired and is no longer
+// valid.
+type ExpiredTokenException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ExpiredTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ExpiredTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ExpiredTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ExpiredTokenException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that an error from the service occurred while trying to process a
+// request.
+type InternalServerException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InternalServerException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InternalServerException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InternalServerException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InternalServerException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Indicates that the clientId or clientSecret in the request is invalid. For
+// example, this can occur when a client sends an incorrect clientId or an expired
+// clientSecret .
+type InvalidClientException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidClientException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidClientException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidClientException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidClientException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the client information sent in the request during registration
+// is invalid.
+type InvalidClientMetadataException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidClientMetadataException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidClientMetadataException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidClientMetadataException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidClientMetadataException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidClientMetadataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that a request contains an invalid grant. This can occur if a client
+// makes a CreateToken request with an invalid grant type.
+type InvalidGrantException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidGrantException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidGrantException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidGrantException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidGrantException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidGrantException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that something is wrong with the input to the request. For example, a
+// required parameter might be missing or out of range.
+type InvalidRequestException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidRequestException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidRequestException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidRequestException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidRequestException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that a token provided as input to the request was issued by and is
+// only usable by calling IAM Identity Center endpoints in another region.
+type InvalidRequestRegionException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+ Endpoint *string
+ Region *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidRequestRegionException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidRequestRegionException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidRequestRegionException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidRequestRegionException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidRequestRegionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the scope provided in the request is invalid.
+type InvalidScopeException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidScopeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidScopeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidScopeException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidScopeException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidScopeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the client is making the request too frequently and is more than
+// the service can handle.
+type SlowDownException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *SlowDownException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *SlowDownException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *SlowDownException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "SlowDownException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *SlowDownException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the client is not currently authorized to make the request. This
+// can happen when a clientId is not issued for a public client.
+type UnauthorizedClientException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *UnauthorizedClientException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *UnauthorizedClientException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *UnauthorizedClientException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "UnauthorizedClientException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *UnauthorizedClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the grant type in the request is not supported by the service.
+type UnsupportedGrantTypeException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *UnsupportedGrantTypeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *UnsupportedGrantTypeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *UnsupportedGrantTypeException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "UnsupportedGrantTypeException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *UnsupportedGrantTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go
new file mode 100644
index 00000000..0ec0789f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go
@@ -0,0 +1,9 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+)
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go
new file mode 100644
index 00000000..9c17e4c8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go
@@ -0,0 +1,184 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpCreateToken struct {
+}
+
+func (*validateOpCreateToken) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateTokenInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateTokenInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateTokenWithIAM struct {
+}
+
+func (*validateOpCreateTokenWithIAM) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateTokenWithIAM) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateTokenWithIAMInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateTokenWithIAMInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRegisterClient struct {
+}
+
+func (*validateOpRegisterClient) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRegisterClient) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RegisterClientInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRegisterClientInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpStartDeviceAuthorization struct {
+}
+
+func (*validateOpStartDeviceAuthorization) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpStartDeviceAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*StartDeviceAuthorizationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpStartDeviceAuthorizationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpCreateTokenValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateToken{}, middleware.After)
+}
+
+func addOpCreateTokenWithIAMValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateTokenWithIAM{}, middleware.After)
+}
+
+func addOpRegisterClientValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRegisterClient{}, middleware.After)
+}
+
+func addOpStartDeviceAuthorizationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpStartDeviceAuthorization{}, middleware.After)
+}
+
+func validateOpCreateTokenInput(v *CreateTokenInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateTokenInput"}
+ if v.ClientId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
+ }
+ if v.ClientSecret == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientSecret"))
+ }
+ if v.GrantType == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("GrantType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateTokenWithIAMInput(v *CreateTokenWithIAMInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateTokenWithIAMInput"}
+ if v.ClientId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
+ }
+ if v.GrantType == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("GrantType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRegisterClientInput(v *RegisterClientInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RegisterClientInput"}
+ if v.ClientName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientName"))
+ }
+ if v.ClientType == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StartDeviceAuthorizationInput"}
+ if v.ClientId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
+ }
+ if v.ClientSecret == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientSecret"))
+ }
+ if v.StartUrl == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StartUrl"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
index 6ad12851..c53cd6d5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
@@ -1,3 +1,322 @@
+# v1.28.4 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.3 (2024-03-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.2 (2024-03-04)
+
+* **Bug Fix**: Update internal/presigned-url dependency for corrected API name.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.1 (2024-02-23)
+
+* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.0 (2024-02-22)
+
+* **Feature**: Add middleware stack snapshot tests.
+
+# v1.27.2 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.1 (2024-02-20)
+
+* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
+
+# v1.27.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.7 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.6 (2023-12-20)
+
+* No change notes available for this release.
+
+# v1.26.5 (2023-12-08)
+
+* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
+
+# v1.26.4 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.3 (2023-12-06)
+
+* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
+* **Bug Fix**: STS `AssumeRoleWithSAML` and `AssumeRoleWithWebIdentity` would incorrectly attempt to use SigV4 authentication.
+
+# v1.26.2 (2023-12-01)
+
+* **Bug Fix**: Correct wrapping of errors in authentication workflow.
+* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.1 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.0 (2023-11-29)
+
+* **Feature**: Expose Options() accessor on service clients.
+* **Documentation**: Documentation updates for AWS Security Token Service.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.6 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.5 (2023-11-28)
+
+* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
+
+# v1.25.4 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.3 (2023-11-17)
+
+* **Documentation**: API updates for the AWS Security Token Service
+
+# v1.25.2 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.1 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.2 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.1 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.0 (2023-10-02)
+
+* **Feature**: STS API updates for assumeRole
+
+# v1.22.0 (2023-09-18)
+
+* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service.
+* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field.
+
+# v1.21.5 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.4 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.3 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.21.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.1 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.0 (2023-07-25)
+
+* **Feature**: API updates for the AWS Security Token Service
+
+# v1.19.3 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.2 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.19.1 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.0 (2023-05-08)
+
+* **Feature**: Documentation updates for AWS Security Token Service.
+
+# v1.18.11 (2023-05-04)
+
+* No change notes available for this release.
+
+# v1.18.10 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.9 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.18.8 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.7 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.6 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.5 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.18.4 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.3 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade smithy to 1.27.2 and correct empty query list serialization.
+
+# v1.18.2 (2023-01-25)
+
+* **Documentation**: Doc only change to update wording in a key topic
+
+# v1.18.1 (2023-01-23)
+
+* No change notes available for this release.
+
+# v1.18.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.17.7 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.6 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.5 (2022-11-22)
+
+* No change notes available for this release.
+
+# v1.17.4 (2022-11-17)
+
+* **Documentation**: Documentation updates for AWS Security Token Service.
+
+# v1.17.3 (2022-11-16)
+
+* No change notes available for this release.
+
+# v1.17.2 (2022-11-10)
+
+* No change notes available for this release.
+
+# v1.17.1 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2022-10-21)
+
+* **Feature**: Add presign functionality for sts:AssumeRole operation
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.19 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.18 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.17 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.16 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.15 (2022-08-30)
+
+* No change notes available for this release.
+
+# v1.16.14 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.13 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.12 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.11 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.10 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.9 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.8 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.7 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.6 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.5 (2022-05-16)
+
+* **Documentation**: Documentation updates for AWS Security Token Service.
+
+# v1.16.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.16.3 (2022-03-30)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
index 4bff1dfe..4d18dc86 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
@@ -4,6 +4,7 @@ package sts
import (
"context"
+ "fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/defaults"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
@@ -11,7 +12,10 @@ import (
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding"
presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
smithy "github.com/aws/smithy-go"
smithydocument "github.com/aws/smithy-go/document"
@@ -48,128 +52,48 @@ func New(options Options, optFns ...func(*Options)) *Client {
resolveHTTPSignerV4(&options)
- resolveDefaultEndpointConfiguration(&options)
+ resolveEndpointResolverV2(&options)
+
+ resolveAuthSchemeResolver(&options)
for _, fn := range optFns {
fn(&options)
}
- client := &Client{
- options: options,
- }
-
- return client
-}
-
-type Options struct {
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- APIOptions []func(*middleware.Stack) error
-
- // Configures the events that will be sent to the configured logger.
- ClientLogMode aws.ClientLogMode
-
- // The credentials object to use when signing requests.
- Credentials aws.CredentialsProvider
-
- // The configuration DefaultsMode that the SDK should use when constructing the
- // clients initial default settings.
- DefaultsMode aws.DefaultsMode
-
- // The endpoint options to be used when attempting to resolve an endpoint.
- EndpointOptions EndpointResolverOptions
-
- // The service endpoint resolver.
- EndpointResolver EndpointResolver
-
- // Signature Version 4 (SigV4) Signer
- HTTPSignerV4 HTTPSignerV4
-
- // The logger writer interface to write logging messages to.
- Logger logging.Logger
-
- // The region to send requests to. (Required)
- Region string
-
- // RetryMaxAttempts specifies the maximum number attempts an API client will call
- // an operation that fails with a retryable error. A value of 0 is ignored, and
- // will not be used to configure the API client created default retryer, or modify
- // per operation call's retry max attempts. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. If specified in an operation call's functional
- // options with a value that is different than the constructed client's Options,
- // the Client's Retryer will be wrapped to use the operation's specific
- // RetryMaxAttempts value.
- RetryMaxAttempts int
-
- // RetryMode specifies the retry mode the API client will be created with, if
- // Retryer option is not also specified. When creating a new API Clients this
- // member will only be used if the Retryer Options member is nil. This value will
- // be ignored if Retryer is not nil. Currently does not support per operation call
- // overrides, may in the future.
- RetryMode aws.RetryMode
+ finalizeRetryMaxAttempts(&options)
- // Retryer guides how HTTP requests should be retried in case of recoverable
- // failures. When nil the API client will use a default retryer. The kind of
- // default retry created by the API client can be changed with the RetryMode
- // option.
- Retryer aws.Retryer
+ ignoreAnonymousAuth(&options)
- // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
- // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
- // should not populate this structure programmatically, or rely on the values here
- // within your applications.
- RuntimeEnvironment aws.RuntimeEnvironment
+ wrapWithAnonymousAuth(&options)
- // The initial DefaultsMode used when the client options were constructed. If the
- // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
- // value was at that point in time. Currently does not support per operation call
- // overrides, may in the future.
- resolvedDefaultsMode aws.DefaultsMode
+ resolveAuthSchemes(&options)
- // The HTTP client to invoke API calls with. Defaults to client's default HTTP
- // implementation if nil.
- HTTPClient HTTPClient
-}
-
-// WithAPIOptions returns a functional option for setting the Client's APIOptions
-// option.
-func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, optFns...)
+ client := &Client{
+ options: options,
}
-}
-// WithEndpointResolver returns a functional option for setting the Client's
-// EndpointResolver option.
-func WithEndpointResolver(v EndpointResolver) func(*Options) {
- return func(o *Options) {
- o.EndpointResolver = v
- }
+ return client
}
-type HTTPClient interface {
- Do(*http.Request) (*http.Response, error)
+// Options returns a copy of the client configuration.
+//
+// Callers SHOULD NOT perform mutations on any inner structures within client
+// config. Config overrides should instead be made on a per-operation basis through
+// functional options.
+func (c *Client) Options() Options {
+ return c.options.Copy()
}
-// Copy creates a clone where the APIOptions list is deep copied.
-func (o Options) Copy() Options {
- to := o
- to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
- copy(to.APIOptions, o.APIOptions)
-
- return to
-}
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
ctx = middleware.ClearStackValues(ctx)
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
options := c.options.Copy()
+
for _, fn := range optFns {
fn(&options)
}
- finalizeRetryMaxAttemptOptions(&options, *c)
+ finalizeOperationRetryMaxAttempts(&options, *c)
finalizeClientEndpointResolverOptions(&options)
@@ -197,8 +121,89 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
return result, metadata, err
}
+type operationInputKey struct{}
+
+func setOperationInput(ctx context.Context, input interface{}) context.Context {
+ return middleware.WithStackValue(ctx, operationInputKey{}, input)
+}
+
+func getOperationInput(ctx context.Context) interface{} {
+ return middleware.GetStackValue(ctx, operationInputKey{})
+}
+
+type setOperationInputMiddleware struct {
+}
+
+func (*setOperationInputMiddleware) ID() string {
+ return "setOperationInput"
+}
+
+func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = setOperationInput(ctx, in.Parameters)
+ return next.HandleSerialize(ctx, in)
+}
+
+func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %v", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %v", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
+func resolveAuthSchemeResolver(options *Options) {
+ if options.AuthSchemeResolver == nil {
+ options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
+ }
+}
+
+func resolveAuthSchemes(options *Options) {
+ if options.AuthSchemes == nil {
+ options.AuthSchemes = []smithyhttp.AuthScheme{
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ }
+ }
+}
+
type noSmithyDocumentSerde = smithydocument.NoSerde
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -236,6 +241,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
APIOptions: cfg.APIOptions,
Logger: cfg.Logger,
ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
@@ -243,6 +249,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
resolveAWSEndpointResolver(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
+ resolveBaseEndpoint(cfg, &opts)
return New(opts, optFns...)
}
@@ -334,7 +341,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
o.RetryMaxAttempts = cfg.RetryMaxAttempts
}
-func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+func finalizeRetryMaxAttempts(o *Options) {
+ if o.RetryMaxAttempts == 0 {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
return
}
@@ -346,20 +361,39 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
return
}
- o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
}
-func addClientUserAgent(stack *middleware.Stack) error {
- return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sts", goModuleVersion)(stack)
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sts", goModuleVersion)
+ if len(options.AppID) > 0 {
+ ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
+ }
+
+ return nil
}
-func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
- mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
- CredentialsProvider: o.Credentials,
- Signer: o.HTTPSignerV4,
- LogSigning: o.ClientLogMode.IsSigning(),
- })
- return stack.Finalize.Add(mw, middleware.After)
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
+ id := (*awsmiddleware.RequestUserAgent)(nil).ID()
+ mw, ok := stack.Build.Get(id)
+ if !ok {
+ mw = awsmiddleware.NewRequestUserAgent()
+ if err := stack.Build.Add(mw, middleware.After); err != nil {
+ return nil, err
+ }
+ }
+
+ ua, ok := mw.(*awsmiddleware.RequestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
+ }
+
+ return ua, nil
}
type HTTPSignerV4 interface {
@@ -380,12 +414,48 @@ func newDefaultV4Signer(o Options) *v4.Signer {
})
}
-func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
- mo := retry.AddRetryMiddlewaresOptions{
- Retryer: o.Retryer,
- LogRetryAttempts: o.ClientLogMode.IsRetries(),
+func addClientRequestID(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
+}
+
+func addComputeContentLength(stack *middleware.Stack) error {
+ return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
+}
+
+func addRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
+}
+
+func addRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
+}
+func addStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
+}
+
+func addUnsignedPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addComputePayloadSHA256(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addContentSHA256Header(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
+}
+
+func addRetry(stack *middleware.Stack, o Options) error {
+ attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
+ m.LogAttempts = o.ClientLogMode.IsRetries()
+ })
+ if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ return err
}
- return retry.AddRetryMiddlewares(stack, mo)
+ if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
+ return err
+ }
+ return nil
}
// resolves dual-stack endpoint configuration
@@ -418,12 +488,18 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
return nil
}
+func addRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
+}
+
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
- return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+ return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
+
}
func addResponseErrorMiddleware(stack *middleware.Stack) error {
- return awshttp.AddResponseErrorMiddleware(stack)
+ return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+
}
// HTTPPresignerV4 represents presigner interface used by presign url client
@@ -496,20 +572,70 @@ func withNopHTTPClientAPIOption(o *Options) {
o.HTTPClient = smithyhttp.NopClient{}
}
+type presignContextPolyfillMiddleware struct {
+}
+
+func (*presignContextPolyfillMiddleware) ID() string {
+ return "presignContextPolyfill"
+}
+
+func (m *presignContextPolyfillMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if schemeID == "aws.auth#sigv4" || schemeID == "com.amazonaws.s3#sigv4express" {
+ if sn, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningName(ctx, sn)
+ }
+ if sr, ok := smithyhttp.GetSigV4SigningRegion(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningRegion(ctx, sr)
+ }
+ } else if schemeID == "aws.auth#sigv4a" {
+ if sn, ok := smithyhttp.GetSigV4ASigningName(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningName(ctx, sn)
+ }
+ if sr, ok := smithyhttp.GetSigV4ASigningRegions(&rscheme.SignerProperties); ok {
+ ctx = awsmiddleware.SetSigningRegion(ctx, sr[0])
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
type presignConverter PresignOptions
func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) {
- stack.Finalize.Clear()
+ if _, ok := stack.Finalize.Get((*acceptencodingcust.DisableGzip)(nil).ID()); ok {
+ stack.Finalize.Remove((*acceptencodingcust.DisableGzip)(nil).ID())
+ }
+ if _, ok := stack.Finalize.Get((*retry.Attempt)(nil).ID()); ok {
+ stack.Finalize.Remove((*retry.Attempt)(nil).ID())
+ }
+ if _, ok := stack.Finalize.Get((*retry.MetricsHeader)(nil).ID()); ok {
+ stack.Finalize.Remove((*retry.MetricsHeader)(nil).ID())
+ }
stack.Deserialize.Clear()
stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID())
stack.Build.Remove("UserAgent")
+ if err := stack.Finalize.Insert(&presignContextPolyfillMiddleware{}, "Signing", middleware.Before); err != nil {
+ return err
+ }
+
pmw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
CredentialsProvider: options.Credentials,
Presigner: c.Presigner,
LogSigning: options.ClientLogMode.IsSigning(),
})
- err = stack.Finalize.Add(pmw, middleware.After)
- if err != nil {
+ if _, err := stack.Finalize.Swap("Signing", pmw); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil {
return err
}
// convert request to a GET request
@@ -517,7 +643,7 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
if err != nil {
return err
}
- err = presignedurlcust.AddAsIsPresigingMiddleware(stack)
+ err = presignedurlcust.AddAsIsPresigningMiddleware(stack)
if err != nil {
return err
}
@@ -532,3 +658,32 @@ func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
}, middleware.After)
}
+
+type disableHTTPSMiddleware struct {
+ DisableHTTPS bool
+}
+
+func (*disableHTTPSMiddleware) ID() string {
+ return "disableHTTPS"
+}
+
+func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Finalize.Insert(&disableHTTPSMiddleware{
+ DisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "ResolveEndpointV2", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
index 7d00b6bd..e0e2c9c2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
@@ -4,6 +4,7 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
@@ -12,74 +13,60 @@ import (
)
// Returns a set of temporary security credentials that you can use to access
-// Amazon Web Services resources that you might not normally have access to. These
-// temporary credentials consist of an access key ID, a secret access key, and a
-// security token. Typically, you use AssumeRole within your account or for
-// cross-account access. For a comparison of AssumeRole with other API operations
-// that produce temporary credentials, see Requesting Temporary Security
-// Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// Amazon Web Services resources. These temporary credentials consist of an access
+// key ID, a secret access key, and a security token. Typically, you use AssumeRole
+// within your account or for cross-account access. For a comparison of AssumeRole
+// with other API operations that produce temporary credentials, see Requesting
+// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
// in the IAM User Guide. Permissions The temporary security credentials created by
-// AssumeRole can be used to make API calls to any Amazon Web Services service with
-// the following exception: You cannot call the Amazon Web Services STS
+// AssumeRole can be used to make API calls to any Amazon Web Services service
+// with the following exception: You cannot call the Amazon Web Services STS
// GetFederationToken or GetSessionToken API operations. (Optional) You can pass
-// inline or managed session policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to use as
-// managed session policies. The plaintext that you use for both inline and managed
-// session policies can't exceed 2,048 characters. Passing policies to this
-// operation returns new temporary credentials. The resulting session's permissions
-// are the intersection of the role's identity-based policy and the session
-// policies. You can use the role's temporary credentials in subsequent Amazon Web
-// Services API calls to access resources in the account that owns the role. You
-// cannot use session policies to grant more permissions than those allowed by the
-// identity-based policy of the role that is being assumed. For more information,
-// see Session Policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// in the IAM User Guide. When you create a role, you create two policies: A role
-// trust policy that specifies who can assume the role and a permissions policy
+// inline session policy. You can also specify up to 10 managed policy Amazon
+// Resource Names (ARNs) to use as managed session policies. The plaintext that you
+// use for both inline and managed session policies can't exceed 2,048 characters.
+// Passing policies to this operation returns new temporary credentials. The
+// resulting session's permissions are the intersection of the role's
+// identity-based policy and the session policies. You can use the role's temporary
+// credentials in subsequent Amazon Web Services API calls to access resources in
+// the account that owns the role. You cannot use session policies to grant more
+// permissions than those allowed by the identity-based policy of the role that is
+// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// in the IAM User Guide. When you create a role, you create two policies: a role
+// trust policy that specifies who can assume the role, and a permissions policy
// that specifies what can be done with the role. You specify the trusted principal
-// who is allowed to assume the role in the role trust policy. To assume a role
+// that is allowed to assume the role in the role trust policy. To assume a role
// from a different account, your Amazon Web Services account must be trusted by
// the role. The trust relationship is defined in the role's trust policy when the
// role is created. That trust policy states which accounts are allowed to delegate
// that access to users in the account. A user who wants to access a role in a
-// different account must also have permissions that are delegated from the user
-// account administrator. The administrator must attach a policy that allows the
-// user to call AssumeRole for the ARN of the role in the other account. To allow a
-// user to assume a role in the same account, you can do either of the
-// following:
+// different account must also have permissions that are delegated from the account
+// administrator. The administrator must attach a policy that allows the user to
+// call AssumeRole for the ARN of the role in the other account. To allow a user
+// to assume a role in the same account, you can do either of the following:
+// - Attach a policy to the user that allows the user to call AssumeRole (as long
+// as the role's trust policy trusts the account).
+// - Add the user as a principal directly in the role's trust policy.
//
-// * Attach a policy to the user that allows the user to call
-// AssumeRole (as long as the role's trust policy trusts the account).
-//
-// * Add the
-// user as a principal directly in the role's trust policy.
-//
-// You can do either
-// because the role’s trust policy acts as an IAM resource-based policy. When a
-// resource-based policy grants access to a principal in the same account, no
-// additional identity-based policy is required. For more information about trust
-// policies and resource-based policies, see IAM Policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) in the
-// IAM User Guide. Tags (Optional) You can pass tag key-value pairs to your
+// You can do either because the role’s trust policy acts as an IAM resource-based
+// policy. When a resource-based policy grants access to a principal in the same
+// account, no additional identity-based policy is required. For more information
+// about trust policies and resource-based policies, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
+// in the IAM User Guide. Tags (Optional) You can pass tag key-value pairs to your
// session. These tags are called session tags. For more information about session
-// tags, see Passing Session Tags in STS
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
-// IAM User Guide. An administrator must grant you the permissions necessary to
-// pass session tags. The administrator can also create granular permissions to
+// tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide. An administrator must grant you the permissions necessary
+// to pass session tags. The administrator can also create granular permissions to
// allow you to pass only specific session tags. For more information, see
-// Tutorial: Using Tags for Attribute-Based Access Control
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
// in the IAM User Guide. You can set the session tags as transitive. Transitive
-// tags persist during role chaining. For more information, see Chaining Roles with
-// Session Tags
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+// tags persist during role chaining. For more information, see Chaining Roles
+// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
// in the IAM User Guide. Using MFA with AssumeRole (Optional) You can include
-// multi-factor authentication (MFA) information when you call AssumeRole. This is
+// multi-factor authentication (MFA) information when you call AssumeRole . This is
// useful for cross-account scenarios to ensure that the user that assumes the role
// has been authenticated with an Amazon Web Services MFA device. In that scenario,
// the trust policy of the role being assumed includes a condition that tests for
@@ -87,12 +74,11 @@ import (
// request to assume the role is denied. The condition in a trust policy that tests
// for MFA authentication might look like the following example. "Condition":
// {"Bool": {"aws:MultiFactorAuthPresent": true}} For more information, see
-// Configuring MFA-Protected API Access
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html) in the
-// IAM User Guide guide. To use MFA with AssumeRole, you pass values for the
-// SerialNumber and TokenCode parameters. The SerialNumber value identifies the
-// user's hardware or virtual MFA device. The TokenCode is the time-based one-time
-// password (TOTP) that the MFA device produces.
+// Configuring MFA-Protected API Access (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html)
+// in the IAM User Guide guide. To use MFA with AssumeRole , you pass values for
+// the SerialNumber and TokenCode parameters. The SerialNumber value identifies
+// the user's hardware or virtual MFA device. The TokenCode is the time-based
+// one-time password (TOTP) that the MFA device produces.
func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) {
if params == nil {
params = &AssumeRoleInput{}
@@ -144,16 +130,14 @@ type AssumeRoleInput struct {
// maximum session duration setting for your role. However, if you assume a role
// using role chaining and provide a DurationSeconds parameter value greater than
// one hour, the operation fails. To learn how to view the maximum value for your
- // role, see View the Maximum Session Duration Setting for a Role
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+ // role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
// in the IAM User Guide. By default, the value is set to 3600 seconds. The
// DurationSeconds parameter is separate from the duration of a console session
// that you might request using the returned credentials. The request to the
// federation endpoint for a console sign-in token takes a SessionDuration
// parameter that specifies the maximum length of the console session. For more
// information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
+ // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
// in the IAM User Guide.
DurationSeconds *int32
@@ -166,8 +150,7 @@ type AssumeRoleInput struct {
// administrator of the trusted account. That way, only someone with the ID can
// assume the role, rather than everyone in the account. For more information about
// the external ID, see How to Use an External ID When Granting Access to Your
- // Amazon Web Services Resources to a Third Party
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html)
+ // Amazon Web Services Resources to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html)
// in the IAM User Guide. The regex used to validate this parameter is a string of
// characters consisting of upper- and lower-case alphanumeric characters with no
// spaces. You can also include underscores or any of the following characters:
@@ -182,18 +165,17 @@ type AssumeRoleInput struct {
// access resources in the account that owns the role. You cannot use session
// policies to grant more permissions than those allowed by the identity-based
// policy of the role that is being assumed. For more information, see Session
- // Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. The plaintext that you use for both inline and managed
// session policies can't exceed 2,048 characters. The JSON policy characters can
// be any ASCII character from the space character to the end of the valid
// character list (\u0020 through \u00FF). It can also include the tab (\u0009),
// linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web
- // Services conversion compresses the passed session policies and session tags into
- // a packed binary format that has a separate limit. Your request can fail for this
- // limit even if your plaintext meets the other requirements. The PackedPolicySize
- // response element indicates by percentage how close the policies and tags for
- // your request are to the upper size limit.
+ // Services conversion compresses the passed inline session policy, managed policy
+ // ARNs, and session tags into a packed binary format that has a separate limit.
+ // Your request can fail for this limit even if your plaintext meets the other
+ // requirements. The PackedPolicySize response element indicates by percentage how
+ // close the policies and tags for your request are to the upper size limit.
Policy *string
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
@@ -201,31 +183,37 @@ type AssumeRoleInput struct {
// the role. This parameter is optional. You can provide up to 10 managed policy
// ARNs. However, the plaintext that you use for both inline and managed session
// policies can't exceed 2,048 characters. For more information about ARNs, see
- // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
- // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
- // the Amazon Web Services General Reference. An Amazon Web Services conversion
- // compresses the passed session policies and session tags into a packed binary
- // format that has a separate limit. Your request can fail for this limit even if
- // your plaintext meets the other requirements. The PackedPolicySize response
- // element indicates by percentage how close the policies and tags for your request
- // are to the upper size limit. Passing policies to this operation returns new
- // temporary credentials. The resulting session's permissions are the intersection
- // of the role's identity-based policy and the session policies. You can use the
- // role's temporary credentials in subsequent Amazon Web Services API calls to
- // access resources in the account that owns the role. You cannot use session
- // policies to grant more permissions than those allowed by the identity-based
- // policy of the role that is being assumed. For more information, see Session
- // Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+ // in the Amazon Web Services General Reference. An Amazon Web Services conversion
+ // compresses the passed inline session policy, managed policy ARNs, and session
+ // tags into a packed binary format that has a separate limit. Your request can
+ // fail for this limit even if your plaintext meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit. Passing policies to this
+ // operation returns new temporary credentials. The resulting session's permissions
+ // are the intersection of the role's identity-based policy and the session
+ // policies. You can use the role's temporary credentials in subsequent Amazon Web
+ // Services API calls to access resources in the account that owns the role. You
+ // cannot use session policies to grant more permissions than those allowed by the
+ // identity-based policy of the role that is being assumed. For more information,
+ // see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide.
PolicyArns []types.PolicyDescriptorType
- // The identification number of the MFA device that is associated with the user who
- // is making the AssumeRole call. Specify this value if the trust policy of the
- // role being assumed includes a condition that requires MFA authentication. The
- // value is either the serial number for a hardware device (such as GAHT12345678)
- // or an Amazon Resource Name (ARN) for a virtual device (such as
- // arn:aws:iam::123456789012:mfa/user). The regex used to validate this parameter
+ // A list of previously acquired trusted context assertions in the format of a
+ // JSON array. The trusted context assertion is signed and encrypted by Amazon Web
+ // Services STS. The following is an example of a ProvidedContext value that
+ // includes a single trusted context assertion and the ARN of the context provider
+ // from which the trusted context assertion was generated.
+ // [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]
+ ProvidedContexts []types.ProvidedContext
+
+ // The identification number of the MFA device that is associated with the user
+ // who is making the AssumeRole call. Specify this value if the trust policy of
+ // the role being assumed includes a condition that requires MFA authentication.
+ // The value is either the serial number for a hardware device (such as
+ // GAHT12345678 ) or an Amazon Resource Name (ARN) for a virtual device (such as
+ // arn:aws:iam::123456789012:mfa/user ). The regex used to validate this parameter
// is a string of characters consisting of upper- and lower-case alphanumeric
// characters with no spaces. You can also include underscores or any of the
// following characters: =,.@-
@@ -238,42 +226,39 @@ type AssumeRoleInput struct {
// who took actions with a role. You can use the aws:SourceIdentity condition key
// to further control access to Amazon Web Services resources based on the value of
// source identity. For more information about using source identity, see Monitor
- // and control actions taken with assumed roles
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
// in the IAM User Guide. The regex used to validate this parameter is a string of
// characters consisting of upper- and lower-case alphanumeric characters with no
// spaces. You can also include underscores or any of the following characters:
- // =,.@-. You cannot use a value that begins with the text aws:. This prefix is
+ // =,.@-. You cannot use a value that begins with the text aws: . This prefix is
// reserved for Amazon Web Services internal use.
SourceIdentity *string
- // A list of session tags that you want to pass. Each session tag consists of a key
- // name and an associated value. For more information about session tags, see
- // Tagging Amazon Web Services STS Sessions
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
- // IAM User Guide. This parameter is optional. You can pass up to 50 session tags.
- // The plaintext session tag keys can’t exceed 128 characters, and the values can’t
- // exceed 256 characters. For these and additional limits, see IAM and STS
- // Character Limits
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // A list of session tags that you want to pass. Each session tag consists of a
+ // key name and an associated value. For more information about session tags, see
+ // Tagging Amazon Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+ // in the IAM User Guide. This parameter is optional. You can pass up to 50 session
+ // tags. The plaintext session tag keys can’t exceed 128 characters, and the values
+ // can’t exceed 256 characters. For these and additional limits, see IAM and STS
+ // Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
- // session policies and session tags into a packed binary format that has a
- // separate limit. Your request can fail for this limit even if your plaintext
- // meets the other requirements. The PackedPolicySize response element indicates by
- // percentage how close the policies and tags for your request are to the upper
- // size limit. You can pass a session tag with the same key as a tag that is
- // already attached to the role. When you do, session tags override a role tag with
- // the same key. Tag key–value pairs are not case sensitive, but case is preserved.
- // This means that you cannot have separate Department and department tag keys.
- // Assume that the role has the Department=Marketing tag and you pass the
- // department=engineering session tag. Department and department are not saved as
- // separate tags, and the session tag passed in the request takes precedence over
- // the role tag. Additionally, if you used temporary credentials to perform this
- // operation, the new session inherits any transitive session tags from the calling
- // session. If you pass a session tag with the same key as an inherited tag, the
- // operation fails. To view the inherited tags for a session, see the CloudTrail
- // logs. For more information, see Viewing Session Tags in CloudTrail
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs)
+ // inline session policy, managed policy ARNs, and session tags into a packed
+ // binary format that has a separate limit. Your request can fail for this limit
+ // even if your plaintext meets the other requirements. The PackedPolicySize
+ // response element indicates by percentage how close the policies and tags for
+ // your request are to the upper size limit. You can pass a session tag with the
+ // same key as a tag that is already attached to the role. When you do, session
+ // tags override a role tag with the same key. Tag key–value pairs are not case
+ // sensitive, but case is preserved. This means that you cannot have separate
+ // Department and department tag keys. Assume that the role has the Department =
+ // Marketing tag and you pass the department = engineering session tag. Department
+ // and department are not saved as separate tags, and the session tag passed in
+ // the request takes precedence over the role tag. Additionally, if you used
+ // temporary credentials to perform this operation, the new session inherits any
+ // transitive session tags from the calling session. If you pass a session tag with
+ // the same key as an inherited tag, the operation fails. To view the inherited
+ // tags for a session, see the CloudTrail logs. For more information, see Viewing
+ // Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs)
// in the IAM User Guide.
Tags []types.Tag
@@ -285,11 +270,10 @@ type AssumeRoleInput struct {
// sequence of six numeric digits.
TokenCode *string
- // A list of keys for session tags that you want to set as transitive. If you set a
- // tag key as transitive, the corresponding key and value passes to subsequent
+ // A list of keys for session tags that you want to set as transitive. If you set
+ // a tag key as transitive, the corresponding key and value passes to subsequent
// sessions in a role chain. For more information, see Chaining Roles with Session
- // Tags
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+ // Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
// in the IAM User Guide. This parameter is optional. When you set session tags as
// transitive, the session policy and session tags packed binary limit is not
// affected. If you choose not to specify a transitive tag key, then no tags are
@@ -308,7 +292,7 @@ type AssumeRoleOutput struct {
// that you can use to refer to the resulting temporary security credentials. For
// example, you can reference these credentials as a principal in a resource-based
// policy by using the ARN or assumed role ID. The ARN and ID include the
- // RoleSessionName that you specified when you called AssumeRole.
+ // RoleSessionName that you specified when you called AssumeRole .
AssumedRoleUser *types.AssumedRoleUser
// The temporary security credentials, which include an access key ID, a secret
@@ -330,8 +314,7 @@ type AssumeRoleOutput struct {
// who took actions with a role. You can use the aws:SourceIdentity condition key
// to further control access to Amazon Web Services resources based on the value of
// source identity. For more information about using source identity, see Monitor
- // and control actions taken with assumed roles
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
// in the IAM User Guide. The regex used to validate this parameter is a string of
// characters consisting of upper- and lower-case alphanumeric characters with no
// spaces. You can also include underscores or any of the following characters:
@@ -345,6 +328,9 @@ type AssumeRoleOutput struct {
}
func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRole{}, middleware.After)
if err != nil {
return err
@@ -353,34 +339,38 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRole"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -389,12 +379,18 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpAssumeRoleValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRole(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -404,6 +400,9 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -411,7 +410,30 @@ func newServiceMetadataMiddleware_opAssumeRole(region string) *awsmiddleware.Reg
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "AssumeRole",
}
}
+
+// PresignAssumeRole is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignAssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &AssumeRoleInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "AssumeRole", params, clientOptFns,
+ c.client.addOperationAssumeRoleMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
index e12315e4..2a57b72a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
@@ -4,6 +4,7 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
@@ -15,10 +16,8 @@ import (
// mechanism for tying an enterprise identity store or directory to role-based
// Amazon Web Services access without user-specific credentials or configuration.
// For a comparison of AssumeRoleWithSAML with the other API operations that
-// produce temporary credentials, see Requesting Temporary Security Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// produce temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
// in the IAM User Guide. The temporary security credentials returned by this
// operation consist of an access key ID, a secret access key, and a security
// token. Applications can use these temporary security credentials to sign calls
@@ -31,15 +30,12 @@ import (
// DurationSeconds value from 900 seconds (15 minutes) up to the maximum session
// duration setting for the role. This setting can have a value from 1 hour to 12
// hours. To learn how to view the maximum value for your role, see View the
-// Maximum Session Duration Setting for a Role
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+// Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
// in the IAM User Guide. The maximum session duration limit applies when you use
// the AssumeRole* API operations or the assume-role* CLI commands. However the
// limit does not apply when you use those operations to create a console URL. For
-// more information, see Using IAM Roles
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in the IAM
-// User Guide. Role chaining
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining)
+// more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
+// in the IAM User Guide. Role chaining (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining)
// limits your CLI or Amazon Web Services API role session to a maximum of one
// hour. When you use the AssumeRole API operation to assume a role, you can
// specify the duration of your role session with the DurationSeconds parameter.
@@ -50,20 +46,18 @@ import (
// credentials created by AssumeRoleWithSAML can be used to make API calls to any
// Amazon Web Services service with the following exception: you cannot call the
// STS GetFederationToken or GetSessionToken API operations. (Optional) You can
-// pass inline or managed session policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to use as
-// managed session policies. The plaintext that you use for both inline and managed
-// session policies can't exceed 2,048 characters. Passing policies to this
-// operation returns new temporary credentials. The resulting session's permissions
-// are the intersection of the role's identity-based policy and the session
-// policies. You can use the role's temporary credentials in subsequent Amazon Web
-// Services API calls to access resources in the account that owns the role. You
-// cannot use session policies to grant more permissions than those allowed by the
-// identity-based policy of the role that is being assumed. For more information,
-// see Session Policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// inline session policy. You can also specify up to 10 managed policy Amazon
+// Resource Names (ARNs) to use as managed session policies. The plaintext that you
+// use for both inline and managed session policies can't exceed 2,048 characters.
+// Passing policies to this operation returns new temporary credentials. The
+// resulting session's permissions are the intersection of the role's
+// identity-based policy and the session policies. You can use the role's temporary
+// credentials in subsequent Amazon Web Services API calls to access resources in
+// the account that owns the role. You cannot use session policies to grant more
+// permissions than those allowed by the identity-based policy of the role that is
+// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. Calling AssumeRoleWithSAML does not require the use of
// Amazon Web Services security credentials. The identity of the caller is
// validated by using keys in the metadata document that is uploaded for the SAML
@@ -71,56 +65,43 @@ import (
// result in an entry in your CloudTrail logs. The entry includes the value in the
// NameID element of the SAML assertion. We recommend that you use a NameIDType
// that is not associated with any personally identifiable information (PII). For
-// example, you could instead use the persistent identifier
-// (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent). Tags (Optional) You can
+// example, you could instead use the persistent identifier (
+// urn:oasis:names:tc:SAML:2.0:nameid-format:persistent ). Tags (Optional) You can
// configure your IdP to pass attributes into your SAML assertion as session tags.
// Each session tag consists of a key name and an associated value. For more
-// information about session tags, see Passing Session Tags in STS
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
-// IAM User Guide. You can pass up to 50 session tags. The plaintext session tag
-// keys can’t exceed 128 characters and the values can’t exceed 256 characters. For
-// these and additional limits, see IAM and STS Character Limits
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+// information about session tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide. You can pass up to 50 session tags. The plaintext session
+// tag keys can’t exceed 128 characters and the values can’t exceed 256 characters.
+// For these and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
-// session policies and session tags into a packed binary format that has a
-// separate limit. Your request can fail for this limit even if your plaintext
-// meets the other requirements. The PackedPolicySize response element indicates by
-// percentage how close the policies and tags for your request are to the upper
-// size limit. You can pass a session tag with the same key as a tag that is
-// attached to the role. When you do, session tags override the role's tags with
-// the same key. An administrator must grant you the permissions necessary to pass
-// session tags. The administrator can also create granular permissions to allow
-// you to pass only specific session tags. For more information, see Tutorial:
-// Using Tags for Attribute-Based Access Control
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// inline session policy, managed policy ARNs, and session tags into a packed
+// binary format that has a separate limit. Your request can fail for this limit
+// even if your plaintext meets the other requirements. The PackedPolicySize
+// response element indicates by percentage how close the policies and tags for
+// your request are to the upper size limit. You can pass a session tag with the
+// same key as a tag that is attached to the role. When you do, session tags
+// override the role's tags with the same key. An administrator must grant you the
+// permissions necessary to pass session tags. The administrator can also create
+// granular permissions to allow you to pass only specific session tags. For more
+// information, see Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
// in the IAM User Guide. You can set the session tags as transitive. Transitive
-// tags persist during role chaining. For more information, see Chaining Roles with
-// Session Tags
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+// tags persist during role chaining. For more information, see Chaining Roles
+// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
// in the IAM User Guide. SAML Configuration Before your application can call
-// AssumeRoleWithSAML, you must configure your SAML identity provider (IdP) to
+// AssumeRoleWithSAML , you must configure your SAML identity provider (IdP) to
// issue the claims required by Amazon Web Services. Additionally, you must use
// Identity and Access Management (IAM) to create a SAML provider entity in your
// Amazon Web Services account that represents your identity provider. You must
// also create an IAM role that specifies this SAML provider in its trust policy.
// For more information, see the following resources:
-//
-// * About SAML 2.0-based
-// Federation
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html)
-// in the IAM User Guide.
-//
-// * Creating SAML Identity Providers
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html)
-// in the IAM User Guide.
-//
-// * Configuring a Relying Party and Claims
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html)
-// in the IAM User Guide.
-//
-// * Creating a Role for SAML 2.0 Federation
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html)
-// in the IAM User Guide.
+// - About SAML 2.0-based Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html)
+// in the IAM User Guide.
+// - Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html)
+// in the IAM User Guide.
+// - Configuring a Relying Party and Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html)
+// in the IAM User Guide.
+// - Creating a Role for SAML 2.0 Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html)
+// in the IAM User Guide.
func (c *Client) AssumeRoleWithSAML(ctx context.Context, params *AssumeRoleWithSAMLInput, optFns ...func(*Options)) (*AssumeRoleWithSAMLOutput, error) {
if params == nil {
params = &AssumeRoleWithSAMLInput{}
@@ -150,8 +131,7 @@ type AssumeRoleWithSAMLInput struct {
RoleArn *string
// The base64 encoded SAML authentication response provided by the IdP. For more
- // information, see Configuring a Relying Party and Adding Claims
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html)
+ // information, see Configuring a Relying Party and Adding Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html)
// in the IAM User Guide.
//
// This member is required.
@@ -166,16 +146,14 @@ type AssumeRoleWithSAMLInput struct {
// than this setting, the operation fails. For example, if you specify a session
// duration of 12 hours, but your administrator set the maximum session duration to
// 6 hours, your operation fails. To learn how to view the maximum value for your
- // role, see View the Maximum Session Duration Setting for a Role
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+ // role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
// in the IAM User Guide. By default, the value is set to 3600 seconds. The
// DurationSeconds parameter is separate from the duration of a console session
// that you might request using the returned credentials. The request to the
// federation endpoint for a console sign-in token takes a SessionDuration
// parameter that specifies the maximum length of the console session. For more
// information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
+ // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
// in the IAM User Guide.
DurationSeconds *int32
@@ -187,18 +165,17 @@ type AssumeRoleWithSAMLInput struct {
// access resources in the account that owns the role. You cannot use session
// policies to grant more permissions than those allowed by the identity-based
// policy of the role that is being assumed. For more information, see Session
- // Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. The plaintext that you use for both inline and managed
// session policies can't exceed 2,048 characters. The JSON policy characters can
// be any ASCII character from the space character to the end of the valid
// character list (\u0020 through \u00FF). It can also include the tab (\u0009),
// linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web
- // Services conversion compresses the passed session policies and session tags into
- // a packed binary format that has a separate limit. Your request can fail for this
- // limit even if your plaintext meets the other requirements. The PackedPolicySize
- // response element indicates by percentage how close the policies and tags for
- // your request are to the upper size limit.
+ // Services conversion compresses the passed inline session policy, managed policy
+ // ARNs, and session tags into a packed binary format that has a separate limit.
+ // Your request can fail for this limit even if your plaintext meets the other
+ // requirements. The PackedPolicySize response element indicates by percentage how
+ // close the policies and tags for your request are to the upper size limit.
Policy *string
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
@@ -206,22 +183,20 @@ type AssumeRoleWithSAMLInput struct {
// the role. This parameter is optional. You can provide up to 10 managed policy
// ARNs. However, the plaintext that you use for both inline and managed session
// policies can't exceed 2,048 characters. For more information about ARNs, see
- // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
- // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
- // the Amazon Web Services General Reference. An Amazon Web Services conversion
- // compresses the passed session policies and session tags into a packed binary
- // format that has a separate limit. Your request can fail for this limit even if
- // your plaintext meets the other requirements. The PackedPolicySize response
- // element indicates by percentage how close the policies and tags for your request
- // are to the upper size limit. Passing policies to this operation returns new
- // temporary credentials. The resulting session's permissions are the intersection
- // of the role's identity-based policy and the session policies. You can use the
- // role's temporary credentials in subsequent Amazon Web Services API calls to
- // access resources in the account that owns the role. You cannot use session
- // policies to grant more permissions than those allowed by the identity-based
- // policy of the role that is being assumed. For more information, see Session
- // Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+ // in the Amazon Web Services General Reference. An Amazon Web Services conversion
+ // compresses the passed inline session policy, managed policy ARNs, and session
+ // tags into a packed binary format that has a separate limit. Your request can
+ // fail for this limit even if your plaintext meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit. Passing policies to this
+ // operation returns new temporary credentials. The resulting session's permissions
+ // are the intersection of the role's identity-based policy and the session
+ // policies. You can use the role's temporary credentials in subsequent Amazon Web
+ // Services API calls to access resources in the account that owns the role. You
+ // cannot use session policies to grant more permissions than those allowed by the
+ // identity-based policy of the role that is being assumed. For more information,
+ // see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide.
PolicyArns []types.PolicyDescriptorType
@@ -251,19 +226,12 @@ type AssumeRoleWithSAMLOutput struct {
Issuer *string
// A hash value based on the concatenation of the following:
- //
- // * The Issuer response
- // value.
- //
- // * The Amazon Web Services account ID.
- //
- // * The friendly name (the last
- // part of the ARN) of the SAML provider in IAM.
- //
- // The combination of NameQualifier
- // and Subject can be used to uniquely identify a federated user. The following
- // pseudocode shows how the hash value is calculated: BASE64 ( SHA1 (
- // "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )
+ // - The Issuer response value.
+ // - The Amazon Web Services account ID.
+ // - The friendly name (the last part of the ARN) of the SAML provider in IAM.
+ // The combination of NameQualifier and Subject can be used to uniquely identify a
+ // user. The following pseudocode shows how the hash value is calculated: BASE64 (
+ // SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )
NameQualifier *string
// A percentage value that indicates the packed size of the session policies and
@@ -272,20 +240,18 @@ type AssumeRoleWithSAMLOutput struct {
// allowed space.
PackedPolicySize *int32
- // The value in the SourceIdentity attribute in the SAML assertion. You can require
- // users to set a source identity value when they assume a role. You do this by
- // using the sts:SourceIdentity condition key in a role trust policy. That way,
- // actions that are taken with the role are associated with that user. After the
- // source identity is set, the value cannot be changed. It is present in the
+ // The value in the SourceIdentity attribute in the SAML assertion. You can
+ // require users to set a source identity value when they assume a role. You do
+ // this by using the sts:SourceIdentity condition key in a role trust policy. That
+ // way, actions that are taken with the role are associated with that user. After
+ // the source identity is set, the value cannot be changed. It is present in the
// request for all actions that are taken by the role and persists across chained
- // role
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
+ // role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
// sessions. You can configure your SAML identity provider to use an attribute
// associated with your users, like user name or email, as the source identity when
- // calling AssumeRoleWithSAML. You do this by adding an attribute to the SAML
+ // calling AssumeRoleWithSAML . You do this by adding an attribute to the SAML
// assertion. For more information about using source identity, see Monitor and
- // control actions taken with assumed roles
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
// in the IAM User Guide. The regex used to validate this parameter is a string of
// characters consisting of upper- and lower-case alphanumeric characters with no
// spaces. You can also include underscores or any of the following characters:
@@ -297,10 +263,10 @@ type AssumeRoleWithSAMLOutput struct {
// The format of the name ID, as defined by the Format attribute in the NameID
// element of the SAML assertion. Typical examples of the format are transient or
- // persistent. If the format includes the prefix
- // urn:oasis:names:tc:SAML:2.0:nameid-format, that prefix is removed. For example,
- // urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as transient. If
- // the format includes any other prefix, the format is returned with no
+ // persistent . If the format includes the prefix
+ // urn:oasis:names:tc:SAML:2.0:nameid-format , that prefix is removed. For example,
+ // urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as transient .
+ // If the format includes any other prefix, the format is returned with no
// modifications.
SubjectType *string
@@ -311,6 +277,9 @@ type AssumeRoleWithSAMLOutput struct {
}
func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithSAML{}, middleware.After)
if err != nil {
return err
@@ -319,28 +288,35 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithSAML"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -349,12 +325,18 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithSAML(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -364,6 +346,9 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -371,7 +356,6 @@ func newServiceMetadataMiddleware_opAssumeRoleWithSAML(region string) *awsmiddle
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "AssumeRoleWithSAML",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
index 2e8b51c9..98108ce6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
@@ -4,6 +4,7 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
@@ -14,131 +15,104 @@ import (
// authenticated in a mobile or web application with a web identity provider.
// Example providers include the OAuth 2.0 providers Login with Amazon and
// Facebook, or any OpenID Connect-compatible identity provider such as Google or
-// Amazon Cognito federated identities
-// (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html).
-// For mobile applications, we recommend that you use Amazon Cognito. You can use
-// Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide
-// (http://aws.amazon.com/sdkforios/) and the Amazon Web Services SDK for Android
-// Developer Guide (http://aws.amazon.com/sdkforandroid/) to uniquely identify a
-// user. You can also supply the user with a consistent identity throughout the
-// lifetime of an application. To learn more about Amazon Cognito, see Amazon
-// Cognito Overview
-// (https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840)
-// in Amazon Web Services SDK for Android Developer Guide and Amazon Cognito
-// Overview
-// (https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664)
-// in the Amazon Web Services SDK for iOS Developer Guide. Calling
-// AssumeRoleWithWebIdentity does not require the use of Amazon Web Services
-// security credentials. Therefore, you can distribute an application (for example,
-// on mobile devices) that requests temporary security credentials without
-// including long-term Amazon Web Services credentials in the application. You also
-// don't need to deploy server-based proxy services that use long-term Amazon Web
-// Services credentials. Instead, the identity of the caller is validated by using
-// a token from the web identity provider. For a comparison of
-// AssumeRoleWithWebIdentity with the other API operations that produce temporary
-// credentials, see Requesting Temporary Security Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// Amazon Cognito federated identities (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html)
+// . For mobile applications, we recommend that you use Amazon Cognito. You can use
+// Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/)
+// and the Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/)
+// to uniquely identify a user. You can also supply the user with a consistent
+// identity throughout the lifetime of an application. To learn more about Amazon
+// Cognito, see Amazon Cognito identity pools (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html)
+// in Amazon Cognito Developer Guide. Calling AssumeRoleWithWebIdentity does not
+// require the use of Amazon Web Services security credentials. Therefore, you can
+// distribute an application (for example, on mobile devices) that requests
+// temporary security credentials without including long-term Amazon Web Services
+// credentials in the application. You also don't need to deploy server-based proxy
+// services that use long-term Amazon Web Services credentials. Instead, the
+// identity of the caller is validated by using a token from the web identity
+// provider. For a comparison of AssumeRoleWithWebIdentity with the other API
+// operations that produce temporary credentials, see Requesting Temporary
+// Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
// in the IAM User Guide. The temporary security credentials returned by this API
// consist of an access key ID, a secret access key, and a security token.
// Applications can use these temporary security credentials to sign calls to
// Amazon Web Services service API operations. Session Duration By default, the
-// temporary security credentials created by AssumeRoleWithWebIdentity last for one
-// hour. However, you can use the optional DurationSeconds parameter to specify the
-// duration of your session. You can provide a value from 900 seconds (15 minutes)
-// up to the maximum session duration setting for the role. This setting can have a
-// value from 1 hour to 12 hours. To learn how to view the maximum value for your
-// role, see View the Maximum Session Duration Setting for a Role
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+// temporary security credentials created by AssumeRoleWithWebIdentity last for
+// one hour. However, you can use the optional DurationSeconds parameter to
+// specify the duration of your session. You can provide a value from 900 seconds
+// (15 minutes) up to the maximum session duration setting for the role. This
+// setting can have a value from 1 hour to 12 hours. To learn how to view the
+// maximum value for your role, see View the Maximum Session Duration Setting for
+// a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
// in the IAM User Guide. The maximum session duration limit applies when you use
// the AssumeRole* API operations or the assume-role* CLI commands. However the
// limit does not apply when you use those operations to create a console URL. For
-// more information, see Using IAM Roles
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in the IAM
-// User Guide. Permissions The temporary security credentials created by
+// more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
+// in the IAM User Guide. Permissions The temporary security credentials created by
// AssumeRoleWithWebIdentity can be used to make API calls to any Amazon Web
// Services service with the following exception: you cannot call the STS
// GetFederationToken or GetSessionToken API operations. (Optional) You can pass
-// inline or managed session policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to use as
-// managed session policies. The plaintext that you use for both inline and managed
-// session policies can't exceed 2,048 characters. Passing policies to this
-// operation returns new temporary credentials. The resulting session's permissions
-// are the intersection of the role's identity-based policy and the session
-// policies. You can use the role's temporary credentials in subsequent Amazon Web
-// Services API calls to access resources in the account that owns the role. You
-// cannot use session policies to grant more permissions than those allowed by the
-// identity-based policy of the role that is being assumed. For more information,
-// see Session Policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// inline session policy. You can also specify up to 10 managed policy Amazon
+// Resource Names (ARNs) to use as managed session policies. The plaintext that you
+// use for both inline and managed session policies can't exceed 2,048 characters.
+// Passing policies to this operation returns new temporary credentials. The
+// resulting session's permissions are the intersection of the role's
+// identity-based policy and the session policies. You can use the role's temporary
+// credentials in subsequent Amazon Web Services API calls to access resources in
+// the account that owns the role. You cannot use session policies to grant more
+// permissions than those allowed by the identity-based policy of the role that is
+// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. Tags (Optional) You can configure your IdP to pass
// attributes into your web identity token as session tags. Each session tag
// consists of a key name and an associated value. For more information about
-// session tags, see Passing Session Tags in STS
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
-// IAM User Guide. You can pass up to 50 session tags. The plaintext session tag
-// keys can’t exceed 128 characters and the values can’t exceed 256 characters. For
-// these and additional limits, see IAM and STS Character Limits
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+// session tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide. You can pass up to 50 session tags. The plaintext session
+// tag keys can’t exceed 128 characters and the values can’t exceed 256 characters.
+// For these and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
-// session policies and session tags into a packed binary format that has a
-// separate limit. Your request can fail for this limit even if your plaintext
-// meets the other requirements. The PackedPolicySize response element indicates by
-// percentage how close the policies and tags for your request are to the upper
-// size limit. You can pass a session tag with the same key as a tag that is
-// attached to the role. When you do, the session tag overrides the role tag with
-// the same key. An administrator must grant you the permissions necessary to pass
-// session tags. The administrator can also create granular permissions to allow
-// you to pass only specific session tags. For more information, see Tutorial:
-// Using Tags for Attribute-Based Access Control
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// inline session policy, managed policy ARNs, and session tags into a packed
+// binary format that has a separate limit. Your request can fail for this limit
+// even if your plaintext meets the other requirements. The PackedPolicySize
+// response element indicates by percentage how close the policies and tags for
+// your request are to the upper size limit. You can pass a session tag with the
+// same key as a tag that is attached to the role. When you do, the session tag
+// overrides the role tag with the same key. An administrator must grant you the
+// permissions necessary to pass session tags. The administrator can also create
+// granular permissions to allow you to pass only specific session tags. For more
+// information, see Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
// in the IAM User Guide. You can set the session tags as transitive. Transitive
-// tags persist during role chaining. For more information, see Chaining Roles with
-// Session Tags
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+// tags persist during role chaining. For more information, see Chaining Roles
+// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
// in the IAM User Guide. Identities Before your application can call
-// AssumeRoleWithWebIdentity, you must have an identity token from a supported
+// AssumeRoleWithWebIdentity , you must have an identity token from a supported
// identity provider and create a role that the application can assume. The role
// that your application assumes must trust the identity provider that is
// associated with the identity token. In other words, the identity provider must
// be specified in the role's trust policy. Calling AssumeRoleWithWebIdentity can
-// result in an entry in your CloudTrail logs. The entry includes the Subject
-// (http://openid.net/specs/openid-connect-core-1_0.html#Claims) of the provided
-// web identity token. We recommend that you avoid using any personally
-// identifiable information (PII) in this field. For example, you could instead use
-// a GUID or a pairwise identifier, as suggested in the OIDC specification
-// (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes). For more
-// information about how to use web identity federation and the
+// result in an entry in your CloudTrail logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims)
+// of the provided web identity token. We recommend that you avoid using any
+// personally identifiable information (PII) in this field. For example, you could
+// instead use a GUID or a pairwise identifier, as suggested in the OIDC
+// specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes)
+// . For more information about how to use web identity federation and the
// AssumeRoleWithWebIdentity API, see the following resources:
-//
-// * Using Web
-// Identity Federation API Operations for Mobile Apps
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html)
-// and Federation Through a Web-based Identity Provider
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity).
-//
-// *
-// Web Identity Federation Playground
-// (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/).
-// Walk through the process of authenticating through Login with Amazon, Facebook,
-// or Google, getting temporary security credentials, and then using those
-// credentials to make a request to Amazon Web Services.
-//
-// * Amazon Web Services SDK
-// for iOS Developer Guide (http://aws.amazon.com/sdkforios/) and Amazon Web
-// Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/).
-// These toolkits contain sample apps that show how to invoke the identity
-// providers. The toolkits then show how to use the information from these
-// providers to get and use temporary security credentials.
-//
-// * Web Identity
-// Federation with Mobile Applications
-// (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications).
-// This article discusses web identity federation and shows an example of how to
-// use web identity federation to get access to content in Amazon S3.
+// - Using Web Identity Federation API Operations for Mobile Apps (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html)
+// and Federation Through a Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
+// .
+// - Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/)
+// . Walk through the process of authenticating through Login with Amazon,
+// Facebook, or Google, getting temporary security credentials, and then using
+// those credentials to make a request to Amazon Web Services.
+// - Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/)
+// and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/)
+// . These toolkits contain sample apps that show how to invoke the identity
+// providers. The toolkits then show how to use the information from these
+// providers to get and use temporary security credentials.
+// - Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications)
+// . This article discusses web identity federation and shows an example of how to
+// use web identity federation to get access to content in Amazon S3.
func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) {
if params == nil {
params = &AssumeRoleWithWebIdentityInput{}
@@ -176,7 +150,8 @@ type AssumeRoleWithWebIdentityInput struct {
// The OAuth 2.0 access token or OpenID Connect ID token that is provided by the
// identity provider. Your application must get this token by authenticating the
// user who is using your application with a web identity provider before the
- // application makes an AssumeRoleWithWebIdentity call.
+ // application makes an AssumeRoleWithWebIdentity call. Only tokens with RSA
+ // algorithms (RS256) are supported.
//
// This member is required.
WebIdentityToken *string
@@ -187,16 +162,14 @@ type AssumeRoleWithWebIdentityInput struct {
// higher than this setting, the operation fails. For example, if you specify a
// session duration of 12 hours, but your administrator set the maximum session
// duration to 6 hours, your operation fails. To learn how to view the maximum
- // value for your role, see View the Maximum Session Duration Setting for a Role
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+ // value for your role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
// in the IAM User Guide. By default, the value is set to 3600 seconds. The
// DurationSeconds parameter is separate from the duration of a console session
// that you might request using the returned credentials. The request to the
// federation endpoint for a console sign-in token takes a SessionDuration
// parameter that specifies the maximum length of the console session. For more
// information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
+ // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
// in the IAM User Guide.
DurationSeconds *int32
@@ -208,18 +181,17 @@ type AssumeRoleWithWebIdentityInput struct {
// access resources in the account that owns the role. You cannot use session
// policies to grant more permissions than those allowed by the identity-based
// policy of the role that is being assumed. For more information, see Session
- // Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. The plaintext that you use for both inline and managed
// session policies can't exceed 2,048 characters. The JSON policy characters can
// be any ASCII character from the space character to the end of the valid
// character list (\u0020 through \u00FF). It can also include the tab (\u0009),
// linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web
- // Services conversion compresses the passed session policies and session tags into
- // a packed binary format that has a separate limit. Your request can fail for this
- // limit even if your plaintext meets the other requirements. The PackedPolicySize
- // response element indicates by percentage how close the policies and tags for
- // your request are to the upper size limit.
+ // Services conversion compresses the passed inline session policy, managed policy
+ // ARNs, and session tags into a packed binary format that has a separate limit.
+ // Your request can fail for this limit even if your plaintext meets the other
+ // requirements. The PackedPolicySize response element indicates by percentage how
+ // close the policies and tags for your request are to the upper size limit.
Policy *string
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
@@ -227,22 +199,20 @@ type AssumeRoleWithWebIdentityInput struct {
// the role. This parameter is optional. You can provide up to 10 managed policy
// ARNs. However, the plaintext that you use for both inline and managed session
// policies can't exceed 2,048 characters. For more information about ARNs, see
- // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
- // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
- // the Amazon Web Services General Reference. An Amazon Web Services conversion
- // compresses the passed session policies and session tags into a packed binary
- // format that has a separate limit. Your request can fail for this limit even if
- // your plaintext meets the other requirements. The PackedPolicySize response
- // element indicates by percentage how close the policies and tags for your request
- // are to the upper size limit. Passing policies to this operation returns new
- // temporary credentials. The resulting session's permissions are the intersection
- // of the role's identity-based policy and the session policies. You can use the
- // role's temporary credentials in subsequent Amazon Web Services API calls to
- // access resources in the account that owns the role. You cannot use session
- // policies to grant more permissions than those allowed by the identity-based
- // policy of the role that is being assumed. For more information, see Session
- // Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+ // in the Amazon Web Services General Reference. An Amazon Web Services conversion
+ // compresses the passed inline session policy, managed policy ARNs, and session
+ // tags into a packed binary format that has a separate limit. Your request can
+ // fail for this limit even if your plaintext meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit. Passing policies to this
+ // operation returns new temporary credentials. The resulting session's permissions
+ // are the intersection of the role's identity-based policy and the session
+ // policies. You can use the role's temporary credentials in subsequent Amazon Web
+ // Services API calls to access resources in the account that owns the role. You
+ // cannot use session policies to grant more permissions than those allowed by the
+ // identity-based policy of the role that is being assumed. For more information,
+ // see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide.
PolicyArns []types.PolicyDescriptorType
@@ -265,7 +235,7 @@ type AssumeRoleWithWebIdentityOutput struct {
// that you can use to refer to the resulting temporary security credentials. For
// example, you can reference these credentials as a principal in a resource-based
// policy by using the ARN or assumed role ID. The ARN and ID include the
- // RoleSessionName that you specified when you called AssumeRole.
+ // RoleSessionName that you specified when you called AssumeRole .
AssumedRoleUser *types.AssumedRoleUser
// The intended audience (also known as client ID) of the web identity token. This
@@ -285,10 +255,10 @@ type AssumeRoleWithWebIdentityOutput struct {
// allowed space.
PackedPolicySize *int32
- // The issuing authority of the web identity token presented. For OpenID Connect ID
- // tokens, this contains the value of the iss field. For OAuth 2.0 access tokens,
- // this contains the value of the ProviderId parameter that was passed in the
- // AssumeRoleWithWebIdentity request.
+ // The issuing authority of the web identity token presented. For OpenID Connect
+ // ID tokens, this contains the value of the iss field. For OAuth 2.0 access
+ // tokens, this contains the value of the ProviderId parameter that was passed in
+ // the AssumeRoleWithWebIdentity request.
Provider *string
// The value of the source identity that is returned in the JSON web token (JWT)
@@ -297,17 +267,14 @@ type AssumeRoleWithWebIdentityOutput struct {
// key in a role trust policy. That way, actions that are taken with the role are
// associated with that user. After the source identity is set, the value cannot be
// changed. It is present in the request for all actions that are taken by the role
- // and persists across chained role
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
+ // and persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
// sessions. You can configure your identity provider to use an attribute
// associated with your users, like user name or email, as the source identity when
- // calling AssumeRoleWithWebIdentity. You do this by adding a claim to the JSON web
- // token. To learn more about OIDC tokens and claims, see Using Tokens with User
- // Pools
- // (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html)
+ // calling AssumeRoleWithWebIdentity . You do this by adding a claim to the JSON
+ // web token. To learn more about OIDC tokens and claims, see Using Tokens with
+ // User Pools (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html)
// in the Amazon Cognito Developer Guide. For more information about using source
- // identity, see Monitor and control actions taken with assumed roles
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // identity, see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
// in the IAM User Guide. The regex used to validate this parameter is a string of
// characters consisting of upper- and lower-case alphanumeric characters with no
// spaces. You can also include underscores or any of the following characters:
@@ -329,6 +296,9 @@ type AssumeRoleWithWebIdentityOutput struct {
}
func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithWebIdentity{}, middleware.After)
if err != nil {
return err
@@ -337,28 +307,35 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
if err != nil {
return err
}
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithWebIdentity"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -367,12 +344,18 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -382,6 +365,9 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -389,7 +375,6 @@ func newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(region string) *aw
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "AssumeRoleWithWebIdentity",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
index b7a637d4..b4ad54ab 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
@@ -4,8 +4,8 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
@@ -22,27 +22,17 @@ import (
// encoded because the details of the authorization status can contain privileged
// information that the user who requested the operation should not see. To decode
// an authorization status message, a user must be granted permissions through an
-// IAM policy
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) to
-// request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage) action.
-// The decoded message includes the following type of information:
-//
-// * Whether the
-// request was denied due to an explicit deny or due to the absence of an explicit
-// allow. For more information, see Determining Whether a Request is Allowed or
-// Denied
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow)
-// in the IAM User Guide.
-//
-// * The principal who made the request.
-//
-// * The requested
-// action.
-//
-// * The requested resource.
-//
-// * The values of condition keys in the
-// context of the user's request.
+// IAM policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
+// to request the DecodeAuthorizationMessage ( sts:DecodeAuthorizationMessage )
+// action. The decoded message includes the following type of information:
+// - Whether the request was denied due to an explicit deny or due to the
+// absence of an explicit allow. For more information, see Determining Whether a
+// Request is Allowed or Denied (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow)
+// in the IAM User Guide.
+// - The principal who made the request.
+// - The requested action.
+// - The requested resource.
+// - The values of condition keys in the context of the user's request.
func (c *Client) DecodeAuthorizationMessage(ctx context.Context, params *DecodeAuthorizationMessageInput, optFns ...func(*Options)) (*DecodeAuthorizationMessageOutput, error) {
if params == nil {
params = &DecodeAuthorizationMessageInput{}
@@ -83,6 +73,9 @@ type DecodeAuthorizationMessageOutput struct {
}
func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpDecodeAuthorizationMessage{}, middleware.After)
if err != nil {
return err
@@ -91,34 +84,38 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DecodeAuthorizationMessage"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -127,12 +124,18 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecodeAuthorizationMessage(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -142,6 +145,9 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -149,7 +155,6 @@ func newServiceMetadataMiddleware_opDecodeAuthorizationMessage(region string) *a
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "DecodeAuthorizationMessage",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
index b86a425d..1f7cbcc2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
@@ -4,28 +4,25 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the account identifier for the specified access key ID. Access keys
-// consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a
-// secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). For
-// more information about access keys, see Managing Access Keys for IAM Users
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
+// consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE ) and
+// a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ).
+// For more information about access keys, see Managing Access Keys for IAM Users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
// in the IAM User Guide. When you pass an access key ID to this operation, it
// returns the ID of the Amazon Web Services account to which the keys belong.
// Access key IDs beginning with AKIA are long-term credentials for an IAM user or
// the Amazon Web Services account root user. Access key IDs beginning with ASIA
// are temporary credentials that are created using STS operations. If the account
// in the response belongs to you, you can sign in as the root user and review your
-// root user access keys. Then, you can pull a credentials report
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html)
+// root user access keys. Then, you can pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html)
// to learn which IAM user owns the keys. To learn who requested the temporary
-// credentials for an ASIA access key, view the STS events in your CloudTrail logs
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html)
+// credentials for an ASIA access key, view the STS events in your CloudTrail logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html)
// in the IAM User Guide. This operation does not indicate the state of the access
// key. The key might be active, inactive, or deleted. Active keys might not have
// permissions to perform an operation. Providing a deleted access key might return
@@ -69,6 +66,9 @@ type GetAccessKeyInfoOutput struct {
}
func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccessKeyInfo{}, middleware.After)
if err != nil {
return err
@@ -77,34 +77,38 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccessKeyInfo"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -113,12 +117,18 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyInfo(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -128,6 +138,9 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -135,7 +148,6 @@ func newServiceMetadataMiddleware_opGetAccessKeyInfo(region string) *awsmiddlewa
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "GetAccessKeyInfo",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
index a7f96c22..acb7ede4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
@@ -4,6 +4,7 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
@@ -12,12 +13,11 @@ import (
// Returns details about the IAM user or role whose credentials are used to call
// the operation. No permissions are required to perform this operation. If an
-// administrator adds a policy to your IAM user or role that explicitly denies
-// access to the sts:GetCallerIdentity action, you can still perform this
-// operation. Permissions are not required because the same information is returned
-// when an IAM user or role is denied access. To view an example response, see I Am
-// Not Authorized to Perform: iam:DeleteVirtualMFADevice
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa)
+// administrator attaches a policy to your identity that explicitly denies access
+// to the sts:GetCallerIdentity action, you can still perform this operation.
+// Permissions are not required because the same information is returned when
+// access is denied. To view an example response, see I Am Not Authorized to
+// Perform: iam:DeleteVirtualMFADevice (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa)
// in the IAM User Guide.
func (c *Client) GetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*Options)) (*GetCallerIdentityOutput, error) {
if params == nil {
@@ -49,10 +49,9 @@ type GetCallerIdentityOutput struct {
// The Amazon Web Services ARN associated with the calling entity.
Arn *string
- // The unique identifier of the calling entity. The exact value depends on the type
- // of entity that is making the call. The values returned are those listed in the
- // aws:userid column in the Principal table
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable)
+ // The unique identifier of the calling entity. The exact value depends on the
+ // type of entity that is making the call. The values returned are those listed in
+ // the aws:userid column in the Principal table (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable)
// found on the Policy Variables reference page in the IAM User Guide.
UserId *string
@@ -63,6 +62,9 @@ type GetCallerIdentityOutput struct {
}
func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetCallerIdentity{}, middleware.After)
if err != nil {
return err
@@ -71,34 +73,38 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetCallerIdentity"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -107,9 +113,15 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -119,6 +131,9 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -126,7 +141,6 @@ func newServiceMetadataMiddleware_opGetCallerIdentity(region string) *awsmiddlew
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "GetCallerIdentity",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
index 01a3d411..3679618c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
@@ -4,98 +4,84 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns a set of temporary security credentials (consisting of an access key ID,
-// a secret access key, and a security token) for a federated user. A typical use
-// is in a proxy application that gets temporary security credentials on behalf of
+// Returns a set of temporary security credentials (consisting of an access key
+// ID, a secret access key, and a security token) for a user. A typical use is in a
+// proxy application that gets temporary security credentials on behalf of
// distributed applications inside a corporate network. You must call the
// GetFederationToken operation using the long-term security credentials of an IAM
// user. As a result, this call is appropriate in contexts where those credentials
-// can be safely stored, usually in a server-based application. For a comparison of
+// can be safeguarded, usually in a server-based application. For a comparison of
// GetFederationToken with the other API operations that produce temporary
-// credentials, see Requesting Temporary Security Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// in the IAM User Guide. Although it is possible to call GetFederationToken using
+// the security credentials of an Amazon Web Services account root user rather than
+// an IAM user that you create for the purpose of a proxy application, we do not
+// recommend it. For more information, see Safeguard your root user credentials
+// and don't use them for everyday tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)
// in the IAM User Guide. You can create a mobile-based or browser-based app that
// can authenticate users using a web identity provider like Login with Amazon,
// Facebook, Google, or an OpenID Connect-compatible identity provider. In this
// case, we recommend that you use Amazon Cognito (http://aws.amazon.com/cognito/)
-// or AssumeRoleWithWebIdentity. For more information, see Federation Through a
-// Web-based Identity Provider
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
-// in the IAM User Guide. You can also call GetFederationToken using the security
-// credentials of an Amazon Web Services account root user, but we do not recommend
-// it. Instead, we recommend that you create an IAM user for the purpose of the
-// proxy application. Then attach a policy to the IAM user that limits federated
-// users to only the actions and resources that they need to access. For more
-// information, see IAM Best Practices
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the
-// IAM User Guide. Session duration The temporary credentials are valid for the
-// specified duration, from 900 seconds (15 minutes) up to a maximum of 129,600
+// or AssumeRoleWithWebIdentity . For more information, see Federation Through a
+// Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
+// in the IAM User Guide. Session duration The temporary credentials are valid for
+// the specified duration, from 900 seconds (15 minutes) up to a maximum of 129,600
// seconds (36 hours). The default session duration is 43,200 seconds (12 hours).
-// Temporary credentials obtained by using the Amazon Web Services account root
-// user credentials have a maximum duration of 3,600 seconds (1 hour). Permissions
-// You can use the temporary credentials created by GetFederationToken in any
-// Amazon Web Services service except the following:
+// Temporary credentials obtained by using the root user credentials have a maximum
+// duration of 3,600 seconds (1 hour). Permissions You can use the temporary
+// credentials created by GetFederationToken in any Amazon Web Services service
+// with the following exceptions:
+// - You cannot call any IAM operations using the CLI or the Amazon Web Services
+// API. This limitation does not apply to console sessions.
+// - You cannot call any STS operations except GetCallerIdentity .
//
-// * You cannot call any IAM
-// operations using the CLI or the Amazon Web Services API.
-//
-// * You cannot call any
-// STS operations except GetCallerIdentity.
-//
-// You must pass an inline or managed
-// session policy
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// You can use temporary credentials for single sign-on (SSO) to the console. You
+// must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to use as
-// managed session policies. The plaintext that you use for both inline and managed
-// session policies can't exceed 2,048 characters. Though the session policy
-// parameters are optional, if you do not pass a policy, then the resulting
-// federated user session has no permissions. When you pass session policies, the
-// session permissions are the intersection of the IAM user policies and the
-// session policies that you pass. This gives you a way to further restrict the
-// permissions for a federated user. You cannot use session policies to grant more
-// permissions than those that are defined in the permissions policy of the IAM
-// user. For more information, see Session Policies
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// inline session policy. You can also specify up to 10 managed policy Amazon
+// Resource Names (ARNs) to use as managed session policies. The plaintext that you
+// use for both inline and managed session policies can't exceed 2,048 characters.
+// Though the session policy parameters are optional, if you do not pass a policy,
+// then the resulting federated user session has no permissions. When you pass
+// session policies, the session permissions are the intersection of the IAM user
+// policies and the session policies that you pass. This gives you a way to further
+// restrict the permissions for a federated user. You cannot use session policies
+// to grant more permissions than those that are defined in the permissions policy
+// of the IAM user. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. For information about using GetFederationToken to create
// temporary security credentials, see GetFederationToken—Federation Through a
-// Custom Identity Broker
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken).
-// You can use the credentials to access a resource that has a resource-based
+// Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken)
+// . You can use the credentials to access a resource that has a resource-based
// policy. If that policy specifically references the federated user session in the
// Principal element of the policy, the session has the permissions allowed by the
// policy. These permissions are granted in addition to the permissions granted by
// the session policies. Tags (Optional) You can pass tag key-value pairs to your
// session. These are called session tags. For more information about session tags,
-// see Passing Session Tags in STS
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
-// IAM User Guide. You can create a mobile-based or browser-based app that can
-// authenticate users using a web identity provider like Login with Amazon,
+// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide. You can create a mobile-based or browser-based app that
+// can authenticate users using a web identity provider like Login with Amazon,
// Facebook, Google, or an OpenID Connect-compatible identity provider. In this
// case, we recommend that you use Amazon Cognito (http://aws.amazon.com/cognito/)
-// or AssumeRoleWithWebIdentity. For more information, see Federation Through a
-// Web-based Identity Provider
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
+// or AssumeRoleWithWebIdentity . For more information, see Federation Through a
+// Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
// in the IAM User Guide. An administrator must grant you the permissions necessary
// to pass session tags. The administrator can also create granular permissions to
// allow you to pass only specific session tags. For more information, see
-// Tutorial: Using Tags for Attribute-Based Access Control
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
// in the IAM User Guide. Tag key–value pairs are not case sensitive, but case is
// preserved. This means that you cannot have separate Department and department
-// tag keys. Assume that the user that you are federating has the
-// Department=Marketing tag and you pass the department=engineering session tag.
-// Department and department are not saved as separate tags, and the session tag
-// passed in the request takes precedence over the user tag.
+// tag keys. Assume that the user that you are federating has the Department =
+// Marketing tag and you pass the department = engineering session tag. Department
+// and department are not saved as separate tags, and the session tag passed in
+// the request takes precedence over the user tag.
func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) {
if params == nil {
params = &GetFederationTokenInput{}
@@ -114,37 +100,36 @@ func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTo
type GetFederationTokenInput struct {
// The name of the federated user. The name is used as an identifier for the
- // temporary security credentials (such as Bob). For example, you can reference the
- // federated user name in a resource-based policy, such as in an Amazon S3 bucket
- // policy. The regex used to validate this parameter is a string of characters
- // consisting of upper- and lower-case alphanumeric characters with no spaces. You
- // can also include underscores or any of the following characters: =,.@-
+ // temporary security credentials (such as Bob ). For example, you can reference
+ // the federated user name in a resource-based policy, such as in an Amazon S3
+ // bucket policy. The regex used to validate this parameter is a string of
+ // characters consisting of upper- and lower-case alphanumeric characters with no
+ // spaces. You can also include underscores or any of the following characters:
+ // =,.@-
//
// This member is required.
Name *string
- // The duration, in seconds, that the session should last. Acceptable durations for
- // federation sessions range from 900 seconds (15 minutes) to 129,600 seconds (36
- // hours), with 43,200 seconds (12 hours) as the default. Sessions obtained using
- // Amazon Web Services account root user credentials are restricted to a maximum of
- // 3,600 seconds (one hour). If the specified duration is longer than one hour, the
- // session obtained by using root user credentials defaults to one hour.
+ // The duration, in seconds, that the session should last. Acceptable durations
+ // for federation sessions range from 900 seconds (15 minutes) to 129,600 seconds
+ // (36 hours), with 43,200 seconds (12 hours) as the default. Sessions obtained
+ // using root user credentials are restricted to a maximum of 3,600 seconds (one
+ // hour). If the specified duration is longer than one hour, the session obtained
+ // by using root user credentials defaults to one hour.
DurationSeconds *int32
// An IAM policy in JSON format that you want to use as an inline session policy.
- // You must pass an inline or managed session policy
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// to this operation. You can pass a single JSON policy document to use as an
- // inline session policy. You can also specify up to 10 managed policies to use as
- // managed session policies. This parameter is optional. However, if you do not
- // pass any session policies, then the resulting federated user session has no
- // permissions. When you pass session policies, the session permissions are the
- // intersection of the IAM user policies and the session policies that you pass.
- // This gives you a way to further restrict the permissions for a federated user.
- // You cannot use session policies to grant more permissions than those that are
- // defined in the permissions policy of the IAM user. For more information, see
- // Session Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // inline session policy. You can also specify up to 10 managed policy Amazon
+ // Resource Names (ARNs) to use as managed session policies. This parameter is
+ // optional. However, if you do not pass any session policies, then the resulting
+ // federated user session has no permissions. When you pass session policies, the
+ // session permissions are the intersection of the IAM user policies and the
+ // session policies that you pass. This gives you a way to further restrict the
+ // permissions for a federated user. You cannot use session policies to grant more
+ // permissions than those that are defined in the permissions policy of the IAM
+ // user. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. The resulting credentials can be used to access a
// resource that has a resource-based policy. If that policy specifically
// references the federated user session in the Principal element of the policy,
@@ -155,68 +140,64 @@ type GetFederationTokenInput struct {
// from the space character to the end of the valid character list (\u0020 through
// \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
// return (\u000D) characters. An Amazon Web Services conversion compresses the
- // passed session policies and session tags into a packed binary format that has a
- // separate limit. Your request can fail for this limit even if your plaintext
- // meets the other requirements. The PackedPolicySize response element indicates by
- // percentage how close the policies and tags for your request are to the upper
- // size limit.
+ // passed inline session policy, managed policy ARNs, and session tags into a
+ // packed binary format that has a separate limit. Your request can fail for this
+ // limit even if your plaintext meets the other requirements. The PackedPolicySize
+ // response element indicates by percentage how close the policies and tags for
+ // your request are to the upper size limit.
Policy *string
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
// use as a managed session policy. The policies must exist in the same account as
// the IAM user that is requesting federated access. You must pass an inline or
- // managed session policy
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// to this operation. You can pass a single JSON policy document to use as an
- // inline session policy. You can also specify up to 10 managed policies to use as
- // managed session policies. The plaintext that you use for both inline and managed
- // session policies can't exceed 2,048 characters. You can provide up to 10 managed
- // policy ARNs. For more information about ARNs, see Amazon Resource Names (ARNs)
- // and Amazon Web Services Service Namespaces
- // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
- // the Amazon Web Services General Reference. This parameter is optional. However,
- // if you do not pass any session policies, then the resulting federated user
- // session has no permissions. When you pass session policies, the session
+ // inline session policy. You can also specify up to 10 managed policy Amazon
+ // Resource Names (ARNs) to use as managed session policies. The plaintext that you
+ // use for both inline and managed session policies can't exceed 2,048 characters.
+ // You can provide up to 10 managed policy ARNs. For more information about ARNs,
+ // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+ // in the Amazon Web Services General Reference. This parameter is optional.
+ // However, if you do not pass any session policies, then the resulting federated
+ // user session has no permissions. When you pass session policies, the session
// permissions are the intersection of the IAM user policies and the session
// policies that you pass. This gives you a way to further restrict the permissions
// for a federated user. You cannot use session policies to grant more permissions
// than those that are defined in the permissions policy of the IAM user. For more
- // information, see Session Policies
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. The resulting credentials can be used to access a
// resource that has a resource-based policy. If that policy specifically
// references the federated user session in the Principal element of the policy,
// the session has the permissions allowed by the policy. These permissions are
// granted in addition to the permissions that are granted by the session policies.
- // An Amazon Web Services conversion compresses the passed session policies and
- // session tags into a packed binary format that has a separate limit. Your request
- // can fail for this limit even if your plaintext meets the other requirements. The
- // PackedPolicySize response element indicates by percentage how close the policies
- // and tags for your request are to the upper size limit.
+ // An Amazon Web Services conversion compresses the passed inline session policy,
+ // managed policy ARNs, and session tags into a packed binary format that has a
+ // separate limit. Your request can fail for this limit even if your plaintext
+ // meets the other requirements. The PackedPolicySize response element indicates
+ // by percentage how close the policies and tags for your request are to the upper
+ // size limit.
PolicyArns []types.PolicyDescriptorType
// A list of session tags. Each session tag consists of a key name and an
// associated value. For more information about session tags, see Passing Session
- // Tags in STS
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
- // IAM User Guide. This parameter is optional. You can pass up to 50 session tags.
- // The plaintext session tag keys can’t exceed 128 characters and the values can’t
- // exceed 256 characters. For these and additional limits, see IAM and STS
- // Character Limits
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+ // in the IAM User Guide. This parameter is optional. You can pass up to 50 session
+ // tags. The plaintext session tag keys can’t exceed 128 characters and the values
+ // can’t exceed 256 characters. For these and additional limits, see IAM and STS
+ // Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
- // session policies and session tags into a packed binary format that has a
- // separate limit. Your request can fail for this limit even if your plaintext
- // meets the other requirements. The PackedPolicySize response element indicates by
- // percentage how close the policies and tags for your request are to the upper
- // size limit. You can pass a session tag with the same key as a tag that is
- // already attached to the user you are federating. When you do, session tags
- // override a user tag with the same key. Tag key–value pairs are not case
- // sensitive, but case is preserved. This means that you cannot have separate
- // Department and department tag keys. Assume that the role has the
- // Department=Marketing tag and you pass the department=engineering session tag.
- // Department and department are not saved as separate tags, and the session tag
- // passed in the request takes precedence over the role tag.
+ // inline session policy, managed policy ARNs, and session tags into a packed
+ // binary format that has a separate limit. Your request can fail for this limit
+ // even if your plaintext meets the other requirements. The PackedPolicySize
+ // response element indicates by percentage how close the policies and tags for
+ // your request are to the upper size limit. You can pass a session tag with the
+ // same key as a tag that is already attached to the user you are federating. When
+ // you do, session tags override a user tag with the same key. Tag key–value pairs
+ // are not case sensitive, but case is preserved. This means that you cannot have
+ // separate Department and department tag keys. Assume that the role has the
+ // Department = Marketing tag and you pass the department = engineering session
+ // tag. Department and department are not saved as separate tags, and the session
+ // tag passed in the request takes precedence over the role tag.
Tags []types.Tag
noSmithyDocumentSerde
@@ -234,7 +215,7 @@ type GetFederationTokenOutput struct {
Credentials *types.Credentials
// Identifiers for the federated user associated with the credentials (such as
- // arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob). You can use
+ // arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob ). You can use
// the federated user's ARN in your resource-based policies, such as an Amazon S3
// bucket policy.
FederatedUser *types.FederatedUser
@@ -252,6 +233,9 @@ type GetFederationTokenOutput struct {
}
func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetFederationToken{}, middleware.After)
if err != nil {
return err
@@ -260,34 +244,38 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFederationToken"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -296,12 +284,18 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFederationToken(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -311,6 +305,9 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -318,7 +315,6 @@ func newServiceMetadataMiddleware_opGetFederationToken(region string) *awsmiddle
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "GetFederationToken",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
index b292f208..751fb147 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
@@ -4,61 +4,53 @@ package sts
import (
"context"
+ "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns a set of temporary credentials for an Amazon Web Services account or IAM
-// user. The credentials consist of an access key ID, a secret access key, and a
-// security token. Typically, you use GetSessionToken if you want to use MFA to
+// Returns a set of temporary credentials for an Amazon Web Services account or
+// IAM user. The credentials consist of an access key ID, a secret access key, and
+// a security token. Typically, you use GetSessionToken if you want to use MFA to
// protect programmatic calls to specific Amazon Web Services API operations like
-// Amazon EC2 StopInstances. MFA-enabled IAM users would need to call
-// GetSessionToken and submit an MFA code that is associated with their MFA device.
-// Using the temporary security credentials that are returned from the call, IAM
-// users can then make programmatic calls to API operations that require MFA
-// authentication. If you do not supply a correct MFA code, then the API returns an
-// access denied error. For a comparison of GetSessionToken with the other API
-// operations that produce temporary credentials, see Requesting Temporary Security
-// Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// Amazon EC2 StopInstances . MFA-enabled IAM users must call GetSessionToken and
+// submit an MFA code that is associated with their MFA device. Using the temporary
+// security credentials that the call returns, IAM users can then make programmatic
+// calls to API operations that require MFA authentication. An incorrect MFA code
+// causes the API to return an access denied error. For a comparison of
+// GetSessionToken with the other API operations that produce temporary
+// credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// in the IAM User Guide. No permissions are required for users to perform this
+// operation. The purpose of the sts:GetSessionToken operation is to authenticate
+// the user using MFA. You cannot use policies to control authentication
+// operations. For more information, see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html)
// in the IAM User Guide. Session Duration The GetSessionToken operation must be
-// called by using the long-term Amazon Web Services security credentials of the
-// Amazon Web Services account root user or an IAM user. Credentials that are
-// created by IAM users are valid for the duration that you specify. This duration
-// can range from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
-// hours), with a default of 43,200 seconds (12 hours). Credentials based on
-// account credentials can range from 900 seconds (15 minutes) up to 3,600 seconds
-// (1 hour), with a default of 1 hour. Permissions The temporary security
-// credentials created by GetSessionToken can be used to make API calls to any
-// Amazon Web Services service with the following exceptions:
+// called by using the long-term Amazon Web Services security credentials of an IAM
+// user. Credentials that are created by IAM users are valid for the duration that
+// you specify. This duration can range from 900 seconds (15 minutes) up to a
+// maximum of 129,600 seconds (36 hours), with a default of 43,200 seconds (12
+// hours). Credentials based on account credentials can range from 900 seconds (15
+// minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. Permissions The
+// temporary security credentials created by GetSessionToken can be used to make
+// API calls to any Amazon Web Services service with the following exceptions:
+// - You cannot call any IAM API operations unless MFA authentication
+// information is included in the request.
+// - You cannot call any STS API except AssumeRole or GetCallerIdentity .
//
-// * You cannot call
-// any IAM API operations unless MFA authentication information is included in the
-// request.
-//
-// * You cannot call any STS API except AssumeRole or
-// GetCallerIdentity.
-//
-// We recommend that you do not call GetSessionToken with
-// Amazon Web Services account root user credentials. Instead, follow our best
-// practices
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users)
-// by creating one or more IAM users, giving them the necessary permissions, and
-// using IAM users for everyday interaction with Amazon Web Services. The
-// credentials that are returned by GetSessionToken are based on permissions
-// associated with the user whose credentials were used to call the operation. If
-// GetSessionToken is called using Amazon Web Services account root user
-// credentials, the temporary credentials have root user permissions. Similarly, if
-// GetSessionToken is called using the credentials of an IAM user, the temporary
-// credentials have the same permissions as the IAM user. For more information
-// about using GetSessionToken to create temporary credentials, go to Temporary
-// Credentials for Users in Untrusted Environments
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken)
+// The credentials that GetSessionToken returns are based on permissions
+// associated with the IAM user whose credentials were used to call the operation.
+// The temporary credentials have the same permissions as the IAM user. Although it
+// is possible to call GetSessionToken using the security credentials of an Amazon
+// Web Services account root user rather than an IAM user, we do not recommend it.
+// If GetSessionToken is called using root user credentials, the temporary
+// credentials have root user permissions. For more information, see Safeguard
+// your root user credentials and don't use them for everyday tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)
+// in the IAM User Guide For more information about using GetSessionToken to
+// create temporary credentials, see Temporary Credentials for Users in Untrusted
+// Environments (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken)
// in the IAM User Guide.
func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) {
if params == nil {
@@ -85,25 +77,25 @@ type GetSessionTokenInput struct {
// Services account owners defaults to one hour.
DurationSeconds *int32
- // The identification number of the MFA device that is associated with the IAM user
- // who is making the GetSessionToken call. Specify this value if the IAM user has a
- // policy that requires MFA authentication. The value is either the serial number
- // for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN)
- // for a virtual device (such as arn:aws:iam::123456789012:mfa/user). You can find
- // the device for an IAM user by going to the Amazon Web Services Management
- // Console and viewing the user's security credentials. The regex used to validate
- // this parameter is a string of characters consisting of upper- and lower-case
- // alphanumeric characters with no spaces. You can also include underscores or any
- // of the following characters: =,.@:/-
+ // The identification number of the MFA device that is associated with the IAM
+ // user who is making the GetSessionToken call. Specify this value if the IAM user
+ // has a policy that requires MFA authentication. The value is either the serial
+ // number for a hardware device (such as GAHT12345678 ) or an Amazon Resource Name
+ // (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user ). You
+ // can find the device for an IAM user by going to the Amazon Web Services
+ // Management Console and viewing the user's security credentials. The regex used
+ // to validate this parameter is a string of characters consisting of upper- and
+ // lower-case alphanumeric characters with no spaces. You can also include
+ // underscores or any of the following characters: =,.@:/-
SerialNumber *string
- // The value provided by the MFA device, if MFA is required. If any policy requires
- // the IAM user to submit an MFA code, specify this value. If MFA authentication is
- // required, the user must provide a code when requesting a set of temporary
- // security credentials. A user who fails to provide the code receives an "access
- // denied" response when requesting resources that require MFA authentication. The
- // format for this parameter, as described by its regex pattern, is a sequence of
- // six numeric digits.
+ // The value provided by the MFA device, if MFA is required. If any policy
+ // requires the IAM user to submit an MFA code, specify this value. If MFA
+ // authentication is required, the user must provide a code when requesting a set
+ // of temporary security credentials. A user who fails to provide the code receives
+ // an "access denied" response when requesting resources that require MFA
+ // authentication. The format for this parameter, as described by its regex
+ // pattern, is a sequence of six numeric digits.
TokenCode *string
noSmithyDocumentSerde
@@ -127,6 +119,9 @@ type GetSessionTokenOutput struct {
}
func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSessionToken{}, middleware.After)
if err != nil {
return err
@@ -135,34 +130,38 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
if err != nil {
return err
}
- if err = addSetLoggerMiddleware(stack, options); err != nil {
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetSessionToken"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ if err = addClientRequestID(stack); err != nil {
return err
}
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ if err = addComputeContentLength(stack); err != nil {
return err
}
- if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
- if err = addRetryMiddlewares(stack, options); err != nil {
+ if err = addComputePayloadSHA256(stack); err != nil {
return err
}
- if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ if err = addRetry(stack, options); err != nil {
return err
}
- if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ if err = addRawResponseToMetadata(stack); err != nil {
return err
}
- if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ if err = addRecordResponseTiming(stack); err != nil {
return err
}
- if err = addClientUserAgent(stack); err != nil {
+ if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
@@ -171,9 +170,15 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil {
return err
}
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
@@ -183,6 +188,9 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
return nil
}
@@ -190,7 +198,6 @@ func newServiceMetadataMiddleware_opGetSessionToken(region string) *awsmiddlewar
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
- SigningName: "sts",
OperationName: "GetSessionToken",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
new file mode 100644
index 00000000..9db5bfd4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
@@ -0,0 +1,296 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) {
+ params.Region = options.Region
+}
+
+type setLegacyContextSigningOptionsMiddleware struct {
+}
+
+func (*setLegacyContextSigningOptionsMiddleware) ID() string {
+ return "setLegacyContextSigningOptions"
+}
+
+func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
+ }
+ }
+
+ if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
+}
+
+type withAnonymous struct {
+ resolver AuthSchemeResolver
+}
+
+var _ AuthSchemeResolver = (*withAnonymous)(nil)
+
+func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ opts = append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ })
+ return opts, nil
+}
+
+func wrapWithAnonymousAuth(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &withAnonymous{
+ resolver: options.AuthSchemeResolver,
+ }
+}
+
+// AuthResolverParameters contains the set of inputs necessary for auth scheme
+// resolution.
+type AuthResolverParameters struct {
+ // The name of the operation being invoked.
+ Operation string
+
+ // The region in which the operation is being invoked.
+ Region string
+}
+
+func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters {
+ params := &AuthResolverParameters{
+ Operation: operation,
+ }
+
+ bindAuthParamsRegion(params, input, options)
+
+ return params
+}
+
+// AuthSchemeResolver returns a set of possible authentication options for an
+// operation.
+type AuthSchemeResolver interface {
+ ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
+}
+
+type defaultAuthSchemeResolver struct{}
+
+var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
+
+func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ if overrides, ok := operationAuthOptions[params.Operation]; ok {
+ return overrides(params), nil
+ }
+ return serviceAuthOptions(params), nil
+}
+
+var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{
+ "AssumeRoleWithSAML": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+
+ "AssumeRoleWithWebIdentity": func(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {SchemeID: smithyauth.SchemeIDAnonymous},
+ }
+ },
+}
+
+func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "sts")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ return props
+ }(),
+ },
+ }
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options)
+ options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
+ }
+
+ scheme, ok := m.selectScheme(options)
+ if !ok {
+ return out, metadata, fmt.Errorf("could not select an auth scheme")
+ }
+
+ ctx = setResolvedAuthScheme(ctx, scheme)
+ return next.HandleFinalize(ctx, in)
+}
+
+func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
+ for _, option := range options {
+ if option.SchemeID == smithyauth.SchemeIDAnonymous {
+ return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
+ }
+
+ for _, scheme := range m.options.AuthSchemes {
+ if scheme.SchemeID() != option.SchemeID {
+ continue
+ }
+
+ if scheme.IdentityResolver(m.options) != nil {
+ return newResolvedAuthScheme(scheme, option), true
+ }
+ }
+ }
+
+ return nil, false
+}
+
+type resolvedAuthSchemeKey struct{}
+
+type resolvedAuthScheme struct {
+ Scheme smithyhttp.AuthScheme
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
+ return &resolvedAuthScheme{
+ Scheme: scheme,
+ IdentityProperties: option.IdentityProperties,
+ SignerProperties: option.SignerProperties,
+ }
+}
+
+func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
+ return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
+}
+
+func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
+ v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
+ return v
+}
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ resolver := rscheme.Scheme.IdentityResolver(m.options)
+ if resolver == nil {
+ return out, metadata, fmt.Errorf("no identity resolver")
+ }
+
+ identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties)
+ if err != nil {
+ return out, metadata, fmt.Errorf("get identity: %w", err)
+ }
+
+ ctx = setIdentity(ctx, identity)
+ return next.HandleFinalize(ctx, in)
+}
+
+type identityKey struct{}
+
+func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
+ return middleware.WithStackValue(ctx, identityKey{}, identity)
+}
+
+func getIdentity(ctx context.Context) smithyauth.Identity {
+ v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
+ return v
+}
+
+type signRequestMiddleware struct {
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ identity := getIdentity(ctx)
+ if identity == nil {
+ return out, metadata, fmt.Errorf("no identity")
+ }
+
+ signer := rscheme.Scheme.Signer()
+ if signer == nil {
+ return out, metadata, fmt.Errorf("no signer")
+ }
+
+ if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil {
+ return out, metadata, fmt.Errorf("sign request: %w", err)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go
index 7cabbb97..d963fd8d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go
@@ -4,9 +4,8 @@
// Security Token Service.
//
// Security Token Service Security Token Service (STS) enables you to request
-// temporary, limited-privilege credentials for Identity and Access Management
-// (IAM) users or for users that you authenticate (federated users). This guide
-// provides descriptions of the STS API. For more information about using this
-// service, see Temporary Security Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
+// temporary, limited-privilege credentials for users. This guide provides
+// descriptions of the STS API. For more information about using this service, see
+// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
+// .
package sts
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
index cababea2..32e2d543 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
@@ -8,10 +8,19 @@ import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
internalendpoints "github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
"github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
"net/url"
+ "os"
"strings"
)
@@ -39,13 +48,6 @@ func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointRe
return fn(region, options)
}
-func resolveDefaultEndpointConfiguration(o *Options) {
- if o.EndpointResolver != nil {
- return
- }
- o.EndpointResolver = NewDefaultEndpointResolver()
-}
-
// EndpointResolverFromURL returns an EndpointResolver configured using the
// provided endpoint url. By default, the resolved endpoint resolver uses the
// client region as signing region, and the endpoint source is set to
@@ -79,6 +81,10 @@ func (*ResolveEndpoint) ID() string {
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
@@ -94,6 +100,11 @@ func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.Ser
var endpoint aws.Endpoint
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
}
@@ -129,27 +140,10 @@ func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
type wrappedEndpointResolver struct {
awsResolver aws.EndpointResolverWithOptions
- resolver EndpointResolver
}
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- if w.awsResolver == nil {
- goto fallback
- }
- endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
- if err == nil {
- return endpoint, nil
- }
-
- if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
- return endpoint, err
- }
-
-fallback:
- if w.resolver == nil {
- return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
- }
- return w.resolver.ResolveEndpoint(region, options)
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
}
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
@@ -160,12 +154,13 @@ func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, opti
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
-// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
-// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
-// fallbackResolver for resolution.
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
//
-// fallbackResolver must not be nil
-func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
@@ -176,7 +171,6 @@ func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptio
return &wrappedEndpointResolver{
awsResolver: resolver,
- resolver: fallbackResolver,
}
}
@@ -198,3 +192,924 @@ func finalizeClientEndpointResolverOptions(options *Options) {
}
}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+func resolveBaseEndpoint(cfg aws.Config, o *Options) {
+ if cfg.BaseEndpoint != nil {
+ o.BaseEndpoint = cfg.BaseEndpoint
+ }
+
+ _, g := os.LookupEnv("AWS_ENDPOINT_URL")
+ _, s := os.LookupEnv("AWS_ENDPOINT_URL_STS")
+
+ if g && !s {
+ return
+ }
+
+ value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "STS", cfg.ConfigSources)
+ if found && err == nil {
+ o.BaseEndpoint = &value
+ }
+}
+
+func bindRegion(region string) *string {
+ if region == "" {
+ return nil
+ }
+ return aws.String(endpoints.MapFIPSRegion(region))
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+
+ // Whether the global endpoint should be used, rather then the regional endpoint
+ // for us-east-1.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::STS::UseGlobalEndpoint
+ UseGlobalEndpoint *bool
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ if p.UseGlobalEndpoint == nil {
+ return fmt.Errorf("parameter UseGlobalEndpoint is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+
+ if p.UseGlobalEndpoint == nil {
+ p.UseGlobalEndpoint = ptr.Bool(false)
+ }
+ return p
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseDualStack := *params.UseDualStack
+ _UseFIPS := *params.UseFIPS
+ _UseGlobalEndpoint := *params.UseGlobalEndpoint
+
+ if _UseGlobalEndpoint == true {
+ if !(params.Endpoint != nil) {
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == false {
+ if _UseDualStack == false {
+ if _Region == "ap-northeast-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "ap-south-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "ap-southeast-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "ap-southeast-2" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "aws-global" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "ca-central-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "eu-central-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "eu-north-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "eu-west-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "eu-west-2" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "eu-west-3" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "sa-east-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "us-east-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "us-east-2" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "us-west-1" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ if _Region == "us-west-2" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sts.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ }
+ }
+ }
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
+ }
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
+ }
+ uriString := _Endpoint
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sts-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
+ }
+ }
+ if _UseFIPS == true {
+ if _PartitionResult.SupportsFIPS == true {
+ if _PartitionResult.Name == "aws-us-gov" {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sts.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sts-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
+ }
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sts.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
+ }
+ if _Region == "aws-global" {
+ uriString := "https://sts.amazonaws.com"
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetSigV4SigningName(&sp, "sts")
+ smithyhttp.SetSigV4ASigningName(&sp, "sts")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://sts.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
+}
+
+type endpointParamsBinder interface {
+ bindEndpointParams(*EndpointParameters)
+}
+
+func bindEndpointParams(input interface{}, options Options) *EndpointParameters {
+ params := &EndpointParameters{}
+
+ params.Region = bindRegion(options.Region)
+ params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
+ params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
+ params.Endpoint = options.BaseEndpoint
+
+ if b, ok := input.(endpointParamsBinder); ok {
+ b.bindEndpointParams(params)
+ }
+
+ return params
+}
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.options.EndpointResolverV2 == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := bindEndpointParams(getOperationInput(ctx), m.options)
+ endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
+ endpt.URI.RawPath = endpt.URI.Path
+ }
+ req.URL.Scheme = endpt.URI.Scheme
+ req.URL.Host = endpt.URI.Host
+ req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
+ req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
+ for k := range endpt.Headers {
+ req.Header.Set(k, endpt.Headers.Get(k))
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
+ for _, o := range opts {
+ rscheme.SignerProperties.SetAll(&o.SignerProperties)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
index 86341bb7..6b6e839e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
@@ -3,6 +3,7 @@
"github.com/aws/aws-sdk-go-v2": "v1.4.0",
"github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
"github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding": "v1.0.5",
"github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7",
"github.com/aws/smithy-go": "v1.4.0"
},
@@ -17,14 +18,19 @@
"api_op_GetCallerIdentity.go",
"api_op_GetFederationToken.go",
"api_op_GetSessionToken.go",
+ "auth.go",
"deserializers.go",
"doc.go",
"endpoints.go",
+ "endpoints_config_test.go",
+ "endpoints_test.go",
"generated.json",
"internal/endpoints/endpoints.go",
"internal/endpoints/endpoints_test.go",
+ "options.go",
"protocol_test.go",
"serializers.go",
+ "snapshot_test.go",
"types/errors.go",
"types/types.go",
"validators.go"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
index c81e72b7..16408ae0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
@@ -3,4 +3,4 @@
package sts
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.16.3"
+const goModuleVersion = "1.28.4"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
index 28ed441b..3dbd993b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
@@ -89,13 +89,17 @@ var partitionRegexp = struct {
AwsCn *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
AwsUsGov *regexp.Regexp
}{
- Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
}
@@ -153,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ap-south-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-1",
}: endpoints.Endpoint{},
@@ -162,6 +169,9 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ap-southeast-3",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "aws-global",
}: endpoints.Endpoint{
@@ -173,15 +183,24 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-south-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
@@ -191,6 +210,12 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "eu-west-3",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
@@ -369,6 +394,48 @@ var defaultPartitions = endpoints.Partitions{
}: endpoints.Endpoint{},
},
},
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ },
{
ID: "aws-us-gov",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
new file mode 100644
index 00000000..5c1be79f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
@@ -0,0 +1,217 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+)
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
+ // endpoint, set the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service operation. This should be
+ // used over the deprecated EndpointResolver.
+ EndpointResolverV2 EndpointResolverV2
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. If specified in an operation call's
+ // functional options with a value that is different than the constructed client's
+ // Options, the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // The auth scheme resolver which determines how to authenticate for each
+ // operation.
+ AuthSchemeResolver AuthSchemeResolver
+
+ // The list of auth schemes supported by the client.
+ AuthSchemes []smithyhttp.AuthScheme
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+
+func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
+ if schemeID == "aws.auth#sigv4" {
+ return getSigV4IdentityResolver(o)
+ }
+ if schemeID == "smithy.api#noAuth" {
+ return &smithyauth.AnonymousIdentityResolver{}
+ }
+ return nil
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
+ }
+ return nil
+}
+
+// WithSigV4SigningName applies an override to the authentication workflow to
+// use the given signing name for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing name from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningName(name string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+// WithSigV4SigningRegion applies an override to the authentication workflow to
+// use the given signing region for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningRegion(region string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func ignoreAnonymousAuth(options *Options) {
+ if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
+ options.Credentials = nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
index 05531d36..4c08061c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
@@ -523,9 +523,6 @@ func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Con
return next.HandleSerialize(ctx, in)
}
func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
array := value.Array("member")
for i := range v {
@@ -549,6 +546,35 @@ func awsAwsquery_serializeDocumentPolicyDescriptorType(v *types.PolicyDescriptor
return nil
}
+func awsAwsquery_serializeDocumentProvidedContext(v *types.ProvidedContext, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ContextAssertion != nil {
+ objectKey := object.Key("ContextAssertion")
+ objectKey.String(*v.ContextAssertion)
+ }
+
+ if v.ProviderArn != nil {
+ objectKey := object.Key("ProviderArn")
+ objectKey.String(*v.ProviderArn)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentProvidedContextsListType(v []types.ProvidedContext, value query.Value) error {
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentProvidedContext(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error {
object := value.Object()
_ = object
@@ -567,9 +593,6 @@ func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error {
}
func awsAwsquery_serializeDocumentTagKeyListType(v []string, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
array := value.Array("member")
for i := range v {
@@ -580,9 +603,6 @@ func awsAwsquery_serializeDocumentTagKeyListType(v []string, value query.Value)
}
func awsAwsquery_serializeDocumentTagListType(v []types.Tag, value query.Value) error {
- if len(v) == 0 {
- return nil
- }
array := value.Array("member")
for i := range v {
@@ -620,6 +640,13 @@ func awsAwsquery_serializeOpDocumentAssumeRoleInput(v *AssumeRoleInput, value qu
}
}
+ if v.ProvidedContexts != nil {
+ objectKey := object.Key("ProvidedContexts")
+ if err := awsAwsquery_serializeDocumentProvidedContextsListType(v.ProvidedContexts, objectKey); err != nil {
+ return err
+ }
+ }
+
if v.RoleArn != nil {
objectKey := object.Key("RoleArn")
objectKey.String(*v.RoleArn)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
index b109fe5f..097875b2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
@@ -12,6 +12,8 @@ import (
type ExpiredTokenException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -24,7 +26,12 @@ func (e *ExpiredTokenException) ErrorMessage() string {
}
return *e.Message
}
-func (e *ExpiredTokenException) ErrorCode() string { return "ExpiredTokenException" }
+func (e *ExpiredTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ExpiredTokenException"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request could not be fulfilled because the identity provider (IDP) that was
@@ -35,6 +42,8 @@ func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.F
type IDPCommunicationErrorException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -47,7 +56,12 @@ func (e *IDPCommunicationErrorException) ErrorMessage() string {
}
return *e.Message
}
-func (e *IDPCommunicationErrorException) ErrorCode() string { return "IDPCommunicationError" }
+func (e *IDPCommunicationErrorException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "IDPCommunicationError"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *IDPCommunicationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The identity provider (IdP) reported that authentication failed. This might be
@@ -57,6 +71,8 @@ func (e *IDPCommunicationErrorException) ErrorFault() smithy.ErrorFault { return
type IDPRejectedClaimException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -69,7 +85,12 @@ func (e *IDPRejectedClaimException) ErrorMessage() string {
}
return *e.Message
}
-func (e *IDPRejectedClaimException) ErrorCode() string { return "IDPRejectedClaim" }
+func (e *IDPRejectedClaimException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "IDPRejectedClaim"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The error returned if the message passed to DecodeAuthorizationMessage was
@@ -78,6 +99,8 @@ func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smit
type InvalidAuthorizationMessageException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -91,7 +114,10 @@ func (e *InvalidAuthorizationMessageException) ErrorMessage() string {
return *e.Message
}
func (e *InvalidAuthorizationMessageException) ErrorCode() string {
- return "InvalidAuthorizationMessageException"
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidAuthorizationMessageException"
+ }
+ return *e.ErrorCodeOverride
}
func (e *InvalidAuthorizationMessageException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
@@ -103,6 +129,8 @@ func (e *InvalidAuthorizationMessageException) ErrorFault() smithy.ErrorFault {
type InvalidIdentityTokenException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -115,7 +143,12 @@ func (e *InvalidIdentityTokenException) ErrorMessage() string {
}
return *e.Message
}
-func (e *InvalidIdentityTokenException) ErrorCode() string { return "InvalidIdentityToken" }
+func (e *InvalidIdentityTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidIdentityToken"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *InvalidIdentityTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request was rejected because the policy document was malformed. The error
@@ -123,6 +156,8 @@ func (e *InvalidIdentityTokenException) ErrorFault() smithy.ErrorFault { return
type MalformedPolicyDocumentException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -135,7 +170,12 @@ func (e *MalformedPolicyDocumentException) ErrorMessage() string {
}
return *e.Message
}
-func (e *MalformedPolicyDocumentException) ErrorCode() string { return "MalformedPolicyDocument" }
+func (e *MalformedPolicyDocumentException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "MalformedPolicyDocument"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request was rejected because the total packed size of the session policies
@@ -143,16 +183,16 @@ func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { retu
// compresses the session policy document, session policy ARNs, and session tags
// into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper size
-// limit. For more information, see Passing Session Tags in STS
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
-// IAM User Guide. You could receive this error even though you meet other defined
-// session policy and session tag limits. For more information, see IAM and STS
-// Entity Character Limits
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
+// limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide. You could receive this error even though you meet other
+// defined session policy and session tag limits. For more information, see IAM
+// and STS Entity Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
// in the IAM User Guide.
type PackedPolicyTooLargeException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -165,18 +205,24 @@ func (e *PackedPolicyTooLargeException) ErrorMessage() string {
}
return *e.Message
}
-func (e *PackedPolicyTooLargeException) ErrorCode() string { return "PackedPolicyTooLarge" }
+func (e *PackedPolicyTooLargeException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "PackedPolicyTooLarge"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-// STS is not activated in the requested region for the account that is being asked
-// to generate credentials. The account administrator must use the IAM console to
-// activate STS in that region. For more information, see Activating and
-// Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// STS is not activated in the requested region for the account that is being
+// asked to generate credentials. The account administrator must use the IAM
+// console to activate STS in that region. For more information, see Activating
+// and Deactivating Amazon Web Services STS in an Amazon Web Services Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
type RegionDisabledException struct {
Message *string
+ ErrorCodeOverride *string
+
noSmithyDocumentSerde
}
@@ -189,5 +235,10 @@ func (e *RegionDisabledException) ErrorMessage() string {
}
return *e.Message
}
-func (e *RegionDisabledException) ErrorCode() string { return "RegionDisabledException" }
+func (e *RegionDisabledException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "RegionDisabledException"
+ }
+ return *e.ErrorCodeOverride
+}
func (e *RegionDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go
index 86e50990..e3701d11 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go
@@ -13,9 +13,8 @@ type AssumedRoleUser struct {
// The ARN of the temporary security credentials that are returned from the
// AssumeRole action. For more information about ARNs and how to use them in
- // policies, see IAM Identifiers
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) in
- // the IAM User Guide.
+ // policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
+ // in the IAM User Guide.
//
// This member is required.
Arn *string
@@ -62,9 +61,8 @@ type FederatedUser struct {
// The ARN that specifies the federated user that is associated with the
// credentials. For more information about ARNs and how to use them in policies,
- // see IAM Identifiers
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) in
- // the IAM User Guide.
+ // see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
+ // in the IAM User Guide.
//
// This member is required.
Arn *string
@@ -84,26 +82,39 @@ type PolicyDescriptorType struct {
// The Amazon Resource Name (ARN) of the IAM managed policy to use as a session
// policy for the role. For more information about ARNs, see Amazon Resource Names
- // (ARNs) and Amazon Web Services Service Namespaces
- // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
- // the Amazon Web Services General Reference.
+ // (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+ // in the Amazon Web Services General Reference.
Arn *string
noSmithyDocumentSerde
}
-// You can pass custom key-value pair attributes when you assume a role or federate
-// a user. These are called session tags. You can then use the session tags to
-// control access to resources. For more information, see Tagging Amazon Web
-// Services STS Sessions
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
-// IAM User Guide.
+// Contains information about the provided context. This includes the signed and
+// encrypted trusted context assertion and the context provider ARN from which the
+// trusted context assertion was generated.
+type ProvidedContext struct {
+
+ // The signed and encrypted trusted context assertion generated by the context
+ // provider. The trusted context assertion is signed and encrypted by Amazon Web
+ // Services STS.
+ ContextAssertion *string
+
+ // The context provider ARN from which the trusted context assertion was generated.
+ ProviderArn *string
+
+ noSmithyDocumentSerde
+}
+
+// You can pass custom key-value pair attributes when you assume a role or
+// federate a user. These are called session tags. You can then use the session
+// tags to control access to resources. For more information, see Tagging Amazon
+// Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
type Tag struct {
// The key for a session tag. You can pass up to 50 session tags. The plain text
// session tag keys can’t exceed 128 characters. For these and additional limits,
- // see IAM and STS Character Limits
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
// in the IAM User Guide.
//
// This member is required.
@@ -111,8 +122,7 @@ type Tag struct {
// The value for a session tag. You can pass up to 50 session tags. The plain text
// session tag values can’t exceed 256 characters. For these and additional limits,
- // see IAM and STS Character Limits
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
// in the IAM User Guide.
//
// This member is required.
diff --git a/vendor/github.com/aws/smithy-go/.gitignore b/vendor/github.com/aws/smithy-go/.gitignore
index c01141aa..2518b349 100644
--- a/vendor/github.com/aws/smithy-go/.gitignore
+++ b/vendor/github.com/aws/smithy-go/.gitignore
@@ -20,3 +20,10 @@ target/
build/
*/out/
*/*/out/
+
+# VS Code
+bin/
+.vscode/
+
+# make
+c.out
diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md
index a5b73cf6..b8d6561a 100644
--- a/vendor/github.com/aws/smithy-go/CHANGELOG.md
+++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md
@@ -1,3 +1,111 @@
+# Release (2024-02-21)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.20.1
+ * **Bug Fix**: Remove runtime dependency on go-cmp.
+
+# Release (2024-02-13)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.20.0
+ * **Feature**: Add codegen definition for sigv4a trait.
+ * **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+
+# Release (2023-12-07)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.19.0
+ * **Feature**: Support modeled request compression.
+
+# Release (2023-11-30)
+
+* No change notes available for this release.
+
+# Release (2023-11-29)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.18.0
+ * **Feature**: Expose Options() method on generated service clients.
+
+# Release (2023-11-15)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.17.0
+ * **Feature**: Support identity/auth components of client reference architecture.
+
+# Release (2023-10-31)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.16.0
+ * **Feature**: **LANG**: Bump minimum go version to 1.19.
+
+# Release (2023-10-06)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.15.0
+ * **Feature**: Add `http.WithHeaderComment` middleware.
+
+# Release (2023-08-18)
+
+* No change notes available for this release.
+
+# Release (2023-08-07)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.14.1
+ * **Bug Fix**: Prevent duplicated error returns in EndpointResolverV2 default implementation.
+
+# Release (2023-07-31)
+
+## General Highlights
+* **Feature**: Adds support for smithy-modeled endpoint resolution.
+
+# Release (2022-12-02)
+
+* No change notes available for this release.
+
+# Release (2022-10-24)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.13.4
+ * **Bug Fix**: fixed document type checking for encoding nested types
+
+# Release (2022-09-14)
+
+* No change notes available for this release.
+
+# Release (v1.13.2)
+
+* No change notes available for this release.
+
+# Release (v1.13.1)
+
+* No change notes available for this release.
+
+# Release (v1.13.0)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.13.0
+ * **Feature**: Adds support for the Smithy httpBearerAuth authentication trait to smithy-go. This allows the SDK to support the bearer authentication flow for API operations decorated with httpBearerAuth. An API client will need to be provided with its own bearer.TokenProvider implementation or use the bearer.StaticTokenProvider implementation.
+
+# Release (v1.12.1)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.12.1
+ * **Bug Fix**: Fixes a bug where JSON object keys were not escaped.
+
+# Release (v1.12.0)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.12.0
+ * **Feature**: `transport/http`: Add utility for setting context metadata when operation serializer automatically assigns content-type default value.
+
+# Release (v1.11.3)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.11.3
+ * **Dependency Update**: Updates smithy-go unit test dependency go-cmp to 0.5.8.
+
# Release (v1.11.2)
* No change notes available for this release.
diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile
index b8c65743..e66fa8ca 100644
--- a/vendor/github.com/aws/smithy-go/Makefile
+++ b/vendor/github.com/aws/smithy-go/Makefile
@@ -14,6 +14,9 @@ REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION}
REPOTOOLS_CMD_MODULE_VERSION = ${REPOTOOLS_MODULE}/cmd/moduleversion@${REPOTOOLS_VERSION}
+UNIT_TEST_TAGS=
+BUILD_TAGS=
+
ifneq ($(PRE_RELEASE_VERSION),)
REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION}
endif
@@ -27,6 +30,42 @@ smithy-build:
smithy-clean:
cd codegen && ./gradlew clean
+##################
+# Linting/Verify #
+##################
+.PHONY: verify vet cover
+
+verify: vet
+
+vet:
+ go vet ${BUILD_TAGS} --all ./...
+
+cover:
+ go test ${BUILD_TAGS} -coverprofile c.out ./...
+ @cover=`go tool cover -func c.out | grep '^total:' | awk '{ print $$3+0 }'`; \
+ echo "total (statements): $$cover%";
+
+################
+# Unit Testing #
+################
+.PHONY: unit unit-race unit-test unit-race-test
+
+unit: verify
+ go vet ${BUILD_TAGS} --all ./... && \
+ go test ${BUILD_TAGS} ${RUN_NONE} ./... && \
+ go test -timeout=1m ${UNIT_TEST_TAGS} ./...
+
+unit-race: verify
+ go vet ${BUILD_TAGS} --all ./... && \
+ go test ${BUILD_TAGS} ${RUN_NONE} ./... && \
+ go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./...
+
+unit-test: verify
+ go test -timeout=1m ${UNIT_TEST_TAGS} ./...
+
+unit-race-test: verify
+ go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./...
+
#####################
# Release Process #
#####################
diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md
index 789b3788..c374f692 100644
--- a/vendor/github.com/aws/smithy-go/README.md
+++ b/vendor/github.com/aws/smithy-go/README.md
@@ -2,10 +2,25 @@
[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml)
-Smithy code generators for Go.
+[Smithy](https://smithy.io/) code generators for Go.
**WARNING: All interfaces are subject to change.**
+## Can I use this?
+
+In order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java),
+such as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html),
+in order to generate transport mechanisms and serialization/deserialization
+code ("serde") accordingly.
+
+The code generator does not currently support any protocols out of the box,
+therefore the useability of this project on its own is currently limited.
+Support for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html)
+exists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are
+tracking the movement of those out of the SDK into smithy-go in
+[#458](https://github.com/aws/smithy-go/issues/458), but there's currently no
+timeline for doing so.
+
## License
This project is licensed under the Apache-2.0 License.
diff --git a/vendor/github.com/aws/smithy-go/auth/auth.go b/vendor/github.com/aws/smithy-go/auth/auth.go
new file mode 100644
index 00000000..5bdb70c9
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/auth.go
@@ -0,0 +1,3 @@
+// Package auth defines protocol-agnostic authentication types for smithy
+// clients.
+package auth
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/docs.go b/vendor/github.com/aws/smithy-go/auth/bearer/docs.go
new file mode 100644
index 00000000..1c9b9715
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/docs.go
@@ -0,0 +1,3 @@
+// Package bearer provides middleware and utilities for authenticating API
+// operation calls with a Bearer Token.
+package bearer
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go b/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go
new file mode 100644
index 00000000..8c7d7209
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go
@@ -0,0 +1,104 @@
+package bearer
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Message is the middleware stack's request transport message value.
+type Message interface{}
+
+// Signer provides an interface for implementations to decorate a request
+// message with a bearer token. The signer is responsible for validating the
+// message type is compatible with the signer.
+type Signer interface {
+ SignWithBearerToken(context.Context, Token, Message) (Message, error)
+}
+
+// AuthenticationMiddleware provides the Finalize middleware step for signing
+// an request message with a bearer token.
+type AuthenticationMiddleware struct {
+ signer Signer
+ tokenProvider TokenProvider
+}
+
+// AddAuthenticationMiddleware helper adds the AuthenticationMiddleware to the
+// middleware Stack in the Finalize step with the options provided.
+func AddAuthenticationMiddleware(s *middleware.Stack, signer Signer, tokenProvider TokenProvider) error {
+ return s.Finalize.Add(
+ NewAuthenticationMiddleware(signer, tokenProvider),
+ middleware.After,
+ )
+}
+
+// NewAuthenticationMiddleware returns an initialized AuthenticationMiddleware.
+func NewAuthenticationMiddleware(signer Signer, tokenProvider TokenProvider) *AuthenticationMiddleware {
+ return &AuthenticationMiddleware{
+ signer: signer,
+ tokenProvider: tokenProvider,
+ }
+}
+
+const authenticationMiddlewareID = "BearerTokenAuthentication"
+
+// ID returns the resolver identifier
+func (m *AuthenticationMiddleware) ID() string {
+ return authenticationMiddlewareID
+}
+
+// HandleFinalize implements the FinalizeMiddleware interface in order to
+// update the request with bearer token authentication.
+func (m *AuthenticationMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ token, err := m.tokenProvider.RetrieveBearerToken(ctx)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed AuthenticationMiddleware wrap message, %w", err)
+ }
+
+ signedMessage, err := m.signer.SignWithBearerToken(ctx, token, in.Request)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed AuthenticationMiddleware sign message, %w", err)
+ }
+
+ in.Request = signedMessage
+ return next.HandleFinalize(ctx, in)
+}
+
+// SignHTTPSMessage provides a bearer token authentication implementation that
+// will sign the message with the provided bearer token.
+//
+// Will fail if the message is not a smithy-go HTTP request or the request is
+// not HTTPS.
+type SignHTTPSMessage struct{}
+
+// NewSignHTTPSMessage returns an initialized signer for HTTP messages.
+func NewSignHTTPSMessage() *SignHTTPSMessage {
+ return &SignHTTPSMessage{}
+}
+
+// SignWithBearerToken returns a copy of the HTTP request with the bearer token
+// added via the "Authorization" header, per RFC 6750, https://datatracker.ietf.org/doc/html/rfc6750.
+//
+// Returns an error if the request's URL scheme is not HTTPS, or the request
+// message is not an smithy-go HTTP Request pointer type.
+func (SignHTTPSMessage) SignWithBearerToken(ctx context.Context, token Token, message Message) (Message, error) {
+ req, ok := message.(*smithyhttp.Request)
+ if !ok {
+ return nil, fmt.Errorf("expect smithy-go HTTP Request, got %T", message)
+ }
+
+ if !req.IsHTTPS() {
+ return nil, fmt.Errorf("bearer token with HTTP request requires HTTPS")
+ }
+
+ reqClone := req.Clone()
+ reqClone.Header.Set("Authorization", "Bearer "+token.Value)
+
+ return reqClone, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token.go b/vendor/github.com/aws/smithy-go/auth/bearer/token.go
new file mode 100644
index 00000000..be260d4c
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/token.go
@@ -0,0 +1,50 @@
+package bearer
+
+import (
+ "context"
+ "time"
+)
+
+// Token provides a type wrapping a bearer token and expiration metadata.
+type Token struct {
+ Value string
+
+ CanExpire bool
+ Expires time.Time
+}
+
+// Expired returns if the token's Expires time is before or equal to the time
+// provided. If CanExpires is false, Expired will always return false.
+func (t Token) Expired(now time.Time) bool {
+ if !t.CanExpire {
+ return false
+ }
+ now = now.Round(0)
+ return now.Equal(t.Expires) || now.After(t.Expires)
+}
+
+// TokenProvider provides interface for retrieving bearer tokens.
+type TokenProvider interface {
+ RetrieveBearerToken(context.Context) (Token, error)
+}
+
+// TokenProviderFunc provides a helper utility to wrap a function as a type
+// that implements the TokenProvider interface.
+type TokenProviderFunc func(context.Context) (Token, error)
+
+// RetrieveBearerToken calls the wrapped function, returning the Token or
+// error.
+func (fn TokenProviderFunc) RetrieveBearerToken(ctx context.Context) (Token, error) {
+ return fn(ctx)
+}
+
+// StaticTokenProvider provides a utility for wrapping a static bearer token
+// value within an implementation of a token provider.
+type StaticTokenProvider struct {
+ Token Token
+}
+
+// RetrieveBearerToken returns the static token specified.
+func (s StaticTokenProvider) RetrieveBearerToken(context.Context) (Token, error) {
+ return s.Token, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go b/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go
new file mode 100644
index 00000000..223ddf52
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go
@@ -0,0 +1,208 @@
+package bearer
+
+import (
+ "context"
+ "fmt"
+ "sync/atomic"
+ "time"
+
+ smithycontext "github.com/aws/smithy-go/context"
+ "github.com/aws/smithy-go/internal/sync/singleflight"
+)
+
+// package variable that can be override in unit tests.
+var timeNow = time.Now
+
+// TokenCacheOptions provides a set of optional configuration options for the
+// TokenCache TokenProvider.
+type TokenCacheOptions struct {
+ // The duration before the token will expire when the credentials will be
+ // refreshed. If DisableAsyncRefresh is true, the RetrieveBearerToken calls
+ // will be blocking.
+ //
+ // Asynchronous refreshes are deduplicated, and only one will be in-flight
+ // at a time. If the token expires while an asynchronous refresh is in
+ // flight, the next call to RetrieveBearerToken will block on that refresh
+ // to return.
+ RefreshBeforeExpires time.Duration
+
+ // The timeout the underlying TokenProvider's RetrieveBearerToken call must
+ // return within, or will be canceled. Defaults to 0, no timeout.
+ //
+ // If 0 timeout, its possible for the underlying tokenProvider's
+ // RetrieveBearerToken call to block forever. Preventing subsequent
+ // TokenCache attempts to refresh the token.
+ //
+ // If this timeout is reached all pending deduplicated calls to
+ // TokenCache RetrieveBearerToken will fail with an error.
+ RetrieveBearerTokenTimeout time.Duration
+
+ // The minimum duration between asynchronous refresh attempts. If the next
+ // asynchronous recent refresh attempt was within the minimum delay
+ // duration, the call to retrieve will return the current cached token, if
+ // not expired.
+ //
+ // The asynchronous retrieve is deduplicated across multiple calls when
+ // RetrieveBearerToken is called. The asynchronous retrieve is not a
+ // periodic task. It is only performed when the token has not yet expired,
+ // and the current item is within the RefreshBeforeExpires window, and the
+ // TokenCache's RetrieveBearerToken method is called.
+ //
+ // If 0, (default) there will be no minimum delay between asynchronous
+ // refresh attempts.
+ //
+ // If DisableAsyncRefresh is true, this option is ignored.
+ AsyncRefreshMinimumDelay time.Duration
+
+ // Sets if the TokenCache will attempt to refresh the token in the
+ // background asynchronously instead of blocking for credentials to be
+ // refreshed. If disabled token refresh will be blocking.
+ //
+ // The first call to RetrieveBearerToken will always be blocking, because
+ // there is no cached token.
+ DisableAsyncRefresh bool
+}
+
+// TokenCache provides an utility to cache Bearer Authentication tokens from a
+// wrapped TokenProvider. The TokenCache can be has options to configure the
+// cache's early and asynchronous refresh of the token.
+type TokenCache struct {
+ options TokenCacheOptions
+ provider TokenProvider
+
+ cachedToken atomic.Value
+ lastRefreshAttemptTime atomic.Value
+ sfGroup singleflight.Group
+}
+
+// NewTokenCache returns a initialized TokenCache that implements the
+// TokenProvider interface. Wrapping the provider passed in. Also taking a set
+// of optional functional option parameters to configure the token cache.
+func NewTokenCache(provider TokenProvider, optFns ...func(*TokenCacheOptions)) *TokenCache {
+ var options TokenCacheOptions
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &TokenCache{
+ options: options,
+ provider: provider,
+ }
+}
+
+// RetrieveBearerToken returns the token if it could be obtained, or error if a
+// valid token could not be retrieved.
+//
+// The passed in Context's cancel/deadline/timeout will impacting only this
+// individual retrieve call and not any other already queued up calls. This
+// means underlying provider's RetrieveBearerToken calls could block for ever,
+// and not be canceled with the Context. Set RetrieveBearerTokenTimeout to
+// provide a timeout, preventing the underlying TokenProvider blocking forever.
+//
+// By default, if the passed in Context is canceled, all of its values will be
+// considered expired. The wrapped TokenProvider will not be able to lookup the
+// values from the Context once it is expired. This is done to protect against
+// expired values no longer being valid. To disable this behavior, use
+// smithy-go's context.WithPreserveExpiredValues to add a value to the Context
+// before calling RetrieveBearerToken to enable support for expired values.
+//
+// Without RetrieveBearerTokenTimeout there is the potential for a underlying
+// Provider's RetrieveBearerToken call to sit forever. Blocking in subsequent
+// attempts at refreshing the token.
+func (p *TokenCache) RetrieveBearerToken(ctx context.Context) (Token, error) {
+ cachedToken, ok := p.getCachedToken()
+ if !ok || cachedToken.Expired(timeNow()) {
+ return p.refreshBearerToken(ctx)
+ }
+
+ // Check if the token should be refreshed before it expires.
+ refreshToken := cachedToken.Expired(timeNow().Add(p.options.RefreshBeforeExpires))
+ if !refreshToken {
+ return cachedToken, nil
+ }
+
+ if p.options.DisableAsyncRefresh {
+ return p.refreshBearerToken(ctx)
+ }
+
+ p.tryAsyncRefresh(ctx)
+
+ return cachedToken, nil
+}
+
+// tryAsyncRefresh attempts to asynchronously refresh the token returning the
+// already cached token. If it AsyncRefreshMinimumDelay option is not zero, and
+// the duration since the last refresh is less than that value, nothing will be
+// done.
+func (p *TokenCache) tryAsyncRefresh(ctx context.Context) {
+ if p.options.AsyncRefreshMinimumDelay != 0 {
+ var lastRefreshAttempt time.Time
+ if v := p.lastRefreshAttemptTime.Load(); v != nil {
+ lastRefreshAttempt = v.(time.Time)
+ }
+
+ if timeNow().Before(lastRefreshAttempt.Add(p.options.AsyncRefreshMinimumDelay)) {
+ return
+ }
+ }
+
+ // Ignore the returned channel so this won't be blocking, and limit the
+ // number of additional goroutines created.
+ p.sfGroup.DoChan("async-refresh", func() (interface{}, error) {
+ res, err := p.refreshBearerToken(ctx)
+ if p.options.AsyncRefreshMinimumDelay != 0 {
+ var refreshAttempt time.Time
+ if err != nil {
+ refreshAttempt = timeNow()
+ }
+ p.lastRefreshAttemptTime.Store(refreshAttempt)
+ }
+
+ return res, err
+ })
+}
+
+func (p *TokenCache) refreshBearerToken(ctx context.Context) (Token, error) {
+ resCh := p.sfGroup.DoChan("refresh-token", func() (interface{}, error) {
+ ctx := smithycontext.WithSuppressCancel(ctx)
+ if v := p.options.RetrieveBearerTokenTimeout; v != 0 {
+ var cancel func()
+ ctx, cancel = context.WithTimeout(ctx, v)
+ defer cancel()
+ }
+ return p.singleRetrieve(ctx)
+ })
+
+ select {
+ case res := <-resCh:
+ return res.Val.(Token), res.Err
+ case <-ctx.Done():
+ return Token{}, fmt.Errorf("retrieve bearer token canceled, %w", ctx.Err())
+ }
+}
+
+func (p *TokenCache) singleRetrieve(ctx context.Context) (interface{}, error) {
+ token, err := p.provider.RetrieveBearerToken(ctx)
+ if err != nil {
+ return Token{}, fmt.Errorf("failed to retrieve bearer token, %w", err)
+ }
+
+ p.cachedToken.Store(&token)
+ return token, nil
+}
+
+// getCachedToken returns the currently cached token and true if found. Returns
+// false if no token is cached.
+func (p *TokenCache) getCachedToken() (Token, bool) {
+ v := p.cachedToken.Load()
+ if v == nil {
+ return Token{}, false
+ }
+
+ t := v.(*Token)
+ if t == nil || t.Value == "" {
+ return Token{}, false
+ }
+
+ return *t, true
+}
diff --git a/vendor/github.com/aws/smithy-go/auth/identity.go b/vendor/github.com/aws/smithy-go/auth/identity.go
new file mode 100644
index 00000000..ba8cf70d
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/identity.go
@@ -0,0 +1,47 @@
+package auth
+
+import (
+ "context"
+ "time"
+
+ "github.com/aws/smithy-go"
+)
+
+// Identity contains information that identifies who the user making the
+// request is.
+type Identity interface {
+ Expiration() time.Time
+}
+
+// IdentityResolver defines the interface through which an Identity is
+// retrieved.
+type IdentityResolver interface {
+ GetIdentity(context.Context, smithy.Properties) (Identity, error)
+}
+
+// IdentityResolverOptions defines the interface through which an entity can be
+// queried to retrieve an IdentityResolver for a given auth scheme.
+type IdentityResolverOptions interface {
+ GetIdentityResolver(schemeID string) IdentityResolver
+}
+
+// AnonymousIdentity is a sentinel to indicate no identity.
+type AnonymousIdentity struct{}
+
+var _ Identity = (*AnonymousIdentity)(nil)
+
+// Expiration returns the zero value for time, as anonymous identity never
+// expires.
+func (*AnonymousIdentity) Expiration() time.Time {
+ return time.Time{}
+}
+
+// AnonymousIdentityResolver returns AnonymousIdentity.
+type AnonymousIdentityResolver struct{}
+
+var _ IdentityResolver = (*AnonymousIdentityResolver)(nil)
+
+// GetIdentity returns AnonymousIdentity.
+func (*AnonymousIdentityResolver) GetIdentity(_ context.Context, _ smithy.Properties) (Identity, error) {
+ return &AnonymousIdentity{}, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/auth/option.go b/vendor/github.com/aws/smithy-go/auth/option.go
new file mode 100644
index 00000000..d5dabff0
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/option.go
@@ -0,0 +1,25 @@
+package auth
+
+import "github.com/aws/smithy-go"
+
+type (
+ authOptionsKey struct{}
+)
+
+// Option represents a possible authentication method for an operation.
+type Option struct {
+ SchemeID string
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+// GetAuthOptions gets auth Options from Properties.
+func GetAuthOptions(p *smithy.Properties) ([]*Option, bool) {
+ v, ok := p.Get(authOptionsKey{}).([]*Option)
+ return v, ok
+}
+
+// SetAuthOptions sets auth Options on Properties.
+func SetAuthOptions(p *smithy.Properties, options []*Option) {
+ p.Set(authOptionsKey{}, options)
+}
diff --git a/vendor/github.com/aws/smithy-go/auth/scheme_id.go b/vendor/github.com/aws/smithy-go/auth/scheme_id.go
new file mode 100644
index 00000000..fb6a57c6
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/scheme_id.go
@@ -0,0 +1,20 @@
+package auth
+
+// Anonymous
+const (
+ SchemeIDAnonymous = "smithy.api#noAuth"
+)
+
+// HTTP auth schemes
+const (
+ SchemeIDHTTPBasic = "smithy.api#httpBasicAuth"
+ SchemeIDHTTPDigest = "smithy.api#httpDigestAuth"
+ SchemeIDHTTPBearer = "smithy.api#httpBearerAuth"
+ SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth"
+)
+
+// AWS auth schemes
+const (
+ SchemeIDSigV4 = "aws.auth#sigv4"
+ SchemeIDSigV4A = "aws.auth#sigv4a"
+)
diff --git a/vendor/github.com/aws/smithy-go/container/private/cache/cache.go b/vendor/github.com/aws/smithy-go/container/private/cache/cache.go
new file mode 100644
index 00000000..69af8775
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/container/private/cache/cache.go
@@ -0,0 +1,19 @@
+// Package cache defines the interface for a key-based data store.
+//
+// This package is designated as private and is intended for use only by the
+// smithy client runtime. The exported API therein is not considered stable and
+// is subject to breaking changes without notice.
+package cache
+
+// Cache defines the interface for an opaquely-typed, key-based data store.
+//
+// The thread-safety of this interface is undefined and is dictated by
+// implementations.
+type Cache interface {
+ // Retrieve the value associated with the given key. The returned boolean
+ // indicates whether the cache held a value for the given key.
+ Get(k interface{}) (interface{}, bool)
+
+ // Store a value under the given key.
+ Put(k interface{}, v interface{})
+}
diff --git a/vendor/github.com/aws/smithy-go/container/private/cache/lru/lru.go b/vendor/github.com/aws/smithy-go/container/private/cache/lru/lru.go
new file mode 100644
index 00000000..02ecb0a3
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/container/private/cache/lru/lru.go
@@ -0,0 +1,63 @@
+// Package lru implements [cache.Cache] with an LRU eviction policy.
+//
+// This implementation is NOT thread-safe.
+//
+// This package is designated as private and is intended for use only by the
+// smithy client runtime. The exported API therein is not considered stable and
+// is subject to breaking changes without notice.
+package lru
+
+import (
+ "container/list"
+
+ "github.com/aws/smithy-go/container/private/cache"
+)
+
+// New creates a new LRU cache with the given capacity.
+func New(cap int) cache.Cache {
+ return &lru{
+ entries: make(map[interface{}]*list.Element, cap),
+ cap: cap,
+ mru: list.New(),
+ }
+}
+
+type lru struct {
+ entries map[interface{}]*list.Element
+ cap int
+
+ mru *list.List // least-recently used is at the back
+}
+
+type element struct {
+ key interface{}
+ value interface{}
+}
+
+func (l *lru) Get(k interface{}) (interface{}, bool) {
+ e, ok := l.entries[k]
+ if !ok {
+ return nil, false
+ }
+
+ l.mru.MoveToFront(e)
+ return e.Value.(*element).value, true
+}
+
+func (l *lru) Put(k interface{}, v interface{}) {
+ if len(l.entries) == l.cap {
+ l.evict()
+ }
+
+ ev := &element{
+ key: k,
+ value: v,
+ }
+ e := l.mru.PushFront(ev)
+ l.entries[k] = e
+}
+
+func (l *lru) evict() {
+ e := l.mru.Remove(l.mru.Back())
+ delete(l.entries, e.(*element).key)
+}
diff --git a/vendor/github.com/aws/smithy-go/context/suppress_expired.go b/vendor/github.com/aws/smithy-go/context/suppress_expired.go
new file mode 100644
index 00000000..a39b84a2
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/context/suppress_expired.go
@@ -0,0 +1,81 @@
+package context
+
+import "context"
+
+// valueOnlyContext provides a utility to preserve only the values of a
+// Context. Suppressing any cancellation or deadline on that context being
+// propagated downstream of this value.
+//
+// If preserveExpiredValues is false (default), and the valueCtx is canceled,
+// calls to lookup values with the Values method, will always return nil. Setting
+// preserveExpiredValues to true, will allow the valueOnlyContext to lookup
+// values in valueCtx even if valueCtx is canceled.
+//
+// Based on the Go standard libraries net/lookup.go onlyValuesCtx utility.
+// https://github.com/golang/go/blob/da2773fe3e2f6106634673a38dc3a6eb875fe7d8/src/net/lookup.go
+type valueOnlyContext struct {
+ context.Context
+
+ preserveExpiredValues bool
+ valuesCtx context.Context
+}
+
+var _ context.Context = (*valueOnlyContext)(nil)
+
+// Value looks up the key, returning its value. If configured to not preserve
+// values of expired context, and the wrapping context is canceled, nil will be
+// returned.
+func (v *valueOnlyContext) Value(key interface{}) interface{} {
+ if !v.preserveExpiredValues {
+ select {
+ case <-v.valuesCtx.Done():
+ return nil
+ default:
+ }
+ }
+
+ return v.valuesCtx.Value(key)
+}
+
+// WithSuppressCancel wraps the Context value, suppressing its deadline and
+// cancellation events being propagated downstream to consumer of the returned
+// context.
+//
+// By default the wrapped Context's Values are available downstream until the
+// wrapped Context is canceled. Once the wrapped Context is canceled, Values
+// method called on the context return will no longer lookup any key. As they
+// are now considered expired.
+//
+// To override this behavior, use WithPreserveExpiredValues on the Context
+// before it is wrapped by WithSuppressCancel. This will make the Context
+// returned by WithSuppressCancel allow lookup of expired values.
+func WithSuppressCancel(ctx context.Context) context.Context {
+ return &valueOnlyContext{
+ Context: context.Background(),
+ valuesCtx: ctx,
+
+ preserveExpiredValues: GetPreserveExpiredValues(ctx),
+ }
+}
+
+type preserveExpiredValuesKey struct{}
+
+// WithPreserveExpiredValues adds a Value to the Context if expired values
+// should be preserved, and looked up by a Context wrapped by
+// WithSuppressCancel.
+//
+// WithPreserveExpiredValues must be added as a value to a Context, before that
+// Context is wrapped by WithSuppressCancel
+func WithPreserveExpiredValues(ctx context.Context, enable bool) context.Context {
+ return context.WithValue(ctx, preserveExpiredValuesKey{}, enable)
+}
+
+// GetPreserveExpiredValues looks up, and returns the PreserveExpressValues
+// value in the context. Returning true if enabled, false otherwise.
+func GetPreserveExpiredValues(ctx context.Context) bool {
+ v := ctx.Value(preserveExpiredValuesKey{})
+ if v != nil {
+ return v.(bool)
+ }
+ return false
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go
index 96abd073..543e7cf0 100644
--- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go
+++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go
@@ -26,10 +26,17 @@ type Encoder struct {
header http.Header
}
-// NewEncoder creates a new encoder from the passed in request. All query and
+// NewEncoder creates a new encoder from the passed in request. It assumes that
+// raw path contains no valuable information at this point, so it passes in path
+// as path and raw path for subsequent trans
+func NewEncoder(path, query string, headers http.Header) (*Encoder, error) {
+ return NewEncoderWithRawPath(path, path, query, headers)
+}
+
+// NewHTTPBindingEncoder creates a new encoder from the passed in request. All query and
// header values will be added on top of the request's existing values. Overwriting
// duplicate values.
-func NewEncoder(path, query string, headers http.Header) (*Encoder, error) {
+func NewEncoderWithRawPath(path, rawPath, query string, headers http.Header) (*Encoder, error) {
parseQuery, err := url.ParseQuery(query)
if err != nil {
return nil, fmt.Errorf("failed to parse query string: %w", err)
@@ -37,7 +44,7 @@ func NewEncoder(path, query string, headers http.Header) (*Encoder, error) {
e := &Encoder{
path: []byte(path),
- rawPath: []byte(path),
+ rawPath: []byte(rawPath),
query: parseQuery,
header: headers.Clone(),
}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/array.go b/vendor/github.com/aws/smithy-go/encoding/json/array.go
new file mode 100644
index 00000000..7a232f66
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/array.go
@@ -0,0 +1,35 @@
+package json
+
+import (
+ "bytes"
+)
+
+// Array represents the encoding of a JSON Array
+type Array struct {
+ w *bytes.Buffer
+ writeComma bool
+ scratch *[]byte
+}
+
+func newArray(w *bytes.Buffer, scratch *[]byte) *Array {
+ w.WriteRune(leftBracket)
+ return &Array{w: w, scratch: scratch}
+}
+
+// Value adds a new element to the JSON Array.
+// Returns a Value type that is used to encode
+// the array element.
+func (a *Array) Value() Value {
+ if a.writeComma {
+ a.w.WriteRune(comma)
+ } else {
+ a.writeComma = true
+ }
+
+ return newValue(a.w, a.scratch)
+}
+
+// Close encodes the end of the JSON Array
+func (a *Array) Close() {
+ a.w.WriteRune(rightBracket)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/constants.go b/vendor/github.com/aws/smithy-go/encoding/json/constants.go
new file mode 100644
index 00000000..91044092
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/constants.go
@@ -0,0 +1,15 @@
+package json
+
+const (
+ leftBrace = '{'
+ rightBrace = '}'
+
+ leftBracket = '['
+ rightBracket = ']'
+
+ comma = ','
+ quote = '"'
+ colon = ':'
+
+ null = "null"
+)
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go b/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go
new file mode 100644
index 00000000..7050c85b
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go
@@ -0,0 +1,139 @@
+package json
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+)
+
+// DiscardUnknownField discards unknown fields from a decoder body.
+// This function is useful while deserializing a JSON body with additional
+// unknown information that should be discarded.
+func DiscardUnknownField(decoder *json.Decoder) error {
+ // This deliberately does not share logic with CollectUnknownField, even
+ // though it could, because if we were to delegate to that then we'd incur
+ // extra allocations and general memory usage.
+ v, err := decoder.Token()
+ if err == io.EOF {
+ return nil
+ }
+ if err != nil {
+ return err
+ }
+
+ if _, ok := v.(json.Delim); ok {
+ for decoder.More() {
+ err = DiscardUnknownField(decoder)
+ }
+ endToken, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if _, ok := endToken.(json.Delim); !ok {
+ return fmt.Errorf("invalid JSON : expected json delimiter, found %T %v",
+ endToken, endToken)
+ }
+ }
+
+ return nil
+}
+
+// CollectUnknownField grabs the contents of unknown fields from the decoder body
+// and returns them as a byte slice. This is useful for skipping unknown fields without
+// completely discarding them.
+func CollectUnknownField(decoder *json.Decoder) ([]byte, error) {
+ result, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ buff := bytes.NewBuffer(nil)
+ encoder := json.NewEncoder(buff)
+
+ if err := encoder.Encode(result); err != nil {
+ return nil, err
+ }
+
+ return buff.Bytes(), nil
+}
+
+func collectUnknownField(decoder *json.Decoder) (interface{}, error) {
+ // Grab the initial value. This could either be a concrete value like a string or a a
+ // delimiter.
+ token, err := decoder.Token()
+ if err == io.EOF {
+ return nil, nil
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // If it's an array or object, we'll need to recurse.
+ delim, ok := token.(json.Delim)
+ if ok {
+ var result interface{}
+ if delim == '{' {
+ result, err = collectUnknownObject(decoder)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ result, err = collectUnknownArray(decoder)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Discard the closing token. decoder.Token handles checking for matching delimiters
+ if _, err := decoder.Token(); err != nil {
+ return nil, err
+ }
+ return result, nil
+ }
+
+ return token, nil
+}
+
+func collectUnknownArray(decoder *json.Decoder) ([]interface{}, error) {
+ // We need to create an empty array here instead of a nil array, since by getting
+ // into this function at all we necessarily have seen a non-nil list.
+ array := []interface{}{}
+
+ for decoder.More() {
+ value, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+ array = append(array, value)
+ }
+
+ return array, nil
+}
+
+func collectUnknownObject(decoder *json.Decoder) (map[string]interface{}, error) {
+ object := make(map[string]interface{})
+
+ for decoder.More() {
+ key, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ // Keys have to be strings, which is particularly important as the encoder
+ // won't except a map with interface{} keys
+ stringKey, ok := key.(string)
+ if !ok {
+ return nil, fmt.Errorf("expected string key, found %T", key)
+ }
+
+ value, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ object[stringKey] = value
+ }
+
+ return object, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/encoder.go b/vendor/github.com/aws/smithy-go/encoding/json/encoder.go
new file mode 100644
index 00000000..8772953f
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/encoder.go
@@ -0,0 +1,30 @@
+package json
+
+import (
+ "bytes"
+)
+
+// Encoder is JSON encoder that supports construction of JSON values
+// using methods.
+type Encoder struct {
+ w *bytes.Buffer
+ Value
+}
+
+// NewEncoder returns a new JSON encoder
+func NewEncoder() *Encoder {
+ writer := bytes.NewBuffer(nil)
+ scratch := make([]byte, 64)
+
+ return &Encoder{w: writer, Value: newValue(writer, &scratch)}
+}
+
+// String returns the String output of the JSON encoder
+func (e Encoder) String() string {
+ return e.w.String()
+}
+
+// Bytes returns the []byte slice of the JSON encoder
+func (e Encoder) Bytes() []byte {
+ return e.w.Bytes()
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/escape.go b/vendor/github.com/aws/smithy-go/encoding/json/escape.go
new file mode 100644
index 00000000..d984d0cd
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/escape.go
@@ -0,0 +1,198 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Copied and modified from Go 1.8 stdlib's encoding/json/#safeSet
+
+package json
+
+import (
+ "bytes"
+ "unicode/utf8"
+)
+
+// safeSet holds the value true if the ASCII character with the given array
+// position can be represented inside a JSON string without any further
+// escaping.
+//
+// All values are true except for the ASCII control characters (0-31), the
+// double quote ("), and the backslash character ("\").
+var safeSet = [utf8.RuneSelf]bool{
+ ' ': true,
+ '!': true,
+ '"': false,
+ '#': true,
+ '$': true,
+ '%': true,
+ '&': true,
+ '\'': true,
+ '(': true,
+ ')': true,
+ '*': true,
+ '+': true,
+ ',': true,
+ '-': true,
+ '.': true,
+ '/': true,
+ '0': true,
+ '1': true,
+ '2': true,
+ '3': true,
+ '4': true,
+ '5': true,
+ '6': true,
+ '7': true,
+ '8': true,
+ '9': true,
+ ':': true,
+ ';': true,
+ '<': true,
+ '=': true,
+ '>': true,
+ '?': true,
+ '@': true,
+ 'A': true,
+ 'B': true,
+ 'C': true,
+ 'D': true,
+ 'E': true,
+ 'F': true,
+ 'G': true,
+ 'H': true,
+ 'I': true,
+ 'J': true,
+ 'K': true,
+ 'L': true,
+ 'M': true,
+ 'N': true,
+ 'O': true,
+ 'P': true,
+ 'Q': true,
+ 'R': true,
+ 'S': true,
+ 'T': true,
+ 'U': true,
+ 'V': true,
+ 'W': true,
+ 'X': true,
+ 'Y': true,
+ 'Z': true,
+ '[': true,
+ '\\': false,
+ ']': true,
+ '^': true,
+ '_': true,
+ '`': true,
+ 'a': true,
+ 'b': true,
+ 'c': true,
+ 'd': true,
+ 'e': true,
+ 'f': true,
+ 'g': true,
+ 'h': true,
+ 'i': true,
+ 'j': true,
+ 'k': true,
+ 'l': true,
+ 'm': true,
+ 'n': true,
+ 'o': true,
+ 'p': true,
+ 'q': true,
+ 'r': true,
+ 's': true,
+ 't': true,
+ 'u': true,
+ 'v': true,
+ 'w': true,
+ 'x': true,
+ 'y': true,
+ 'z': true,
+ '{': true,
+ '|': true,
+ '}': true,
+ '~': true,
+ '\u007f': true,
+}
+
+// copied from Go 1.8 stdlib's encoding/json/#hex
+var hex = "0123456789abcdef"
+
+// escapeStringBytes escapes and writes the passed in string bytes to the dst
+// buffer
+//
+// Copied and modifed from Go 1.8 stdlib's encodeing/json/#encodeState.stringBytes
+func escapeStringBytes(e *bytes.Buffer, s []byte) {
+ e.WriteByte('"')
+ start := 0
+ for i := 0; i < len(s); {
+ if b := s[i]; b < utf8.RuneSelf {
+ if safeSet[b] {
+ i++
+ continue
+ }
+ if start < i {
+ e.Write(s[start:i])
+ }
+ switch b {
+ case '\\', '"':
+ e.WriteByte('\\')
+ e.WriteByte(b)
+ case '\n':
+ e.WriteByte('\\')
+ e.WriteByte('n')
+ case '\r':
+ e.WriteByte('\\')
+ e.WriteByte('r')
+ case '\t':
+ e.WriteByte('\\')
+ e.WriteByte('t')
+ default:
+ // This encodes bytes < 0x20 except for \t, \n and \r.
+ // If escapeHTML is set, it also escapes <, >, and &
+ // because they can lead to security holes when
+ // user-controlled strings are rendered into JSON
+ // and served to some browsers.
+ e.WriteString(`\u00`)
+ e.WriteByte(hex[b>>4])
+ e.WriteByte(hex[b&0xF])
+ }
+ i++
+ start = i
+ continue
+ }
+ c, size := utf8.DecodeRune(s[i:])
+ if c == utf8.RuneError && size == 1 {
+ if start < i {
+ e.Write(s[start:i])
+ }
+ e.WriteString(`\ufffd`)
+ i += size
+ start = i
+ continue
+ }
+ // U+2028 is LINE SEPARATOR.
+ // U+2029 is PARAGRAPH SEPARATOR.
+ // They are both technically valid characters in JSON strings,
+ // but don't work in JSONP, which has to be evaluated as JavaScript,
+ // and can lead to security holes there. It is valid JSON to
+ // escape them, so we do so unconditionally.
+ // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion.
+ if c == '\u2028' || c == '\u2029' {
+ if start < i {
+ e.Write(s[start:i])
+ }
+ e.WriteString(`\u202`)
+ e.WriteByte(hex[c&0xF])
+ i += size
+ start = i
+ continue
+ }
+ i += size
+ }
+ if start < len(s) {
+ e.Write(s[start:])
+ }
+ e.WriteByte('"')
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/object.go b/vendor/github.com/aws/smithy-go/encoding/json/object.go
new file mode 100644
index 00000000..722346d0
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/object.go
@@ -0,0 +1,40 @@
+package json
+
+import (
+ "bytes"
+)
+
+// Object represents the encoding of a JSON Object type
+type Object struct {
+ w *bytes.Buffer
+ writeComma bool
+ scratch *[]byte
+}
+
+func newObject(w *bytes.Buffer, scratch *[]byte) *Object {
+ w.WriteRune(leftBrace)
+ return &Object{w: w, scratch: scratch}
+}
+
+func (o *Object) writeKey(key string) {
+ escapeStringBytes(o.w, []byte(key))
+ o.w.WriteRune(colon)
+}
+
+// Key adds the given named key to the JSON object.
+// Returns a Value encoder that should be used to encode
+// a JSON value type.
+func (o *Object) Key(name string) Value {
+ if o.writeComma {
+ o.w.WriteRune(comma)
+ } else {
+ o.writeComma = true
+ }
+ o.writeKey(name)
+ return newValue(o.w, o.scratch)
+}
+
+// Close encodes the end of the JSON Object
+func (o *Object) Close() {
+ o.w.WriteRune(rightBrace)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/value.go b/vendor/github.com/aws/smithy-go/encoding/json/value.go
new file mode 100644
index 00000000..b41ff1e1
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/value.go
@@ -0,0 +1,149 @@
+package json
+
+import (
+ "bytes"
+ "encoding/base64"
+ "math/big"
+ "strconv"
+
+ "github.com/aws/smithy-go/encoding"
+)
+
+// Value represents a JSON Value type
+// JSON Value types: Object, Array, String, Number, Boolean, and Null
+type Value struct {
+ w *bytes.Buffer
+ scratch *[]byte
+}
+
+// newValue returns a new Value encoder
+func newValue(w *bytes.Buffer, scratch *[]byte) Value {
+ return Value{w: w, scratch: scratch}
+}
+
+// String encodes v as a JSON string
+func (jv Value) String(v string) {
+ escapeStringBytes(jv.w, []byte(v))
+}
+
+// Byte encodes v as a JSON number
+func (jv Value) Byte(v int8) {
+ jv.Long(int64(v))
+}
+
+// Short encodes v as a JSON number
+func (jv Value) Short(v int16) {
+ jv.Long(int64(v))
+}
+
+// Integer encodes v as a JSON number
+func (jv Value) Integer(v int32) {
+ jv.Long(int64(v))
+}
+
+// Long encodes v as a JSON number
+func (jv Value) Long(v int64) {
+ *jv.scratch = strconv.AppendInt((*jv.scratch)[:0], v, 10)
+ jv.w.Write(*jv.scratch)
+}
+
+// ULong encodes v as a JSON number
+func (jv Value) ULong(v uint64) {
+ *jv.scratch = strconv.AppendUint((*jv.scratch)[:0], v, 10)
+ jv.w.Write(*jv.scratch)
+}
+
+// Float encodes v as a JSON number
+func (jv Value) Float(v float32) {
+ jv.float(float64(v), 32)
+}
+
+// Double encodes v as a JSON number
+func (jv Value) Double(v float64) {
+ jv.float(v, 64)
+}
+
+func (jv Value) float(v float64, bits int) {
+ *jv.scratch = encoding.EncodeFloat((*jv.scratch)[:0], v, bits)
+ jv.w.Write(*jv.scratch)
+}
+
+// Boolean encodes v as a JSON boolean
+func (jv Value) Boolean(v bool) {
+ *jv.scratch = strconv.AppendBool((*jv.scratch)[:0], v)
+ jv.w.Write(*jv.scratch)
+}
+
+// Base64EncodeBytes writes v as a base64 value in JSON string
+func (jv Value) Base64EncodeBytes(v []byte) {
+ encodeByteSlice(jv.w, (*jv.scratch)[:0], v)
+}
+
+// Write writes v directly to the JSON document
+func (jv Value) Write(v []byte) {
+ jv.w.Write(v)
+}
+
+// Array returns a new Array encoder
+func (jv Value) Array() *Array {
+ return newArray(jv.w, jv.scratch)
+}
+
+// Object returns a new Object encoder
+func (jv Value) Object() *Object {
+ return newObject(jv.w, jv.scratch)
+}
+
+// Null encodes a null JSON value
+func (jv Value) Null() {
+ jv.w.WriteString(null)
+}
+
+// BigInteger encodes v as JSON value
+func (jv Value) BigInteger(v *big.Int) {
+ jv.w.Write([]byte(v.Text(10)))
+}
+
+// BigDecimal encodes v as JSON value
+func (jv Value) BigDecimal(v *big.Float) {
+ if i, accuracy := v.Int64(); accuracy == big.Exact {
+ jv.Long(i)
+ return
+ }
+ // TODO: Should this try to match ES6 ToString similar to stdlib JSON?
+ jv.w.Write([]byte(v.Text('e', -1)))
+}
+
+// Based on encoding/json encodeByteSlice from the Go Standard Library
+// https://golang.org/src/encoding/json/encode.go
+func encodeByteSlice(w *bytes.Buffer, scratch []byte, v []byte) {
+ if v == nil {
+ w.WriteString(null)
+ return
+ }
+
+ w.WriteRune(quote)
+
+ encodedLen := base64.StdEncoding.EncodedLen(len(v))
+ if encodedLen <= len(scratch) {
+ // If the encoded bytes fit in e.scratch, avoid an extra
+ // allocation and use the cheaper Encoding.Encode.
+ dst := scratch[:encodedLen]
+ base64.StdEncoding.Encode(dst, v)
+ w.Write(dst)
+ } else if encodedLen <= 1024 {
+ // The encoded bytes are short enough to allocate for, and
+ // Encoding.Encode is still cheaper.
+ dst := make([]byte, encodedLen)
+ base64.StdEncoding.Encode(dst, v)
+ w.Write(dst)
+ } else {
+ // The encoded bytes are too long to cheaply allocate, and
+ // Encoding.Encode is no longer noticeably cheaper.
+ enc := base64.NewEncoder(base64.StdEncoding, w)
+ enc.Write(v)
+ enc.Close()
+ }
+
+ w.WriteRune(quote)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/doc.go b/vendor/github.com/aws/smithy-go/encoding/xml/doc.go
index d6e1e41e..f9200093 100644
--- a/vendor/github.com/aws/smithy-go/encoding/xml/doc.go
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/doc.go
@@ -2,7 +2,7 @@
Package xml holds the XMl encoder utility. This utility is written in accordance to our design to delegate to
shape serializer function in which a xml.Value will be passed around.
-Resources followed: https://awslabs.github.io/smithy/1.0/spec/core/xml-traits.html#
+Resources followed: https://smithy.io/2.0/spec/protocol-traits.html#xml-bindings
Member Element
diff --git a/vendor/github.com/aws/smithy-go/endpoints/endpoint.go b/vendor/github.com/aws/smithy-go/endpoints/endpoint.go
new file mode 100644
index 00000000..a9352839
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/endpoints/endpoint.go
@@ -0,0 +1,23 @@
+package transport
+
+import (
+ "net/http"
+ "net/url"
+
+ "github.com/aws/smithy-go"
+)
+
+// Endpoint is the endpoint object returned by Endpoint resolution V2
+type Endpoint struct {
+ // The complete URL minimally specfiying the scheme and host.
+ // May optionally specify the port and base path component.
+ URI url.URL
+
+ // An optional set of headers to be sent using transport layer headers.
+ Headers http.Header
+
+ // A grab-bag property map of endpoint attributes. The
+ // values present here are subject to change, or being add/removed at any
+ // time.
+ Properties smithy.Properties
+}
diff --git a/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/doc.go b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/doc.go
new file mode 100644
index 00000000..e24e190d
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/doc.go
@@ -0,0 +1,4 @@
+// Package rulesfn provides endpoint rule functions for evaluating endpoint
+// resolution rules.
+
+package rulesfn
diff --git a/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/strings.go b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/strings.go
new file mode 100644
index 00000000..5cf4a7b0
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/strings.go
@@ -0,0 +1,25 @@
+package rulesfn
+
+// Substring returns the substring of the input provided. If the start or stop
+// indexes are not valid for the input nil will be returned. If errors occur
+// they will be added to the provided [ErrorCollector].
+func SubString(input string, start, stop int, reverse bool) *string {
+ if start < 0 || stop < 1 || start >= stop || len(input) < stop {
+ return nil
+ }
+
+ for _, r := range input {
+ if r > 127 {
+ return nil
+ }
+ }
+
+ if !reverse {
+ v := input[start:stop]
+ return &v
+ }
+
+ rStart := len(input) - stop
+ rStop := len(input) - start
+ return SubString(input, rStart, rStop, false)
+}
diff --git a/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/uri.go b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/uri.go
new file mode 100644
index 00000000..0c115412
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/uri.go
@@ -0,0 +1,130 @@
+package rulesfn
+
+import (
+ "fmt"
+ "net"
+ "net/url"
+ "strings"
+
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// IsValidHostLabel returns if the input is a single valid [RFC 1123] host
+// label. If allowSubDomains is true, will allow validation to include nested
+// host labels. Returns false if the input is not a valid host label. If errors
+// occur they will be added to the provided [ErrorCollector].
+//
+// [RFC 1123]: https://www.ietf.org/rfc/rfc1123.txt
+func IsValidHostLabel(input string, allowSubDomains bool) bool {
+ var labels []string
+ if allowSubDomains {
+ labels = strings.Split(input, ".")
+ } else {
+ labels = []string{input}
+ }
+
+ for _, label := range labels {
+ if !smithyhttp.ValidHostLabel(label) {
+ return false
+ }
+ }
+
+ return true
+}
+
+// ParseURL returns a [URL] if the provided string could be parsed. Returns nil
+// if the string could not be parsed. Any parsing error will be added to the
+// [ErrorCollector].
+//
+// If the input URL string contains an IP6 address with a zone index. The
+// returned [builtin.URL.Authority] value will contain the percent escaped (%)
+// zone index separator.
+func ParseURL(input string) *URL {
+ u, err := url.Parse(input)
+ if err != nil {
+ return nil
+ }
+
+ if u.RawQuery != "" {
+ return nil
+ }
+
+ if u.Scheme != "http" && u.Scheme != "https" {
+ return nil
+ }
+
+ normalizedPath := u.Path
+ if !strings.HasPrefix(normalizedPath, "/") {
+ normalizedPath = "/" + normalizedPath
+ }
+ if !strings.HasSuffix(normalizedPath, "/") {
+ normalizedPath = normalizedPath + "/"
+ }
+
+ // IP6 hosts may have zone indexes that need to be escaped to be valid in a
+ // URI. The Go URL parser will unescape the `%25` into `%`. This needs to
+ // be reverted since the returned URL will be used in string builders.
+ authority := strings.ReplaceAll(u.Host, "%", "%25")
+
+ return &URL{
+ Scheme: u.Scheme,
+ Authority: authority,
+ Path: u.Path,
+ NormalizedPath: normalizedPath,
+ IsIp: net.ParseIP(hostnameWithoutZone(u)) != nil,
+ }
+}
+
+// URL provides the structure describing the parts of a parsed URL returned by
+// [ParseURL].
+type URL struct {
+ Scheme string // https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+ Authority string // https://www.rfc-editor.org/rfc/rfc3986#section-3.2
+ Path string // https://www.rfc-editor.org/rfc/rfc3986#section-3.3
+ NormalizedPath string // https://www.rfc-editor.org/rfc/rfc3986#section-6.2.3
+ IsIp bool
+}
+
+// URIEncode returns an percent-encoded [RFC3986 section 2.1] version of the
+// input string.
+//
+// [RFC3986 section 2.1]: https://www.rfc-editor.org/rfc/rfc3986#section-2.1
+func URIEncode(input string) string {
+ var output strings.Builder
+ for _, c := range []byte(input) {
+ if validPercentEncodedChar(c) {
+ output.WriteByte(c)
+ continue
+ }
+
+ fmt.Fprintf(&output, "%%%X", c)
+ }
+
+ return output.String()
+}
+
+func validPercentEncodedChar(c byte) bool {
+ return (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c >= '0' && c <= '9') ||
+ c == '-' || c == '_' || c == '.' || c == '~'
+}
+
+// hostname implements u.Hostname() but strips the ipv6 zone ID (if present)
+// such that net.ParseIP can still recognize IPv6 addresses with zone IDs.
+//
+// FUTURE(10/2023): netip.ParseAddr handles this natively but we can't take
+// that package as a dependency yet due to our min go version (1.15, netip
+// starts in 1.18). When we align with go runtime deprecation policy in
+// 10/2023, we can remove this.
+func hostnameWithoutZone(u *url.URL) string {
+ full := u.Hostname()
+
+ // this more or less mimics the internals of net/ (see unexported
+ // splitHostZone in that source) but throws the zone away because we don't
+ // need it
+ if i := strings.LastIndex(full, "%"); i > -1 {
+ return full[:i]
+ }
+ return full
+}
diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go
index 7e252ec8..341392e1 100644
--- a/vendor/github.com/aws/smithy-go/go_module_metadata.go
+++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go
@@ -3,4 +3,4 @@
package smithy
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.11.2"
+const goModuleVersion = "1.20.1"
diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE
new file mode 100644
index 00000000..fe6a6200
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go
new file mode 100644
index 00000000..9c9d02b9
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go
@@ -0,0 +1,8 @@
+// Package singleflight provides a duplicate function call suppression
+// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight
+// package. The package is forked, because the package a part of the unstable
+// and unversioned golang.org/x/sync module.
+//
+// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight
+
+package singleflight
diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go
new file mode 100644
index 00000000..e8a1b17d
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go
@@ -0,0 +1,210 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package singleflight
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "runtime"
+ "runtime/debug"
+ "sync"
+)
+
+// errGoexit indicates the runtime.Goexit was called in
+// the user given function.
+var errGoexit = errors.New("runtime.Goexit was called")
+
+// A panicError is an arbitrary value recovered from a panic
+// with the stack trace during the execution of given function.
+type panicError struct {
+ value interface{}
+ stack []byte
+}
+
+// Error implements error interface.
+func (p *panicError) Error() string {
+ return fmt.Sprintf("%v\n\n%s", p.value, p.stack)
+}
+
+func newPanicError(v interface{}) error {
+ stack := debug.Stack()
+
+ // The first line of the stack trace is of the form "goroutine N [status]:"
+ // but by the time the panic reaches Do the goroutine may no longer exist
+ // and its status will have changed. Trim out the misleading line.
+ if line := bytes.IndexByte(stack[:], '\n'); line >= 0 {
+ stack = stack[line+1:]
+ }
+ return &panicError{value: v, stack: stack}
+}
+
+// call is an in-flight or completed singleflight.Do call
+type call struct {
+ wg sync.WaitGroup
+
+ // These fields are written once before the WaitGroup is done
+ // and are only read after the WaitGroup is done.
+ val interface{}
+ err error
+
+ // forgotten indicates whether Forget was called with this call's key
+ // while the call was still in flight.
+ forgotten bool
+
+ // These fields are read and written with the singleflight
+ // mutex held before the WaitGroup is done, and are read but
+ // not written after the WaitGroup is done.
+ dups int
+ chans []chan<- Result
+}
+
+// Group represents a class of work and forms a namespace in
+// which units of work can be executed with duplicate suppression.
+type Group struct {
+ mu sync.Mutex // protects m
+ m map[string]*call // lazily initialized
+}
+
+// Result holds the results of Do, so they can be passed
+// on a channel.
+type Result struct {
+ Val interface{}
+ Err error
+ Shared bool
+}
+
+// Do executes and returns the results of the given function, making
+// sure that only one execution is in-flight for a given key at a
+// time. If a duplicate comes in, the duplicate caller waits for the
+// original to complete and receives the same results.
+// The return value shared indicates whether v was given to multiple callers.
+func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
+ g.mu.Lock()
+ if g.m == nil {
+ g.m = make(map[string]*call)
+ }
+ if c, ok := g.m[key]; ok {
+ c.dups++
+ g.mu.Unlock()
+ c.wg.Wait()
+
+ if e, ok := c.err.(*panicError); ok {
+ panic(e)
+ } else if c.err == errGoexit {
+ runtime.Goexit()
+ }
+ return c.val, c.err, true
+ }
+ c := new(call)
+ c.wg.Add(1)
+ g.m[key] = c
+ g.mu.Unlock()
+
+ g.doCall(c, key, fn)
+ return c.val, c.err, c.dups > 0
+}
+
+// DoChan is like Do but returns a channel that will receive the
+// results when they are ready.
+//
+// The returned channel will not be closed.
+func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
+ ch := make(chan Result, 1)
+ g.mu.Lock()
+ if g.m == nil {
+ g.m = make(map[string]*call)
+ }
+ if c, ok := g.m[key]; ok {
+ c.dups++
+ c.chans = append(c.chans, ch)
+ g.mu.Unlock()
+ return ch
+ }
+ c := &call{chans: []chan<- Result{ch}}
+ c.wg.Add(1)
+ g.m[key] = c
+ g.mu.Unlock()
+
+ go g.doCall(c, key, fn)
+
+ return ch
+}
+
+// doCall handles the single call for a key.
+func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
+ normalReturn := false
+ recovered := false
+
+ // use double-defer to distinguish panic from runtime.Goexit,
+ // more details see https://golang.org/cl/134395
+ defer func() {
+ // the given function invoked runtime.Goexit
+ if !normalReturn && !recovered {
+ c.err = errGoexit
+ }
+
+ c.wg.Done()
+ g.mu.Lock()
+ defer g.mu.Unlock()
+ if !c.forgotten {
+ delete(g.m, key)
+ }
+
+ if e, ok := c.err.(*panicError); ok {
+ // In order to prevent the waiting channels from being blocked forever,
+ // needs to ensure that this panic cannot be recovered.
+ if len(c.chans) > 0 {
+ go panic(e)
+ select {} // Keep this goroutine around so that it will appear in the crash dump.
+ } else {
+ panic(e)
+ }
+ } else if c.err == errGoexit {
+ // Already in the process of goexit, no need to call again
+ } else {
+ // Normal return
+ for _, ch := range c.chans {
+ ch <- Result{c.val, c.err, c.dups > 0}
+ }
+ }
+ }()
+
+ func() {
+ defer func() {
+ if !normalReturn {
+ // Ideally, we would wait to take a stack trace until we've determined
+ // whether this is a panic or a runtime.Goexit.
+ //
+ // Unfortunately, the only way we can distinguish the two is to see
+ // whether the recover stopped the goroutine from terminating, and by
+ // the time we know that, the part of the stack trace relevant to the
+ // panic has been discarded.
+ if r := recover(); r != nil {
+ c.err = newPanicError(r)
+ }
+ }
+ }()
+
+ c.val, c.err = fn()
+ normalReturn = true
+ }()
+
+ if !normalReturn {
+ recovered = true
+ }
+}
+
+// Forget tells the singleflight to forget about a key. Future calls
+// to Do for this key will call the function rather than waiting for
+// an earlier call to complete.
+func (g *Group) Forget(key string) {
+ g.mu.Lock()
+ if c, ok := g.m[key]; ok {
+ c.forgotten = true
+ }
+ delete(g.m, key)
+ g.mu.Unlock()
+}
diff --git a/vendor/github.com/aws/smithy-go/modman.toml b/vendor/github.com/aws/smithy-go/modman.toml
new file mode 100644
index 00000000..9d94b7cb
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/modman.toml
@@ -0,0 +1,10 @@
+[dependencies]
+ "github.com/jmespath/go-jmespath" = "v0.4.0"
+
+[modules]
+
+ [modules.codegen]
+ no_tag = true
+
+ [modules."codegen/smithy-go-codegen/build/test-generated/go/internal/testmodule"]
+ no_tag = true
diff --git a/vendor/github.com/aws/smithy-go/private/requestcompression/gzip.go b/vendor/github.com/aws/smithy-go/private/requestcompression/gzip.go
new file mode 100644
index 00000000..004d78f2
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/private/requestcompression/gzip.go
@@ -0,0 +1,30 @@
+package requestcompression
+
+import (
+ "bytes"
+ "compress/gzip"
+ "fmt"
+ "io"
+)
+
+func gzipCompress(input io.Reader) ([]byte, error) {
+ var b bytes.Buffer
+ w, err := gzip.NewWriterLevel(&b, gzip.DefaultCompression)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create gzip writer, %v", err)
+ }
+
+ inBytes, err := io.ReadAll(input)
+ if err != nil {
+ return nil, fmt.Errorf("failed read payload to compress, %v", err)
+ }
+
+ if _, err = w.Write(inBytes); err != nil {
+ return nil, fmt.Errorf("failed to write payload to be compressed, %v", err)
+ }
+ if err = w.Close(); err != nil {
+ return nil, fmt.Errorf("failed to flush payload being compressed, %v", err)
+ }
+
+ return b.Bytes(), nil
+}
diff --git a/vendor/github.com/aws/smithy-go/private/requestcompression/middleware_capture_request_compression.go b/vendor/github.com/aws/smithy-go/private/requestcompression/middleware_capture_request_compression.go
new file mode 100644
index 00000000..06c16afc
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/private/requestcompression/middleware_capture_request_compression.go
@@ -0,0 +1,52 @@
+package requestcompression
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "net/http"
+)
+
+const captureUncompressedRequestID = "CaptureUncompressedRequest"
+
+// AddCaptureUncompressedRequestMiddleware captures http request before compress encoding for check
+func AddCaptureUncompressedRequestMiddleware(stack *middleware.Stack, buf *bytes.Buffer) error {
+ return stack.Serialize.Insert(&captureUncompressedRequestMiddleware{
+ buf: buf,
+ }, "RequestCompression", middleware.Before)
+}
+
+type captureUncompressedRequestMiddleware struct {
+ req *http.Request
+ buf *bytes.Buffer
+ bytes []byte
+}
+
+// ID returns id of the captureUncompressedRequestMiddleware
+func (*captureUncompressedRequestMiddleware) ID() string {
+ return captureUncompressedRequestID
+}
+
+// HandleSerialize captures request payload before it is compressed by request compression middleware
+func (m *captureUncompressedRequestMiddleware) HandleSerialize(ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ output middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := input.Request.(*smithyhttp.Request)
+ if !ok {
+ return output, metadata, fmt.Errorf("error when retrieving http request")
+ }
+
+ _, err = io.Copy(m.buf, request.GetStream())
+ if err != nil {
+ return output, metadata, fmt.Errorf("error when copying http request stream: %q", err)
+ }
+ if err = request.RewindStream(); err != nil {
+ return output, metadata, fmt.Errorf("error when rewinding request stream: %q", err)
+ }
+
+ return next.HandleSerialize(ctx, input)
+}
diff --git a/vendor/github.com/aws/smithy-go/private/requestcompression/request_compression.go b/vendor/github.com/aws/smithy-go/private/requestcompression/request_compression.go
new file mode 100644
index 00000000..7c414760
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/private/requestcompression/request_compression.go
@@ -0,0 +1,103 @@
+// Package requestcompression implements runtime support for smithy-modeled
+// request compression.
+//
+// This package is designated as private and is intended for use only by the
+// smithy client runtime. The exported API therein is not considered stable and
+// is subject to breaking changes without notice.
+package requestcompression
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/transport/http"
+ "io"
+)
+
+const MaxRequestMinCompressSizeBytes = 10485760
+
+// Enumeration values for supported compress Algorithms.
+const (
+ GZIP = "gzip"
+)
+
+type compressFunc func(io.Reader) ([]byte, error)
+
+var allowedAlgorithms = map[string]compressFunc{
+ GZIP: gzipCompress,
+}
+
+// AddRequestCompression add requestCompression middleware to op stack
+func AddRequestCompression(stack *middleware.Stack, disabled bool, minBytes int64, algorithms []string) error {
+ return stack.Serialize.Add(&requestCompression{
+ disableRequestCompression: disabled,
+ requestMinCompressSizeBytes: minBytes,
+ compressAlgorithms: algorithms,
+ }, middleware.After)
+}
+
+type requestCompression struct {
+ disableRequestCompression bool
+ requestMinCompressSizeBytes int64
+ compressAlgorithms []string
+}
+
+// ID returns the ID of the middleware
+func (m requestCompression) ID() string {
+ return "RequestCompression"
+}
+
+// HandleSerialize gzip compress the request's stream/body if enabled by config fields
+func (m requestCompression) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.disableRequestCompression {
+ return next.HandleSerialize(ctx, in)
+ }
+ // still need to check requestMinCompressSizeBytes in case it is out of range after service client config
+ if m.requestMinCompressSizeBytes < 0 || m.requestMinCompressSizeBytes > MaxRequestMinCompressSizeBytes {
+ return out, metadata, fmt.Errorf("invalid range for min request compression size bytes %d, must be within 0 and 10485760 inclusively", m.requestMinCompressSizeBytes)
+ }
+
+ req, ok := in.Request.(*http.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ for _, algorithm := range m.compressAlgorithms {
+ compressFunc := allowedAlgorithms[algorithm]
+ if compressFunc != nil {
+ if stream := req.GetStream(); stream != nil {
+ size, found, err := req.StreamLength()
+ if err != nil {
+ return out, metadata, fmt.Errorf("error while finding request stream length, %v", err)
+ } else if !found || size < m.requestMinCompressSizeBytes {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ compressedBytes, err := compressFunc(stream)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to compress request stream, %v", err)
+ }
+
+ var newReq *http.Request
+ if newReq, err = req.SetStream(bytes.NewReader(compressedBytes)); err != nil {
+ return out, metadata, fmt.Errorf("failed to set request stream, %v", err)
+ }
+ *req = *newReq
+
+ if val := req.Header.Get("Content-Encoding"); val != "" {
+ req.Header.Set("Content-Encoding", fmt.Sprintf("%s, %s", val, algorithm))
+ } else {
+ req.Header.Set("Content-Encoding", algorithm)
+ }
+ }
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
diff --git a/vendor/github.com/aws/smithy-go/properties.go b/vendor/github.com/aws/smithy-go/properties.go
new file mode 100644
index 00000000..c9af66c0
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/properties.go
@@ -0,0 +1,62 @@
+package smithy
+
+// PropertiesReader provides an interface for reading metadata from the
+// underlying metadata container.
+type PropertiesReader interface {
+ Get(key interface{}) interface{}
+}
+
+// Properties provides storing and reading metadata values. Keys may be any
+// comparable value type. Get and Set will panic if a key is not comparable.
+//
+// The zero value for a Properties instance is ready for reads/writes without
+// any additional initialization.
+type Properties struct {
+ values map[interface{}]interface{}
+}
+
+// Get attempts to retrieve the value the key points to. Returns nil if the
+// key was not found.
+//
+// Panics if key type is not comparable.
+func (m *Properties) Get(key interface{}) interface{} {
+ m.lazyInit()
+ return m.values[key]
+}
+
+// Set stores the value pointed to by the key. If a value already exists at
+// that key it will be replaced with the new value.
+//
+// Panics if the key type is not comparable.
+func (m *Properties) Set(key, value interface{}) {
+ m.lazyInit()
+ m.values[key] = value
+}
+
+// Has returns whether the key exists in the metadata.
+//
+// Panics if the key type is not comparable.
+func (m *Properties) Has(key interface{}) bool {
+ m.lazyInit()
+ _, ok := m.values[key]
+ return ok
+}
+
+// SetAll accepts all of the given Properties into the receiver, overwriting
+// any existing keys in the case of conflicts.
+func (m *Properties) SetAll(other *Properties) {
+ if other.values == nil {
+ return
+ }
+
+ m.lazyInit()
+ for k, v := range other.values {
+ m.values[k] = v
+ }
+}
+
+func (m *Properties) lazyInit() {
+ if m.values == nil {
+ m.values = map[interface{}]interface{}{}
+ }
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/auth.go b/vendor/github.com/aws/smithy-go/transport/http/auth.go
new file mode 100644
index 00000000..58e1ab5e
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/auth.go
@@ -0,0 +1,21 @@
+package http
+
+import (
+ "context"
+
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+)
+
+// AuthScheme defines an HTTP authentication scheme.
+type AuthScheme interface {
+ SchemeID() string
+ IdentityResolver(auth.IdentityResolverOptions) auth.IdentityResolver
+ Signer() Signer
+}
+
+// Signer defines the interface through which HTTP requests are supplemented
+// with an Identity.
+type Signer interface {
+ SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go b/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go
new file mode 100644
index 00000000..d60cf2a6
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go
@@ -0,0 +1,45 @@
+package http
+
+import (
+ "context"
+
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/auth"
+)
+
+// NewAnonymousScheme returns the anonymous HTTP auth scheme.
+func NewAnonymousScheme() AuthScheme {
+ return &authScheme{
+ schemeID: auth.SchemeIDAnonymous,
+ signer: &nopSigner{},
+ }
+}
+
+// authScheme is parameterized to generically implement the exported AuthScheme
+// interface
+type authScheme struct {
+ schemeID string
+ signer Signer
+}
+
+var _ AuthScheme = (*authScheme)(nil)
+
+func (s *authScheme) SchemeID() string {
+ return s.schemeID
+}
+
+func (s *authScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver {
+ return o.GetIdentityResolver(s.schemeID)
+}
+
+func (s *authScheme) Signer() Signer {
+ return s.signer
+}
+
+type nopSigner struct{}
+
+var _ Signer = (*nopSigner)(nil)
+
+func (*nopSigner) SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error {
+ return nil
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go
new file mode 100644
index 00000000..855c2272
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go
@@ -0,0 +1,81 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+// WithHeaderComment instruments a middleware stack to append an HTTP field
+// comment to the given header as specified in RFC 9110
+// (https://www.rfc-editor.org/rfc/rfc9110#name-comments).
+//
+// The header is case-insensitive. If the provided header exists when the
+// middleware runs, the content will be inserted as-is enclosed in parentheses.
+//
+// Note that per the HTTP specification, comments are only allowed in fields
+// containing "comment" as part of their field value definition, but this API
+// will NOT verify whether the provided header is one of them.
+//
+// WithHeaderComment MAY be applied more than once to a middleware stack and/or
+// more than once per header.
+func WithHeaderComment(header, content string) func(*middleware.Stack) error {
+ return func(s *middleware.Stack) error {
+ m, err := getOrAddHeaderComment(s)
+ if err != nil {
+ return fmt.Errorf("get or add header comment: %v", err)
+ }
+
+ m.values.Add(header, content)
+ return nil
+ }
+}
+
+type headerCommentMiddleware struct {
+ values http.Header // hijack case-insensitive access APIs
+}
+
+func (*headerCommentMiddleware) ID() string {
+ return "headerComment"
+}
+
+func (m *headerCommentMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ r, ok := in.Request.(*Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ for h, contents := range m.values {
+ for _, c := range contents {
+ if existing := r.Header.Get(h); existing != "" {
+ r.Header.Set(h, fmt.Sprintf("%s (%s)", existing, c))
+ }
+ }
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+func getOrAddHeaderComment(s *middleware.Stack) (*headerCommentMiddleware, error) {
+ id := (*headerCommentMiddleware)(nil).ID()
+ m, ok := s.Build.Get(id)
+ if !ok {
+ m := &headerCommentMiddleware{values: http.Header{}}
+ if err := s.Build.Add(m, middleware.After); err != nil {
+ return nil, fmt.Errorf("add build: %v", err)
+ }
+
+ return m, nil
+ }
+
+ hc, ok := m.(*headerCommentMiddleware)
+ if !ok {
+ return nil, fmt.Errorf("existing middleware w/ id %s is not *headerCommentMiddleware", id)
+ }
+
+ return hc, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go
index 49884e6a..eac32b4b 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go
@@ -7,6 +7,85 @@ import (
"github.com/aws/smithy-go/middleware"
)
+type isContentTypeAutoSet struct{}
+
+// SetIsContentTypeDefaultValue returns a Context specifying if the request's
+// content-type header was set to a default value.
+func SetIsContentTypeDefaultValue(ctx context.Context, isDefault bool) context.Context {
+ return context.WithValue(ctx, isContentTypeAutoSet{}, isDefault)
+}
+
+// GetIsContentTypeDefaultValue returns if the content-type HTTP header on the
+// request is a default value that was auto assigned by an operation
+// serializer. Allows middleware post serialization to know if the content-type
+// was auto set to a default value or not.
+//
+// Also returns false if the Context value was never updated to include if
+// content-type was set to a default value.
+func GetIsContentTypeDefaultValue(ctx context.Context) bool {
+ v, _ := ctx.Value(isContentTypeAutoSet{}).(bool)
+ return v
+}
+
+// AddNoPayloadDefaultContentTypeRemover Adds the DefaultContentTypeRemover
+// middleware to the stack after the operation serializer. This middleware will
+// remove the content-type header from the request if it was set as a default
+// value, and no request payload is present.
+//
+// Returns error if unable to add the middleware.
+func AddNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) {
+ err = stack.Serialize.Insert(removeDefaultContentType{},
+ "OperationSerializer", middleware.After)
+ if err != nil {
+ return fmt.Errorf("failed to add %s serialize middleware, %w",
+ removeDefaultContentType{}.ID(), err)
+ }
+
+ return nil
+}
+
+// RemoveNoPayloadDefaultContentTypeRemover removes the
+// DefaultContentTypeRemover middleware from the stack. Returns an error if
+// unable to remove the middleware.
+func RemoveNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) {
+ _, err = stack.Serialize.Remove(removeDefaultContentType{}.ID())
+ if err != nil {
+ return fmt.Errorf("failed to remove %s serialize middleware, %w",
+ removeDefaultContentType{}.ID(), err)
+
+ }
+ return nil
+}
+
+// removeDefaultContentType provides after serialization middleware that will
+// remove the content-type header from an HTTP request if the header was set as
+// a default value by the operation serializer, and there is no request payload.
+type removeDefaultContentType struct{}
+
+// ID returns the middleware ID
+func (removeDefaultContentType) ID() string { return "RemoveDefaultContentType" }
+
+// HandleSerialize implements the serialization middleware.
+func (removeDefaultContentType) HandleSerialize(
+ ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, meta middleware.Metadata, err error,
+) {
+ req, ok := input.Request.(*Request)
+ if !ok {
+ return out, meta, fmt.Errorf(
+ "unexpected request type %T for removeDefaultContentType middleware",
+ input.Request)
+ }
+
+ if GetIsContentTypeDefaultValue(ctx) && req.GetStream() == nil {
+ req.Header.Del("Content-Type")
+ input.Request = req
+ }
+
+ return next.HandleSerialize(ctx, input)
+}
+
type headerValue struct {
header string
value string
diff --git a/vendor/github.com/aws/smithy-go/transport/http/properties.go b/vendor/github.com/aws/smithy-go/transport/http/properties.go
new file mode 100644
index 00000000..c65aa393
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/properties.go
@@ -0,0 +1,80 @@
+package http
+
+import smithy "github.com/aws/smithy-go"
+
+type (
+ sigV4SigningNameKey struct{}
+ sigV4SigningRegionKey struct{}
+
+ sigV4ASigningNameKey struct{}
+ sigV4ASigningRegionsKey struct{}
+
+ isUnsignedPayloadKey struct{}
+ disableDoubleEncodingKey struct{}
+)
+
+// GetSigV4SigningName gets the signing name from Properties.
+func GetSigV4SigningName(p *smithy.Properties) (string, bool) {
+ v, ok := p.Get(sigV4SigningNameKey{}).(string)
+ return v, ok
+}
+
+// SetSigV4SigningName sets the signing name on Properties.
+func SetSigV4SigningName(p *smithy.Properties, name string) {
+ p.Set(sigV4SigningNameKey{}, name)
+}
+
+// GetSigV4SigningRegion gets the signing region from Properties.
+func GetSigV4SigningRegion(p *smithy.Properties) (string, bool) {
+ v, ok := p.Get(sigV4SigningRegionKey{}).(string)
+ return v, ok
+}
+
+// SetSigV4SigningRegion sets the signing region on Properties.
+func SetSigV4SigningRegion(p *smithy.Properties, region string) {
+ p.Set(sigV4SigningRegionKey{}, region)
+}
+
+// GetSigV4ASigningName gets the v4a signing name from Properties.
+func GetSigV4ASigningName(p *smithy.Properties) (string, bool) {
+ v, ok := p.Get(sigV4ASigningNameKey{}).(string)
+ return v, ok
+}
+
+// SetSigV4ASigningName sets the signing name on Properties.
+func SetSigV4ASigningName(p *smithy.Properties, name string) {
+ p.Set(sigV4ASigningNameKey{}, name)
+}
+
+// GetSigV4ASigningRegion gets the v4a signing region set from Properties.
+func GetSigV4ASigningRegions(p *smithy.Properties) ([]string, bool) {
+ v, ok := p.Get(sigV4ASigningRegionsKey{}).([]string)
+ return v, ok
+}
+
+// SetSigV4ASigningRegions sets the v4a signing region set on Properties.
+func SetSigV4ASigningRegions(p *smithy.Properties, regions []string) {
+ p.Set(sigV4ASigningRegionsKey{}, regions)
+}
+
+// GetIsUnsignedPayload gets whether the payload is unsigned from Properties.
+func GetIsUnsignedPayload(p *smithy.Properties) (bool, bool) {
+ v, ok := p.Get(isUnsignedPayloadKey{}).(bool)
+ return v, ok
+}
+
+// SetIsUnsignedPayload sets whether the payload is unsigned on Properties.
+func SetIsUnsignedPayload(p *smithy.Properties, isUnsignedPayload bool) {
+ p.Set(isUnsignedPayloadKey{}, isUnsignedPayload)
+}
+
+// GetDisableDoubleEncoding gets whether the payload is unsigned from Properties.
+func GetDisableDoubleEncoding(p *smithy.Properties) (bool, bool) {
+ v, ok := p.Get(disableDoubleEncodingKey{}).(bool)
+ return v, ok
+}
+
+// SetDisableDoubleEncoding sets whether the payload is unsigned on Properties.
+func SetDisableDoubleEncoding(p *smithy.Properties, disableDoubleEncoding bool) {
+ p.Set(disableDoubleEncodingKey{}, disableDoubleEncoding)
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/request.go b/vendor/github.com/aws/smithy-go/transport/http/request.go
index ffac684f..7177d6f9 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/request.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/request.go
@@ -7,6 +7,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
+ "strings"
iointernal "github.com/aws/smithy-go/transport/http/internal/io"
)
@@ -33,6 +34,14 @@ func NewStackRequest() interface{} {
}
}
+// IsHTTPS returns if the request is HTTPS. Returns false if no endpoint URL is set.
+func (r *Request) IsHTTPS() bool {
+ if r.URL == nil {
+ return false
+ }
+ return strings.EqualFold(r.URL.Scheme, "https")
+}
+
// Clone returns a deep copy of the Request for the new context. A reference to
// the Stream is copied, but the underlying stream is not copied.
func (r *Request) Clone() *Request {
diff --git a/vendor/google.golang.org/protobuf/AUTHORS b/vendor/google.golang.org/protobuf/AUTHORS
deleted file mode 100644
index 2b00ddba..00000000
--- a/vendor/google.golang.org/protobuf/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at https://tip.golang.org/AUTHORS.
diff --git a/vendor/google.golang.org/protobuf/CONTRIBUTORS b/vendor/google.golang.org/protobuf/CONTRIBUTORS
deleted file mode 100644
index 1fbd3e97..00000000
--- a/vendor/google.golang.org/protobuf/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at https://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go
index 179d6e8f..a45f112b 100644
--- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go
+++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go
@@ -17,11 +17,11 @@ import (
"google.golang.org/protobuf/internal/set"
"google.golang.org/protobuf/internal/strs"
"google.golang.org/protobuf/proto"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/reflect/protoregistry"
)
-// Unmarshal reads the given []byte into the given proto.Message.
+// Unmarshal reads the given []byte into the given [proto.Message].
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func Unmarshal(b []byte, m proto.Message) error {
return UnmarshalOptions{}.Unmarshal(b, m)
@@ -51,7 +51,7 @@ type UnmarshalOptions struct {
}
}
-// Unmarshal reads the given []byte and populates the given proto.Message
+// Unmarshal reads the given []byte and populates the given [proto.Message]
// using options in the UnmarshalOptions object.
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error {
@@ -103,7 +103,7 @@ func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
}
// unmarshalMessage unmarshals into the given protoreflect.Message.
-func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error {
+func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) error {
messageDesc := m.Descriptor()
if !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) {
return errors.New("no support for proto1 MessageSets")
@@ -150,24 +150,24 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error {
}
// Resolve the field descriptor.
- var name pref.Name
- var fd pref.FieldDescriptor
- var xt pref.ExtensionType
+ var name protoreflect.Name
+ var fd protoreflect.FieldDescriptor
+ var xt protoreflect.ExtensionType
var xtErr error
var isFieldNumberName bool
switch tok.NameKind() {
case text.IdentName:
- name = pref.Name(tok.IdentName())
+ name = protoreflect.Name(tok.IdentName())
fd = fieldDescs.ByTextName(string(name))
case text.TypeName:
// Handle extensions only. This code path is not for Any.
- xt, xtErr = d.opts.Resolver.FindExtensionByName(pref.FullName(tok.TypeName()))
+ xt, xtErr = d.opts.Resolver.FindExtensionByName(protoreflect.FullName(tok.TypeName()))
case text.FieldNumber:
isFieldNumberName = true
- num := pref.FieldNumber(tok.FieldNumber())
+ num := protoreflect.FieldNumber(tok.FieldNumber())
if !num.IsValid() {
return d.newError(tok.Pos(), "invalid field number: %d", num)
}
@@ -215,7 +215,7 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error {
switch {
case fd.IsList():
kind := fd.Kind()
- if kind != pref.MessageKind && kind != pref.GroupKind && !tok.HasSeparator() {
+ if kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() {
return d.syntaxError(tok.Pos(), "missing field separator :")
}
@@ -232,7 +232,7 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error {
default:
kind := fd.Kind()
- if kind != pref.MessageKind && kind != pref.GroupKind && !tok.HasSeparator() {
+ if kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() {
return d.syntaxError(tok.Pos(), "missing field separator :")
}
@@ -262,11 +262,11 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error {
// unmarshalSingular unmarshals a non-repeated field value specified by the
// given FieldDescriptor.
-func (d decoder) unmarshalSingular(fd pref.FieldDescriptor, m pref.Message) error {
- var val pref.Value
+func (d decoder) unmarshalSingular(fd protoreflect.FieldDescriptor, m protoreflect.Message) error {
+ var val protoreflect.Value
var err error
switch fd.Kind() {
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
val = m.NewField(fd)
err = d.unmarshalMessage(val.Message(), true)
default:
@@ -280,94 +280,94 @@ func (d decoder) unmarshalSingular(fd pref.FieldDescriptor, m pref.Message) erro
// unmarshalScalar unmarshals a scalar/enum protoreflect.Value specified by the
// given FieldDescriptor.
-func (d decoder) unmarshalScalar(fd pref.FieldDescriptor) (pref.Value, error) {
+func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {
tok, err := d.Read()
if err != nil {
- return pref.Value{}, err
+ return protoreflect.Value{}, err
}
if tok.Kind() != text.Scalar {
- return pref.Value{}, d.unexpectedTokenError(tok)
+ return protoreflect.Value{}, d.unexpectedTokenError(tok)
}
kind := fd.Kind()
switch kind {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if b, ok := tok.Bool(); ok {
- return pref.ValueOfBool(b), nil
+ return protoreflect.ValueOfBool(b), nil
}
- case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind:
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
if n, ok := tok.Int32(); ok {
- return pref.ValueOfInt32(n), nil
+ return protoreflect.ValueOfInt32(n), nil
}
- case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind:
+ case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
if n, ok := tok.Int64(); ok {
- return pref.ValueOfInt64(n), nil
+ return protoreflect.ValueOfInt64(n), nil
}
- case pref.Uint32Kind, pref.Fixed32Kind:
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
if n, ok := tok.Uint32(); ok {
- return pref.ValueOfUint32(n), nil
+ return protoreflect.ValueOfUint32(n), nil
}
- case pref.Uint64Kind, pref.Fixed64Kind:
+ case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
if n, ok := tok.Uint64(); ok {
- return pref.ValueOfUint64(n), nil
+ return protoreflect.ValueOfUint64(n), nil
}
- case pref.FloatKind:
+ case protoreflect.FloatKind:
if n, ok := tok.Float32(); ok {
- return pref.ValueOfFloat32(n), nil
+ return protoreflect.ValueOfFloat32(n), nil
}
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
if n, ok := tok.Float64(); ok {
- return pref.ValueOfFloat64(n), nil
+ return protoreflect.ValueOfFloat64(n), nil
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if s, ok := tok.String(); ok {
if strs.EnforceUTF8(fd) && !utf8.ValidString(s) {
- return pref.Value{}, d.newError(tok.Pos(), "contains invalid UTF-8")
+ return protoreflect.Value{}, d.newError(tok.Pos(), "contains invalid UTF-8")
}
- return pref.ValueOfString(s), nil
+ return protoreflect.ValueOfString(s), nil
}
- case pref.BytesKind:
+ case protoreflect.BytesKind:
if b, ok := tok.String(); ok {
- return pref.ValueOfBytes([]byte(b)), nil
+ return protoreflect.ValueOfBytes([]byte(b)), nil
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if lit, ok := tok.Enum(); ok {
// Lookup EnumNumber based on name.
- if enumVal := fd.Enum().Values().ByName(pref.Name(lit)); enumVal != nil {
- return pref.ValueOfEnum(enumVal.Number()), nil
+ if enumVal := fd.Enum().Values().ByName(protoreflect.Name(lit)); enumVal != nil {
+ return protoreflect.ValueOfEnum(enumVal.Number()), nil
}
}
if num, ok := tok.Int32(); ok {
- return pref.ValueOfEnum(pref.EnumNumber(num)), nil
+ return protoreflect.ValueOfEnum(protoreflect.EnumNumber(num)), nil
}
default:
panic(fmt.Sprintf("invalid scalar kind %v", kind))
}
- return pref.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString())
+ return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString())
}
// unmarshalList unmarshals into given protoreflect.List. A list value can
// either be in [] syntax or simply just a single scalar/message value.
-func (d decoder) unmarshalList(fd pref.FieldDescriptor, list pref.List) error {
+func (d decoder) unmarshalList(fd protoreflect.FieldDescriptor, list protoreflect.List) error {
tok, err := d.Peek()
if err != nil {
return err
}
switch fd.Kind() {
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
switch tok.Kind() {
case text.ListOpen:
d.Read()
@@ -441,22 +441,22 @@ func (d decoder) unmarshalList(fd pref.FieldDescriptor, list pref.List) error {
// unmarshalMap unmarshals into given protoreflect.Map. A map value is a
// textproto message containing {key: , value: }.
-func (d decoder) unmarshalMap(fd pref.FieldDescriptor, mmap pref.Map) error {
+func (d decoder) unmarshalMap(fd protoreflect.FieldDescriptor, mmap protoreflect.Map) error {
// Determine ahead whether map entry is a scalar type or a message type in
// order to call the appropriate unmarshalMapValue func inside
// unmarshalMapEntry.
- var unmarshalMapValue func() (pref.Value, error)
+ var unmarshalMapValue func() (protoreflect.Value, error)
switch fd.MapValue().Kind() {
- case pref.MessageKind, pref.GroupKind:
- unmarshalMapValue = func() (pref.Value, error) {
+ case protoreflect.MessageKind, protoreflect.GroupKind:
+ unmarshalMapValue = func() (protoreflect.Value, error) {
pval := mmap.NewValue()
if err := d.unmarshalMessage(pval.Message(), true); err != nil {
- return pref.Value{}, err
+ return protoreflect.Value{}, err
}
return pval, nil
}
default:
- unmarshalMapValue = func() (pref.Value, error) {
+ unmarshalMapValue = func() (protoreflect.Value, error) {
return d.unmarshalScalar(fd.MapValue())
}
}
@@ -494,9 +494,9 @@ func (d decoder) unmarshalMap(fd pref.FieldDescriptor, mmap pref.Map) error {
// unmarshalMap unmarshals into given protoreflect.Map. A map value is a
// textproto message containing {key: , value: }.
-func (d decoder) unmarshalMapEntry(fd pref.FieldDescriptor, mmap pref.Map, unmarshalMapValue func() (pref.Value, error)) error {
- var key pref.MapKey
- var pval pref.Value
+func (d decoder) unmarshalMapEntry(fd protoreflect.FieldDescriptor, mmap protoreflect.Map, unmarshalMapValue func() (protoreflect.Value, error)) error {
+ var key protoreflect.MapKey
+ var pval protoreflect.Value
Loop:
for {
// Read field name.
@@ -520,7 +520,7 @@ Loop:
return d.unexpectedTokenError(tok)
}
- switch name := pref.Name(tok.IdentName()); name {
+ switch name := protoreflect.Name(tok.IdentName()); name {
case genid.MapEntry_Key_field_name:
if !tok.HasSeparator() {
return d.syntaxError(tok.Pos(), "missing field separator :")
@@ -535,7 +535,7 @@ Loop:
key = val.MapKey()
case genid.MapEntry_Value_field_name:
- if kind := fd.MapValue().Kind(); (kind != pref.MessageKind) && (kind != pref.GroupKind) {
+ if kind := fd.MapValue().Kind(); (kind != protoreflect.MessageKind) && (kind != protoreflect.GroupKind) {
if !tok.HasSeparator() {
return d.syntaxError(tok.Pos(), "missing field separator :")
}
@@ -561,7 +561,7 @@ Loop:
}
if !pval.IsValid() {
switch fd.MapValue().Kind() {
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
// If value field is not set for message/group types, construct an
// empty one as default.
pval = mmap.NewValue()
@@ -575,7 +575,7 @@ Loop:
// unmarshalAny unmarshals an Any textproto. It can either be in expanded form
// or non-expanded form.
-func (d decoder) unmarshalAny(m pref.Message, checkDelims bool) error {
+func (d decoder) unmarshalAny(m protoreflect.Message, checkDelims bool) error {
var typeURL string
var bValue []byte
var seenTypeUrl bool
@@ -619,7 +619,7 @@ Loop:
return d.syntaxError(tok.Pos(), "missing field separator :")
}
- switch name := pref.Name(tok.IdentName()); name {
+ switch name := protoreflect.Name(tok.IdentName()); name {
case genid.Any_TypeUrl_field_name:
if seenTypeUrl {
return d.newError(tok.Pos(), "duplicate %v field", genid.Any_TypeUrl_field_fullname)
@@ -686,10 +686,10 @@ Loop:
fds := m.Descriptor().Fields()
if len(typeURL) > 0 {
- m.Set(fds.ByNumber(genid.Any_TypeUrl_field_number), pref.ValueOfString(typeURL))
+ m.Set(fds.ByNumber(genid.Any_TypeUrl_field_number), protoreflect.ValueOfString(typeURL))
}
if len(bValue) > 0 {
- m.Set(fds.ByNumber(genid.Any_Value_field_number), pref.ValueOfBytes(bValue))
+ m.Set(fds.ByNumber(genid.Any_Value_field_number), protoreflect.ValueOfBytes(bValue))
}
return nil
}
@@ -739,7 +739,9 @@ func (d decoder) skipValue() error {
case text.ListClose:
return nil
case text.MessageOpen:
- return d.skipMessageValue()
+ if err := d.skipMessageValue(); err != nil {
+ return err
+ }
default:
// Skip items. This will not validate whether skipped values are
// of the same type or not, same behavior as C++
diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go
index 8d5304dc..95967e81 100644
--- a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go
+++ b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go
@@ -20,7 +20,6 @@ import (
"google.golang.org/protobuf/internal/strs"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/reflect/protoregistry"
)
@@ -34,7 +33,7 @@ func Format(m proto.Message) string {
return MarshalOptions{Multiline: true}.Format(m)
}
-// Marshal writes the given proto.Message in textproto format using default
+// Marshal writes the given [proto.Message] in textproto format using default
// options. Do not depend on the output being stable. It may change over time
// across different versions of the program.
func Marshal(m proto.Message) ([]byte, error) {
@@ -98,17 +97,23 @@ func (o MarshalOptions) Format(m proto.Message) string {
return string(b)
}
-// Marshal writes the given proto.Message in textproto format using options in
+// Marshal writes the given [proto.Message] in textproto format using options in
// MarshalOptions object. Do not depend on the output being stable. It may
// change over time across different versions of the program.
func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {
- return o.marshal(m)
+ return o.marshal(nil, m)
+}
+
+// MarshalAppend appends the textproto format encoding of m to b,
+// returning the result.
+func (o MarshalOptions) MarshalAppend(b []byte, m proto.Message) ([]byte, error) {
+ return o.marshal(b, m)
}
// marshal is a centralized function that all marshal operations go through.
// For profiling purposes, avoid changing the name of this function or
// introducing other code paths for marshal that do not go through this.
-func (o MarshalOptions) marshal(m proto.Message) ([]byte, error) {
+func (o MarshalOptions) marshal(b []byte, m proto.Message) ([]byte, error) {
var delims = [2]byte{'{', '}'}
if o.Multiline && o.Indent == "" {
@@ -118,7 +123,7 @@ func (o MarshalOptions) marshal(m proto.Message) ([]byte, error) {
o.Resolver = protoregistry.GlobalTypes
}
- internalEnc, err := text.NewEncoder(o.Indent, delims, o.EmitASCII)
+ internalEnc, err := text.NewEncoder(b, o.Indent, delims, o.EmitASCII)
if err != nil {
return nil, err
}
@@ -126,7 +131,7 @@ func (o MarshalOptions) marshal(m proto.Message) ([]byte, error) {
// Treat nil message interface as an empty message,
// in which case there is nothing to output.
if m == nil {
- return []byte{}, nil
+ return b, nil
}
enc := encoder{internalEnc, o}
@@ -150,7 +155,7 @@ type encoder struct {
}
// marshalMessage marshals the given protoreflect.Message.
-func (e encoder) marshalMessage(m pref.Message, inclDelims bool) error {
+func (e encoder) marshalMessage(m protoreflect.Message, inclDelims bool) error {
messageDesc := m.Descriptor()
if !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) {
return errors.New("no support for proto1 MessageSets")
@@ -190,7 +195,7 @@ func (e encoder) marshalMessage(m pref.Message, inclDelims bool) error {
}
// marshalField marshals the given field with protoreflect.Value.
-func (e encoder) marshalField(name string, val pref.Value, fd pref.FieldDescriptor) error {
+func (e encoder) marshalField(name string, val protoreflect.Value, fd protoreflect.FieldDescriptor) error {
switch {
case fd.IsList():
return e.marshalList(name, val.List(), fd)
@@ -204,40 +209,40 @@ func (e encoder) marshalField(name string, val pref.Value, fd pref.FieldDescript
// marshalSingular marshals the given non-repeated field value. This includes
// all scalar types, enums, messages, and groups.
-func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error {
+func (e encoder) marshalSingular(val protoreflect.Value, fd protoreflect.FieldDescriptor) error {
kind := fd.Kind()
switch kind {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
e.WriteBool(val.Bool())
- case pref.StringKind:
+ case protoreflect.StringKind:
s := val.String()
if !e.opts.allowInvalidUTF8 && strs.EnforceUTF8(fd) && !utf8.ValidString(s) {
return errors.InvalidUTF8(string(fd.FullName()))
}
e.WriteString(s)
- case pref.Int32Kind, pref.Int64Kind,
- pref.Sint32Kind, pref.Sint64Kind,
- pref.Sfixed32Kind, pref.Sfixed64Kind:
+ case protoreflect.Int32Kind, protoreflect.Int64Kind,
+ protoreflect.Sint32Kind, protoreflect.Sint64Kind,
+ protoreflect.Sfixed32Kind, protoreflect.Sfixed64Kind:
e.WriteInt(val.Int())
- case pref.Uint32Kind, pref.Uint64Kind,
- pref.Fixed32Kind, pref.Fixed64Kind:
+ case protoreflect.Uint32Kind, protoreflect.Uint64Kind,
+ protoreflect.Fixed32Kind, protoreflect.Fixed64Kind:
e.WriteUint(val.Uint())
- case pref.FloatKind:
+ case protoreflect.FloatKind:
// Encoder.WriteFloat handles the special numbers NaN and infinites.
e.WriteFloat(val.Float(), 32)
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
// Encoder.WriteFloat handles the special numbers NaN and infinites.
e.WriteFloat(val.Float(), 64)
- case pref.BytesKind:
+ case protoreflect.BytesKind:
e.WriteString(string(val.Bytes()))
- case pref.EnumKind:
+ case protoreflect.EnumKind:
num := val.Enum()
if desc := fd.Enum().Values().ByNumber(num); desc != nil {
e.WriteLiteral(string(desc.Name()))
@@ -246,7 +251,7 @@ func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error
e.WriteInt(int64(num))
}
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
return e.marshalMessage(val.Message(), true)
default:
@@ -256,7 +261,7 @@ func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error
}
// marshalList marshals the given protoreflect.List as multiple name-value fields.
-func (e encoder) marshalList(name string, list pref.List, fd pref.FieldDescriptor) error {
+func (e encoder) marshalList(name string, list protoreflect.List, fd protoreflect.FieldDescriptor) error {
size := list.Len()
for i := 0; i < size; i++ {
e.WriteName(name)
@@ -268,9 +273,9 @@ func (e encoder) marshalList(name string, list pref.List, fd pref.FieldDescripto
}
// marshalMap marshals the given protoreflect.Map as multiple name-value fields.
-func (e encoder) marshalMap(name string, mmap pref.Map, fd pref.FieldDescriptor) error {
+func (e encoder) marshalMap(name string, mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error {
var err error
- order.RangeEntries(mmap, order.GenericKeyOrder, func(key pref.MapKey, val pref.Value) bool {
+ order.RangeEntries(mmap, order.GenericKeyOrder, func(key protoreflect.MapKey, val protoreflect.Value) bool {
e.WriteName(name)
e.StartMessage()
defer e.EndMessage()
@@ -334,7 +339,7 @@ func (e encoder) marshalUnknown(b []byte) {
// marshalAny marshals the given google.protobuf.Any message in expanded form.
// It returns true if it was able to marshal, else false.
-func (e encoder) marshalAny(any pref.Message) bool {
+func (e encoder) marshalAny(any protoreflect.Message) bool {
// Construct the embedded message.
fds := any.Descriptor().Fields()
fdType := fds.ByNumber(genid.Any_TypeUrl_field_number)
diff --git a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
index a427f8b7..e942bc98 100644
--- a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
+++ b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
@@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.
// Package protowire parses and formats the raw wire encoding.
-// See https://developers.google.com/protocol-buffers/docs/encoding.
+// See https://protobuf.dev/programming-guides/encoding.
//
// For marshaling and unmarshaling entire protobuf messages,
-// use the "google.golang.org/protobuf/proto" package instead.
+// use the [google.golang.org/protobuf/proto] package instead.
package protowire
import (
@@ -21,19 +21,16 @@ import (
type Number int32
const (
- MinValidNumber Number = 1
- FirstReservedNumber Number = 19000
- LastReservedNumber Number = 19999
- MaxValidNumber Number = 1<<29 - 1
+ MinValidNumber Number = 1
+ FirstReservedNumber Number = 19000
+ LastReservedNumber Number = 19999
+ MaxValidNumber Number = 1<<29 - 1
+ DefaultRecursionLimit = 10000
)
// IsValid reports whether the field number is semantically valid.
-//
-// Note that while numbers within the reserved range are semantically invalid,
-// they are syntactically valid in the wire format.
-// Implementations may treat records with reserved field numbers as unknown.
func (n Number) IsValid() bool {
- return MinValidNumber <= n && n < FirstReservedNumber || LastReservedNumber < n && n <= MaxValidNumber
+ return MinValidNumber <= n && n <= MaxValidNumber
}
// Type represents the wire type.
@@ -55,6 +52,7 @@ const (
errCodeOverflow
errCodeReserved
errCodeEndGroup
+ errCodeRecursionDepth
)
var (
@@ -89,7 +87,7 @@ func ParseError(n int) error {
// ConsumeField parses an entire field record (both tag and value) and returns
// the field number, the wire type, and the total length.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
//
// The total length includes the tag header and the end group marker (if the
// field is a group).
@@ -106,12 +104,16 @@ func ConsumeField(b []byte) (Number, Type, int) {
}
// ConsumeFieldValue parses a field value and returns its length.
-// This assumes that the field Number and wire Type have already been parsed.
-// This returns a negative length upon an error (see ParseError).
+// This assumes that the field [Number] and wire [Type] have already been parsed.
+// This returns a negative length upon an error (see [ParseError]).
//
// When parsing a group, the length includes the end group marker and
// the end group is verified to match the starting field number.
func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {
+ return consumeFieldValueD(num, typ, b, DefaultRecursionLimit)
+}
+
+func consumeFieldValueD(num Number, typ Type, b []byte, depth int) (n int) {
switch typ {
case VarintType:
_, n = ConsumeVarint(b)
@@ -126,6 +128,9 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {
_, n = ConsumeBytes(b)
return n
case StartGroupType:
+ if depth < 0 {
+ return errCodeRecursionDepth
+ }
n0 := len(b)
for {
num2, typ2, n := ConsumeTag(b)
@@ -140,7 +145,7 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {
return n0 - len(b)
}
- n = ConsumeFieldValue(num2, typ2, b)
+ n = consumeFieldValueD(num2, typ2, b, depth-1)
if n < 0 {
return n // forward error code
}
@@ -159,7 +164,7 @@ func AppendTag(b []byte, num Number, typ Type) []byte {
}
// ConsumeTag parses b as a varint-encoded tag, reporting its length.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
func ConsumeTag(b []byte) (Number, Type, int) {
v, n := ConsumeVarint(b)
if n < 0 {
@@ -258,7 +263,7 @@ func AppendVarint(b []byte, v uint64) []byte {
}
// ConsumeVarint parses b as a varint-encoded uint64, reporting its length.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
func ConsumeVarint(b []byte) (v uint64, n int) {
var y uint64
if len(b) <= 0 {
@@ -379,7 +384,7 @@ func AppendFixed32(b []byte, v uint32) []byte {
}
// ConsumeFixed32 parses b as a little-endian uint32, reporting its length.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
func ConsumeFixed32(b []byte) (v uint32, n int) {
if len(b) < 4 {
return 0, errCodeTruncated
@@ -407,7 +412,7 @@ func AppendFixed64(b []byte, v uint64) []byte {
}
// ConsumeFixed64 parses b as a little-endian uint64, reporting its length.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
func ConsumeFixed64(b []byte) (v uint64, n int) {
if len(b) < 8 {
return 0, errCodeTruncated
@@ -427,7 +432,7 @@ func AppendBytes(b []byte, v []byte) []byte {
}
// ConsumeBytes parses b as a length-prefixed bytes value, reporting its length.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
func ConsumeBytes(b []byte) (v []byte, n int) {
m, n := ConsumeVarint(b)
if n < 0 {
@@ -451,7 +456,7 @@ func AppendString(b []byte, v string) []byte {
}
// ConsumeString parses b as a length-prefixed bytes value, reporting its length.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
func ConsumeString(b []byte) (v string, n int) {
bb, n := ConsumeBytes(b)
return string(bb), n
@@ -466,7 +471,7 @@ func AppendGroup(b []byte, num Number, v []byte) []byte {
// ConsumeGroup parses b as a group value until the trailing end group marker,
// and verifies that the end marker matches the provided num. The value v
// does not contain the end marker, while the length does contain the end marker.
-// This returns a negative length upon an error (see ParseError).
+// This returns a negative length upon an error (see [ParseError]).
func ConsumeGroup(num Number, b []byte) (v []byte, n int) {
n = ConsumeFieldValue(num, StartGroupType, b)
if n < 0 {
@@ -490,8 +495,8 @@ func SizeGroup(num Number, n int) int {
return n + SizeTag(num)
}
-// DecodeTag decodes the field Number and wire Type from its unified form.
-// The Number is -1 if the decoded field number overflows int32.
+// DecodeTag decodes the field [Number] and wire [Type] from its unified form.
+// The [Number] is -1 if the decoded field number overflows int32.
// Other than overflow, this does not check for field number validity.
func DecodeTag(x uint64) (Number, Type) {
// NOTE: MessageSet allows for larger field numbers than normal.
@@ -501,12 +506,13 @@ func DecodeTag(x uint64) (Number, Type) {
return Number(x >> 3), Type(x & 7)
}
-// EncodeTag encodes the field Number and wire Type into its unified form.
+// EncodeTag encodes the field [Number] and wire [Type] into its unified form.
func EncodeTag(num Number, typ Type) uint64 {
return uint64(num)<<3 | uint64(typ&7)
}
// DecodeZigZag decodes a zig-zag-encoded uint64 as an int64.
+//
// Input: {…, 5, 3, 1, 0, 2, 4, 6, …}
// Output: {…, -3, -2, -1, 0, +1, +2, +3, …}
func DecodeZigZag(x uint64) int64 {
@@ -514,6 +520,7 @@ func DecodeZigZag(x uint64) int64 {
}
// EncodeZigZag encodes an int64 as a zig-zag-encoded uint64.
+//
// Input: {…, -3, -2, -1, 0, +1, +2, +3, …}
// Output: {…, 5, 3, 1, 0, 2, 4, 6, …}
func EncodeZigZag(x int64) uint64 {
@@ -521,6 +528,7 @@ func EncodeZigZag(x int64) uint64 {
}
// DecodeBool decodes a uint64 as a bool.
+//
// Input: { 0, 1, 2, …}
// Output: {false, true, true, …}
func DecodeBool(x uint64) bool {
@@ -528,6 +536,7 @@ func DecodeBool(x uint64) bool {
}
// EncodeBool encodes a bool as a uint64.
+//
// Input: {false, true}
// Output: { 0, 1}
func EncodeBool(x bool) uint64 {
diff --git a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go
index 360c6332..a45625c8 100644
--- a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go
+++ b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go
@@ -14,7 +14,7 @@ import (
"google.golang.org/protobuf/internal/detrand"
"google.golang.org/protobuf/internal/pragma"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type list interface {
@@ -30,17 +30,17 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string {
if isRoot {
var name string
switch vs.(type) {
- case pref.Names:
+ case protoreflect.Names:
name = "Names"
- case pref.FieldNumbers:
+ case protoreflect.FieldNumbers:
name = "FieldNumbers"
- case pref.FieldRanges:
+ case protoreflect.FieldRanges:
name = "FieldRanges"
- case pref.EnumRanges:
+ case protoreflect.EnumRanges:
name = "EnumRanges"
- case pref.FileImports:
+ case protoreflect.FileImports:
name = "FileImports"
- case pref.Descriptor:
+ case protoreflect.Descriptor:
name = reflect.ValueOf(vs).MethodByName("Get").Type().Out(0).Name() + "s"
default:
name = reflect.ValueOf(vs).Elem().Type().Name()
@@ -50,17 +50,17 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string {
var ss []string
switch vs := vs.(type) {
- case pref.Names:
+ case protoreflect.Names:
for i := 0; i < vs.Len(); i++ {
ss = append(ss, fmt.Sprint(vs.Get(i)))
}
return start + joinStrings(ss, false) + end
- case pref.FieldNumbers:
+ case protoreflect.FieldNumbers:
for i := 0; i < vs.Len(); i++ {
ss = append(ss, fmt.Sprint(vs.Get(i)))
}
return start + joinStrings(ss, false) + end
- case pref.FieldRanges:
+ case protoreflect.FieldRanges:
for i := 0; i < vs.Len(); i++ {
r := vs.Get(i)
if r[0]+1 == r[1] {
@@ -70,7 +70,7 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string {
}
}
return start + joinStrings(ss, false) + end
- case pref.EnumRanges:
+ case protoreflect.EnumRanges:
for i := 0; i < vs.Len(); i++ {
r := vs.Get(i)
if r[0] == r[1] {
@@ -80,46 +80,44 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string {
}
}
return start + joinStrings(ss, false) + end
- case pref.FileImports:
+ case protoreflect.FileImports:
for i := 0; i < vs.Len(); i++ {
var rs records
- rs.Append(reflect.ValueOf(vs.Get(i)), "Path", "Package", "IsPublic", "IsWeak")
+ rv := reflect.ValueOf(vs.Get(i))
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Path"), "Path"},
+ {rv.MethodByName("Package"), "Package"},
+ {rv.MethodByName("IsPublic"), "IsPublic"},
+ {rv.MethodByName("IsWeak"), "IsWeak"},
+ }...)
ss = append(ss, "{"+rs.Join()+"}")
}
return start + joinStrings(ss, allowMulti) + end
default:
- _, isEnumValue := vs.(pref.EnumValueDescriptors)
+ _, isEnumValue := vs.(protoreflect.EnumValueDescriptors)
for i := 0; i < vs.Len(); i++ {
m := reflect.ValueOf(vs).MethodByName("Get")
v := m.Call([]reflect.Value{reflect.ValueOf(i)})[0].Interface()
- ss = append(ss, formatDescOpt(v.(pref.Descriptor), false, allowMulti && !isEnumValue))
+ ss = append(ss, formatDescOpt(v.(protoreflect.Descriptor), false, allowMulti && !isEnumValue, nil))
}
return start + joinStrings(ss, allowMulti && isEnumValue) + end
}
}
-// descriptorAccessors is a list of accessors to print for each descriptor.
-//
-// Do not print all accessors since some contain redundant information,
-// while others are pointers that we do not want to follow since the descriptor
-// is actually a cyclic graph.
-//
-// Using a list allows us to print the accessors in a sensible order.
-var descriptorAccessors = map[reflect.Type][]string{
- reflect.TypeOf((*pref.FileDescriptor)(nil)).Elem(): {"Path", "Package", "Imports", "Messages", "Enums", "Extensions", "Services"},
- reflect.TypeOf((*pref.MessageDescriptor)(nil)).Elem(): {"IsMapEntry", "Fields", "Oneofs", "ReservedNames", "ReservedRanges", "RequiredNumbers", "ExtensionRanges", "Messages", "Enums", "Extensions"},
- reflect.TypeOf((*pref.FieldDescriptor)(nil)).Elem(): {"Number", "Cardinality", "Kind", "HasJSONName", "JSONName", "HasPresence", "IsExtension", "IsPacked", "IsWeak", "IsList", "IsMap", "MapKey", "MapValue", "HasDefault", "Default", "ContainingOneof", "ContainingMessage", "Message", "Enum"},
- reflect.TypeOf((*pref.OneofDescriptor)(nil)).Elem(): {"Fields"}, // not directly used; must keep in sync with formatDescOpt
- reflect.TypeOf((*pref.EnumDescriptor)(nil)).Elem(): {"Values", "ReservedNames", "ReservedRanges"},
- reflect.TypeOf((*pref.EnumValueDescriptor)(nil)).Elem(): {"Number"},
- reflect.TypeOf((*pref.ServiceDescriptor)(nil)).Elem(): {"Methods"},
- reflect.TypeOf((*pref.MethodDescriptor)(nil)).Elem(): {"Input", "Output", "IsStreamingClient", "IsStreamingServer"},
+type methodAndName struct {
+ method reflect.Value
+ name string
}
-func FormatDesc(s fmt.State, r rune, t pref.Descriptor) {
- io.WriteString(s, formatDescOpt(t, true, r == 'v' && (s.Flag('+') || s.Flag('#'))))
+func FormatDesc(s fmt.State, r rune, t protoreflect.Descriptor) {
+ io.WriteString(s, formatDescOpt(t, true, r == 'v' && (s.Flag('+') || s.Flag('#')), nil))
}
-func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string {
+
+func InternalFormatDescOptForTesting(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string {
+ return formatDescOpt(t, isRoot, allowMulti, record)
+}
+
+func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string {
rv := reflect.ValueOf(t)
rt := rv.MethodByName("ProtoType").Type().In(0)
@@ -128,27 +126,61 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string {
start = rt.Name() + "{"
}
- _, isFile := t.(pref.FileDescriptor)
- rs := records{allowMulti: allowMulti}
+ _, isFile := t.(protoreflect.FileDescriptor)
+ rs := records{
+ allowMulti: allowMulti,
+ record: record,
+ }
if t.IsPlaceholder() {
if isFile {
- rs.Append(rv, "Path", "Package", "IsPlaceholder")
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Path"), "Path"},
+ {rv.MethodByName("Package"), "Package"},
+ {rv.MethodByName("IsPlaceholder"), "IsPlaceholder"},
+ }...)
} else {
- rs.Append(rv, "FullName", "IsPlaceholder")
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("FullName"), "FullName"},
+ {rv.MethodByName("IsPlaceholder"), "IsPlaceholder"},
+ }...)
}
} else {
switch {
case isFile:
- rs.Append(rv, "Syntax")
+ rs.Append(rv, methodAndName{rv.MethodByName("Syntax"), "Syntax"})
case isRoot:
- rs.Append(rv, "Syntax", "FullName")
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Syntax"), "Syntax"},
+ {rv.MethodByName("FullName"), "FullName"},
+ }...)
default:
- rs.Append(rv, "Name")
+ rs.Append(rv, methodAndName{rv.MethodByName("Name"), "Name"})
}
switch t := t.(type) {
- case pref.FieldDescriptor:
- for _, s := range descriptorAccessors[rt] {
- switch s {
+ case protoreflect.FieldDescriptor:
+ accessors := []methodAndName{
+ {rv.MethodByName("Number"), "Number"},
+ {rv.MethodByName("Cardinality"), "Cardinality"},
+ {rv.MethodByName("Kind"), "Kind"},
+ {rv.MethodByName("HasJSONName"), "HasJSONName"},
+ {rv.MethodByName("JSONName"), "JSONName"},
+ {rv.MethodByName("HasPresence"), "HasPresence"},
+ {rv.MethodByName("IsExtension"), "IsExtension"},
+ {rv.MethodByName("IsPacked"), "IsPacked"},
+ {rv.MethodByName("IsWeak"), "IsWeak"},
+ {rv.MethodByName("IsList"), "IsList"},
+ {rv.MethodByName("IsMap"), "IsMap"},
+ {rv.MethodByName("MapKey"), "MapKey"},
+ {rv.MethodByName("MapValue"), "MapValue"},
+ {rv.MethodByName("HasDefault"), "HasDefault"},
+ {rv.MethodByName("Default"), "Default"},
+ {rv.MethodByName("ContainingOneof"), "ContainingOneof"},
+ {rv.MethodByName("ContainingMessage"), "ContainingMessage"},
+ {rv.MethodByName("Message"), "Message"},
+ {rv.MethodByName("Enum"), "Enum"},
+ }
+ for _, s := range accessors {
+ switch s.name {
case "MapKey":
if k := t.MapKey(); k != nil {
rs.recs = append(rs.recs, [2]string{"MapKey", k.Kind().String()})
@@ -156,21 +188,21 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string {
case "MapValue":
if v := t.MapValue(); v != nil {
switch v.Kind() {
- case pref.EnumKind:
- rs.recs = append(rs.recs, [2]string{"MapValue", string(v.Enum().FullName())})
- case pref.MessageKind, pref.GroupKind:
- rs.recs = append(rs.recs, [2]string{"MapValue", string(v.Message().FullName())})
+ case protoreflect.EnumKind:
+ rs.AppendRecs("MapValue", [2]string{"MapValue", string(v.Enum().FullName())})
+ case protoreflect.MessageKind, protoreflect.GroupKind:
+ rs.AppendRecs("MapValue", [2]string{"MapValue", string(v.Message().FullName())})
default:
- rs.recs = append(rs.recs, [2]string{"MapValue", v.Kind().String()})
+ rs.AppendRecs("MapValue", [2]string{"MapValue", v.Kind().String()})
}
}
case "ContainingOneof":
if od := t.ContainingOneof(); od != nil {
- rs.recs = append(rs.recs, [2]string{"Oneof", string(od.Name())})
+ rs.AppendRecs("ContainingOneof", [2]string{"Oneof", string(od.Name())})
}
case "ContainingMessage":
if t.IsExtension() {
- rs.recs = append(rs.recs, [2]string{"Extendee", string(t.ContainingMessage().FullName())})
+ rs.AppendRecs("ContainingMessage", [2]string{"Extendee", string(t.ContainingMessage().FullName())})
}
case "Message":
if !t.IsMap() {
@@ -180,20 +212,68 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string {
rs.Append(rv, s)
}
}
- case pref.OneofDescriptor:
+ case protoreflect.OneofDescriptor:
var ss []string
fs := t.Fields()
for i := 0; i < fs.Len(); i++ {
ss = append(ss, string(fs.Get(i).Name()))
}
if len(ss) > 0 {
- rs.recs = append(rs.recs, [2]string{"Fields", "[" + joinStrings(ss, false) + "]"})
+ rs.AppendRecs("Fields", [2]string{"Fields", "[" + joinStrings(ss, false) + "]"})
}
- default:
- rs.Append(rv, descriptorAccessors[rt]...)
+
+ case protoreflect.FileDescriptor:
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Path"), "Path"},
+ {rv.MethodByName("Package"), "Package"},
+ {rv.MethodByName("Imports"), "Imports"},
+ {rv.MethodByName("Messages"), "Messages"},
+ {rv.MethodByName("Enums"), "Enums"},
+ {rv.MethodByName("Extensions"), "Extensions"},
+ {rv.MethodByName("Services"), "Services"},
+ }...)
+
+ case protoreflect.MessageDescriptor:
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("IsMapEntry"), "IsMapEntry"},
+ {rv.MethodByName("Fields"), "Fields"},
+ {rv.MethodByName("Oneofs"), "Oneofs"},
+ {rv.MethodByName("ReservedNames"), "ReservedNames"},
+ {rv.MethodByName("ReservedRanges"), "ReservedRanges"},
+ {rv.MethodByName("RequiredNumbers"), "RequiredNumbers"},
+ {rv.MethodByName("ExtensionRanges"), "ExtensionRanges"},
+ {rv.MethodByName("Messages"), "Messages"},
+ {rv.MethodByName("Enums"), "Enums"},
+ {rv.MethodByName("Extensions"), "Extensions"},
+ }...)
+
+ case protoreflect.EnumDescriptor:
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Values"), "Values"},
+ {rv.MethodByName("ReservedNames"), "ReservedNames"},
+ {rv.MethodByName("ReservedRanges"), "ReservedRanges"},
+ }...)
+
+ case protoreflect.EnumValueDescriptor:
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Number"), "Number"},
+ }...)
+
+ case protoreflect.ServiceDescriptor:
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Methods"), "Methods"},
+ }...)
+
+ case protoreflect.MethodDescriptor:
+ rs.Append(rv, []methodAndName{
+ {rv.MethodByName("Input"), "Input"},
+ {rv.MethodByName("Output"), "Output"},
+ {rv.MethodByName("IsStreamingClient"), "IsStreamingClient"},
+ {rv.MethodByName("IsStreamingServer"), "IsStreamingServer"},
+ }...)
}
- if rv.MethodByName("GoType").IsValid() {
- rs.Append(rv, "GoType")
+ if m := rv.MethodByName("GoType"); m.IsValid() {
+ rs.Append(rv, methodAndName{m, "GoType"})
}
}
return start + rs.Join() + end
@@ -202,21 +282,36 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string {
type records struct {
recs [][2]string
allowMulti bool
+
+ // record is a function that will be called for every Append() or
+ // AppendRecs() call, to be used for testing with the
+ // InternalFormatDescOptForTesting function.
+ record func(string)
}
-func (rs *records) Append(v reflect.Value, accessors ...string) {
+func (rs *records) AppendRecs(fieldName string, newRecs [2]string) {
+ if rs.record != nil {
+ rs.record(fieldName)
+ }
+ rs.recs = append(rs.recs, newRecs)
+}
+
+func (rs *records) Append(v reflect.Value, accessors ...methodAndName) {
for _, a := range accessors {
+ if rs.record != nil {
+ rs.record(a.name)
+ }
var rv reflect.Value
- if m := v.MethodByName(a); m.IsValid() {
- rv = m.Call(nil)[0]
+ if a.method.IsValid() {
+ rv = a.method.Call(nil)[0]
}
if v.Kind() == reflect.Struct && !rv.IsValid() {
- rv = v.FieldByName(a)
+ rv = v.FieldByName(a.name)
}
if !rv.IsValid() {
- panic(fmt.Sprintf("unknown accessor: %v.%s", v.Type(), a))
+ panic(fmt.Sprintf("unknown accessor: %v.%s", v.Type(), a.name))
}
- if _, ok := rv.Interface().(pref.Value); ok {
+ if _, ok := rv.Interface().(protoreflect.Value); ok {
rv = rv.MethodByName("Interface").Call(nil)[0]
if !rv.IsNil() {
rv = rv.Elem()
@@ -250,9 +345,9 @@ func (rs *records) Append(v reflect.Value, accessors ...string) {
switch v := v.(type) {
case list:
s = formatListOpt(v, false, rs.allowMulti)
- case pref.FieldDescriptor, pref.OneofDescriptor, pref.EnumValueDescriptor, pref.MethodDescriptor:
- s = string(v.(pref.Descriptor).Name())
- case pref.Descriptor:
+ case protoreflect.FieldDescriptor, protoreflect.OneofDescriptor, protoreflect.EnumValueDescriptor, protoreflect.MethodDescriptor:
+ s = string(v.(protoreflect.Descriptor).Name())
+ case protoreflect.Descriptor:
s = string(v.FullName())
case string:
s = strconv.Quote(v)
@@ -261,7 +356,7 @@ func (rs *records) Append(v reflect.Value, accessors ...string) {
default:
s = fmt.Sprint(v)
}
- rs.recs = append(rs.recs, [2]string{a, s})
+ rs.recs = append(rs.recs, [2]string{a.name, s})
}
}
diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go b/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go
new file mode 100644
index 00000000..14656b65
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go
@@ -0,0 +1,12 @@
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package editiondefaults contains the binary representation of the editions
+// defaults.
+package editiondefaults
+
+import _ "embed"
+
+//go:embed editions_defaults.binpb
+var Defaults []byte
diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb
new file mode 100644
index 00000000..18f07568
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb
@@ -0,0 +1,4 @@
+
+ (0
+ (0
+ (0 (
\ No newline at end of file
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go b/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go
index fdd9b13f..328dc733 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go
@@ -15,8 +15,8 @@ import (
"strconv"
ptext "google.golang.org/protobuf/internal/encoding/text"
- errors "google.golang.org/protobuf/internal/errors"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/internal/errors"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
// Format is the serialization format used to represent the default value.
@@ -35,56 +35,56 @@ const (
// Unmarshal deserializes the default string s according to the given kind k.
// When k is an enum, a list of enum value descriptors must be provided.
-func Unmarshal(s string, k pref.Kind, evs pref.EnumValueDescriptors, f Format) (pref.Value, pref.EnumValueDescriptor, error) {
+func Unmarshal(s string, k protoreflect.Kind, evs protoreflect.EnumValueDescriptors, f Format) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) {
switch k {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if f == GoTag {
switch s {
case "1":
- return pref.ValueOfBool(true), nil, nil
+ return protoreflect.ValueOfBool(true), nil, nil
case "0":
- return pref.ValueOfBool(false), nil, nil
+ return protoreflect.ValueOfBool(false), nil, nil
}
} else {
switch s {
case "true":
- return pref.ValueOfBool(true), nil, nil
+ return protoreflect.ValueOfBool(true), nil, nil
case "false":
- return pref.ValueOfBool(false), nil, nil
+ return protoreflect.ValueOfBool(false), nil, nil
}
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if f == GoTag {
// Go tags use the numeric form of the enum value.
if n, err := strconv.ParseInt(s, 10, 32); err == nil {
- if ev := evs.ByNumber(pref.EnumNumber(n)); ev != nil {
- return pref.ValueOfEnum(ev.Number()), ev, nil
+ if ev := evs.ByNumber(protoreflect.EnumNumber(n)); ev != nil {
+ return protoreflect.ValueOfEnum(ev.Number()), ev, nil
}
}
} else {
// Descriptor default_value use the enum identifier.
- ev := evs.ByName(pref.Name(s))
+ ev := evs.ByName(protoreflect.Name(s))
if ev != nil {
- return pref.ValueOfEnum(ev.Number()), ev, nil
+ return protoreflect.ValueOfEnum(ev.Number()), ev, nil
}
}
- case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind:
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
if v, err := strconv.ParseInt(s, 10, 32); err == nil {
- return pref.ValueOfInt32(int32(v)), nil, nil
+ return protoreflect.ValueOfInt32(int32(v)), nil, nil
}
- case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind:
+ case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
if v, err := strconv.ParseInt(s, 10, 64); err == nil {
- return pref.ValueOfInt64(int64(v)), nil, nil
+ return protoreflect.ValueOfInt64(int64(v)), nil, nil
}
- case pref.Uint32Kind, pref.Fixed32Kind:
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
if v, err := strconv.ParseUint(s, 10, 32); err == nil {
- return pref.ValueOfUint32(uint32(v)), nil, nil
+ return protoreflect.ValueOfUint32(uint32(v)), nil, nil
}
- case pref.Uint64Kind, pref.Fixed64Kind:
+ case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
if v, err := strconv.ParseUint(s, 10, 64); err == nil {
- return pref.ValueOfUint64(uint64(v)), nil, nil
+ return protoreflect.ValueOfUint64(uint64(v)), nil, nil
}
- case pref.FloatKind, pref.DoubleKind:
+ case protoreflect.FloatKind, protoreflect.DoubleKind:
var v float64
var err error
switch s {
@@ -98,29 +98,29 @@ func Unmarshal(s string, k pref.Kind, evs pref.EnumValueDescriptors, f Format) (
v, err = strconv.ParseFloat(s, 64)
}
if err == nil {
- if k == pref.FloatKind {
- return pref.ValueOfFloat32(float32(v)), nil, nil
+ if k == protoreflect.FloatKind {
+ return protoreflect.ValueOfFloat32(float32(v)), nil, nil
} else {
- return pref.ValueOfFloat64(float64(v)), nil, nil
+ return protoreflect.ValueOfFloat64(float64(v)), nil, nil
}
}
- case pref.StringKind:
+ case protoreflect.StringKind:
// String values are already unescaped and can be used as is.
- return pref.ValueOfString(s), nil, nil
- case pref.BytesKind:
+ return protoreflect.ValueOfString(s), nil, nil
+ case protoreflect.BytesKind:
if b, ok := unmarshalBytes(s); ok {
- return pref.ValueOfBytes(b), nil, nil
+ return protoreflect.ValueOfBytes(b), nil, nil
}
}
- return pref.Value{}, nil, errors.New("could not parse value for %v: %q", k, s)
+ return protoreflect.Value{}, nil, errors.New("could not parse value for %v: %q", k, s)
}
// Marshal serializes v as the default string according to the given kind k.
// When specifying the Descriptor format for an enum kind, the associated
// enum value descriptor must be provided.
-func Marshal(v pref.Value, ev pref.EnumValueDescriptor, k pref.Kind, f Format) (string, error) {
+func Marshal(v protoreflect.Value, ev protoreflect.EnumValueDescriptor, k protoreflect.Kind, f Format) (string, error) {
switch k {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if f == GoTag {
if v.Bool() {
return "1", nil
@@ -134,17 +134,17 @@ func Marshal(v pref.Value, ev pref.EnumValueDescriptor, k pref.Kind, f Format) (
return "false", nil
}
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if f == GoTag {
return strconv.FormatInt(int64(v.Enum()), 10), nil
} else {
return string(ev.Name()), nil
}
- case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind, pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind:
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
return strconv.FormatInt(v.Int(), 10), nil
- case pref.Uint32Kind, pref.Fixed32Kind, pref.Uint64Kind, pref.Fixed64Kind:
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
return strconv.FormatUint(v.Uint(), 10), nil
- case pref.FloatKind, pref.DoubleKind:
+ case protoreflect.FloatKind, protoreflect.DoubleKind:
f := v.Float()
switch {
case math.IsInf(f, -1):
@@ -154,16 +154,16 @@ func Marshal(v pref.Value, ev pref.EnumValueDescriptor, k pref.Kind, f Format) (
case math.IsNaN(f):
return "nan", nil
default:
- if k == pref.FloatKind {
+ if k == protoreflect.FloatKind {
return strconv.FormatFloat(f, 'g', -1, 32), nil
} else {
return strconv.FormatFloat(f, 'g', -1, 64), nil
}
}
- case pref.StringKind:
+ case protoreflect.StringKind:
// String values are serialized as is without any escaping.
return v.String(), nil
- case pref.BytesKind:
+ case protoreflect.BytesKind:
if s, ok := marshalBytes(v.Bytes()); ok {
return s, nil
}
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go b/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go
index c1866f3c..a6693f0a 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go
@@ -10,7 +10,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/errors"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
// The MessageSet wire format is equivalent to a message defined as follows,
@@ -33,6 +33,7 @@ const (
// ExtensionName is the field name for extensions of MessageSet.
//
// A valid MessageSet extension must be of the form:
+//
// message MyMessage {
// extend proto2.bridge.MessageSet {
// optional MyMessage message_set_extension = 1234;
@@ -42,13 +43,13 @@ const (
const ExtensionName = "message_set_extension"
// IsMessageSet returns whether the message uses the MessageSet wire format.
-func IsMessageSet(md pref.MessageDescriptor) bool {
+func IsMessageSet(md protoreflect.MessageDescriptor) bool {
xmd, ok := md.(interface{ IsMessageSet() bool })
return ok && xmd.IsMessageSet()
}
// IsMessageSetExtension reports this field properly extends a MessageSet.
-func IsMessageSetExtension(fd pref.FieldDescriptor) bool {
+func IsMessageSetExtension(fd protoreflect.FieldDescriptor) bool {
switch {
case fd.Name() != ExtensionName:
return false
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go
index 38f1931c..373d2083 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go
@@ -11,10 +11,10 @@ import (
"strconv"
"strings"
- defval "google.golang.org/protobuf/internal/encoding/defval"
- fdesc "google.golang.org/protobuf/internal/filedesc"
+ "google.golang.org/protobuf/internal/encoding/defval"
+ "google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/internal/strs"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
var byteType = reflect.TypeOf(byte(0))
@@ -29,9 +29,9 @@ var byteType = reflect.TypeOf(byte(0))
// This does not populate the Enum or Message (except for weak message).
//
// This function is a best effort attempt; parsing errors are ignored.
-func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) pref.FieldDescriptor {
- f := new(fdesc.Field)
- f.L0.ParentFile = fdesc.SurrogateProto2
+func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor {
+ f := new(filedesc.Field)
+ f.L0.ParentFile = filedesc.SurrogateProto2
for len(tag) > 0 {
i := strings.IndexByte(tag, ',')
if i < 0 {
@@ -39,68 +39,68 @@ func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) p
}
switch s := tag[:i]; {
case strings.HasPrefix(s, "name="):
- f.L0.FullName = pref.FullName(s[len("name="):])
+ f.L0.FullName = protoreflect.FullName(s[len("name="):])
case strings.Trim(s, "0123456789") == "":
n, _ := strconv.ParseUint(s, 10, 32)
- f.L1.Number = pref.FieldNumber(n)
+ f.L1.Number = protoreflect.FieldNumber(n)
case s == "opt":
- f.L1.Cardinality = pref.Optional
+ f.L1.Cardinality = protoreflect.Optional
case s == "req":
- f.L1.Cardinality = pref.Required
+ f.L1.Cardinality = protoreflect.Required
case s == "rep":
- f.L1.Cardinality = pref.Repeated
+ f.L1.Cardinality = protoreflect.Repeated
case s == "varint":
switch goType.Kind() {
case reflect.Bool:
- f.L1.Kind = pref.BoolKind
+ f.L1.Kind = protoreflect.BoolKind
case reflect.Int32:
- f.L1.Kind = pref.Int32Kind
+ f.L1.Kind = protoreflect.Int32Kind
case reflect.Int64:
- f.L1.Kind = pref.Int64Kind
+ f.L1.Kind = protoreflect.Int64Kind
case reflect.Uint32:
- f.L1.Kind = pref.Uint32Kind
+ f.L1.Kind = protoreflect.Uint32Kind
case reflect.Uint64:
- f.L1.Kind = pref.Uint64Kind
+ f.L1.Kind = protoreflect.Uint64Kind
}
case s == "zigzag32":
if goType.Kind() == reflect.Int32 {
- f.L1.Kind = pref.Sint32Kind
+ f.L1.Kind = protoreflect.Sint32Kind
}
case s == "zigzag64":
if goType.Kind() == reflect.Int64 {
- f.L1.Kind = pref.Sint64Kind
+ f.L1.Kind = protoreflect.Sint64Kind
}
case s == "fixed32":
switch goType.Kind() {
case reflect.Int32:
- f.L1.Kind = pref.Sfixed32Kind
+ f.L1.Kind = protoreflect.Sfixed32Kind
case reflect.Uint32:
- f.L1.Kind = pref.Fixed32Kind
+ f.L1.Kind = protoreflect.Fixed32Kind
case reflect.Float32:
- f.L1.Kind = pref.FloatKind
+ f.L1.Kind = protoreflect.FloatKind
}
case s == "fixed64":
switch goType.Kind() {
case reflect.Int64:
- f.L1.Kind = pref.Sfixed64Kind
+ f.L1.Kind = protoreflect.Sfixed64Kind
case reflect.Uint64:
- f.L1.Kind = pref.Fixed64Kind
+ f.L1.Kind = protoreflect.Fixed64Kind
case reflect.Float64:
- f.L1.Kind = pref.DoubleKind
+ f.L1.Kind = protoreflect.DoubleKind
}
case s == "bytes":
switch {
case goType.Kind() == reflect.String:
- f.L1.Kind = pref.StringKind
+ f.L1.Kind = protoreflect.StringKind
case goType.Kind() == reflect.Slice && goType.Elem() == byteType:
- f.L1.Kind = pref.BytesKind
+ f.L1.Kind = protoreflect.BytesKind
default:
- f.L1.Kind = pref.MessageKind
+ f.L1.Kind = protoreflect.MessageKind
}
case s == "group":
- f.L1.Kind = pref.GroupKind
+ f.L1.Kind = protoreflect.GroupKind
case strings.HasPrefix(s, "enum="):
- f.L1.Kind = pref.EnumKind
+ f.L1.Kind = protoreflect.EnumKind
case strings.HasPrefix(s, "json="):
jsonName := s[len("json="):]
if jsonName != strs.JSONCamelCase(string(f.L0.FullName.Name())) {
@@ -111,23 +111,23 @@ func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) p
f.L1.IsPacked = true
case strings.HasPrefix(s, "weak="):
f.L1.IsWeak = true
- f.L1.Message = fdesc.PlaceholderMessage(pref.FullName(s[len("weak="):]))
+ f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):]))
case strings.HasPrefix(s, "def="):
// The default tag is special in that everything afterwards is the
// default regardless of the presence of commas.
s, i = tag[len("def="):], len(tag)
v, ev, _ := defval.Unmarshal(s, f.L1.Kind, evs, defval.GoTag)
- f.L1.Default = fdesc.DefaultValue(v, ev)
+ f.L1.Default = filedesc.DefaultValue(v, ev)
case s == "proto3":
- f.L0.ParentFile = fdesc.SurrogateProto3
+ f.L0.ParentFile = filedesc.SurrogateProto3
}
tag = strings.TrimPrefix(tag[i:], ",")
}
// The generator uses the group message name instead of the field name.
// We obtain the real field name by lowercasing the group name.
- if f.L1.Kind == pref.GroupKind {
- f.L0.FullName = pref.FullName(strings.ToLower(string(f.L0.FullName)))
+ if f.L1.Kind == protoreflect.GroupKind {
+ f.L0.FullName = protoreflect.FullName(strings.ToLower(string(f.L0.FullName)))
}
return f
}
@@ -140,38 +140,38 @@ func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) p
// Depending on the context on how Marshal is called, there are different ways
// through which that information is determined. As such it is the caller's
// responsibility to provide a function to obtain that information.
-func Marshal(fd pref.FieldDescriptor, enumName string) string {
+func Marshal(fd protoreflect.FieldDescriptor, enumName string) string {
var tag []string
switch fd.Kind() {
- case pref.BoolKind, pref.EnumKind, pref.Int32Kind, pref.Uint32Kind, pref.Int64Kind, pref.Uint64Kind:
+ case protoreflect.BoolKind, protoreflect.EnumKind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Int64Kind, protoreflect.Uint64Kind:
tag = append(tag, "varint")
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
tag = append(tag, "zigzag32")
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
tag = append(tag, "zigzag64")
- case pref.Sfixed32Kind, pref.Fixed32Kind, pref.FloatKind:
+ case protoreflect.Sfixed32Kind, protoreflect.Fixed32Kind, protoreflect.FloatKind:
tag = append(tag, "fixed32")
- case pref.Sfixed64Kind, pref.Fixed64Kind, pref.DoubleKind:
+ case protoreflect.Sfixed64Kind, protoreflect.Fixed64Kind, protoreflect.DoubleKind:
tag = append(tag, "fixed64")
- case pref.StringKind, pref.BytesKind, pref.MessageKind:
+ case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind:
tag = append(tag, "bytes")
- case pref.GroupKind:
+ case protoreflect.GroupKind:
tag = append(tag, "group")
}
tag = append(tag, strconv.Itoa(int(fd.Number())))
switch fd.Cardinality() {
- case pref.Optional:
+ case protoreflect.Optional:
tag = append(tag, "opt")
- case pref.Required:
+ case protoreflect.Required:
tag = append(tag, "req")
- case pref.Repeated:
+ case protoreflect.Repeated:
tag = append(tag, "rep")
}
if fd.IsPacked() {
tag = append(tag, "packed")
}
name := string(fd.Name())
- if fd.Kind() == pref.GroupKind {
+ if fd.Kind() == protoreflect.GroupKind {
// The name of the FieldDescriptor for a group field is
// lowercased. To find the original capitalization, we
// look in the field's MessageType.
@@ -189,10 +189,10 @@ func Marshal(fd pref.FieldDescriptor, enumName string) string {
// The previous implementation does not tag extension fields as proto3,
// even when the field is defined in a proto3 file. Match that behavior
// for consistency.
- if fd.Syntax() == pref.Proto3 && !fd.IsExtension() {
+ if fd.Syntax() == protoreflect.Proto3 && !fd.IsExtension() {
tag = append(tag, "proto3")
}
- if fd.Kind() == pref.EnumKind && enumName != "" {
+ if fd.Kind() == protoreflect.EnumKind && enumName != "" {
tag = append(tag, "enum="+enumName)
}
if fd.ContainingOneof() != nil {
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
index eb10ea10..87853e78 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
@@ -8,7 +8,6 @@ import (
"bytes"
"fmt"
"io"
- "regexp"
"strconv"
"unicode/utf8"
@@ -381,7 +380,7 @@ func (d *Decoder) currentOpenKind() (Kind, byte) {
case '[':
return ListOpen, ']'
}
- panic(fmt.Sprintf("Decoder: openStack contains invalid byte %s", string(openCh)))
+ panic(fmt.Sprintf("Decoder: openStack contains invalid byte %c", openCh))
}
func (d *Decoder) pushOpenStack(ch byte) {
@@ -413,15 +412,16 @@ func (d *Decoder) parseFieldName() (tok Token, err error) {
// Field number. Identify if input is a valid number that is not negative
// and is decimal integer within 32-bit range.
if num := parseNumber(d.in); num.size > 0 {
+ str := num.string(d.in)
if !num.neg && num.kind == numDec {
- if _, err := strconv.ParseInt(string(d.in[:num.size]), 10, 32); err == nil {
+ if _, err := strconv.ParseInt(str, 10, 32); err == nil {
return d.consumeToken(Name, num.size, uint8(FieldNumber)), nil
}
}
- return Token{}, d.newSyntaxError("invalid field number: %s", d.in[:num.size])
+ return Token{}, d.newSyntaxError("invalid field number: %s", str)
}
- return Token{}, d.newSyntaxError("invalid field name: %s", errRegexp.Find(d.in))
+ return Token{}, d.newSyntaxError("invalid field name: %s", errId(d.in))
}
// parseTypeName parses Any type URL or extension field name. The name is
@@ -571,7 +571,7 @@ func (d *Decoder) parseScalar() (Token, error) {
return tok, nil
}
- return Token{}, d.newSyntaxError("invalid scalar value: %s", errRegexp.Find(d.in))
+ return Token{}, d.newSyntaxError("invalid scalar value: %s", errId(d.in))
}
// parseLiteralValue parses a literal value. A literal value is used for
@@ -653,8 +653,29 @@ func consume(b []byte, n int) []byte {
return b
}
-// Any sequence that looks like a non-delimiter (for error reporting).
-var errRegexp = regexp.MustCompile(`^([-+._a-zA-Z0-9\/]+|.)`)
+// errId extracts a byte sequence that looks like an invalid ID
+// (for the purposes of error reporting).
+func errId(seq []byte) []byte {
+ const maxLen = 32
+ for i := 0; i < len(seq); {
+ if i > maxLen {
+ return append(seq[:i:i], "…"...)
+ }
+ r, size := utf8.DecodeRune(seq[i:])
+ if r > utf8.RuneSelf || (r != '/' && isDelim(byte(r))) {
+ if i == 0 {
+ // Either the first byte is invalid UTF-8 or a
+ // delimiter, or the first rune is non-ASCII.
+ // Return it as-is.
+ i = size
+ }
+ return seq[:i:i]
+ }
+ i += size
+ }
+ // No delimiter found.
+ return seq
+}
// isDelim returns true if given byte is a delimiter character.
func isDelim(c byte) bool {
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go
index f2d90b78..45c81f02 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go
@@ -15,17 +15,12 @@ func (d *Decoder) parseNumberValue() (Token, bool) {
if num.neg {
numAttrs |= isNegative
}
- strSize := num.size
- last := num.size - 1
- if num.kind == numFloat && (d.in[last] == 'f' || d.in[last] == 'F') {
- strSize = last
- }
tok := Token{
kind: Scalar,
attrs: numberValue,
pos: len(d.orig) - len(d.in),
raw: d.in[:num.size],
- str: string(d.in[:strSize]),
+ str: num.string(d.in),
numAttrs: numAttrs,
}
d.consume(num.size)
@@ -46,12 +41,35 @@ type number struct {
kind uint8
neg bool
size int
+ // if neg, this is the length of whitespace and comments between
+ // the minus sign and the rest fo the number literal
+ sep int
+}
+
+func (num number) string(data []byte) string {
+ strSize := num.size
+ last := num.size - 1
+ if num.kind == numFloat && (data[last] == 'f' || data[last] == 'F') {
+ strSize = last
+ }
+ if num.neg && num.sep > 0 {
+ // strip whitespace/comments between negative sign and the rest
+ strLen := strSize - num.sep
+ str := make([]byte, strLen)
+ str[0] = data[0]
+ copy(str[1:], data[num.sep+1:strSize])
+ return string(str)
+ }
+ return string(data[:strSize])
+
}
// parseNumber constructs a number object from given input. It allows for the
// following patterns:
-// integer: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*)
-// float: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?)
+//
+// integer: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*)
+// float: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?)
+//
// It also returns the number of parsed bytes for the given number, 0 if it is
// not a number.
func parseNumber(input []byte) number {
@@ -65,19 +83,22 @@ func parseNumber(input []byte) number {
}
// Optional -
+ var sep int
if s[0] == '-' {
neg = true
s = s[1:]
size++
+ // Consume any whitespace or comments between the
+ // negative sign and the rest of the number
+ lenBefore := len(s)
+ s = consume(s, 0)
+ sep = lenBefore - len(s)
+ size += sep
if len(s) == 0 {
return number{}
}
}
- // C++ allows for whitespace and comments in between the negative sign and
- // the rest of the number. This logic currently does not but is consistent
- // with v1.
-
switch {
case s[0] == '0':
if len(s) > 1 {
@@ -114,7 +135,7 @@ func parseNumber(input []byte) number {
if len(s) > 0 && !isDelim(s[0]) {
return number{}
}
- return number{kind: kind, neg: neg, size: size}
+ return number{kind: kind, neg: neg, size: size, sep: sep}
}
}
s = s[1:]
@@ -186,5 +207,5 @@ func parseNumber(input []byte) number {
return number{}
}
- return number{kind: kind, neg: neg, size: size}
+ return number{kind: kind, neg: neg, size: size, sep: sep}
}
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go b/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go
index 0ce8d6fb..7ae6c2a3 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go
@@ -24,6 +24,6 @@
// the Go implementation should as well.
//
// The text format is almost a superset of JSON except:
-// * message keys are not quoted strings, but identifiers
-// * the top-level value must be a message without the delimiters
+// - message keys are not quoted strings, but identifiers
+// - the top-level value must be a message without the delimiters
package text
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
index da289ccc..cf7aed77 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
@@ -53,8 +53,10 @@ type encoderState struct {
// If outputASCII is true, strings will be serialized in such a way that
// multi-byte UTF-8 sequences are escaped. This property ensures that the
// overall output is ASCII (as opposed to UTF-8).
-func NewEncoder(indent string, delims [2]byte, outputASCII bool) (*Encoder, error) {
- e := &Encoder{}
+func NewEncoder(buf []byte, indent string, delims [2]byte, outputASCII bool) (*Encoder, error) {
+ e := &Encoder{
+ encoderState: encoderState{out: buf},
+ }
if len(indent) > 0 {
if strings.Trim(indent, " \t") != "" {
return nil, errors.New("indent may only be composed of space and tab characters")
@@ -195,13 +197,13 @@ func appendFloat(out []byte, n float64, bitSize int) []byte {
// WriteInt writes out the given signed integer value.
func (e *Encoder) WriteInt(n int64) {
e.prepareNext(scalar)
- e.out = append(e.out, strconv.FormatInt(n, 10)...)
+ e.out = strconv.AppendInt(e.out, n, 10)
}
// WriteUint writes out the given unsigned integer value.
func (e *Encoder) WriteUint(n uint64) {
e.prepareNext(scalar)
- e.out = append(e.out, strconv.FormatUint(n, 10)...)
+ e.out = strconv.AppendUint(e.out, n, 10)
}
// WriteLiteral writes out the given string as a literal value without quotes.
diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go
index f90e909b..fbcd3492 100644
--- a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go
+++ b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.13
// +build !go1.13
package errors
diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go
index dc05f419..5e72f1cd 100644
--- a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go
+++ b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.13
// +build go1.13
package errors
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/build.go b/vendor/google.golang.org/protobuf/internal/filedesc/build.go
index b293b694..7cac1c19 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/build.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/build.go
@@ -12,8 +12,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/reflect/protoreflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/reflect/protoregistry"
)
// Builder construct a protoreflect.FileDescriptor from the raw descriptor.
@@ -38,7 +37,7 @@ type Builder struct {
// TypeResolver resolves extension field types for descriptor options.
// If nil, it uses protoregistry.GlobalTypes.
TypeResolver interface {
- preg.ExtensionTypeResolver
+ protoregistry.ExtensionTypeResolver
}
// FileRegistry is use to lookup file, enum, and message dependencies.
@@ -46,8 +45,8 @@ type Builder struct {
// If nil, it uses protoregistry.GlobalFiles.
FileRegistry interface {
FindFileByPath(string) (protoreflect.FileDescriptor, error)
- FindDescriptorByName(pref.FullName) (pref.Descriptor, error)
- RegisterFile(pref.FileDescriptor) error
+ FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error)
+ RegisterFile(protoreflect.FileDescriptor) error
}
}
@@ -55,8 +54,8 @@ type Builder struct {
// If so, it permits looking up an enum or message dependency based on the
// sub-list and element index into filetype.Builder.DependencyIndexes.
type resolverByIndex interface {
- FindEnumByIndex(int32, int32, []Enum, []Message) pref.EnumDescriptor
- FindMessageByIndex(int32, int32, []Enum, []Message) pref.MessageDescriptor
+ FindEnumByIndex(int32, int32, []Enum, []Message) protoreflect.EnumDescriptor
+ FindMessageByIndex(int32, int32, []Enum, []Message) protoreflect.MessageDescriptor
}
// Indexes of each sub-list in filetype.Builder.DependencyIndexes.
@@ -70,7 +69,7 @@ const (
// Out is the output of the Builder.
type Out struct {
- File pref.FileDescriptor
+ File protoreflect.FileDescriptor
// Enums is all enum descriptors in "flattened ordering".
Enums []Enum
@@ -97,10 +96,10 @@ func (db Builder) Build() (out Out) {
// Initialize resolvers and registries if unpopulated.
if db.TypeResolver == nil {
- db.TypeResolver = preg.GlobalTypes
+ db.TypeResolver = protoregistry.GlobalTypes
}
if db.FileRegistry == nil {
- db.FileRegistry = preg.GlobalFiles
+ db.FileRegistry = protoregistry.GlobalFiles
}
fd := newRawFile(db)
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
index 98ab142a..8826bcf4 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
@@ -17,15 +17,30 @@ import (
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/internal/pragma"
"google.golang.org/protobuf/internal/strs"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/reflect/protoregistry"
)
+// Edition is an Enum for proto2.Edition
+type Edition int32
+
+// These values align with the value of Enum in descriptor.proto which allows
+// direct conversion between the proto enum and this enum.
+const (
+ EditionUnknown Edition = 0
+ EditionProto2 Edition = 998
+ EditionProto3 Edition = 999
+ Edition2023 Edition = 1000
+ EditionUnsupported Edition = 100000
+)
+
// The types in this file may have a suffix:
// • L0: Contains fields common to all descriptors (except File) and
// must be initialized up front.
// • L1: Contains fields specific to a descriptor and
-// must be initialized up front.
+// must be initialized up front. If the associated proto uses Editions, the
+// Editions features must always be resolved. If not explicitly set, the
+// appropriate default must be resolved and set.
// • L2: Contains fields that are lazily initialized when constructing
// from the raw file descriptor. When constructing as a literal, the L2
// fields must be initialized up front.
@@ -43,46 +58,76 @@ type (
L2 *FileL2
}
FileL1 struct {
- Syntax pref.Syntax
+ Syntax protoreflect.Syntax
+ Edition Edition // Only used if Syntax == Editions
Path string
- Package pref.FullName
+ Package protoreflect.FullName
Enums Enums
Messages Messages
Extensions Extensions
Services Services
+
+ EditionFeatures EditionFeatures
}
FileL2 struct {
- Options func() pref.ProtoMessage
+ Options func() protoreflect.ProtoMessage
Imports FileImports
Locations SourceLocations
}
+
+ EditionFeatures struct {
+ // IsFieldPresence is true if field_presence is EXPLICIT
+ // https://protobuf.dev/editions/features/#field_presence
+ IsFieldPresence bool
+ // IsFieldPresence is true if field_presence is LEGACY_REQUIRED
+ // https://protobuf.dev/editions/features/#field_presence
+ IsLegacyRequired bool
+ // IsOpenEnum is true if enum_type is OPEN
+ // https://protobuf.dev/editions/features/#enum_type
+ IsOpenEnum bool
+ // IsPacked is true if repeated_field_encoding is PACKED
+ // https://protobuf.dev/editions/features/#repeated_field_encoding
+ IsPacked bool
+ // IsUTF8Validated is true if utf_validation is VERIFY
+ // https://protobuf.dev/editions/features/#utf8_validation
+ IsUTF8Validated bool
+ // IsDelimitedEncoded is true if message_encoding is DELIMITED
+ // https://protobuf.dev/editions/features/#message_encoding
+ IsDelimitedEncoded bool
+ // IsJSONCompliant is true if json_format is ALLOW
+ // https://protobuf.dev/editions/features/#json_format
+ IsJSONCompliant bool
+ // GenerateLegacyUnmarshalJSON determines if the plugin generates the
+ // UnmarshalJSON([]byte) error method for enums.
+ GenerateLegacyUnmarshalJSON bool
+ }
)
-func (fd *File) ParentFile() pref.FileDescriptor { return fd }
-func (fd *File) Parent() pref.Descriptor { return nil }
-func (fd *File) Index() int { return 0 }
-func (fd *File) Syntax() pref.Syntax { return fd.L1.Syntax }
-func (fd *File) Name() pref.Name { return fd.L1.Package.Name() }
-func (fd *File) FullName() pref.FullName { return fd.L1.Package }
-func (fd *File) IsPlaceholder() bool { return false }
-func (fd *File) Options() pref.ProtoMessage {
+func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd }
+func (fd *File) Parent() protoreflect.Descriptor { return nil }
+func (fd *File) Index() int { return 0 }
+func (fd *File) Syntax() protoreflect.Syntax { return fd.L1.Syntax }
+func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() }
+func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package }
+func (fd *File) IsPlaceholder() bool { return false }
+func (fd *File) Options() protoreflect.ProtoMessage {
if f := fd.lazyInit().Options; f != nil {
return f()
}
return descopts.File
}
-func (fd *File) Path() string { return fd.L1.Path }
-func (fd *File) Package() pref.FullName { return fd.L1.Package }
-func (fd *File) Imports() pref.FileImports { return &fd.lazyInit().Imports }
-func (fd *File) Enums() pref.EnumDescriptors { return &fd.L1.Enums }
-func (fd *File) Messages() pref.MessageDescriptors { return &fd.L1.Messages }
-func (fd *File) Extensions() pref.ExtensionDescriptors { return &fd.L1.Extensions }
-func (fd *File) Services() pref.ServiceDescriptors { return &fd.L1.Services }
-func (fd *File) SourceLocations() pref.SourceLocations { return &fd.lazyInit().Locations }
-func (fd *File) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
-func (fd *File) ProtoType(pref.FileDescriptor) {}
-func (fd *File) ProtoInternal(pragma.DoNotImplement) {}
+func (fd *File) Path() string { return fd.L1.Path }
+func (fd *File) Package() protoreflect.FullName { return fd.L1.Package }
+func (fd *File) Imports() protoreflect.FileImports { return &fd.lazyInit().Imports }
+func (fd *File) Enums() protoreflect.EnumDescriptors { return &fd.L1.Enums }
+func (fd *File) Messages() protoreflect.MessageDescriptors { return &fd.L1.Messages }
+func (fd *File) Extensions() protoreflect.ExtensionDescriptors { return &fd.L1.Extensions }
+func (fd *File) Services() protoreflect.ServiceDescriptors { return &fd.L1.Services }
+func (fd *File) SourceLocations() protoreflect.SourceLocations { return &fd.lazyInit().Locations }
+func (fd *File) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
+func (fd *File) ProtoType(protoreflect.FileDescriptor) {}
+func (fd *File) ProtoInternal(pragma.DoNotImplement) {}
func (fd *File) lazyInit() *FileL2 {
if atomic.LoadUint32(&fd.once) == 0 {
@@ -117,9 +162,11 @@ type (
}
EnumL1 struct {
eagerValues bool // controls whether EnumL2.Values is already populated
+
+ EditionFeatures EditionFeatures
}
EnumL2 struct {
- Options func() pref.ProtoMessage
+ Options func() protoreflect.ProtoMessage
Values EnumValues
ReservedNames Names
ReservedRanges EnumRanges
@@ -130,41 +177,41 @@ type (
L1 EnumValueL1
}
EnumValueL1 struct {
- Options func() pref.ProtoMessage
- Number pref.EnumNumber
+ Options func() protoreflect.ProtoMessage
+ Number protoreflect.EnumNumber
}
)
-func (ed *Enum) Options() pref.ProtoMessage {
+func (ed *Enum) Options() protoreflect.ProtoMessage {
if f := ed.lazyInit().Options; f != nil {
return f()
}
return descopts.Enum
}
-func (ed *Enum) Values() pref.EnumValueDescriptors {
+func (ed *Enum) Values() protoreflect.EnumValueDescriptors {
if ed.L1.eagerValues {
return &ed.L2.Values
}
return &ed.lazyInit().Values
}
-func (ed *Enum) ReservedNames() pref.Names { return &ed.lazyInit().ReservedNames }
-func (ed *Enum) ReservedRanges() pref.EnumRanges { return &ed.lazyInit().ReservedRanges }
-func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) }
-func (ed *Enum) ProtoType(pref.EnumDescriptor) {}
+func (ed *Enum) ReservedNames() protoreflect.Names { return &ed.lazyInit().ReservedNames }
+func (ed *Enum) ReservedRanges() protoreflect.EnumRanges { return &ed.lazyInit().ReservedRanges }
+func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) }
+func (ed *Enum) ProtoType(protoreflect.EnumDescriptor) {}
func (ed *Enum) lazyInit() *EnumL2 {
ed.L0.ParentFile.lazyInit() // implicitly initializes L2
return ed.L2
}
-func (ed *EnumValue) Options() pref.ProtoMessage {
+func (ed *EnumValue) Options() protoreflect.ProtoMessage {
if f := ed.L1.Options; f != nil {
return f()
}
return descopts.EnumValue
}
-func (ed *EnumValue) Number() pref.EnumNumber { return ed.L1.Number }
-func (ed *EnumValue) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) }
-func (ed *EnumValue) ProtoType(pref.EnumValueDescriptor) {}
+func (ed *EnumValue) Number() protoreflect.EnumNumber { return ed.L1.Number }
+func (ed *EnumValue) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) }
+func (ed *EnumValue) ProtoType(protoreflect.EnumValueDescriptor) {}
type (
Message struct {
@@ -178,16 +225,18 @@ type (
Extensions Extensions
IsMapEntry bool // promoted from google.protobuf.MessageOptions
IsMessageSet bool // promoted from google.protobuf.MessageOptions
+
+ EditionFeatures EditionFeatures
}
MessageL2 struct {
- Options func() pref.ProtoMessage
+ Options func() protoreflect.ProtoMessage
Fields Fields
Oneofs Oneofs
ReservedNames Names
ReservedRanges FieldRanges
RequiredNumbers FieldNumbers // must be consistent with Fields.Cardinality
ExtensionRanges FieldRanges
- ExtensionRangeOptions []func() pref.ProtoMessage // must be same length as ExtensionRanges
+ ExtensionRangeOptions []func() protoreflect.ProtoMessage // must be same length as ExtensionRanges
}
Field struct {
@@ -195,10 +244,10 @@ type (
L1 FieldL1
}
FieldL1 struct {
- Options func() pref.ProtoMessage
- Number pref.FieldNumber
- Cardinality pref.Cardinality // must be consistent with Message.RequiredNumbers
- Kind pref.Kind
+ Options func() protoreflect.ProtoMessage
+ Number protoreflect.FieldNumber
+ Cardinality protoreflect.Cardinality // must be consistent with Message.RequiredNumbers
+ Kind protoreflect.Kind
StringName stringName
IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto
IsWeak bool // promoted from google.protobuf.FieldOptions
@@ -207,9 +256,11 @@ type (
HasEnforceUTF8 bool // promoted from google.protobuf.FieldOptions
EnforceUTF8 bool // promoted from google.protobuf.FieldOptions
Default defaultValue
- ContainingOneof pref.OneofDescriptor // must be consistent with Message.Oneofs.Fields
- Enum pref.EnumDescriptor
- Message pref.MessageDescriptor
+ ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields
+ Enum protoreflect.EnumDescriptor
+ Message protoreflect.MessageDescriptor
+
+ EditionFeatures EditionFeatures
}
Oneof struct {
@@ -217,35 +268,37 @@ type (
L1 OneofL1
}
OneofL1 struct {
- Options func() pref.ProtoMessage
+ Options func() protoreflect.ProtoMessage
Fields OneofFields // must be consistent with Message.Fields.ContainingOneof
+
+ EditionFeatures EditionFeatures
}
)
-func (md *Message) Options() pref.ProtoMessage {
+func (md *Message) Options() protoreflect.ProtoMessage {
if f := md.lazyInit().Options; f != nil {
return f()
}
return descopts.Message
}
-func (md *Message) IsMapEntry() bool { return md.L1.IsMapEntry }
-func (md *Message) Fields() pref.FieldDescriptors { return &md.lazyInit().Fields }
-func (md *Message) Oneofs() pref.OneofDescriptors { return &md.lazyInit().Oneofs }
-func (md *Message) ReservedNames() pref.Names { return &md.lazyInit().ReservedNames }
-func (md *Message) ReservedRanges() pref.FieldRanges { return &md.lazyInit().ReservedRanges }
-func (md *Message) RequiredNumbers() pref.FieldNumbers { return &md.lazyInit().RequiredNumbers }
-func (md *Message) ExtensionRanges() pref.FieldRanges { return &md.lazyInit().ExtensionRanges }
-func (md *Message) ExtensionRangeOptions(i int) pref.ProtoMessage {
+func (md *Message) IsMapEntry() bool { return md.L1.IsMapEntry }
+func (md *Message) Fields() protoreflect.FieldDescriptors { return &md.lazyInit().Fields }
+func (md *Message) Oneofs() protoreflect.OneofDescriptors { return &md.lazyInit().Oneofs }
+func (md *Message) ReservedNames() protoreflect.Names { return &md.lazyInit().ReservedNames }
+func (md *Message) ReservedRanges() protoreflect.FieldRanges { return &md.lazyInit().ReservedRanges }
+func (md *Message) RequiredNumbers() protoreflect.FieldNumbers { return &md.lazyInit().RequiredNumbers }
+func (md *Message) ExtensionRanges() protoreflect.FieldRanges { return &md.lazyInit().ExtensionRanges }
+func (md *Message) ExtensionRangeOptions(i int) protoreflect.ProtoMessage {
if f := md.lazyInit().ExtensionRangeOptions[i]; f != nil {
return f()
}
return descopts.ExtensionRange
}
-func (md *Message) Enums() pref.EnumDescriptors { return &md.L1.Enums }
-func (md *Message) Messages() pref.MessageDescriptors { return &md.L1.Messages }
-func (md *Message) Extensions() pref.ExtensionDescriptors { return &md.L1.Extensions }
-func (md *Message) ProtoType(pref.MessageDescriptor) {}
-func (md *Message) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) }
+func (md *Message) Enums() protoreflect.EnumDescriptors { return &md.L1.Enums }
+func (md *Message) Messages() protoreflect.MessageDescriptors { return &md.L1.Messages }
+func (md *Message) Extensions() protoreflect.ExtensionDescriptors { return &md.L1.Extensions }
+func (md *Message) ProtoType(protoreflect.MessageDescriptor) {}
+func (md *Message) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) }
func (md *Message) lazyInit() *MessageL2 {
md.L0.ParentFile.lazyInit() // implicitly initializes L2
return md.L2
@@ -260,70 +313,83 @@ func (md *Message) IsMessageSet() bool {
return md.L1.IsMessageSet
}
-func (fd *Field) Options() pref.ProtoMessage {
+func (fd *Field) Options() protoreflect.ProtoMessage {
if f := fd.L1.Options; f != nil {
return f()
}
return descopts.Field
}
-func (fd *Field) Number() pref.FieldNumber { return fd.L1.Number }
-func (fd *Field) Cardinality() pref.Cardinality { return fd.L1.Cardinality }
-func (fd *Field) Kind() pref.Kind { return fd.L1.Kind }
-func (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON }
-func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) }
-func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) }
+func (fd *Field) Number() protoreflect.FieldNumber { return fd.L1.Number }
+func (fd *Field) Cardinality() protoreflect.Cardinality { return fd.L1.Cardinality }
+func (fd *Field) Kind() protoreflect.Kind {
+ return fd.L1.Kind
+}
+func (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON }
+func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) }
+func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) }
func (fd *Field) HasPresence() bool {
- return fd.L1.Cardinality != pref.Repeated && (fd.L0.ParentFile.L1.Syntax == pref.Proto2 || fd.L1.Message != nil || fd.L1.ContainingOneof != nil)
+ if fd.L1.Cardinality == protoreflect.Repeated {
+ return false
+ }
+ explicitFieldPresence := fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsFieldPresence
+ return fd.Syntax() == protoreflect.Proto2 || explicitFieldPresence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil
}
func (fd *Field) HasOptionalKeyword() bool {
- return (fd.L0.ParentFile.L1.Syntax == pref.Proto2 && fd.L1.Cardinality == pref.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional
+ return (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional
}
func (fd *Field) IsPacked() bool {
- if !fd.L1.HasPacked && fd.L0.ParentFile.L1.Syntax != pref.Proto2 && fd.L1.Cardinality == pref.Repeated {
- switch fd.L1.Kind {
- case pref.StringKind, pref.BytesKind, pref.MessageKind, pref.GroupKind:
- default:
- return true
- }
+ if fd.L1.Cardinality != protoreflect.Repeated {
+ return false
+ }
+ switch fd.L1.Kind {
+ case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind:
+ return false
+ }
+ if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions {
+ return fd.L1.EditionFeatures.IsPacked
+ }
+ if fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 {
+ // proto3 repeated fields are packed by default.
+ return !fd.L1.HasPacked || fd.L1.IsPacked
}
return fd.L1.IsPacked
}
func (fd *Field) IsExtension() bool { return false }
func (fd *Field) IsWeak() bool { return fd.L1.IsWeak }
-func (fd *Field) IsList() bool { return fd.Cardinality() == pref.Repeated && !fd.IsMap() }
+func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() }
func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() }
-func (fd *Field) MapKey() pref.FieldDescriptor {
+func (fd *Field) MapKey() protoreflect.FieldDescriptor {
if !fd.IsMap() {
return nil
}
return fd.Message().Fields().ByNumber(genid.MapEntry_Key_field_number)
}
-func (fd *Field) MapValue() pref.FieldDescriptor {
+func (fd *Field) MapValue() protoreflect.FieldDescriptor {
if !fd.IsMap() {
return nil
}
return fd.Message().Fields().ByNumber(genid.MapEntry_Value_field_number)
}
-func (fd *Field) HasDefault() bool { return fd.L1.Default.has }
-func (fd *Field) Default() pref.Value { return fd.L1.Default.get(fd) }
-func (fd *Field) DefaultEnumValue() pref.EnumValueDescriptor { return fd.L1.Default.enum }
-func (fd *Field) ContainingOneof() pref.OneofDescriptor { return fd.L1.ContainingOneof }
-func (fd *Field) ContainingMessage() pref.MessageDescriptor {
- return fd.L0.Parent.(pref.MessageDescriptor)
+func (fd *Field) HasDefault() bool { return fd.L1.Default.has }
+func (fd *Field) Default() protoreflect.Value { return fd.L1.Default.get(fd) }
+func (fd *Field) DefaultEnumValue() protoreflect.EnumValueDescriptor { return fd.L1.Default.enum }
+func (fd *Field) ContainingOneof() protoreflect.OneofDescriptor { return fd.L1.ContainingOneof }
+func (fd *Field) ContainingMessage() protoreflect.MessageDescriptor {
+ return fd.L0.Parent.(protoreflect.MessageDescriptor)
}
-func (fd *Field) Enum() pref.EnumDescriptor {
+func (fd *Field) Enum() protoreflect.EnumDescriptor {
return fd.L1.Enum
}
-func (fd *Field) Message() pref.MessageDescriptor {
+func (fd *Field) Message() protoreflect.MessageDescriptor {
if fd.L1.IsWeak {
if d, _ := protoregistry.GlobalFiles.FindDescriptorByName(fd.L1.Message.FullName()); d != nil {
- return d.(pref.MessageDescriptor)
+ return d.(protoreflect.MessageDescriptor)
}
}
return fd.L1.Message
}
-func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
-func (fd *Field) ProtoType(pref.FieldDescriptor) {}
+func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
+func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {}
// EnforceUTF8 is a pseudo-internal API to determine whether to enforce UTF-8
// validation for the string field. This exists for Google-internal use only
@@ -333,24 +399,27 @@ func (fd *Field) ProtoType(pref.FieldDescriptor) {}
// WARNING: This method is exempt from the compatibility promise and may be
// removed in the future without warning.
func (fd *Field) EnforceUTF8() bool {
+ if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions {
+ return fd.L1.EditionFeatures.IsUTF8Validated
+ }
if fd.L1.HasEnforceUTF8 {
return fd.L1.EnforceUTF8
}
- return fd.L0.ParentFile.L1.Syntax == pref.Proto3
+ return fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3
}
func (od *Oneof) IsSynthetic() bool {
- return od.L0.ParentFile.L1.Syntax == pref.Proto3 && len(od.L1.Fields.List) == 1 && od.L1.Fields.List[0].HasOptionalKeyword()
+ return od.L0.ParentFile.L1.Syntax == protoreflect.Proto3 && len(od.L1.Fields.List) == 1 && od.L1.Fields.List[0].HasOptionalKeyword()
}
-func (od *Oneof) Options() pref.ProtoMessage {
+func (od *Oneof) Options() protoreflect.ProtoMessage {
if f := od.L1.Options; f != nil {
return f()
}
return descopts.Oneof
}
-func (od *Oneof) Fields() pref.FieldDescriptors { return &od.L1.Fields }
-func (od *Oneof) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, od) }
-func (od *Oneof) ProtoType(pref.OneofDescriptor) {}
+func (od *Oneof) Fields() protoreflect.FieldDescriptors { return &od.L1.Fields }
+func (od *Oneof) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, od) }
+func (od *Oneof) ProtoType(protoreflect.OneofDescriptor) {}
type (
Extension struct {
@@ -359,55 +428,58 @@ type (
L2 *ExtensionL2 // protected by fileDesc.once
}
ExtensionL1 struct {
- Number pref.FieldNumber
- Extendee pref.MessageDescriptor
- Cardinality pref.Cardinality
- Kind pref.Kind
+ Number protoreflect.FieldNumber
+ Extendee protoreflect.MessageDescriptor
+ Cardinality protoreflect.Cardinality
+ Kind protoreflect.Kind
+ EditionFeatures EditionFeatures
}
ExtensionL2 struct {
- Options func() pref.ProtoMessage
+ Options func() protoreflect.ProtoMessage
StringName stringName
IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto
IsPacked bool // promoted from google.protobuf.FieldOptions
Default defaultValue
- Enum pref.EnumDescriptor
- Message pref.MessageDescriptor
+ Enum protoreflect.EnumDescriptor
+ Message protoreflect.MessageDescriptor
}
)
-func (xd *Extension) Options() pref.ProtoMessage {
+func (xd *Extension) Options() protoreflect.ProtoMessage {
if f := xd.lazyInit().Options; f != nil {
return f()
}
return descopts.Field
}
-func (xd *Extension) Number() pref.FieldNumber { return xd.L1.Number }
-func (xd *Extension) Cardinality() pref.Cardinality { return xd.L1.Cardinality }
-func (xd *Extension) Kind() pref.Kind { return xd.L1.Kind }
-func (xd *Extension) HasJSONName() bool { return xd.lazyInit().StringName.hasJSON }
-func (xd *Extension) JSONName() string { return xd.lazyInit().StringName.getJSON(xd) }
-func (xd *Extension) TextName() string { return xd.lazyInit().StringName.getText(xd) }
-func (xd *Extension) HasPresence() bool { return xd.L1.Cardinality != pref.Repeated }
+func (xd *Extension) Number() protoreflect.FieldNumber { return xd.L1.Number }
+func (xd *Extension) Cardinality() protoreflect.Cardinality { return xd.L1.Cardinality }
+func (xd *Extension) Kind() protoreflect.Kind { return xd.L1.Kind }
+func (xd *Extension) HasJSONName() bool { return xd.lazyInit().StringName.hasJSON }
+func (xd *Extension) JSONName() string { return xd.lazyInit().StringName.getJSON(xd) }
+func (xd *Extension) TextName() string { return xd.lazyInit().StringName.getText(xd) }
+func (xd *Extension) HasPresence() bool { return xd.L1.Cardinality != protoreflect.Repeated }
func (xd *Extension) HasOptionalKeyword() bool {
- return (xd.L0.ParentFile.L1.Syntax == pref.Proto2 && xd.L1.Cardinality == pref.Optional) || xd.lazyInit().IsProto3Optional
-}
-func (xd *Extension) IsPacked() bool { return xd.lazyInit().IsPacked }
-func (xd *Extension) IsExtension() bool { return true }
-func (xd *Extension) IsWeak() bool { return false }
-func (xd *Extension) IsList() bool { return xd.Cardinality() == pref.Repeated }
-func (xd *Extension) IsMap() bool { return false }
-func (xd *Extension) MapKey() pref.FieldDescriptor { return nil }
-func (xd *Extension) MapValue() pref.FieldDescriptor { return nil }
-func (xd *Extension) HasDefault() bool { return xd.lazyInit().Default.has }
-func (xd *Extension) Default() pref.Value { return xd.lazyInit().Default.get(xd) }
-func (xd *Extension) DefaultEnumValue() pref.EnumValueDescriptor { return xd.lazyInit().Default.enum }
-func (xd *Extension) ContainingOneof() pref.OneofDescriptor { return nil }
-func (xd *Extension) ContainingMessage() pref.MessageDescriptor { return xd.L1.Extendee }
-func (xd *Extension) Enum() pref.EnumDescriptor { return xd.lazyInit().Enum }
-func (xd *Extension) Message() pref.MessageDescriptor { return xd.lazyInit().Message }
-func (xd *Extension) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, xd) }
-func (xd *Extension) ProtoType(pref.FieldDescriptor) {}
-func (xd *Extension) ProtoInternal(pragma.DoNotImplement) {}
+ return (xd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && xd.L1.Cardinality == protoreflect.Optional) || xd.lazyInit().IsProto3Optional
+}
+func (xd *Extension) IsPacked() bool { return xd.lazyInit().IsPacked }
+func (xd *Extension) IsExtension() bool { return true }
+func (xd *Extension) IsWeak() bool { return false }
+func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated }
+func (xd *Extension) IsMap() bool { return false }
+func (xd *Extension) MapKey() protoreflect.FieldDescriptor { return nil }
+func (xd *Extension) MapValue() protoreflect.FieldDescriptor { return nil }
+func (xd *Extension) HasDefault() bool { return xd.lazyInit().Default.has }
+func (xd *Extension) Default() protoreflect.Value { return xd.lazyInit().Default.get(xd) }
+func (xd *Extension) DefaultEnumValue() protoreflect.EnumValueDescriptor {
+ return xd.lazyInit().Default.enum
+}
+func (xd *Extension) ContainingOneof() protoreflect.OneofDescriptor { return nil }
+func (xd *Extension) ContainingMessage() protoreflect.MessageDescriptor { return xd.L1.Extendee }
+func (xd *Extension) Enum() protoreflect.EnumDescriptor { return xd.lazyInit().Enum }
+func (xd *Extension) Message() protoreflect.MessageDescriptor { return xd.lazyInit().Message }
+func (xd *Extension) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, xd) }
+func (xd *Extension) ProtoType(protoreflect.FieldDescriptor) {}
+func (xd *Extension) ProtoInternal(pragma.DoNotImplement) {}
func (xd *Extension) lazyInit() *ExtensionL2 {
xd.L0.ParentFile.lazyInit() // implicitly initializes L2
return xd.L2
@@ -421,7 +493,7 @@ type (
}
ServiceL1 struct{}
ServiceL2 struct {
- Options func() pref.ProtoMessage
+ Options func() protoreflect.ProtoMessage
Methods Methods
}
@@ -430,48 +502,48 @@ type (
L1 MethodL1
}
MethodL1 struct {
- Options func() pref.ProtoMessage
- Input pref.MessageDescriptor
- Output pref.MessageDescriptor
+ Options func() protoreflect.ProtoMessage
+ Input protoreflect.MessageDescriptor
+ Output protoreflect.MessageDescriptor
IsStreamingClient bool
IsStreamingServer bool
}
)
-func (sd *Service) Options() pref.ProtoMessage {
+func (sd *Service) Options() protoreflect.ProtoMessage {
if f := sd.lazyInit().Options; f != nil {
return f()
}
return descopts.Service
}
-func (sd *Service) Methods() pref.MethodDescriptors { return &sd.lazyInit().Methods }
-func (sd *Service) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, sd) }
-func (sd *Service) ProtoType(pref.ServiceDescriptor) {}
-func (sd *Service) ProtoInternal(pragma.DoNotImplement) {}
+func (sd *Service) Methods() protoreflect.MethodDescriptors { return &sd.lazyInit().Methods }
+func (sd *Service) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, sd) }
+func (sd *Service) ProtoType(protoreflect.ServiceDescriptor) {}
+func (sd *Service) ProtoInternal(pragma.DoNotImplement) {}
func (sd *Service) lazyInit() *ServiceL2 {
sd.L0.ParentFile.lazyInit() // implicitly initializes L2
return sd.L2
}
-func (md *Method) Options() pref.ProtoMessage {
+func (md *Method) Options() protoreflect.ProtoMessage {
if f := md.L1.Options; f != nil {
return f()
}
return descopts.Method
}
-func (md *Method) Input() pref.MessageDescriptor { return md.L1.Input }
-func (md *Method) Output() pref.MessageDescriptor { return md.L1.Output }
-func (md *Method) IsStreamingClient() bool { return md.L1.IsStreamingClient }
-func (md *Method) IsStreamingServer() bool { return md.L1.IsStreamingServer }
-func (md *Method) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) }
-func (md *Method) ProtoType(pref.MethodDescriptor) {}
-func (md *Method) ProtoInternal(pragma.DoNotImplement) {}
+func (md *Method) Input() protoreflect.MessageDescriptor { return md.L1.Input }
+func (md *Method) Output() protoreflect.MessageDescriptor { return md.L1.Output }
+func (md *Method) IsStreamingClient() bool { return md.L1.IsStreamingClient }
+func (md *Method) IsStreamingServer() bool { return md.L1.IsStreamingServer }
+func (md *Method) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) }
+func (md *Method) ProtoType(protoreflect.MethodDescriptor) {}
+func (md *Method) ProtoInternal(pragma.DoNotImplement) {}
// Surrogate files are can be used to create standalone descriptors
// where the syntax is only information derived from the parent file.
var (
- SurrogateProto2 = &File{L1: FileL1{Syntax: pref.Proto2}, L2: &FileL2{}}
- SurrogateProto3 = &File{L1: FileL1{Syntax: pref.Proto3}, L2: &FileL2{}}
+ SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}}
+ SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}}
)
type (
@@ -479,24 +551,24 @@ type (
L0 BaseL0
}
BaseL0 struct {
- FullName pref.FullName // must be populated
- ParentFile *File // must be populated
- Parent pref.Descriptor
+ FullName protoreflect.FullName // must be populated
+ ParentFile *File // must be populated
+ Parent protoreflect.Descriptor
Index int
}
)
-func (d *Base) Name() pref.Name { return d.L0.FullName.Name() }
-func (d *Base) FullName() pref.FullName { return d.L0.FullName }
-func (d *Base) ParentFile() pref.FileDescriptor {
+func (d *Base) Name() protoreflect.Name { return d.L0.FullName.Name() }
+func (d *Base) FullName() protoreflect.FullName { return d.L0.FullName }
+func (d *Base) ParentFile() protoreflect.FileDescriptor {
if d.L0.ParentFile == SurrogateProto2 || d.L0.ParentFile == SurrogateProto3 {
return nil // surrogate files are not real parents
}
return d.L0.ParentFile
}
-func (d *Base) Parent() pref.Descriptor { return d.L0.Parent }
+func (d *Base) Parent() protoreflect.Descriptor { return d.L0.Parent }
func (d *Base) Index() int { return d.L0.Index }
-func (d *Base) Syntax() pref.Syntax { return d.L0.ParentFile.Syntax() }
+func (d *Base) Syntax() protoreflect.Syntax { return d.L0.ParentFile.Syntax() }
func (d *Base) IsPlaceholder() bool { return false }
func (d *Base) ProtoInternal(pragma.DoNotImplement) {}
@@ -513,7 +585,7 @@ func (s *stringName) InitJSON(name string) {
s.nameJSON = name
}
-func (s *stringName) lazyInit(fd pref.FieldDescriptor) *stringName {
+func (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName {
s.once.Do(func() {
if fd.IsExtension() {
// For extensions, JSON and text are formatted the same way.
@@ -533,7 +605,7 @@ func (s *stringName) lazyInit(fd pref.FieldDescriptor) *stringName {
// Format the text name.
s.nameText = string(fd.Name())
- if fd.Kind() == pref.GroupKind {
+ if fd.Kind() == protoreflect.GroupKind {
s.nameText = string(fd.Message().Name())
}
}
@@ -541,10 +613,10 @@ func (s *stringName) lazyInit(fd pref.FieldDescriptor) *stringName {
return s
}
-func (s *stringName) getJSON(fd pref.FieldDescriptor) string { return s.lazyInit(fd).nameJSON }
-func (s *stringName) getText(fd pref.FieldDescriptor) string { return s.lazyInit(fd).nameText }
+func (s *stringName) getJSON(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameJSON }
+func (s *stringName) getText(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameText }
-func DefaultValue(v pref.Value, ev pref.EnumValueDescriptor) defaultValue {
+func DefaultValue(v protoreflect.Value, ev protoreflect.EnumValueDescriptor) defaultValue {
dv := defaultValue{has: v.IsValid(), val: v, enum: ev}
if b, ok := v.Interface().([]byte); ok {
// Store a copy of the default bytes, so that we can detect
@@ -554,9 +626,9 @@ func DefaultValue(v pref.Value, ev pref.EnumValueDescriptor) defaultValue {
return dv
}
-func unmarshalDefault(b []byte, k pref.Kind, pf *File, ed pref.EnumDescriptor) defaultValue {
- var evs pref.EnumValueDescriptors
- if k == pref.EnumKind {
+func unmarshalDefault(b []byte, k protoreflect.Kind, pf *File, ed protoreflect.EnumDescriptor) defaultValue {
+ var evs protoreflect.EnumValueDescriptors
+ if k == protoreflect.EnumKind {
// If the enum is declared within the same file, be careful not to
// blindly call the Values method, lest we bind ourselves in a deadlock.
if e, ok := ed.(*Enum); ok && e.L0.ParentFile == pf {
@@ -567,9 +639,9 @@ func unmarshalDefault(b []byte, k pref.Kind, pf *File, ed pref.EnumDescriptor) d
// If we are unable to resolve the enum dependency, use a placeholder
// enum value since we will not be able to parse the default value.
- if ed.IsPlaceholder() && pref.Name(b).IsValid() {
- v := pref.ValueOfEnum(0)
- ev := PlaceholderEnumValue(ed.FullName().Parent().Append(pref.Name(b)))
+ if ed.IsPlaceholder() && protoreflect.Name(b).IsValid() {
+ v := protoreflect.ValueOfEnum(0)
+ ev := PlaceholderEnumValue(ed.FullName().Parent().Append(protoreflect.Name(b)))
return DefaultValue(v, ev)
}
}
@@ -583,41 +655,41 @@ func unmarshalDefault(b []byte, k pref.Kind, pf *File, ed pref.EnumDescriptor) d
type defaultValue struct {
has bool
- val pref.Value
- enum pref.EnumValueDescriptor
+ val protoreflect.Value
+ enum protoreflect.EnumValueDescriptor
bytes []byte
}
-func (dv *defaultValue) get(fd pref.FieldDescriptor) pref.Value {
+func (dv *defaultValue) get(fd protoreflect.FieldDescriptor) protoreflect.Value {
// Return the zero value as the default if unpopulated.
if !dv.has {
- if fd.Cardinality() == pref.Repeated {
- return pref.Value{}
+ if fd.Cardinality() == protoreflect.Repeated {
+ return protoreflect.Value{}
}
switch fd.Kind() {
- case pref.BoolKind:
- return pref.ValueOfBool(false)
- case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind:
- return pref.ValueOfInt32(0)
- case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind:
- return pref.ValueOfInt64(0)
- case pref.Uint32Kind, pref.Fixed32Kind:
- return pref.ValueOfUint32(0)
- case pref.Uint64Kind, pref.Fixed64Kind:
- return pref.ValueOfUint64(0)
- case pref.FloatKind:
- return pref.ValueOfFloat32(0)
- case pref.DoubleKind:
- return pref.ValueOfFloat64(0)
- case pref.StringKind:
- return pref.ValueOfString("")
- case pref.BytesKind:
- return pref.ValueOfBytes(nil)
- case pref.EnumKind:
+ case protoreflect.BoolKind:
+ return protoreflect.ValueOfBool(false)
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
+ return protoreflect.ValueOfInt32(0)
+ case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
+ return protoreflect.ValueOfInt64(0)
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
+ return protoreflect.ValueOfUint32(0)
+ case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
+ return protoreflect.ValueOfUint64(0)
+ case protoreflect.FloatKind:
+ return protoreflect.ValueOfFloat32(0)
+ case protoreflect.DoubleKind:
+ return protoreflect.ValueOfFloat64(0)
+ case protoreflect.StringKind:
+ return protoreflect.ValueOfString("")
+ case protoreflect.BytesKind:
+ return protoreflect.ValueOfBytes(nil)
+ case protoreflect.EnumKind:
if evs := fd.Enum().Values(); evs.Len() > 0 {
- return pref.ValueOfEnum(evs.Get(0).Number())
+ return protoreflect.ValueOfEnum(evs.Get(0).Number())
}
- return pref.ValueOfEnum(0)
+ return protoreflect.ValueOfEnum(0)
}
}
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
index 66e1fee5..237e64fd 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
@@ -5,12 +5,13 @@
package filedesc
import (
+ "fmt"
"sync"
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/internal/strs"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
// fileRaw is a data struct used when initializing a file descriptor from
@@ -95,9 +96,10 @@ func (fd *File) unmarshalSeed(b []byte) {
sb := getBuilder()
defer putBuilder(sb)
- var prevField pref.FieldNumber
+ var prevField protoreflect.FieldNumber
var numEnums, numMessages, numExtensions, numServices int
var posEnums, posMessages, posExtensions, posServices int
+ var options []byte
b0 := b
for len(b) > 0 {
num, typ, n := protowire.ConsumeTag(b)
@@ -110,16 +112,20 @@ func (fd *File) unmarshalSeed(b []byte) {
case genid.FileDescriptorProto_Syntax_field_number:
switch string(v) {
case "proto2":
- fd.L1.Syntax = pref.Proto2
+ fd.L1.Syntax = protoreflect.Proto2
case "proto3":
- fd.L1.Syntax = pref.Proto3
+ fd.L1.Syntax = protoreflect.Proto3
+ case "editions":
+ fd.L1.Syntax = protoreflect.Editions
default:
panic("invalid syntax")
}
case genid.FileDescriptorProto_Name_field_number:
fd.L1.Path = sb.MakeString(v)
case genid.FileDescriptorProto_Package_field_number:
- fd.L1.Package = pref.FullName(sb.MakeString(v))
+ fd.L1.Package = protoreflect.FullName(sb.MakeString(v))
+ case genid.FileDescriptorProto_Options_field_number:
+ options = v
case genid.FileDescriptorProto_EnumType_field_number:
if prevField != genid.FileDescriptorProto_EnumType_field_number {
if numEnums > 0 {
@@ -154,6 +160,13 @@ func (fd *File) unmarshalSeed(b []byte) {
numServices++
}
prevField = num
+ case protowire.VarintType:
+ v, m := protowire.ConsumeVarint(b)
+ b = b[m:]
+ switch num {
+ case genid.FileDescriptorProto_Edition_field_number:
+ fd.L1.Edition = Edition(v)
+ }
default:
m := protowire.ConsumeFieldValue(num, typ, b)
b = b[m:]
@@ -163,7 +176,16 @@ func (fd *File) unmarshalSeed(b []byte) {
// If syntax is missing, it is assumed to be proto2.
if fd.L1.Syntax == 0 {
- fd.L1.Syntax = pref.Proto2
+ fd.L1.Syntax = protoreflect.Proto2
+ }
+
+ if fd.L1.Syntax == protoreflect.Editions {
+ fd.L1.EditionFeatures = getFeaturesFor(fd.L1.Edition)
+ }
+
+ // Parse editions features from options if any
+ if options != nil {
+ fd.unmarshalSeedOptions(options)
}
// Must allocate all declarations before parsing each descriptor type
@@ -219,7 +241,29 @@ func (fd *File) unmarshalSeed(b []byte) {
}
}
-func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (fd *File) unmarshalSeedOptions(b []byte) {
+ for b := b; len(b) > 0; {
+ num, typ, n := protowire.ConsumeTag(b)
+ b = b[n:]
+ switch typ {
+ case protowire.BytesType:
+ v, m := protowire.ConsumeBytes(b)
+ b = b[m:]
+ switch num {
+ case genid.FileOptions_Features_field_number:
+ if fd.Syntax() != protoreflect.Editions {
+ panic(fmt.Sprintf("invalid descriptor: using edition features in a proto with syntax %s", fd.Syntax()))
+ }
+ fd.L1.EditionFeatures = unmarshalFeatureSet(v, fd.L1.EditionFeatures)
+ }
+ default:
+ m := protowire.ConsumeFieldValue(num, typ, b)
+ b = b[m:]
+ }
+ }
+}
+
+func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
ed.L0.ParentFile = pf
ed.L0.Parent = pd
ed.L0.Index = i
@@ -271,12 +315,13 @@ func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Desc
}
}
-func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
md.L0.ParentFile = pf
md.L0.Parent = pd
md.L0.Index = i
+ md.L1.EditionFeatures = featuresFromParentDesc(md.Parent())
- var prevField pref.FieldNumber
+ var prevField protoreflect.FieldNumber
var numEnums, numMessages, numExtensions int
var posEnums, posMessages, posExtensions int
b0 := b
@@ -380,6 +425,13 @@ func (md *Message) unmarshalSeedOptions(b []byte) {
case genid.MessageOptions_MessageSetWireFormat_field_number:
md.L1.IsMessageSet = protowire.DecodeBool(v)
}
+ case protowire.BytesType:
+ v, m := protowire.ConsumeBytes(b)
+ b = b[m:]
+ switch num {
+ case genid.MessageOptions_Features_field_number:
+ md.L1.EditionFeatures = unmarshalFeatureSet(v, md.L1.EditionFeatures)
+ }
default:
m := protowire.ConsumeFieldValue(num, typ, b)
b = b[m:]
@@ -387,7 +439,7 @@ func (md *Message) unmarshalSeedOptions(b []byte) {
}
}
-func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
xd.L0.ParentFile = pf
xd.L0.Parent = pd
xd.L0.Index = i
@@ -401,11 +453,11 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref
b = b[m:]
switch num {
case genid.FieldDescriptorProto_Number_field_number:
- xd.L1.Number = pref.FieldNumber(v)
+ xd.L1.Number = protoreflect.FieldNumber(v)
case genid.FieldDescriptorProto_Label_field_number:
- xd.L1.Cardinality = pref.Cardinality(v)
+ xd.L1.Cardinality = protoreflect.Cardinality(v)
case genid.FieldDescriptorProto_Type_field_number:
- xd.L1.Kind = pref.Kind(v)
+ xd.L1.Kind = protoreflect.Kind(v)
}
case protowire.BytesType:
v, m := protowire.ConsumeBytes(b)
@@ -423,7 +475,7 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref
}
}
-func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
sd.L0.ParentFile = pf
sd.L0.Parent = pd
sd.L0.Index = i
@@ -459,13 +511,13 @@ func putBuilder(b *strs.Builder) {
// makeFullName converts b to a protoreflect.FullName,
// where b must start with a leading dot.
-func makeFullName(sb *strs.Builder, b []byte) pref.FullName {
+func makeFullName(sb *strs.Builder, b []byte) protoreflect.FullName {
if len(b) == 0 || b[0] != '.' {
panic("name reference must be fully qualified")
}
- return pref.FullName(sb.MakeString(b[1:]))
+ return protoreflect.FullName(sb.MakeString(b[1:]))
}
-func appendFullName(sb *strs.Builder, prefix pref.FullName, suffix []byte) pref.FullName {
- return sb.AppendFullName(prefix, pref.Name(strs.UnsafeString(suffix)))
+func appendFullName(sb *strs.Builder, prefix protoreflect.FullName, suffix []byte) protoreflect.FullName {
+ return sb.AppendFullName(prefix, protoreflect.Name(strs.UnsafeString(suffix)))
}
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
index 198451e3..482a61cc 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
@@ -13,7 +13,7 @@ import (
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/internal/strs"
"google.golang.org/protobuf/proto"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
func (fd *File) lazyRawInit() {
@@ -39,10 +39,10 @@ func (file *File) resolveMessages() {
// Resolve message field dependency.
switch fd.L1.Kind {
- case pref.EnumKind:
+ case protoreflect.EnumKind:
fd.L1.Enum = file.resolveEnumDependency(fd.L1.Enum, listFieldDeps, depIdx)
depIdx++
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx)
depIdx++
}
@@ -62,10 +62,10 @@ func (file *File) resolveExtensions() {
// Resolve extension field dependency.
switch xd.L1.Kind {
- case pref.EnumKind:
+ case protoreflect.EnumKind:
xd.L2.Enum = file.resolveEnumDependency(xd.L2.Enum, listExtDeps, depIdx)
depIdx++
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
xd.L2.Message = file.resolveMessageDependency(xd.L2.Message, listExtDeps, depIdx)
depIdx++
}
@@ -92,7 +92,7 @@ func (file *File) resolveServices() {
}
}
-func (file *File) resolveEnumDependency(ed pref.EnumDescriptor, i, j int32) pref.EnumDescriptor {
+func (file *File) resolveEnumDependency(ed protoreflect.EnumDescriptor, i, j int32) protoreflect.EnumDescriptor {
r := file.builder.FileRegistry
if r, ok := r.(resolverByIndex); ok {
if ed2 := r.FindEnumByIndex(i, j, file.allEnums, file.allMessages); ed2 != nil {
@@ -105,12 +105,12 @@ func (file *File) resolveEnumDependency(ed pref.EnumDescriptor, i, j int32) pref
}
}
if d, _ := r.FindDescriptorByName(ed.FullName()); d != nil {
- return d.(pref.EnumDescriptor)
+ return d.(protoreflect.EnumDescriptor)
}
return ed
}
-func (file *File) resolveMessageDependency(md pref.MessageDescriptor, i, j int32) pref.MessageDescriptor {
+func (file *File) resolveMessageDependency(md protoreflect.MessageDescriptor, i, j int32) protoreflect.MessageDescriptor {
r := file.builder.FileRegistry
if r, ok := r.(resolverByIndex); ok {
if md2 := r.FindMessageByIndex(i, j, file.allEnums, file.allMessages); md2 != nil {
@@ -123,7 +123,7 @@ func (file *File) resolveMessageDependency(md pref.MessageDescriptor, i, j int32
}
}
if d, _ := r.FindDescriptorByName(md.FullName()); d != nil {
- return d.(pref.MessageDescriptor)
+ return d.(protoreflect.MessageDescriptor)
}
return md
}
@@ -158,7 +158,7 @@ func (fd *File) unmarshalFull(b []byte) {
if imp == nil {
imp = PlaceholderFile(path)
}
- fd.L2.Imports = append(fd.L2.Imports, pref.FileImport{FileDescriptor: imp})
+ fd.L2.Imports = append(fd.L2.Imports, protoreflect.FileImport{FileDescriptor: imp})
case genid.FileDescriptorProto_EnumType_field_number:
fd.L1.Enums.List[enumIdx].unmarshalFull(v, sb)
enumIdx++
@@ -199,7 +199,7 @@ func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) {
case genid.EnumDescriptorProto_Value_field_number:
rawValues = append(rawValues, v)
case genid.EnumDescriptorProto_ReservedName_field_number:
- ed.L2.ReservedNames.List = append(ed.L2.ReservedNames.List, pref.Name(sb.MakeString(v)))
+ ed.L2.ReservedNames.List = append(ed.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v)))
case genid.EnumDescriptorProto_ReservedRange_field_number:
ed.L2.ReservedRanges.List = append(ed.L2.ReservedRanges.List, unmarshalEnumReservedRange(v))
case genid.EnumDescriptorProto_Options_field_number:
@@ -219,7 +219,7 @@ func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) {
ed.L2.Options = ed.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Enum, rawOptions)
}
-func unmarshalEnumReservedRange(b []byte) (r [2]pref.EnumNumber) {
+func unmarshalEnumReservedRange(b []byte) (r [2]protoreflect.EnumNumber) {
for len(b) > 0 {
num, typ, n := protowire.ConsumeTag(b)
b = b[n:]
@@ -229,9 +229,9 @@ func unmarshalEnumReservedRange(b []byte) (r [2]pref.EnumNumber) {
b = b[m:]
switch num {
case genid.EnumDescriptorProto_EnumReservedRange_Start_field_number:
- r[0] = pref.EnumNumber(v)
+ r[0] = protoreflect.EnumNumber(v)
case genid.EnumDescriptorProto_EnumReservedRange_End_field_number:
- r[1] = pref.EnumNumber(v)
+ r[1] = protoreflect.EnumNumber(v)
}
default:
m := protowire.ConsumeFieldValue(num, typ, b)
@@ -241,7 +241,7 @@ func unmarshalEnumReservedRange(b []byte) (r [2]pref.EnumNumber) {
return r
}
-func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
vd.L0.ParentFile = pf
vd.L0.Parent = pd
vd.L0.Index = i
@@ -256,7 +256,7 @@ func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref
b = b[m:]
switch num {
case genid.EnumValueDescriptorProto_Number_field_number:
- vd.L1.Number = pref.EnumNumber(v)
+ vd.L1.Number = protoreflect.EnumNumber(v)
}
case protowire.BytesType:
v, m := protowire.ConsumeBytes(b)
@@ -294,7 +294,7 @@ func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) {
case genid.DescriptorProto_OneofDecl_field_number:
rawOneofs = append(rawOneofs, v)
case genid.DescriptorProto_ReservedName_field_number:
- md.L2.ReservedNames.List = append(md.L2.ReservedNames.List, pref.Name(sb.MakeString(v)))
+ md.L2.ReservedNames.List = append(md.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v)))
case genid.DescriptorProto_ReservedRange_field_number:
md.L2.ReservedRanges.List = append(md.L2.ReservedRanges.List, unmarshalMessageReservedRange(v))
case genid.DescriptorProto_ExtensionRange_field_number:
@@ -326,7 +326,7 @@ func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) {
for i, b := range rawFields {
fd := &md.L2.Fields.List[i]
fd.unmarshalFull(b, sb, md.L0.ParentFile, md, i)
- if fd.L1.Cardinality == pref.Required {
+ if fd.L1.Cardinality == protoreflect.Required {
md.L2.RequiredNumbers.List = append(md.L2.RequiredNumbers.List, fd.L1.Number)
}
}
@@ -359,7 +359,7 @@ func (md *Message) unmarshalOptions(b []byte) {
}
}
-func unmarshalMessageReservedRange(b []byte) (r [2]pref.FieldNumber) {
+func unmarshalMessageReservedRange(b []byte) (r [2]protoreflect.FieldNumber) {
for len(b) > 0 {
num, typ, n := protowire.ConsumeTag(b)
b = b[n:]
@@ -369,9 +369,9 @@ func unmarshalMessageReservedRange(b []byte) (r [2]pref.FieldNumber) {
b = b[m:]
switch num {
case genid.DescriptorProto_ReservedRange_Start_field_number:
- r[0] = pref.FieldNumber(v)
+ r[0] = protoreflect.FieldNumber(v)
case genid.DescriptorProto_ReservedRange_End_field_number:
- r[1] = pref.FieldNumber(v)
+ r[1] = protoreflect.FieldNumber(v)
}
default:
m := protowire.ConsumeFieldValue(num, typ, b)
@@ -381,7 +381,7 @@ func unmarshalMessageReservedRange(b []byte) (r [2]pref.FieldNumber) {
return r
}
-func unmarshalMessageExtensionRange(b []byte) (r [2]pref.FieldNumber, rawOptions []byte) {
+func unmarshalMessageExtensionRange(b []byte) (r [2]protoreflect.FieldNumber, rawOptions []byte) {
for len(b) > 0 {
num, typ, n := protowire.ConsumeTag(b)
b = b[n:]
@@ -391,9 +391,9 @@ func unmarshalMessageExtensionRange(b []byte) (r [2]pref.FieldNumber, rawOptions
b = b[m:]
switch num {
case genid.DescriptorProto_ExtensionRange_Start_field_number:
- r[0] = pref.FieldNumber(v)
+ r[0] = protoreflect.FieldNumber(v)
case genid.DescriptorProto_ExtensionRange_End_field_number:
- r[1] = pref.FieldNumber(v)
+ r[1] = protoreflect.FieldNumber(v)
}
case protowire.BytesType:
v, m := protowire.ConsumeBytes(b)
@@ -410,10 +410,11 @@ func unmarshalMessageExtensionRange(b []byte) (r [2]pref.FieldNumber, rawOptions
return r, rawOptions
}
-func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
fd.L0.ParentFile = pf
fd.L0.Parent = pd
fd.L0.Index = i
+ fd.L1.EditionFeatures = featuresFromParentDesc(fd.Parent())
var rawTypeName []byte
var rawOptions []byte
@@ -426,11 +427,11 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Des
b = b[m:]
switch num {
case genid.FieldDescriptorProto_Number_field_number:
- fd.L1.Number = pref.FieldNumber(v)
+ fd.L1.Number = protoreflect.FieldNumber(v)
case genid.FieldDescriptorProto_Label_field_number:
- fd.L1.Cardinality = pref.Cardinality(v)
+ fd.L1.Cardinality = protoreflect.Cardinality(v)
case genid.FieldDescriptorProto_Type_field_number:
- fd.L1.Kind = pref.Kind(v)
+ fd.L1.Kind = protoreflect.Kind(v)
case genid.FieldDescriptorProto_OneofIndex_field_number:
// In Message.unmarshalFull, we allocate slices for both
// the field and oneof descriptors before unmarshaling either
@@ -453,7 +454,7 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Des
case genid.FieldDescriptorProto_JsonName_field_number:
fd.L1.StringName.InitJSON(sb.MakeString(v))
case genid.FieldDescriptorProto_DefaultValue_field_number:
- fd.L1.Default.val = pref.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveMessages
+ fd.L1.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveMessages
case genid.FieldDescriptorProto_TypeName_field_number:
rawTypeName = v
case genid.FieldDescriptorProto_Options_field_number:
@@ -465,12 +466,18 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Des
b = b[m:]
}
}
+ if fd.Syntax() == protoreflect.Editions && fd.L1.Kind == protoreflect.MessageKind && fd.L1.EditionFeatures.IsDelimitedEncoded {
+ fd.L1.Kind = protoreflect.GroupKind
+ }
+ if fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsLegacyRequired {
+ fd.L1.Cardinality = protoreflect.Required
+ }
if rawTypeName != nil {
name := makeFullName(sb, rawTypeName)
switch fd.L1.Kind {
- case pref.EnumKind:
+ case protoreflect.EnumKind:
fd.L1.Enum = PlaceholderEnum(name)
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
fd.L1.Message = PlaceholderMessage(name)
}
}
@@ -497,6 +504,13 @@ func (fd *Field) unmarshalOptions(b []byte) {
fd.L1.HasEnforceUTF8 = true
fd.L1.EnforceUTF8 = protowire.DecodeBool(v)
}
+ case protowire.BytesType:
+ v, m := protowire.ConsumeBytes(b)
+ b = b[m:]
+ switch num {
+ case genid.FieldOptions_Features_field_number:
+ fd.L1.EditionFeatures = unmarshalFeatureSet(v, fd.L1.EditionFeatures)
+ }
default:
m := protowire.ConsumeFieldValue(num, typ, b)
b = b[m:]
@@ -504,7 +518,7 @@ func (fd *Field) unmarshalOptions(b []byte) {
}
}
-func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
od.L0.ParentFile = pf
od.L0.Parent = pd
od.L0.Index = i
@@ -534,6 +548,7 @@ func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Des
func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) {
var rawTypeName []byte
var rawOptions []byte
+ xd.L1.EditionFeatures = featuresFromParentDesc(xd.L1.Extendee)
xd.L2 = new(ExtensionL2)
for len(b) > 0 {
num, typ, n := protowire.ConsumeTag(b)
@@ -553,7 +568,7 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) {
case genid.FieldDescriptorProto_JsonName_field_number:
xd.L2.StringName.InitJSON(sb.MakeString(v))
case genid.FieldDescriptorProto_DefaultValue_field_number:
- xd.L2.Default.val = pref.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveExtensions
+ xd.L2.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveExtensions
case genid.FieldDescriptorProto_TypeName_field_number:
rawTypeName = v
case genid.FieldDescriptorProto_Options_field_number:
@@ -565,12 +580,18 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) {
b = b[m:]
}
}
+ if xd.Syntax() == protoreflect.Editions && xd.L1.Kind == protoreflect.MessageKind && xd.L1.EditionFeatures.IsDelimitedEncoded {
+ xd.L1.Kind = protoreflect.GroupKind
+ }
+ if xd.Syntax() == protoreflect.Editions && xd.L1.EditionFeatures.IsLegacyRequired {
+ xd.L1.Cardinality = protoreflect.Required
+ }
if rawTypeName != nil {
name := makeFullName(sb, rawTypeName)
switch xd.L1.Kind {
- case pref.EnumKind:
+ case protoreflect.EnumKind:
xd.L2.Enum = PlaceholderEnum(name)
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
xd.L2.Message = PlaceholderMessage(name)
}
}
@@ -589,6 +610,13 @@ func (xd *Extension) unmarshalOptions(b []byte) {
case genid.FieldOptions_Packed_field_number:
xd.L2.IsPacked = protowire.DecodeBool(v)
}
+ case protowire.BytesType:
+ v, m := protowire.ConsumeBytes(b)
+ b = b[m:]
+ switch num {
+ case genid.FieldOptions_Features_field_number:
+ xd.L1.EditionFeatures = unmarshalFeatureSet(v, xd.L1.EditionFeatures)
+ }
default:
m := protowire.ConsumeFieldValue(num, typ, b)
b = b[m:]
@@ -627,7 +655,7 @@ func (sd *Service) unmarshalFull(b []byte, sb *strs.Builder) {
sd.L2.Options = sd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Service, rawOptions)
}
-func (md *Method) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) {
+func (md *Method) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {
md.L0.ParentFile = pf
md.L0.Parent = pd
md.L0.Index = i
@@ -680,18 +708,18 @@ func appendOptions(dst, src []byte) []byte {
//
// The type of message to unmarshal to is passed as a pointer since the
// vars in descopts may not yet be populated at the time this function is called.
-func (db *Builder) optionsUnmarshaler(p *pref.ProtoMessage, b []byte) func() pref.ProtoMessage {
+func (db *Builder) optionsUnmarshaler(p *protoreflect.ProtoMessage, b []byte) func() protoreflect.ProtoMessage {
if b == nil {
return nil
}
- var opts pref.ProtoMessage
+ var opts protoreflect.ProtoMessage
var once sync.Once
- return func() pref.ProtoMessage {
+ return func() protoreflect.ProtoMessage {
once.Do(func() {
if *p == nil {
panic("Descriptor.Options called without importing the descriptor package")
}
- opts = reflect.New(reflect.TypeOf(*p).Elem()).Interface().(pref.ProtoMessage)
+ opts = reflect.New(reflect.TypeOf(*p).Elem()).Interface().(protoreflect.ProtoMessage)
if err := (proto.UnmarshalOptions{
AllowPartial: true,
Resolver: db.TypeResolver,
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go
index aa294fff..e3b6587d 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go
@@ -17,31 +17,30 @@ import (
"google.golang.org/protobuf/internal/errors"
"google.golang.org/protobuf/internal/pragma"
"google.golang.org/protobuf/reflect/protoreflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
)
-type FileImports []pref.FileImport
+type FileImports []protoreflect.FileImport
func (p *FileImports) Len() int { return len(*p) }
-func (p *FileImports) Get(i int) pref.FileImport { return (*p)[i] }
+func (p *FileImports) Get(i int) protoreflect.FileImport { return (*p)[i] }
func (p *FileImports) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) }
func (p *FileImports) ProtoInternal(pragma.DoNotImplement) {}
type Names struct {
- List []pref.Name
+ List []protoreflect.Name
once sync.Once
- has map[pref.Name]int // protected by once
+ has map[protoreflect.Name]int // protected by once
}
func (p *Names) Len() int { return len(p.List) }
-func (p *Names) Get(i int) pref.Name { return p.List[i] }
-func (p *Names) Has(s pref.Name) bool { return p.lazyInit().has[s] > 0 }
+func (p *Names) Get(i int) protoreflect.Name { return p.List[i] }
+func (p *Names) Has(s protoreflect.Name) bool { return p.lazyInit().has[s] > 0 }
func (p *Names) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) }
func (p *Names) ProtoInternal(pragma.DoNotImplement) {}
func (p *Names) lazyInit() *Names {
p.once.Do(func() {
if len(p.List) > 0 {
- p.has = make(map[pref.Name]int, len(p.List))
+ p.has = make(map[protoreflect.Name]int, len(p.List))
for _, s := range p.List {
p.has[s] = p.has[s] + 1
}
@@ -67,14 +66,14 @@ func (p *Names) CheckValid() error {
}
type EnumRanges struct {
- List [][2]pref.EnumNumber // start inclusive; end inclusive
+ List [][2]protoreflect.EnumNumber // start inclusive; end inclusive
once sync.Once
- sorted [][2]pref.EnumNumber // protected by once
+ sorted [][2]protoreflect.EnumNumber // protected by once
}
-func (p *EnumRanges) Len() int { return len(p.List) }
-func (p *EnumRanges) Get(i int) [2]pref.EnumNumber { return p.List[i] }
-func (p *EnumRanges) Has(n pref.EnumNumber) bool {
+func (p *EnumRanges) Len() int { return len(p.List) }
+func (p *EnumRanges) Get(i int) [2]protoreflect.EnumNumber { return p.List[i] }
+func (p *EnumRanges) Has(n protoreflect.EnumNumber) bool {
for ls := p.lazyInit().sorted; len(ls) > 0; {
i := len(ls) / 2
switch r := enumRange(ls[i]); {
@@ -129,14 +128,14 @@ func (r enumRange) String() string {
}
type FieldRanges struct {
- List [][2]pref.FieldNumber // start inclusive; end exclusive
+ List [][2]protoreflect.FieldNumber // start inclusive; end exclusive
once sync.Once
- sorted [][2]pref.FieldNumber // protected by once
+ sorted [][2]protoreflect.FieldNumber // protected by once
}
-func (p *FieldRanges) Len() int { return len(p.List) }
-func (p *FieldRanges) Get(i int) [2]pref.FieldNumber { return p.List[i] }
-func (p *FieldRanges) Has(n pref.FieldNumber) bool {
+func (p *FieldRanges) Len() int { return len(p.List) }
+func (p *FieldRanges) Get(i int) [2]protoreflect.FieldNumber { return p.List[i] }
+func (p *FieldRanges) Has(n protoreflect.FieldNumber) bool {
for ls := p.lazyInit().sorted; len(ls) > 0; {
i := len(ls) / 2
switch r := fieldRange(ls[i]); {
@@ -221,17 +220,17 @@ func (r fieldRange) String() string {
}
type FieldNumbers struct {
- List []pref.FieldNumber
+ List []protoreflect.FieldNumber
once sync.Once
- has map[pref.FieldNumber]struct{} // protected by once
+ has map[protoreflect.FieldNumber]struct{} // protected by once
}
-func (p *FieldNumbers) Len() int { return len(p.List) }
-func (p *FieldNumbers) Get(i int) pref.FieldNumber { return p.List[i] }
-func (p *FieldNumbers) Has(n pref.FieldNumber) bool {
+func (p *FieldNumbers) Len() int { return len(p.List) }
+func (p *FieldNumbers) Get(i int) protoreflect.FieldNumber { return p.List[i] }
+func (p *FieldNumbers) Has(n protoreflect.FieldNumber) bool {
p.once.Do(func() {
if len(p.List) > 0 {
- p.has = make(map[pref.FieldNumber]struct{}, len(p.List))
+ p.has = make(map[protoreflect.FieldNumber]struct{}, len(p.List))
for _, n := range p.List {
p.has[n] = struct{}{}
}
@@ -244,30 +243,38 @@ func (p *FieldNumbers) Format(s fmt.State, r rune) { descfmt.FormatList
func (p *FieldNumbers) ProtoInternal(pragma.DoNotImplement) {}
type OneofFields struct {
- List []pref.FieldDescriptor
+ List []protoreflect.FieldDescriptor
once sync.Once
- byName map[pref.Name]pref.FieldDescriptor // protected by once
- byJSON map[string]pref.FieldDescriptor // protected by once
- byText map[string]pref.FieldDescriptor // protected by once
- byNum map[pref.FieldNumber]pref.FieldDescriptor // protected by once
+ byName map[protoreflect.Name]protoreflect.FieldDescriptor // protected by once
+ byJSON map[string]protoreflect.FieldDescriptor // protected by once
+ byText map[string]protoreflect.FieldDescriptor // protected by once
+ byNum map[protoreflect.FieldNumber]protoreflect.FieldDescriptor // protected by once
}
-func (p *OneofFields) Len() int { return len(p.List) }
-func (p *OneofFields) Get(i int) pref.FieldDescriptor { return p.List[i] }
-func (p *OneofFields) ByName(s pref.Name) pref.FieldDescriptor { return p.lazyInit().byName[s] }
-func (p *OneofFields) ByJSONName(s string) pref.FieldDescriptor { return p.lazyInit().byJSON[s] }
-func (p *OneofFields) ByTextName(s string) pref.FieldDescriptor { return p.lazyInit().byText[s] }
-func (p *OneofFields) ByNumber(n pref.FieldNumber) pref.FieldDescriptor { return p.lazyInit().byNum[n] }
-func (p *OneofFields) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) }
-func (p *OneofFields) ProtoInternal(pragma.DoNotImplement) {}
+func (p *OneofFields) Len() int { return len(p.List) }
+func (p *OneofFields) Get(i int) protoreflect.FieldDescriptor { return p.List[i] }
+func (p *OneofFields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor {
+ return p.lazyInit().byName[s]
+}
+func (p *OneofFields) ByJSONName(s string) protoreflect.FieldDescriptor {
+ return p.lazyInit().byJSON[s]
+}
+func (p *OneofFields) ByTextName(s string) protoreflect.FieldDescriptor {
+ return p.lazyInit().byText[s]
+}
+func (p *OneofFields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor {
+ return p.lazyInit().byNum[n]
+}
+func (p *OneofFields) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) }
+func (p *OneofFields) ProtoInternal(pragma.DoNotImplement) {}
func (p *OneofFields) lazyInit() *OneofFields {
p.once.Do(func() {
if len(p.List) > 0 {
- p.byName = make(map[pref.Name]pref.FieldDescriptor, len(p.List))
- p.byJSON = make(map[string]pref.FieldDescriptor, len(p.List))
- p.byText = make(map[string]pref.FieldDescriptor, len(p.List))
- p.byNum = make(map[pref.FieldNumber]pref.FieldDescriptor, len(p.List))
+ p.byName = make(map[protoreflect.Name]protoreflect.FieldDescriptor, len(p.List))
+ p.byJSON = make(map[string]protoreflect.FieldDescriptor, len(p.List))
+ p.byText = make(map[string]protoreflect.FieldDescriptor, len(p.List))
+ p.byNum = make(map[protoreflect.FieldNumber]protoreflect.FieldDescriptor, len(p.List))
for _, f := range p.List {
// Field names and numbers are guaranteed to be unique.
p.byName[f.Name()] = f
@@ -284,123 +291,123 @@ type SourceLocations struct {
// List is a list of SourceLocations.
// The SourceLocation.Next field does not need to be populated
// as it will be lazily populated upon first need.
- List []pref.SourceLocation
+ List []protoreflect.SourceLocation
// File is the parent file descriptor that these locations are relative to.
// If non-nil, ByDescriptor verifies that the provided descriptor
// is a child of this file descriptor.
- File pref.FileDescriptor
+ File protoreflect.FileDescriptor
once sync.Once
byPath map[pathKey]int
}
-func (p *SourceLocations) Len() int { return len(p.List) }
-func (p *SourceLocations) Get(i int) pref.SourceLocation { return p.lazyInit().List[i] }
-func (p *SourceLocations) byKey(k pathKey) pref.SourceLocation {
+func (p *SourceLocations) Len() int { return len(p.List) }
+func (p *SourceLocations) Get(i int) protoreflect.SourceLocation { return p.lazyInit().List[i] }
+func (p *SourceLocations) byKey(k pathKey) protoreflect.SourceLocation {
if i, ok := p.lazyInit().byPath[k]; ok {
return p.List[i]
}
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
-func (p *SourceLocations) ByPath(path pref.SourcePath) pref.SourceLocation {
+func (p *SourceLocations) ByPath(path protoreflect.SourcePath) protoreflect.SourceLocation {
return p.byKey(newPathKey(path))
}
-func (p *SourceLocations) ByDescriptor(desc pref.Descriptor) pref.SourceLocation {
+func (p *SourceLocations) ByDescriptor(desc protoreflect.Descriptor) protoreflect.SourceLocation {
if p.File != nil && desc != nil && p.File != desc.ParentFile() {
- return pref.SourceLocation{} // mismatching parent files
+ return protoreflect.SourceLocation{} // mismatching parent files
}
var pathArr [16]int32
path := pathArr[:0]
for {
switch desc.(type) {
- case pref.FileDescriptor:
+ case protoreflect.FileDescriptor:
// Reverse the path since it was constructed in reverse.
for i, j := 0, len(path)-1; i < j; i, j = i+1, j-1 {
path[i], path[j] = path[j], path[i]
}
return p.byKey(newPathKey(path))
- case pref.MessageDescriptor:
+ case protoreflect.MessageDescriptor:
path = append(path, int32(desc.Index()))
desc = desc.Parent()
switch desc.(type) {
- case pref.FileDescriptor:
+ case protoreflect.FileDescriptor:
path = append(path, int32(genid.FileDescriptorProto_MessageType_field_number))
- case pref.MessageDescriptor:
+ case protoreflect.MessageDescriptor:
path = append(path, int32(genid.DescriptorProto_NestedType_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
- case pref.FieldDescriptor:
- isExtension := desc.(pref.FieldDescriptor).IsExtension()
+ case protoreflect.FieldDescriptor:
+ isExtension := desc.(protoreflect.FieldDescriptor).IsExtension()
path = append(path, int32(desc.Index()))
desc = desc.Parent()
if isExtension {
switch desc.(type) {
- case pref.FileDescriptor:
+ case protoreflect.FileDescriptor:
path = append(path, int32(genid.FileDescriptorProto_Extension_field_number))
- case pref.MessageDescriptor:
+ case protoreflect.MessageDescriptor:
path = append(path, int32(genid.DescriptorProto_Extension_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
} else {
switch desc.(type) {
- case pref.MessageDescriptor:
+ case protoreflect.MessageDescriptor:
path = append(path, int32(genid.DescriptorProto_Field_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
}
- case pref.OneofDescriptor:
+ case protoreflect.OneofDescriptor:
path = append(path, int32(desc.Index()))
desc = desc.Parent()
switch desc.(type) {
- case pref.MessageDescriptor:
+ case protoreflect.MessageDescriptor:
path = append(path, int32(genid.DescriptorProto_OneofDecl_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
- case pref.EnumDescriptor:
+ case protoreflect.EnumDescriptor:
path = append(path, int32(desc.Index()))
desc = desc.Parent()
switch desc.(type) {
- case pref.FileDescriptor:
+ case protoreflect.FileDescriptor:
path = append(path, int32(genid.FileDescriptorProto_EnumType_field_number))
- case pref.MessageDescriptor:
+ case protoreflect.MessageDescriptor:
path = append(path, int32(genid.DescriptorProto_EnumType_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
- case pref.EnumValueDescriptor:
+ case protoreflect.EnumValueDescriptor:
path = append(path, int32(desc.Index()))
desc = desc.Parent()
switch desc.(type) {
- case pref.EnumDescriptor:
+ case protoreflect.EnumDescriptor:
path = append(path, int32(genid.EnumDescriptorProto_Value_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
- case pref.ServiceDescriptor:
+ case protoreflect.ServiceDescriptor:
path = append(path, int32(desc.Index()))
desc = desc.Parent()
switch desc.(type) {
- case pref.FileDescriptor:
+ case protoreflect.FileDescriptor:
path = append(path, int32(genid.FileDescriptorProto_Service_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
- case pref.MethodDescriptor:
+ case protoreflect.MethodDescriptor:
path = append(path, int32(desc.Index()))
desc = desc.Parent()
switch desc.(type) {
- case pref.ServiceDescriptor:
+ case protoreflect.ServiceDescriptor:
path = append(path, int32(genid.ServiceDescriptorProto_Method_field_number))
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
default:
- return pref.SourceLocation{}
+ return protoreflect.SourceLocation{}
}
}
}
@@ -435,7 +442,7 @@ type pathKey struct {
str string // used if the path does not fit in arr
}
-func newPathKey(p pref.SourcePath) (k pathKey) {
+func newPathKey(p protoreflect.SourcePath) (k pathKey) {
if len(p) < len(k.arr) {
for i, ps := range p {
if ps < 0 || math.MaxUint8 <= ps {
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
new file mode 100644
index 00000000..0375a49d
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
@@ -0,0 +1,142 @@
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package filedesc
+
+import (
+ "fmt"
+
+ "google.golang.org/protobuf/encoding/protowire"
+ "google.golang.org/protobuf/internal/editiondefaults"
+ "google.golang.org/protobuf/internal/genid"
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+var defaultsCache = make(map[Edition]EditionFeatures)
+
+func init() {
+ unmarshalEditionDefaults(editiondefaults.Defaults)
+}
+
+func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures {
+ for len(b) > 0 {
+ num, _, n := protowire.ConsumeTag(b)
+ b = b[n:]
+ switch num {
+ case genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number:
+ v, m := protowire.ConsumeVarint(b)
+ b = b[m:]
+ parent.GenerateLegacyUnmarshalJSON = protowire.DecodeBool(v)
+ default:
+ panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num))
+ }
+ }
+ return parent
+}
+
+func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures {
+ for len(b) > 0 {
+ num, typ, n := protowire.ConsumeTag(b)
+ b = b[n:]
+ switch typ {
+ case protowire.VarintType:
+ v, m := protowire.ConsumeVarint(b)
+ b = b[m:]
+ switch num {
+ case genid.FeatureSet_FieldPresence_field_number:
+ parent.IsFieldPresence = v == genid.FeatureSet_EXPLICIT_enum_value || v == genid.FeatureSet_LEGACY_REQUIRED_enum_value
+ parent.IsLegacyRequired = v == genid.FeatureSet_LEGACY_REQUIRED_enum_value
+ case genid.FeatureSet_EnumType_field_number:
+ parent.IsOpenEnum = v == genid.FeatureSet_OPEN_enum_value
+ case genid.FeatureSet_RepeatedFieldEncoding_field_number:
+ parent.IsPacked = v == genid.FeatureSet_PACKED_enum_value
+ case genid.FeatureSet_Utf8Validation_field_number:
+ parent.IsUTF8Validated = v == genid.FeatureSet_VERIFY_enum_value
+ case genid.FeatureSet_MessageEncoding_field_number:
+ parent.IsDelimitedEncoded = v == genid.FeatureSet_DELIMITED_enum_value
+ case genid.FeatureSet_JsonFormat_field_number:
+ parent.IsJSONCompliant = v == genid.FeatureSet_ALLOW_enum_value
+ default:
+ panic(fmt.Sprintf("unkown field number %d while unmarshalling FeatureSet", num))
+ }
+ case protowire.BytesType:
+ v, m := protowire.ConsumeBytes(b)
+ b = b[m:]
+ switch num {
+ case genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number:
+ parent = unmarshalGoFeature(v, parent)
+ }
+ }
+ }
+
+ return parent
+}
+
+func featuresFromParentDesc(parentDesc protoreflect.Descriptor) EditionFeatures {
+ var parentFS EditionFeatures
+ switch p := parentDesc.(type) {
+ case *File:
+ parentFS = p.L1.EditionFeatures
+ case *Message:
+ parentFS = p.L1.EditionFeatures
+ default:
+ panic(fmt.Sprintf("unknown parent type %T", parentDesc))
+ }
+ return parentFS
+}
+
+func unmarshalEditionDefault(b []byte) {
+ var ed Edition
+ var fs EditionFeatures
+ for len(b) > 0 {
+ num, typ, n := protowire.ConsumeTag(b)
+ b = b[n:]
+ switch typ {
+ case protowire.VarintType:
+ v, m := protowire.ConsumeVarint(b)
+ b = b[m:]
+ switch num {
+ case genid.FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number:
+ ed = Edition(v)
+ }
+ case protowire.BytesType:
+ v, m := protowire.ConsumeBytes(b)
+ b = b[m:]
+ switch num {
+ case genid.FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number:
+ fs = unmarshalFeatureSet(v, fs)
+ }
+ }
+ }
+ defaultsCache[ed] = fs
+}
+
+func unmarshalEditionDefaults(b []byte) {
+ for len(b) > 0 {
+ num, _, n := protowire.ConsumeTag(b)
+ b = b[n:]
+ switch num {
+ case genid.FeatureSetDefaults_Defaults_field_number:
+ def, m := protowire.ConsumeBytes(b)
+ b = b[m:]
+ unmarshalEditionDefault(def)
+ case genid.FeatureSetDefaults_MinimumEdition_field_number,
+ genid.FeatureSetDefaults_MaximumEdition_field_number:
+ // We don't care about the minimum and maximum editions. If the
+ // edition we are looking for later on is not in the cache we know
+ // it is outside of the range between minimum and maximum edition.
+ _, m := protowire.ConsumeVarint(b)
+ b = b[m:]
+ default:
+ panic(fmt.Sprintf("unkown field number %d while unmarshalling EditionDefault", num))
+ }
+ }
+}
+
+func getFeaturesFor(ed Edition) EditionFeatures {
+ if def, ok := defaultsCache[ed]; ok {
+ return def
+ }
+ panic(fmt.Sprintf("unsupported edition: %v", ed))
+}
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go b/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go
index dbf2c605..28240ebc 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go
@@ -7,7 +7,7 @@ package filedesc
import (
"google.golang.org/protobuf/internal/descopts"
"google.golang.org/protobuf/internal/pragma"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
var (
@@ -30,78 +30,80 @@ var (
// PlaceholderFile is a placeholder, representing only the file path.
type PlaceholderFile string
-func (f PlaceholderFile) ParentFile() pref.FileDescriptor { return f }
-func (f PlaceholderFile) Parent() pref.Descriptor { return nil }
-func (f PlaceholderFile) Index() int { return 0 }
-func (f PlaceholderFile) Syntax() pref.Syntax { return 0 }
-func (f PlaceholderFile) Name() pref.Name { return "" }
-func (f PlaceholderFile) FullName() pref.FullName { return "" }
-func (f PlaceholderFile) IsPlaceholder() bool { return true }
-func (f PlaceholderFile) Options() pref.ProtoMessage { return descopts.File }
-func (f PlaceholderFile) Path() string { return string(f) }
-func (f PlaceholderFile) Package() pref.FullName { return "" }
-func (f PlaceholderFile) Imports() pref.FileImports { return emptyFiles }
-func (f PlaceholderFile) Messages() pref.MessageDescriptors { return emptyMessages }
-func (f PlaceholderFile) Enums() pref.EnumDescriptors { return emptyEnums }
-func (f PlaceholderFile) Extensions() pref.ExtensionDescriptors { return emptyExtensions }
-func (f PlaceholderFile) Services() pref.ServiceDescriptors { return emptyServices }
-func (f PlaceholderFile) SourceLocations() pref.SourceLocations { return emptySourceLocations }
-func (f PlaceholderFile) ProtoType(pref.FileDescriptor) { return }
-func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement) { return }
+func (f PlaceholderFile) ParentFile() protoreflect.FileDescriptor { return f }
+func (f PlaceholderFile) Parent() protoreflect.Descriptor { return nil }
+func (f PlaceholderFile) Index() int { return 0 }
+func (f PlaceholderFile) Syntax() protoreflect.Syntax { return 0 }
+func (f PlaceholderFile) Name() protoreflect.Name { return "" }
+func (f PlaceholderFile) FullName() protoreflect.FullName { return "" }
+func (f PlaceholderFile) IsPlaceholder() bool { return true }
+func (f PlaceholderFile) Options() protoreflect.ProtoMessage { return descopts.File }
+func (f PlaceholderFile) Path() string { return string(f) }
+func (f PlaceholderFile) Package() protoreflect.FullName { return "" }
+func (f PlaceholderFile) Imports() protoreflect.FileImports { return emptyFiles }
+func (f PlaceholderFile) Messages() protoreflect.MessageDescriptors { return emptyMessages }
+func (f PlaceholderFile) Enums() protoreflect.EnumDescriptors { return emptyEnums }
+func (f PlaceholderFile) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions }
+func (f PlaceholderFile) Services() protoreflect.ServiceDescriptors { return emptyServices }
+func (f PlaceholderFile) SourceLocations() protoreflect.SourceLocations { return emptySourceLocations }
+func (f PlaceholderFile) ProtoType(protoreflect.FileDescriptor) { return }
+func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement) { return }
// PlaceholderEnum is a placeholder, representing only the full name.
-type PlaceholderEnum pref.FullName
+type PlaceholderEnum protoreflect.FullName
-func (e PlaceholderEnum) ParentFile() pref.FileDescriptor { return nil }
-func (e PlaceholderEnum) Parent() pref.Descriptor { return nil }
-func (e PlaceholderEnum) Index() int { return 0 }
-func (e PlaceholderEnum) Syntax() pref.Syntax { return 0 }
-func (e PlaceholderEnum) Name() pref.Name { return pref.FullName(e).Name() }
-func (e PlaceholderEnum) FullName() pref.FullName { return pref.FullName(e) }
-func (e PlaceholderEnum) IsPlaceholder() bool { return true }
-func (e PlaceholderEnum) Options() pref.ProtoMessage { return descopts.Enum }
-func (e PlaceholderEnum) Values() pref.EnumValueDescriptors { return emptyEnumValues }
-func (e PlaceholderEnum) ReservedNames() pref.Names { return emptyNames }
-func (e PlaceholderEnum) ReservedRanges() pref.EnumRanges { return emptyEnumRanges }
-func (e PlaceholderEnum) ProtoType(pref.EnumDescriptor) { return }
-func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return }
+func (e PlaceholderEnum) ParentFile() protoreflect.FileDescriptor { return nil }
+func (e PlaceholderEnum) Parent() protoreflect.Descriptor { return nil }
+func (e PlaceholderEnum) Index() int { return 0 }
+func (e PlaceholderEnum) Syntax() protoreflect.Syntax { return 0 }
+func (e PlaceholderEnum) Name() protoreflect.Name { return protoreflect.FullName(e).Name() }
+func (e PlaceholderEnum) FullName() protoreflect.FullName { return protoreflect.FullName(e) }
+func (e PlaceholderEnum) IsPlaceholder() bool { return true }
+func (e PlaceholderEnum) Options() protoreflect.ProtoMessage { return descopts.Enum }
+func (e PlaceholderEnum) Values() protoreflect.EnumValueDescriptors { return emptyEnumValues }
+func (e PlaceholderEnum) ReservedNames() protoreflect.Names { return emptyNames }
+func (e PlaceholderEnum) ReservedRanges() protoreflect.EnumRanges { return emptyEnumRanges }
+func (e PlaceholderEnum) ProtoType(protoreflect.EnumDescriptor) { return }
+func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return }
// PlaceholderEnumValue is a placeholder, representing only the full name.
-type PlaceholderEnumValue pref.FullName
+type PlaceholderEnumValue protoreflect.FullName
-func (e PlaceholderEnumValue) ParentFile() pref.FileDescriptor { return nil }
-func (e PlaceholderEnumValue) Parent() pref.Descriptor { return nil }
-func (e PlaceholderEnumValue) Index() int { return 0 }
-func (e PlaceholderEnumValue) Syntax() pref.Syntax { return 0 }
-func (e PlaceholderEnumValue) Name() pref.Name { return pref.FullName(e).Name() }
-func (e PlaceholderEnumValue) FullName() pref.FullName { return pref.FullName(e) }
-func (e PlaceholderEnumValue) IsPlaceholder() bool { return true }
-func (e PlaceholderEnumValue) Options() pref.ProtoMessage { return descopts.EnumValue }
-func (e PlaceholderEnumValue) Number() pref.EnumNumber { return 0 }
-func (e PlaceholderEnumValue) ProtoType(pref.EnumValueDescriptor) { return }
-func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement) { return }
+func (e PlaceholderEnumValue) ParentFile() protoreflect.FileDescriptor { return nil }
+func (e PlaceholderEnumValue) Parent() protoreflect.Descriptor { return nil }
+func (e PlaceholderEnumValue) Index() int { return 0 }
+func (e PlaceholderEnumValue) Syntax() protoreflect.Syntax { return 0 }
+func (e PlaceholderEnumValue) Name() protoreflect.Name { return protoreflect.FullName(e).Name() }
+func (e PlaceholderEnumValue) FullName() protoreflect.FullName { return protoreflect.FullName(e) }
+func (e PlaceholderEnumValue) IsPlaceholder() bool { return true }
+func (e PlaceholderEnumValue) Options() protoreflect.ProtoMessage { return descopts.EnumValue }
+func (e PlaceholderEnumValue) Number() protoreflect.EnumNumber { return 0 }
+func (e PlaceholderEnumValue) ProtoType(protoreflect.EnumValueDescriptor) { return }
+func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement) { return }
// PlaceholderMessage is a placeholder, representing only the full name.
-type PlaceholderMessage pref.FullName
+type PlaceholderMessage protoreflect.FullName
-func (m PlaceholderMessage) ParentFile() pref.FileDescriptor { return nil }
-func (m PlaceholderMessage) Parent() pref.Descriptor { return nil }
-func (m PlaceholderMessage) Index() int { return 0 }
-func (m PlaceholderMessage) Syntax() pref.Syntax { return 0 }
-func (m PlaceholderMessage) Name() pref.Name { return pref.FullName(m).Name() }
-func (m PlaceholderMessage) FullName() pref.FullName { return pref.FullName(m) }
-func (m PlaceholderMessage) IsPlaceholder() bool { return true }
-func (m PlaceholderMessage) Options() pref.ProtoMessage { return descopts.Message }
-func (m PlaceholderMessage) IsMapEntry() bool { return false }
-func (m PlaceholderMessage) Fields() pref.FieldDescriptors { return emptyFields }
-func (m PlaceholderMessage) Oneofs() pref.OneofDescriptors { return emptyOneofs }
-func (m PlaceholderMessage) ReservedNames() pref.Names { return emptyNames }
-func (m PlaceholderMessage) ReservedRanges() pref.FieldRanges { return emptyFieldRanges }
-func (m PlaceholderMessage) RequiredNumbers() pref.FieldNumbers { return emptyFieldNumbers }
-func (m PlaceholderMessage) ExtensionRanges() pref.FieldRanges { return emptyFieldRanges }
-func (m PlaceholderMessage) ExtensionRangeOptions(int) pref.ProtoMessage { panic("index out of range") }
-func (m PlaceholderMessage) Messages() pref.MessageDescriptors { return emptyMessages }
-func (m PlaceholderMessage) Enums() pref.EnumDescriptors { return emptyEnums }
-func (m PlaceholderMessage) Extensions() pref.ExtensionDescriptors { return emptyExtensions }
-func (m PlaceholderMessage) ProtoType(pref.MessageDescriptor) { return }
-func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement) { return }
+func (m PlaceholderMessage) ParentFile() protoreflect.FileDescriptor { return nil }
+func (m PlaceholderMessage) Parent() protoreflect.Descriptor { return nil }
+func (m PlaceholderMessage) Index() int { return 0 }
+func (m PlaceholderMessage) Syntax() protoreflect.Syntax { return 0 }
+func (m PlaceholderMessage) Name() protoreflect.Name { return protoreflect.FullName(m).Name() }
+func (m PlaceholderMessage) FullName() protoreflect.FullName { return protoreflect.FullName(m) }
+func (m PlaceholderMessage) IsPlaceholder() bool { return true }
+func (m PlaceholderMessage) Options() protoreflect.ProtoMessage { return descopts.Message }
+func (m PlaceholderMessage) IsMapEntry() bool { return false }
+func (m PlaceholderMessage) Fields() protoreflect.FieldDescriptors { return emptyFields }
+func (m PlaceholderMessage) Oneofs() protoreflect.OneofDescriptors { return emptyOneofs }
+func (m PlaceholderMessage) ReservedNames() protoreflect.Names { return emptyNames }
+func (m PlaceholderMessage) ReservedRanges() protoreflect.FieldRanges { return emptyFieldRanges }
+func (m PlaceholderMessage) RequiredNumbers() protoreflect.FieldNumbers { return emptyFieldNumbers }
+func (m PlaceholderMessage) ExtensionRanges() protoreflect.FieldRanges { return emptyFieldRanges }
+func (m PlaceholderMessage) ExtensionRangeOptions(int) protoreflect.ProtoMessage {
+ panic("index out of range")
+}
+func (m PlaceholderMessage) Messages() protoreflect.MessageDescriptors { return emptyMessages }
+func (m PlaceholderMessage) Enums() protoreflect.EnumDescriptors { return emptyEnums }
+func (m PlaceholderMessage) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions }
+func (m PlaceholderMessage) ProtoType(protoreflect.MessageDescriptor) { return }
+func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement) { return }
diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go
index 0a0dd35d..f0e38c4e 100644
--- a/vendor/google.golang.org/protobuf/internal/filetype/build.go
+++ b/vendor/google.golang.org/protobuf/internal/filetype/build.go
@@ -10,17 +10,16 @@ import (
"reflect"
"google.golang.org/protobuf/internal/descopts"
- fdesc "google.golang.org/protobuf/internal/filedesc"
+ "google.golang.org/protobuf/internal/filedesc"
pimpl "google.golang.org/protobuf/internal/impl"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
)
// Builder constructs type descriptors from a raw file descriptor
// and associated Go types for each enum and message declaration.
//
-//
-// Flattened Ordering
+// # Flattened Ordering
//
// The protobuf type system represents declarations as a tree. Certain nodes in
// the tree require us to either associate it with a concrete Go type or to
@@ -52,7 +51,7 @@ import (
// that children themselves may have.
type Builder struct {
// File is the underlying file descriptor builder.
- File fdesc.Builder
+ File filedesc.Builder
// GoTypes is a unique set of the Go types for all declarations and
// dependencies. Each type is represented as a zero value of the Go type.
@@ -108,22 +107,22 @@ type Builder struct {
// TypeRegistry is the registry to register each type descriptor.
// If nil, it uses protoregistry.GlobalTypes.
TypeRegistry interface {
- RegisterMessage(pref.MessageType) error
- RegisterEnum(pref.EnumType) error
- RegisterExtension(pref.ExtensionType) error
+ RegisterMessage(protoreflect.MessageType) error
+ RegisterEnum(protoreflect.EnumType) error
+ RegisterExtension(protoreflect.ExtensionType) error
}
}
// Out is the output of the builder.
type Out struct {
- File pref.FileDescriptor
+ File protoreflect.FileDescriptor
}
func (tb Builder) Build() (out Out) {
// Replace the resolver with one that resolves dependencies by index,
// which is faster and more reliable than relying on the global registry.
if tb.File.FileRegistry == nil {
- tb.File.FileRegistry = preg.GlobalFiles
+ tb.File.FileRegistry = protoregistry.GlobalFiles
}
tb.File.FileRegistry = &resolverByIndex{
goTypes: tb.GoTypes,
@@ -133,7 +132,7 @@ func (tb Builder) Build() (out Out) {
// Initialize registry if unpopulated.
if tb.TypeRegistry == nil {
- tb.TypeRegistry = preg.GlobalTypes
+ tb.TypeRegistry = protoregistry.GlobalTypes
}
fbOut := tb.File.Build()
@@ -183,23 +182,23 @@ func (tb Builder) Build() (out Out) {
for i := range fbOut.Messages {
switch fbOut.Messages[i].Name() {
case "FileOptions":
- descopts.File = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.File = messageGoTypes[i].(protoreflect.ProtoMessage)
case "EnumOptions":
- descopts.Enum = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.Enum = messageGoTypes[i].(protoreflect.ProtoMessage)
case "EnumValueOptions":
- descopts.EnumValue = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.EnumValue = messageGoTypes[i].(protoreflect.ProtoMessage)
case "MessageOptions":
- descopts.Message = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.Message = messageGoTypes[i].(protoreflect.ProtoMessage)
case "FieldOptions":
- descopts.Field = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.Field = messageGoTypes[i].(protoreflect.ProtoMessage)
case "OneofOptions":
- descopts.Oneof = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.Oneof = messageGoTypes[i].(protoreflect.ProtoMessage)
case "ExtensionRangeOptions":
- descopts.ExtensionRange = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.ExtensionRange = messageGoTypes[i].(protoreflect.ProtoMessage)
case "ServiceOptions":
- descopts.Service = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.Service = messageGoTypes[i].(protoreflect.ProtoMessage)
case "MethodOptions":
- descopts.Method = messageGoTypes[i].(pref.ProtoMessage)
+ descopts.Method = messageGoTypes[i].(protoreflect.ProtoMessage)
}
}
}
@@ -216,11 +215,11 @@ func (tb Builder) Build() (out Out) {
const listExtDeps = 2
var goType reflect.Type
switch fbOut.Extensions[i].L1.Kind {
- case pref.EnumKind:
+ case protoreflect.EnumKind:
j := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx)
goType = reflect.TypeOf(tb.GoTypes[j])
depIdx++
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
j := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx)
goType = reflect.TypeOf(tb.GoTypes[j])
depIdx++
@@ -242,22 +241,22 @@ func (tb Builder) Build() (out Out) {
return out
}
-var goTypeForPBKind = map[pref.Kind]reflect.Type{
- pref.BoolKind: reflect.TypeOf(bool(false)),
- pref.Int32Kind: reflect.TypeOf(int32(0)),
- pref.Sint32Kind: reflect.TypeOf(int32(0)),
- pref.Sfixed32Kind: reflect.TypeOf(int32(0)),
- pref.Int64Kind: reflect.TypeOf(int64(0)),
- pref.Sint64Kind: reflect.TypeOf(int64(0)),
- pref.Sfixed64Kind: reflect.TypeOf(int64(0)),
- pref.Uint32Kind: reflect.TypeOf(uint32(0)),
- pref.Fixed32Kind: reflect.TypeOf(uint32(0)),
- pref.Uint64Kind: reflect.TypeOf(uint64(0)),
- pref.Fixed64Kind: reflect.TypeOf(uint64(0)),
- pref.FloatKind: reflect.TypeOf(float32(0)),
- pref.DoubleKind: reflect.TypeOf(float64(0)),
- pref.StringKind: reflect.TypeOf(string("")),
- pref.BytesKind: reflect.TypeOf([]byte(nil)),
+var goTypeForPBKind = map[protoreflect.Kind]reflect.Type{
+ protoreflect.BoolKind: reflect.TypeOf(bool(false)),
+ protoreflect.Int32Kind: reflect.TypeOf(int32(0)),
+ protoreflect.Sint32Kind: reflect.TypeOf(int32(0)),
+ protoreflect.Sfixed32Kind: reflect.TypeOf(int32(0)),
+ protoreflect.Int64Kind: reflect.TypeOf(int64(0)),
+ protoreflect.Sint64Kind: reflect.TypeOf(int64(0)),
+ protoreflect.Sfixed64Kind: reflect.TypeOf(int64(0)),
+ protoreflect.Uint32Kind: reflect.TypeOf(uint32(0)),
+ protoreflect.Fixed32Kind: reflect.TypeOf(uint32(0)),
+ protoreflect.Uint64Kind: reflect.TypeOf(uint64(0)),
+ protoreflect.Fixed64Kind: reflect.TypeOf(uint64(0)),
+ protoreflect.FloatKind: reflect.TypeOf(float32(0)),
+ protoreflect.DoubleKind: reflect.TypeOf(float64(0)),
+ protoreflect.StringKind: reflect.TypeOf(string("")),
+ protoreflect.BytesKind: reflect.TypeOf([]byte(nil)),
}
type depIdxs []int32
@@ -274,13 +273,13 @@ type (
fileRegistry
}
fileRegistry interface {
- FindFileByPath(string) (pref.FileDescriptor, error)
- FindDescriptorByName(pref.FullName) (pref.Descriptor, error)
- RegisterFile(pref.FileDescriptor) error
+ FindFileByPath(string) (protoreflect.FileDescriptor, error)
+ FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error)
+ RegisterFile(protoreflect.FileDescriptor) error
}
)
-func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []fdesc.Enum, ms []fdesc.Message) pref.EnumDescriptor {
+func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.EnumDescriptor {
if depIdx := int(r.depIdxs.Get(i, j)); int(depIdx) < len(es)+len(ms) {
return &es[depIdx]
} else {
@@ -288,7 +287,7 @@ func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []fdesc.Enum, ms []fdes
}
}
-func (r *resolverByIndex) FindMessageByIndex(i, j int32, es []fdesc.Enum, ms []fdesc.Message) pref.MessageDescriptor {
+func (r *resolverByIndex) FindMessageByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.MessageDescriptor {
if depIdx := int(r.depIdxs.Get(i, j)); depIdx < len(es)+len(ms) {
return &ms[depIdx-len(es)]
} else {
diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
index a72995f0..bda8e8cf 100644
--- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
+++ b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !protolegacy
// +build !protolegacy
package flags
diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
index 772e2f0e..6d8d9bd6 100644
--- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
+++ b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build protolegacy
// +build protolegacy
package flags
diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
index e3cdf1c2..40272c89 100644
--- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
+++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
@@ -12,6 +12,27 @@ import (
const File_google_protobuf_descriptor_proto = "google/protobuf/descriptor.proto"
+// Full and short names for google.protobuf.Edition.
+const (
+ Edition_enum_fullname = "google.protobuf.Edition"
+ Edition_enum_name = "Edition"
+)
+
+// Enum values for google.protobuf.Edition.
+const (
+ Edition_EDITION_UNKNOWN_enum_value = 0
+ Edition_EDITION_PROTO2_enum_value = 998
+ Edition_EDITION_PROTO3_enum_value = 999
+ Edition_EDITION_2023_enum_value = 1000
+ Edition_EDITION_2024_enum_value = 1001
+ Edition_EDITION_1_TEST_ONLY_enum_value = 1
+ Edition_EDITION_2_TEST_ONLY_enum_value = 2
+ Edition_EDITION_99997_TEST_ONLY_enum_value = 99997
+ Edition_EDITION_99998_TEST_ONLY_enum_value = 99998
+ Edition_EDITION_99999_TEST_ONLY_enum_value = 99999
+ Edition_EDITION_MAX_enum_value = 2147483647
+)
+
// Names for google.protobuf.FileDescriptorSet.
const (
FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet"
@@ -50,6 +71,7 @@ const (
FileDescriptorProto_Options_field_name protoreflect.Name = "options"
FileDescriptorProto_SourceCodeInfo_field_name protoreflect.Name = "source_code_info"
FileDescriptorProto_Syntax_field_name protoreflect.Name = "syntax"
+ FileDescriptorProto_Edition_field_name protoreflect.Name = "edition"
FileDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.name"
FileDescriptorProto_Package_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.package"
@@ -63,6 +85,7 @@ const (
FileDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.options"
FileDescriptorProto_SourceCodeInfo_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.source_code_info"
FileDescriptorProto_Syntax_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.syntax"
+ FileDescriptorProto_Edition_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.edition"
)
// Field numbers for google.protobuf.FileDescriptorProto.
@@ -79,6 +102,7 @@ const (
FileDescriptorProto_Options_field_number protoreflect.FieldNumber = 8
FileDescriptorProto_SourceCodeInfo_field_number protoreflect.FieldNumber = 9
FileDescriptorProto_Syntax_field_number protoreflect.FieldNumber = 12
+ FileDescriptorProto_Edition_field_number protoreflect.FieldNumber = 14
)
// Names for google.protobuf.DescriptorProto.
@@ -180,13 +204,64 @@ const (
// Field names for google.protobuf.ExtensionRangeOptions.
const (
ExtensionRangeOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
+ ExtensionRangeOptions_Declaration_field_name protoreflect.Name = "declaration"
+ ExtensionRangeOptions_Features_field_name protoreflect.Name = "features"
+ ExtensionRangeOptions_Verification_field_name protoreflect.Name = "verification"
ExtensionRangeOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.uninterpreted_option"
+ ExtensionRangeOptions_Declaration_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.declaration"
+ ExtensionRangeOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.features"
+ ExtensionRangeOptions_Verification_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.verification"
)
// Field numbers for google.protobuf.ExtensionRangeOptions.
const (
ExtensionRangeOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
+ ExtensionRangeOptions_Declaration_field_number protoreflect.FieldNumber = 2
+ ExtensionRangeOptions_Features_field_number protoreflect.FieldNumber = 50
+ ExtensionRangeOptions_Verification_field_number protoreflect.FieldNumber = 3
+)
+
+// Full and short names for google.protobuf.ExtensionRangeOptions.VerificationState.
+const (
+ ExtensionRangeOptions_VerificationState_enum_fullname = "google.protobuf.ExtensionRangeOptions.VerificationState"
+ ExtensionRangeOptions_VerificationState_enum_name = "VerificationState"
+)
+
+// Enum values for google.protobuf.ExtensionRangeOptions.VerificationState.
+const (
+ ExtensionRangeOptions_DECLARATION_enum_value = 0
+ ExtensionRangeOptions_UNVERIFIED_enum_value = 1
+)
+
+// Names for google.protobuf.ExtensionRangeOptions.Declaration.
+const (
+ ExtensionRangeOptions_Declaration_message_name protoreflect.Name = "Declaration"
+ ExtensionRangeOptions_Declaration_message_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration"
+)
+
+// Field names for google.protobuf.ExtensionRangeOptions.Declaration.
+const (
+ ExtensionRangeOptions_Declaration_Number_field_name protoreflect.Name = "number"
+ ExtensionRangeOptions_Declaration_FullName_field_name protoreflect.Name = "full_name"
+ ExtensionRangeOptions_Declaration_Type_field_name protoreflect.Name = "type"
+ ExtensionRangeOptions_Declaration_Reserved_field_name protoreflect.Name = "reserved"
+ ExtensionRangeOptions_Declaration_Repeated_field_name protoreflect.Name = "repeated"
+
+ ExtensionRangeOptions_Declaration_Number_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.number"
+ ExtensionRangeOptions_Declaration_FullName_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.full_name"
+ ExtensionRangeOptions_Declaration_Type_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.type"
+ ExtensionRangeOptions_Declaration_Reserved_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.reserved"
+ ExtensionRangeOptions_Declaration_Repeated_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.repeated"
+)
+
+// Field numbers for google.protobuf.ExtensionRangeOptions.Declaration.
+const (
+ ExtensionRangeOptions_Declaration_Number_field_number protoreflect.FieldNumber = 1
+ ExtensionRangeOptions_Declaration_FullName_field_number protoreflect.FieldNumber = 2
+ ExtensionRangeOptions_Declaration_Type_field_number protoreflect.FieldNumber = 3
+ ExtensionRangeOptions_Declaration_Reserved_field_number protoreflect.FieldNumber = 5
+ ExtensionRangeOptions_Declaration_Repeated_field_number protoreflect.FieldNumber = 6
)
// Names for google.protobuf.FieldDescriptorProto.
@@ -243,12 +318,41 @@ const (
FieldDescriptorProto_Type_enum_name = "Type"
)
+// Enum values for google.protobuf.FieldDescriptorProto.Type.
+const (
+ FieldDescriptorProto_TYPE_DOUBLE_enum_value = 1
+ FieldDescriptorProto_TYPE_FLOAT_enum_value = 2
+ FieldDescriptorProto_TYPE_INT64_enum_value = 3
+ FieldDescriptorProto_TYPE_UINT64_enum_value = 4
+ FieldDescriptorProto_TYPE_INT32_enum_value = 5
+ FieldDescriptorProto_TYPE_FIXED64_enum_value = 6
+ FieldDescriptorProto_TYPE_FIXED32_enum_value = 7
+ FieldDescriptorProto_TYPE_BOOL_enum_value = 8
+ FieldDescriptorProto_TYPE_STRING_enum_value = 9
+ FieldDescriptorProto_TYPE_GROUP_enum_value = 10
+ FieldDescriptorProto_TYPE_MESSAGE_enum_value = 11
+ FieldDescriptorProto_TYPE_BYTES_enum_value = 12
+ FieldDescriptorProto_TYPE_UINT32_enum_value = 13
+ FieldDescriptorProto_TYPE_ENUM_enum_value = 14
+ FieldDescriptorProto_TYPE_SFIXED32_enum_value = 15
+ FieldDescriptorProto_TYPE_SFIXED64_enum_value = 16
+ FieldDescriptorProto_TYPE_SINT32_enum_value = 17
+ FieldDescriptorProto_TYPE_SINT64_enum_value = 18
+)
+
// Full and short names for google.protobuf.FieldDescriptorProto.Label.
const (
FieldDescriptorProto_Label_enum_fullname = "google.protobuf.FieldDescriptorProto.Label"
FieldDescriptorProto_Label_enum_name = "Label"
)
+// Enum values for google.protobuf.FieldDescriptorProto.Label.
+const (
+ FieldDescriptorProto_LABEL_OPTIONAL_enum_value = 1
+ FieldDescriptorProto_LABEL_REPEATED_enum_value = 3
+ FieldDescriptorProto_LABEL_REQUIRED_enum_value = 2
+)
+
// Names for google.protobuf.OneofDescriptorProto.
const (
OneofDescriptorProto_message_name protoreflect.Name = "OneofDescriptorProto"
@@ -420,7 +524,6 @@ const (
FileOptions_CcGenericServices_field_name protoreflect.Name = "cc_generic_services"
FileOptions_JavaGenericServices_field_name protoreflect.Name = "java_generic_services"
FileOptions_PyGenericServices_field_name protoreflect.Name = "py_generic_services"
- FileOptions_PhpGenericServices_field_name protoreflect.Name = "php_generic_services"
FileOptions_Deprecated_field_name protoreflect.Name = "deprecated"
FileOptions_CcEnableArenas_field_name protoreflect.Name = "cc_enable_arenas"
FileOptions_ObjcClassPrefix_field_name protoreflect.Name = "objc_class_prefix"
@@ -430,6 +533,7 @@ const (
FileOptions_PhpNamespace_field_name protoreflect.Name = "php_namespace"
FileOptions_PhpMetadataNamespace_field_name protoreflect.Name = "php_metadata_namespace"
FileOptions_RubyPackage_field_name protoreflect.Name = "ruby_package"
+ FileOptions_Features_field_name protoreflect.Name = "features"
FileOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
FileOptions_JavaPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_package"
@@ -442,7 +546,6 @@ const (
FileOptions_CcGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_generic_services"
FileOptions_JavaGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_generic_services"
FileOptions_PyGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.py_generic_services"
- FileOptions_PhpGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_generic_services"
FileOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.deprecated"
FileOptions_CcEnableArenas_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_enable_arenas"
FileOptions_ObjcClassPrefix_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.objc_class_prefix"
@@ -452,6 +555,7 @@ const (
FileOptions_PhpNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_namespace"
FileOptions_PhpMetadataNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_metadata_namespace"
FileOptions_RubyPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.ruby_package"
+ FileOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.features"
FileOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.uninterpreted_option"
)
@@ -467,7 +571,6 @@ const (
FileOptions_CcGenericServices_field_number protoreflect.FieldNumber = 16
FileOptions_JavaGenericServices_field_number protoreflect.FieldNumber = 17
FileOptions_PyGenericServices_field_number protoreflect.FieldNumber = 18
- FileOptions_PhpGenericServices_field_number protoreflect.FieldNumber = 42
FileOptions_Deprecated_field_number protoreflect.FieldNumber = 23
FileOptions_CcEnableArenas_field_number protoreflect.FieldNumber = 31
FileOptions_ObjcClassPrefix_field_number protoreflect.FieldNumber = 36
@@ -477,6 +580,7 @@ const (
FileOptions_PhpNamespace_field_number protoreflect.FieldNumber = 41
FileOptions_PhpMetadataNamespace_field_number protoreflect.FieldNumber = 44
FileOptions_RubyPackage_field_number protoreflect.FieldNumber = 45
+ FileOptions_Features_field_number protoreflect.FieldNumber = 50
FileOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@@ -486,6 +590,13 @@ const (
FileOptions_OptimizeMode_enum_name = "OptimizeMode"
)
+// Enum values for google.protobuf.FileOptions.OptimizeMode.
+const (
+ FileOptions_SPEED_enum_value = 1
+ FileOptions_CODE_SIZE_enum_value = 2
+ FileOptions_LITE_RUNTIME_enum_value = 3
+)
+
// Names for google.protobuf.MessageOptions.
const (
MessageOptions_message_name protoreflect.Name = "MessageOptions"
@@ -494,26 +605,32 @@ const (
// Field names for google.protobuf.MessageOptions.
const (
- MessageOptions_MessageSetWireFormat_field_name protoreflect.Name = "message_set_wire_format"
- MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor"
- MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated"
- MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry"
- MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
+ MessageOptions_MessageSetWireFormat_field_name protoreflect.Name = "message_set_wire_format"
+ MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor"
+ MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated"
+ MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry"
+ MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts"
+ MessageOptions_Features_field_name protoreflect.Name = "features"
+ MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
- MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format"
- MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor"
- MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated"
- MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry"
- MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option"
+ MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format"
+ MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor"
+ MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated"
+ MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry"
+ MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts"
+ MessageOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.features"
+ MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option"
)
// Field numbers for google.protobuf.MessageOptions.
const (
- MessageOptions_MessageSetWireFormat_field_number protoreflect.FieldNumber = 1
- MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2
- MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3
- MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7
- MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
+ MessageOptions_MessageSetWireFormat_field_number protoreflect.FieldNumber = 1
+ MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2
+ MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3
+ MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7
+ MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 11
+ MessageOptions_Features_field_number protoreflect.FieldNumber = 12
+ MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
// Names for google.protobuf.FieldOptions.
@@ -528,16 +645,28 @@ const (
FieldOptions_Packed_field_name protoreflect.Name = "packed"
FieldOptions_Jstype_field_name protoreflect.Name = "jstype"
FieldOptions_Lazy_field_name protoreflect.Name = "lazy"
+ FieldOptions_UnverifiedLazy_field_name protoreflect.Name = "unverified_lazy"
FieldOptions_Deprecated_field_name protoreflect.Name = "deprecated"
FieldOptions_Weak_field_name protoreflect.Name = "weak"
+ FieldOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
+ FieldOptions_Retention_field_name protoreflect.Name = "retention"
+ FieldOptions_Targets_field_name protoreflect.Name = "targets"
+ FieldOptions_EditionDefaults_field_name protoreflect.Name = "edition_defaults"
+ FieldOptions_Features_field_name protoreflect.Name = "features"
FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype"
FieldOptions_Packed_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.packed"
FieldOptions_Jstype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.jstype"
FieldOptions_Lazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.lazy"
+ FieldOptions_UnverifiedLazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.unverified_lazy"
FieldOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.deprecated"
FieldOptions_Weak_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.weak"
+ FieldOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.debug_redact"
+ FieldOptions_Retention_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.retention"
+ FieldOptions_Targets_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.targets"
+ FieldOptions_EditionDefaults_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.edition_defaults"
+ FieldOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.features"
FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option"
)
@@ -547,8 +676,14 @@ const (
FieldOptions_Packed_field_number protoreflect.FieldNumber = 2
FieldOptions_Jstype_field_number protoreflect.FieldNumber = 6
FieldOptions_Lazy_field_number protoreflect.FieldNumber = 5
+ FieldOptions_UnverifiedLazy_field_number protoreflect.FieldNumber = 15
FieldOptions_Deprecated_field_number protoreflect.FieldNumber = 3
FieldOptions_Weak_field_number protoreflect.FieldNumber = 10
+ FieldOptions_DebugRedact_field_number protoreflect.FieldNumber = 16
+ FieldOptions_Retention_field_number protoreflect.FieldNumber = 17
+ FieldOptions_Targets_field_number protoreflect.FieldNumber = 19
+ FieldOptions_EditionDefaults_field_number protoreflect.FieldNumber = 20
+ FieldOptions_Features_field_number protoreflect.FieldNumber = 21
FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@@ -558,12 +693,80 @@ const (
FieldOptions_CType_enum_name = "CType"
)
+// Enum values for google.protobuf.FieldOptions.CType.
+const (
+ FieldOptions_STRING_enum_value = 0
+ FieldOptions_CORD_enum_value = 1
+ FieldOptions_STRING_PIECE_enum_value = 2
+)
+
// Full and short names for google.protobuf.FieldOptions.JSType.
const (
FieldOptions_JSType_enum_fullname = "google.protobuf.FieldOptions.JSType"
FieldOptions_JSType_enum_name = "JSType"
)
+// Enum values for google.protobuf.FieldOptions.JSType.
+const (
+ FieldOptions_JS_NORMAL_enum_value = 0
+ FieldOptions_JS_STRING_enum_value = 1
+ FieldOptions_JS_NUMBER_enum_value = 2
+)
+
+// Full and short names for google.protobuf.FieldOptions.OptionRetention.
+const (
+ FieldOptions_OptionRetention_enum_fullname = "google.protobuf.FieldOptions.OptionRetention"
+ FieldOptions_OptionRetention_enum_name = "OptionRetention"
+)
+
+// Enum values for google.protobuf.FieldOptions.OptionRetention.
+const (
+ FieldOptions_RETENTION_UNKNOWN_enum_value = 0
+ FieldOptions_RETENTION_RUNTIME_enum_value = 1
+ FieldOptions_RETENTION_SOURCE_enum_value = 2
+)
+
+// Full and short names for google.protobuf.FieldOptions.OptionTargetType.
+const (
+ FieldOptions_OptionTargetType_enum_fullname = "google.protobuf.FieldOptions.OptionTargetType"
+ FieldOptions_OptionTargetType_enum_name = "OptionTargetType"
+)
+
+// Enum values for google.protobuf.FieldOptions.OptionTargetType.
+const (
+ FieldOptions_TARGET_TYPE_UNKNOWN_enum_value = 0
+ FieldOptions_TARGET_TYPE_FILE_enum_value = 1
+ FieldOptions_TARGET_TYPE_EXTENSION_RANGE_enum_value = 2
+ FieldOptions_TARGET_TYPE_MESSAGE_enum_value = 3
+ FieldOptions_TARGET_TYPE_FIELD_enum_value = 4
+ FieldOptions_TARGET_TYPE_ONEOF_enum_value = 5
+ FieldOptions_TARGET_TYPE_ENUM_enum_value = 6
+ FieldOptions_TARGET_TYPE_ENUM_ENTRY_enum_value = 7
+ FieldOptions_TARGET_TYPE_SERVICE_enum_value = 8
+ FieldOptions_TARGET_TYPE_METHOD_enum_value = 9
+)
+
+// Names for google.protobuf.FieldOptions.EditionDefault.
+const (
+ FieldOptions_EditionDefault_message_name protoreflect.Name = "EditionDefault"
+ FieldOptions_EditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault"
+)
+
+// Field names for google.protobuf.FieldOptions.EditionDefault.
+const (
+ FieldOptions_EditionDefault_Edition_field_name protoreflect.Name = "edition"
+ FieldOptions_EditionDefault_Value_field_name protoreflect.Name = "value"
+
+ FieldOptions_EditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.edition"
+ FieldOptions_EditionDefault_Value_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.value"
+)
+
+// Field numbers for google.protobuf.FieldOptions.EditionDefault.
+const (
+ FieldOptions_EditionDefault_Edition_field_number protoreflect.FieldNumber = 3
+ FieldOptions_EditionDefault_Value_field_number protoreflect.FieldNumber = 2
+)
+
// Names for google.protobuf.OneofOptions.
const (
OneofOptions_message_name protoreflect.Name = "OneofOptions"
@@ -572,13 +775,16 @@ const (
// Field names for google.protobuf.OneofOptions.
const (
+ OneofOptions_Features_field_name protoreflect.Name = "features"
OneofOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
+ OneofOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.features"
OneofOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.uninterpreted_option"
)
// Field numbers for google.protobuf.OneofOptions.
const (
+ OneofOptions_Features_field_number protoreflect.FieldNumber = 1
OneofOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@@ -590,20 +796,26 @@ const (
// Field names for google.protobuf.EnumOptions.
const (
- EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias"
- EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated"
- EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
+ EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias"
+ EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated"
+ EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts"
+ EnumOptions_Features_field_name protoreflect.Name = "features"
+ EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
- EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias"
- EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated"
- EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option"
+ EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias"
+ EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated"
+ EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts"
+ EnumOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.features"
+ EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option"
)
// Field numbers for google.protobuf.EnumOptions.
const (
- EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2
- EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3
- EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
+ EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2
+ EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3
+ EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 6
+ EnumOptions_Features_field_number protoreflect.FieldNumber = 7
+ EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
// Names for google.protobuf.EnumValueOptions.
@@ -615,15 +827,21 @@ const (
// Field names for google.protobuf.EnumValueOptions.
const (
EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated"
+ EnumValueOptions_Features_field_name protoreflect.Name = "features"
+ EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated"
+ EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features"
+ EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact"
EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option"
)
// Field numbers for google.protobuf.EnumValueOptions.
const (
EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1
+ EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2
+ EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3
EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@@ -635,15 +853,18 @@ const (
// Field names for google.protobuf.ServiceOptions.
const (
+ ServiceOptions_Features_field_name protoreflect.Name = "features"
ServiceOptions_Deprecated_field_name protoreflect.Name = "deprecated"
ServiceOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
+ ServiceOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.features"
ServiceOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.deprecated"
ServiceOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.uninterpreted_option"
)
// Field numbers for google.protobuf.ServiceOptions.
const (
+ ServiceOptions_Features_field_number protoreflect.FieldNumber = 34
ServiceOptions_Deprecated_field_number protoreflect.FieldNumber = 33
ServiceOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@@ -658,10 +879,12 @@ const (
const (
MethodOptions_Deprecated_field_name protoreflect.Name = "deprecated"
MethodOptions_IdempotencyLevel_field_name protoreflect.Name = "idempotency_level"
+ MethodOptions_Features_field_name protoreflect.Name = "features"
MethodOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
MethodOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.deprecated"
MethodOptions_IdempotencyLevel_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.idempotency_level"
+ MethodOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.features"
MethodOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.uninterpreted_option"
)
@@ -669,6 +892,7 @@ const (
const (
MethodOptions_Deprecated_field_number protoreflect.FieldNumber = 33
MethodOptions_IdempotencyLevel_field_number protoreflect.FieldNumber = 34
+ MethodOptions_Features_field_number protoreflect.FieldNumber = 35
MethodOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@@ -678,6 +902,13 @@ const (
MethodOptions_IdempotencyLevel_enum_name = "IdempotencyLevel"
)
+// Enum values for google.protobuf.MethodOptions.IdempotencyLevel.
+const (
+ MethodOptions_IDEMPOTENCY_UNKNOWN_enum_value = 0
+ MethodOptions_NO_SIDE_EFFECTS_enum_value = 1
+ MethodOptions_IDEMPOTENT_enum_value = 2
+)
+
// Names for google.protobuf.UninterpretedOption.
const (
UninterpretedOption_message_name protoreflect.Name = "UninterpretedOption"
@@ -735,6 +966,163 @@ const (
UninterpretedOption_NamePart_IsExtension_field_number protoreflect.FieldNumber = 2
)
+// Names for google.protobuf.FeatureSet.
+const (
+ FeatureSet_message_name protoreflect.Name = "FeatureSet"
+ FeatureSet_message_fullname protoreflect.FullName = "google.protobuf.FeatureSet"
+)
+
+// Field names for google.protobuf.FeatureSet.
+const (
+ FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
+ FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
+ FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
+ FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
+ FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
+ FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
+
+ FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
+ FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
+ FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
+ FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
+ FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
+ FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
+)
+
+// Field numbers for google.protobuf.FeatureSet.
+const (
+ FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
+ FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
+ FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
+ FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
+ FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
+ FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
+)
+
+// Full and short names for google.protobuf.FeatureSet.FieldPresence.
+const (
+ FeatureSet_FieldPresence_enum_fullname = "google.protobuf.FeatureSet.FieldPresence"
+ FeatureSet_FieldPresence_enum_name = "FieldPresence"
+)
+
+// Enum values for google.protobuf.FeatureSet.FieldPresence.
+const (
+ FeatureSet_FIELD_PRESENCE_UNKNOWN_enum_value = 0
+ FeatureSet_EXPLICIT_enum_value = 1
+ FeatureSet_IMPLICIT_enum_value = 2
+ FeatureSet_LEGACY_REQUIRED_enum_value = 3
+)
+
+// Full and short names for google.protobuf.FeatureSet.EnumType.
+const (
+ FeatureSet_EnumType_enum_fullname = "google.protobuf.FeatureSet.EnumType"
+ FeatureSet_EnumType_enum_name = "EnumType"
+)
+
+// Enum values for google.protobuf.FeatureSet.EnumType.
+const (
+ FeatureSet_ENUM_TYPE_UNKNOWN_enum_value = 0
+ FeatureSet_OPEN_enum_value = 1
+ FeatureSet_CLOSED_enum_value = 2
+)
+
+// Full and short names for google.protobuf.FeatureSet.RepeatedFieldEncoding.
+const (
+ FeatureSet_RepeatedFieldEncoding_enum_fullname = "google.protobuf.FeatureSet.RepeatedFieldEncoding"
+ FeatureSet_RepeatedFieldEncoding_enum_name = "RepeatedFieldEncoding"
+)
+
+// Enum values for google.protobuf.FeatureSet.RepeatedFieldEncoding.
+const (
+ FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN_enum_value = 0
+ FeatureSet_PACKED_enum_value = 1
+ FeatureSet_EXPANDED_enum_value = 2
+)
+
+// Full and short names for google.protobuf.FeatureSet.Utf8Validation.
+const (
+ FeatureSet_Utf8Validation_enum_fullname = "google.protobuf.FeatureSet.Utf8Validation"
+ FeatureSet_Utf8Validation_enum_name = "Utf8Validation"
+)
+
+// Enum values for google.protobuf.FeatureSet.Utf8Validation.
+const (
+ FeatureSet_UTF8_VALIDATION_UNKNOWN_enum_value = 0
+ FeatureSet_VERIFY_enum_value = 2
+ FeatureSet_NONE_enum_value = 3
+)
+
+// Full and short names for google.protobuf.FeatureSet.MessageEncoding.
+const (
+ FeatureSet_MessageEncoding_enum_fullname = "google.protobuf.FeatureSet.MessageEncoding"
+ FeatureSet_MessageEncoding_enum_name = "MessageEncoding"
+)
+
+// Enum values for google.protobuf.FeatureSet.MessageEncoding.
+const (
+ FeatureSet_MESSAGE_ENCODING_UNKNOWN_enum_value = 0
+ FeatureSet_LENGTH_PREFIXED_enum_value = 1
+ FeatureSet_DELIMITED_enum_value = 2
+)
+
+// Full and short names for google.protobuf.FeatureSet.JsonFormat.
+const (
+ FeatureSet_JsonFormat_enum_fullname = "google.protobuf.FeatureSet.JsonFormat"
+ FeatureSet_JsonFormat_enum_name = "JsonFormat"
+)
+
+// Enum values for google.protobuf.FeatureSet.JsonFormat.
+const (
+ FeatureSet_JSON_FORMAT_UNKNOWN_enum_value = 0
+ FeatureSet_ALLOW_enum_value = 1
+ FeatureSet_LEGACY_BEST_EFFORT_enum_value = 2
+)
+
+// Names for google.protobuf.FeatureSetDefaults.
+const (
+ FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults"
+ FeatureSetDefaults_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults"
+)
+
+// Field names for google.protobuf.FeatureSetDefaults.
+const (
+ FeatureSetDefaults_Defaults_field_name protoreflect.Name = "defaults"
+ FeatureSetDefaults_MinimumEdition_field_name protoreflect.Name = "minimum_edition"
+ FeatureSetDefaults_MaximumEdition_field_name protoreflect.Name = "maximum_edition"
+
+ FeatureSetDefaults_Defaults_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.defaults"
+ FeatureSetDefaults_MinimumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.minimum_edition"
+ FeatureSetDefaults_MaximumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.maximum_edition"
+)
+
+// Field numbers for google.protobuf.FeatureSetDefaults.
+const (
+ FeatureSetDefaults_Defaults_field_number protoreflect.FieldNumber = 1
+ FeatureSetDefaults_MinimumEdition_field_number protoreflect.FieldNumber = 4
+ FeatureSetDefaults_MaximumEdition_field_number protoreflect.FieldNumber = 5
+)
+
+// Names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.
+const (
+ FeatureSetDefaults_FeatureSetEditionDefault_message_name protoreflect.Name = "FeatureSetEditionDefault"
+ FeatureSetDefaults_FeatureSetEditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"
+)
+
+// Field names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.
+const (
+ FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition"
+ FeatureSetDefaults_FeatureSetEditionDefault_Features_field_name protoreflect.Name = "features"
+
+ FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition"
+ FeatureSetDefaults_FeatureSetEditionDefault_Features_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features"
+)
+
+// Field numbers for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.
+const (
+ FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3
+ FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number protoreflect.FieldNumber = 2
+)
+
// Names for google.protobuf.SourceCodeInfo.
const (
SourceCodeInfo_message_name protoreflect.Name = "SourceCodeInfo"
@@ -813,11 +1201,13 @@ const (
GeneratedCodeInfo_Annotation_SourceFile_field_name protoreflect.Name = "source_file"
GeneratedCodeInfo_Annotation_Begin_field_name protoreflect.Name = "begin"
GeneratedCodeInfo_Annotation_End_field_name protoreflect.Name = "end"
+ GeneratedCodeInfo_Annotation_Semantic_field_name protoreflect.Name = "semantic"
GeneratedCodeInfo_Annotation_Path_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.path"
GeneratedCodeInfo_Annotation_SourceFile_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.source_file"
GeneratedCodeInfo_Annotation_Begin_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.begin"
GeneratedCodeInfo_Annotation_End_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.end"
+ GeneratedCodeInfo_Annotation_Semantic_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.semantic"
)
// Field numbers for google.protobuf.GeneratedCodeInfo.Annotation.
@@ -826,4 +1216,18 @@ const (
GeneratedCodeInfo_Annotation_SourceFile_field_number protoreflect.FieldNumber = 2
GeneratedCodeInfo_Annotation_Begin_field_number protoreflect.FieldNumber = 3
GeneratedCodeInfo_Annotation_End_field_number protoreflect.FieldNumber = 4
+ GeneratedCodeInfo_Annotation_Semantic_field_number protoreflect.FieldNumber = 5
+)
+
+// Full and short names for google.protobuf.GeneratedCodeInfo.Annotation.Semantic.
+const (
+ GeneratedCodeInfo_Annotation_Semantic_enum_fullname = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic"
+ GeneratedCodeInfo_Annotation_Semantic_enum_name = "Semantic"
+)
+
+// Enum values for google.protobuf.GeneratedCodeInfo.Annotation.Semantic.
+const (
+ GeneratedCodeInfo_Annotation_NONE_enum_value = 0
+ GeneratedCodeInfo_Annotation_SET_enum_value = 1
+ GeneratedCodeInfo_Annotation_ALIAS_enum_value = 2
)
diff --git a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go
new file mode 100644
index 00000000..fd9015e8
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go
@@ -0,0 +1,31 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Code generated by generate-protos. DO NOT EDIT.
+
+package genid
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+const File_reflect_protodesc_proto_go_features_proto = "reflect/protodesc/proto/go_features.proto"
+
+// Names for google.protobuf.GoFeatures.
+const (
+ GoFeatures_message_name protoreflect.Name = "GoFeatures"
+ GoFeatures_message_fullname protoreflect.FullName = "google.protobuf.GoFeatures"
+)
+
+// Field names for google.protobuf.GoFeatures.
+const (
+ GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum"
+
+ GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "google.protobuf.GoFeatures.legacy_unmarshal_json_enum"
+)
+
+// Field numbers for google.protobuf.GoFeatures.
+const (
+ GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1
+)
diff --git a/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go b/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go
index 1a38944b..ad6f80c4 100644
--- a/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go
+++ b/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go
@@ -18,6 +18,11 @@ const (
NullValue_enum_name = "NullValue"
)
+// Enum values for google.protobuf.NullValue.
+const (
+ NullValue_NULL_VALUE_enum_value = 0
+)
+
// Names for google.protobuf.Struct.
const (
Struct_message_name protoreflect.Name = "Struct"
diff --git a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go b/vendor/google.golang.org/protobuf/internal/genid/type_gen.go
index 3bc71013..49bc73e2 100644
--- a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go
+++ b/vendor/google.golang.org/protobuf/internal/genid/type_gen.go
@@ -18,6 +18,13 @@ const (
Syntax_enum_name = "Syntax"
)
+// Enum values for google.protobuf.Syntax.
+const (
+ Syntax_SYNTAX_PROTO2_enum_value = 0
+ Syntax_SYNTAX_PROTO3_enum_value = 1
+ Syntax_SYNTAX_EDITIONS_enum_value = 2
+)
+
// Names for google.protobuf.Type.
const (
Type_message_name protoreflect.Name = "Type"
@@ -32,6 +39,7 @@ const (
Type_Options_field_name protoreflect.Name = "options"
Type_SourceContext_field_name protoreflect.Name = "source_context"
Type_Syntax_field_name protoreflect.Name = "syntax"
+ Type_Edition_field_name protoreflect.Name = "edition"
Type_Name_field_fullname protoreflect.FullName = "google.protobuf.Type.name"
Type_Fields_field_fullname protoreflect.FullName = "google.protobuf.Type.fields"
@@ -39,6 +47,7 @@ const (
Type_Options_field_fullname protoreflect.FullName = "google.protobuf.Type.options"
Type_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Type.source_context"
Type_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Type.syntax"
+ Type_Edition_field_fullname protoreflect.FullName = "google.protobuf.Type.edition"
)
// Field numbers for google.protobuf.Type.
@@ -49,6 +58,7 @@ const (
Type_Options_field_number protoreflect.FieldNumber = 4
Type_SourceContext_field_number protoreflect.FieldNumber = 5
Type_Syntax_field_number protoreflect.FieldNumber = 6
+ Type_Edition_field_number protoreflect.FieldNumber = 7
)
// Names for google.protobuf.Field.
@@ -102,12 +112,43 @@ const (
Field_Kind_enum_name = "Kind"
)
+// Enum values for google.protobuf.Field.Kind.
+const (
+ Field_TYPE_UNKNOWN_enum_value = 0
+ Field_TYPE_DOUBLE_enum_value = 1
+ Field_TYPE_FLOAT_enum_value = 2
+ Field_TYPE_INT64_enum_value = 3
+ Field_TYPE_UINT64_enum_value = 4
+ Field_TYPE_INT32_enum_value = 5
+ Field_TYPE_FIXED64_enum_value = 6
+ Field_TYPE_FIXED32_enum_value = 7
+ Field_TYPE_BOOL_enum_value = 8
+ Field_TYPE_STRING_enum_value = 9
+ Field_TYPE_GROUP_enum_value = 10
+ Field_TYPE_MESSAGE_enum_value = 11
+ Field_TYPE_BYTES_enum_value = 12
+ Field_TYPE_UINT32_enum_value = 13
+ Field_TYPE_ENUM_enum_value = 14
+ Field_TYPE_SFIXED32_enum_value = 15
+ Field_TYPE_SFIXED64_enum_value = 16
+ Field_TYPE_SINT32_enum_value = 17
+ Field_TYPE_SINT64_enum_value = 18
+)
+
// Full and short names for google.protobuf.Field.Cardinality.
const (
Field_Cardinality_enum_fullname = "google.protobuf.Field.Cardinality"
Field_Cardinality_enum_name = "Cardinality"
)
+// Enum values for google.protobuf.Field.Cardinality.
+const (
+ Field_CARDINALITY_UNKNOWN_enum_value = 0
+ Field_CARDINALITY_OPTIONAL_enum_value = 1
+ Field_CARDINALITY_REQUIRED_enum_value = 2
+ Field_CARDINALITY_REPEATED_enum_value = 3
+)
+
// Names for google.protobuf.Enum.
const (
Enum_message_name protoreflect.Name = "Enum"
@@ -121,12 +162,14 @@ const (
Enum_Options_field_name protoreflect.Name = "options"
Enum_SourceContext_field_name protoreflect.Name = "source_context"
Enum_Syntax_field_name protoreflect.Name = "syntax"
+ Enum_Edition_field_name protoreflect.Name = "edition"
Enum_Name_field_fullname protoreflect.FullName = "google.protobuf.Enum.name"
Enum_Enumvalue_field_fullname protoreflect.FullName = "google.protobuf.Enum.enumvalue"
Enum_Options_field_fullname protoreflect.FullName = "google.protobuf.Enum.options"
Enum_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Enum.source_context"
Enum_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Enum.syntax"
+ Enum_Edition_field_fullname protoreflect.FullName = "google.protobuf.Enum.edition"
)
// Field numbers for google.protobuf.Enum.
@@ -136,6 +179,7 @@ const (
Enum_Options_field_number protoreflect.FieldNumber = 3
Enum_SourceContext_field_number protoreflect.FieldNumber = 4
Enum_Syntax_field_number protoreflect.FieldNumber = 5
+ Enum_Edition_field_number protoreflect.FieldNumber = 6
)
// Names for google.protobuf.EnumValue.
diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export.go b/vendor/google.golang.org/protobuf/internal/impl/api_export.go
index abee5f30..a371f98d 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/api_export.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/api_export.go
@@ -12,8 +12,8 @@ import (
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/internal/errors"
"google.golang.org/protobuf/proto"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/runtime/protoiface"
)
// Export is a zero-length named type that exists only to export a set of
@@ -32,11 +32,11 @@ type enum = interface{}
// EnumOf returns the protoreflect.Enum interface over e.
// It returns nil if e is nil.
-func (Export) EnumOf(e enum) pref.Enum {
+func (Export) EnumOf(e enum) protoreflect.Enum {
switch e := e.(type) {
case nil:
return nil
- case pref.Enum:
+ case protoreflect.Enum:
return e
default:
return legacyWrapEnum(reflect.ValueOf(e))
@@ -45,11 +45,11 @@ func (Export) EnumOf(e enum) pref.Enum {
// EnumDescriptorOf returns the protoreflect.EnumDescriptor for e.
// It returns nil if e is nil.
-func (Export) EnumDescriptorOf(e enum) pref.EnumDescriptor {
+func (Export) EnumDescriptorOf(e enum) protoreflect.EnumDescriptor {
switch e := e.(type) {
case nil:
return nil
- case pref.Enum:
+ case protoreflect.Enum:
return e.Descriptor()
default:
return LegacyLoadEnumDesc(reflect.TypeOf(e))
@@ -58,11 +58,11 @@ func (Export) EnumDescriptorOf(e enum) pref.EnumDescriptor {
// EnumTypeOf returns the protoreflect.EnumType for e.
// It returns nil if e is nil.
-func (Export) EnumTypeOf(e enum) pref.EnumType {
+func (Export) EnumTypeOf(e enum) protoreflect.EnumType {
switch e := e.(type) {
case nil:
return nil
- case pref.Enum:
+ case protoreflect.Enum:
return e.Type()
default:
return legacyLoadEnumType(reflect.TypeOf(e))
@@ -71,7 +71,7 @@ func (Export) EnumTypeOf(e enum) pref.EnumType {
// EnumStringOf returns the enum value as a string, either as the name if
// the number is resolvable, or the number formatted as a string.
-func (Export) EnumStringOf(ed pref.EnumDescriptor, n pref.EnumNumber) string {
+func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNumber) string {
ev := ed.Values().ByNumber(n)
if ev != nil {
return string(ev.Name())
@@ -84,7 +84,7 @@ func (Export) EnumStringOf(ed pref.EnumDescriptor, n pref.EnumNumber) string {
type message = interface{}
// legacyMessageWrapper wraps a v2 message as a v1 message.
-type legacyMessageWrapper struct{ m pref.ProtoMessage }
+type legacyMessageWrapper struct{ m protoreflect.ProtoMessage }
func (m legacyMessageWrapper) Reset() { proto.Reset(m.m) }
func (m legacyMessageWrapper) String() string { return Export{}.MessageStringOf(m.m) }
@@ -92,30 +92,30 @@ func (m legacyMessageWrapper) ProtoMessage() {}
// ProtoMessageV1Of converts either a v1 or v2 message to a v1 message.
// It returns nil if m is nil.
-func (Export) ProtoMessageV1Of(m message) piface.MessageV1 {
+func (Export) ProtoMessageV1Of(m message) protoiface.MessageV1 {
switch mv := m.(type) {
case nil:
return nil
- case piface.MessageV1:
+ case protoiface.MessageV1:
return mv
case unwrapper:
return Export{}.ProtoMessageV1Of(mv.protoUnwrap())
- case pref.ProtoMessage:
+ case protoreflect.ProtoMessage:
return legacyMessageWrapper{mv}
default:
panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m))
}
}
-func (Export) protoMessageV2Of(m message) pref.ProtoMessage {
+func (Export) protoMessageV2Of(m message) protoreflect.ProtoMessage {
switch mv := m.(type) {
case nil:
return nil
- case pref.ProtoMessage:
+ case protoreflect.ProtoMessage:
return mv
case legacyMessageWrapper:
return mv.m
- case piface.MessageV1:
+ case protoiface.MessageV1:
return nil
default:
panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m))
@@ -124,7 +124,7 @@ func (Export) protoMessageV2Of(m message) pref.ProtoMessage {
// ProtoMessageV2Of converts either a v1 or v2 message to a v2 message.
// It returns nil if m is nil.
-func (Export) ProtoMessageV2Of(m message) pref.ProtoMessage {
+func (Export) ProtoMessageV2Of(m message) protoreflect.ProtoMessage {
if m == nil {
return nil
}
@@ -136,7 +136,7 @@ func (Export) ProtoMessageV2Of(m message) pref.ProtoMessage {
// MessageOf returns the protoreflect.Message interface over m.
// It returns nil if m is nil.
-func (Export) MessageOf(m message) pref.Message {
+func (Export) MessageOf(m message) protoreflect.Message {
if m == nil {
return nil
}
@@ -148,7 +148,7 @@ func (Export) MessageOf(m message) pref.Message {
// MessageDescriptorOf returns the protoreflect.MessageDescriptor for m.
// It returns nil if m is nil.
-func (Export) MessageDescriptorOf(m message) pref.MessageDescriptor {
+func (Export) MessageDescriptorOf(m message) protoreflect.MessageDescriptor {
if m == nil {
return nil
}
@@ -160,7 +160,7 @@ func (Export) MessageDescriptorOf(m message) pref.MessageDescriptor {
// MessageTypeOf returns the protoreflect.MessageType for m.
// It returns nil if m is nil.
-func (Export) MessageTypeOf(m message) pref.MessageType {
+func (Export) MessageTypeOf(m message) protoreflect.MessageType {
if m == nil {
return nil
}
@@ -172,6 +172,6 @@ func (Export) MessageTypeOf(m message) pref.MessageType {
// MessageStringOf returns the message value as a string,
// which is the message serialized in the protobuf text format.
-func (Export) MessageStringOf(m pref.ProtoMessage) string {
+func (Export) MessageStringOf(m protoreflect.ProtoMessage) string {
return prototext.MarshalOptions{Multiline: false}.Format(m)
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go
index b82341e5..bff041ed 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go
@@ -8,18 +8,18 @@ import (
"sync"
"google.golang.org/protobuf/internal/errors"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/runtime/protoiface"
)
-func (mi *MessageInfo) checkInitialized(in piface.CheckInitializedInput) (piface.CheckInitializedOutput, error) {
+func (mi *MessageInfo) checkInitialized(in protoiface.CheckInitializedInput) (protoiface.CheckInitializedOutput, error) {
var p pointer
if ms, ok := in.Message.(*messageState); ok {
p = ms.pointer()
} else {
p = in.Message.(*messageReflectWrapper).pointer()
}
- return piface.CheckInitializedOutput{}, mi.checkInitializedPointer(p)
+ return protoiface.CheckInitializedOutput{}, mi.checkInitializedPointer(p)
}
func (mi *MessageInfo) checkInitializedPointer(p pointer) error {
@@ -90,7 +90,7 @@ var (
// needsInitCheck reports whether a message needs to be checked for partial initialization.
//
// It returns true if the message transitively includes any required or extension fields.
-func needsInitCheck(md pref.MessageDescriptor) bool {
+func needsInitCheck(md protoreflect.MessageDescriptor) bool {
if v, ok := needsInitCheckMap.Load(md); ok {
if has, ok := v.(bool); ok {
return has
@@ -101,7 +101,7 @@ func needsInitCheck(md pref.MessageDescriptor) bool {
return needsInitCheckLocked(md)
}
-func needsInitCheckLocked(md pref.MessageDescriptor) (has bool) {
+func needsInitCheckLocked(md protoreflect.MessageDescriptor) (has bool) {
if v, ok := needsInitCheckMap.Load(md); ok {
// If has is true, we've previously determined that this message
// needs init checks.
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go
index 08d35170..2b8f122c 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go
@@ -10,7 +10,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/errors"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type extensionFieldInfo struct {
@@ -21,29 +21,21 @@ type extensionFieldInfo struct {
validation validationInfo
}
-var legacyExtensionFieldInfoCache sync.Map // map[protoreflect.ExtensionType]*extensionFieldInfo
-
-func getExtensionFieldInfo(xt pref.ExtensionType) *extensionFieldInfo {
+func getExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo {
if xi, ok := xt.(*ExtensionInfo); ok {
xi.lazyInit()
return xi.info
}
- return legacyLoadExtensionFieldInfo(xt)
-}
-
-// legacyLoadExtensionFieldInfo dynamically loads a *ExtensionInfo for xt.
-func legacyLoadExtensionFieldInfo(xt pref.ExtensionType) *extensionFieldInfo {
- if xi, ok := legacyExtensionFieldInfoCache.Load(xt); ok {
- return xi.(*extensionFieldInfo)
- }
- e := makeExtensionFieldInfo(xt.TypeDescriptor())
- if e, ok := legacyMessageTypeCache.LoadOrStore(xt, e); ok {
- return e.(*extensionFieldInfo)
- }
- return e
+ // Ideally we'd cache the resulting *extensionFieldInfo so we don't have to
+ // recompute this metadata repeatedly. But without support for something like
+ // weak references, such a cache would pin temporary values (like dynamic
+ // extension types, constructed for the duration of a user request) to the
+ // heap forever, causing memory usage of the cache to grow unbounded.
+ // See discussion in https://github.com/golang/protobuf/issues/1521.
+ return makeExtensionFieldInfo(xt.TypeDescriptor())
}
-func makeExtensionFieldInfo(xd pref.ExtensionDescriptor) *extensionFieldInfo {
+func makeExtensionFieldInfo(xd protoreflect.ExtensionDescriptor) *extensionFieldInfo {
var wiretag uint64
if !xd.IsPacked() {
wiretag = protowire.EncodeTag(xd.Number(), wireTypes[xd.Kind()])
@@ -59,10 +51,10 @@ func makeExtensionFieldInfo(xd pref.ExtensionDescriptor) *extensionFieldInfo {
// This is true for composite types, where we pass in a message, list, or map to fill in,
// and for enums, where we pass in a prototype value to specify the concrete enum type.
switch xd.Kind() {
- case pref.MessageKind, pref.GroupKind, pref.EnumKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind, protoreflect.EnumKind:
e.unmarshalNeedsValue = true
default:
- if xd.Cardinality() == pref.Repeated {
+ if xd.Cardinality() == protoreflect.Repeated {
e.unmarshalNeedsValue = true
}
}
@@ -73,21 +65,21 @@ type lazyExtensionValue struct {
atomicOnce uint32 // atomically set if value is valid
mu sync.Mutex
xi *extensionFieldInfo
- value pref.Value
+ value protoreflect.Value
b []byte
- fn func() pref.Value
+ fn func() protoreflect.Value
}
type ExtensionField struct {
- typ pref.ExtensionType
+ typ protoreflect.ExtensionType
// value is either the value of GetValue,
// or a *lazyExtensionValue that then returns the value of GetValue.
- value pref.Value
+ value protoreflect.Value
lazy *lazyExtensionValue
}
-func (f *ExtensionField) appendLazyBytes(xt pref.ExtensionType, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, b []byte) {
+func (f *ExtensionField) appendLazyBytes(xt protoreflect.ExtensionType, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, b []byte) {
if f.lazy == nil {
f.lazy = &lazyExtensionValue{xi: xi}
}
@@ -97,7 +89,7 @@ func (f *ExtensionField) appendLazyBytes(xt pref.ExtensionType, xi *extensionFie
f.lazy.b = append(f.lazy.b, b...)
}
-func (f *ExtensionField) canLazy(xt pref.ExtensionType) bool {
+func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool {
if f.typ == nil {
return true
}
@@ -154,7 +146,7 @@ func (f *ExtensionField) lazyInit() {
// Set sets the type and value of the extension field.
// This must not be called concurrently.
-func (f *ExtensionField) Set(t pref.ExtensionType, v pref.Value) {
+func (f *ExtensionField) Set(t protoreflect.ExtensionType, v protoreflect.Value) {
f.typ = t
f.value = v
f.lazy = nil
@@ -162,14 +154,14 @@ func (f *ExtensionField) Set(t pref.ExtensionType, v pref.Value) {
// SetLazy sets the type and a value that is to be lazily evaluated upon first use.
// This must not be called concurrently.
-func (f *ExtensionField) SetLazy(t pref.ExtensionType, fn func() pref.Value) {
+func (f *ExtensionField) SetLazy(t protoreflect.ExtensionType, fn func() protoreflect.Value) {
f.typ = t
f.lazy = &lazyExtensionValue{fn: fn}
}
// Value returns the value of the extension field.
// This may be called concurrently.
-func (f *ExtensionField) Value() pref.Value {
+func (f *ExtensionField) Value() protoreflect.Value {
if f.lazy != nil {
if atomic.LoadUint32(&f.lazy.atomicOnce) == 0 {
f.lazyInit()
@@ -181,7 +173,7 @@ func (f *ExtensionField) Value() pref.Value {
// Type returns the type of the extension field.
// This may be called concurrently.
-func (f ExtensionField) Type() pref.ExtensionType {
+func (f ExtensionField) Type() protoreflect.ExtensionType {
return f.typ
}
@@ -193,7 +185,7 @@ func (f ExtensionField) IsSet() bool {
// IsLazy reports whether a field is lazily encoded.
// It is exported for testing.
-func IsLazy(m pref.Message, fd pref.FieldDescriptor) bool {
+func IsLazy(m protoreflect.Message, fd protoreflect.FieldDescriptor) bool {
var mi *MessageInfo
var p pointer
switch m := m.(type) {
@@ -206,7 +198,7 @@ func IsLazy(m pref.Message, fd pref.FieldDescriptor) bool {
default:
return false
}
- xd, ok := fd.(pref.ExtensionTypeDescriptor)
+ xd, ok := fd.(protoreflect.ExtensionTypeDescriptor)
if !ok {
return false
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
index cb4b482d..3fadd241 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
@@ -12,9 +12,9 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/errors"
"google.golang.org/protobuf/proto"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/runtime/protoiface"
)
type errInvalidUTF8 struct{}
@@ -30,7 +30,7 @@ func (errInvalidUTF8) Unwrap() error { return errors.Error }
// to the appropriate field-specific function as necessary.
//
// The unmarshal function is set on each field individually as usual.
-func (mi *MessageInfo) initOneofFieldCoders(od pref.OneofDescriptor, si structInfo) {
+func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si structInfo) {
fs := si.oneofsByName[od.Name()]
ft := fs.Type
oneofFields := make(map[reflect.Type]*coderFieldInfo)
@@ -118,13 +118,13 @@ func (mi *MessageInfo) initOneofFieldCoders(od pref.OneofDescriptor, si structIn
}
}
-func makeWeakMessageFieldCoder(fd pref.FieldDescriptor) pointerCoderFuncs {
+func makeWeakMessageFieldCoder(fd protoreflect.FieldDescriptor) pointerCoderFuncs {
var once sync.Once
- var messageType pref.MessageType
+ var messageType protoreflect.MessageType
lazyInit := func() {
once.Do(func() {
messageName := fd.Message().FullName()
- messageType, _ = preg.GlobalTypes.FindMessageByName(messageName)
+ messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName)
})
}
@@ -190,7 +190,7 @@ func makeWeakMessageFieldCoder(fd pref.FieldDescriptor) pointerCoderFuncs {
}
}
-func makeMessageFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
+func makeMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
if mi := getMessageInfo(ft); mi != nil {
funcs := pointerCoderFuncs{
size: sizeMessageInfo,
@@ -280,7 +280,7 @@ func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarsh
if n < 0 {
return out, errDecode
}
- o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
+ o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{
Buf: v,
Message: m.ProtoReflect(),
})
@@ -288,27 +288,27 @@ func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarsh
return out, err
}
out.n = n
- out.initialized = o.Flags&piface.UnmarshalInitialized != 0
+ out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0
return out, nil
}
-func sizeMessageValue(v pref.Value, tagsize int, opts marshalOptions) int {
+func sizeMessageValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {
m := v.Message().Interface()
return sizeMessage(m, tagsize, opts)
}
-func appendMessageValue(b []byte, v pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
+func appendMessageValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
m := v.Message().Interface()
return appendMessage(b, m, wiretag, opts)
}
-func consumeMessageValue(b []byte, v pref.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (pref.Value, unmarshalOutput, error) {
+func consumeMessageValue(b []byte, v protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) {
m := v.Message().Interface()
out, err := consumeMessage(b, m, wtyp, opts)
return v, out, err
}
-func isInitMessageValue(v pref.Value) error {
+func isInitMessageValue(v protoreflect.Value) error {
m := v.Message().Interface()
return proto.CheckInitialized(m)
}
@@ -321,17 +321,17 @@ var coderMessageValue = valueCoderFuncs{
merge: mergeMessageValue,
}
-func sizeGroupValue(v pref.Value, tagsize int, opts marshalOptions) int {
+func sizeGroupValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {
m := v.Message().Interface()
return sizeGroup(m, tagsize, opts)
}
-func appendGroupValue(b []byte, v pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
+func appendGroupValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
m := v.Message().Interface()
return appendGroup(b, m, wiretag, opts)
}
-func consumeGroupValue(b []byte, v pref.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (pref.Value, unmarshalOutput, error) {
+func consumeGroupValue(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) {
m := v.Message().Interface()
out, err := consumeGroup(b, m, num, wtyp, opts)
return v, out, err
@@ -345,7 +345,7 @@ var coderGroupValue = valueCoderFuncs{
merge: mergeMessageValue,
}
-func makeGroupFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
+func makeGroupFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
num := fd.Number()
if mi := getMessageInfo(ft); mi != nil {
funcs := pointerCoderFuncs{
@@ -424,7 +424,7 @@ func consumeGroup(b []byte, m proto.Message, num protowire.Number, wtyp protowir
if n < 0 {
return out, errDecode
}
- o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
+ o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{
Buf: b,
Message: m.ProtoReflect(),
})
@@ -432,11 +432,11 @@ func consumeGroup(b []byte, m proto.Message, num protowire.Number, wtyp protowir
return out, err
}
out.n = n
- out.initialized = o.Flags&piface.UnmarshalInitialized != 0
+ out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0
return out, nil
}
-func makeMessageSliceFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
+func makeMessageSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
if mi := getMessageInfo(ft); mi != nil {
funcs := pointerCoderFuncs{
size: sizeMessageSliceInfo,
@@ -555,7 +555,7 @@ func consumeMessageSlice(b []byte, p pointer, goType reflect.Type, wtyp protowir
return out, errDecode
}
mp := reflect.New(goType.Elem())
- o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
+ o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{
Buf: v,
Message: asMessage(mp).ProtoReflect(),
})
@@ -564,7 +564,7 @@ func consumeMessageSlice(b []byte, p pointer, goType reflect.Type, wtyp protowir
}
p.AppendPointerSlice(pointerOfValue(mp))
out.n = n
- out.initialized = o.Flags&piface.UnmarshalInitialized != 0
+ out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0
return out, nil
}
@@ -581,7 +581,7 @@ func isInitMessageSlice(p pointer, goType reflect.Type) error {
// Slices of messages
-func sizeMessageSliceValue(listv pref.Value, tagsize int, opts marshalOptions) int {
+func sizeMessageSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int {
list := listv.List()
n := 0
for i, llen := 0, list.Len(); i < llen; i++ {
@@ -591,7 +591,7 @@ func sizeMessageSliceValue(listv pref.Value, tagsize int, opts marshalOptions) i
return n
}
-func appendMessageSliceValue(b []byte, listv pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
+func appendMessageSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
list := listv.List()
mopts := opts.Options()
for i, llen := 0, list.Len(); i < llen; i++ {
@@ -608,30 +608,30 @@ func appendMessageSliceValue(b []byte, listv pref.Value, wiretag uint64, opts ma
return b, nil
}
-func consumeMessageSliceValue(b []byte, listv pref.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ pref.Value, out unmarshalOutput, err error) {
+func consumeMessageSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {
list := listv.List()
if wtyp != protowire.BytesType {
- return pref.Value{}, out, errUnknown
+ return protoreflect.Value{}, out, errUnknown
}
v, n := protowire.ConsumeBytes(b)
if n < 0 {
- return pref.Value{}, out, errDecode
+ return protoreflect.Value{}, out, errDecode
}
m := list.NewElement()
- o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
+ o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{
Buf: v,
Message: m.Message(),
})
if err != nil {
- return pref.Value{}, out, err
+ return protoreflect.Value{}, out, err
}
list.Append(m)
out.n = n
- out.initialized = o.Flags&piface.UnmarshalInitialized != 0
+ out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0
return listv, out, nil
}
-func isInitMessageSliceValue(listv pref.Value) error {
+func isInitMessageSliceValue(listv protoreflect.Value) error {
list := listv.List()
for i, llen := 0, list.Len(); i < llen; i++ {
m := list.Get(i).Message().Interface()
@@ -650,7 +650,7 @@ var coderMessageSliceValue = valueCoderFuncs{
merge: mergeMessageListValue,
}
-func sizeGroupSliceValue(listv pref.Value, tagsize int, opts marshalOptions) int {
+func sizeGroupSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int {
list := listv.List()
n := 0
for i, llen := 0, list.Len(); i < llen; i++ {
@@ -660,7 +660,7 @@ func sizeGroupSliceValue(listv pref.Value, tagsize int, opts marshalOptions) int
return n
}
-func appendGroupSliceValue(b []byte, listv pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
+func appendGroupSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {
list := listv.List()
mopts := opts.Options()
for i, llen := 0, list.Len(); i < llen; i++ {
@@ -676,26 +676,26 @@ func appendGroupSliceValue(b []byte, listv pref.Value, wiretag uint64, opts mars
return b, nil
}
-func consumeGroupSliceValue(b []byte, listv pref.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ pref.Value, out unmarshalOutput, err error) {
+func consumeGroupSliceValue(b []byte, listv protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {
list := listv.List()
if wtyp != protowire.StartGroupType {
- return pref.Value{}, out, errUnknown
+ return protoreflect.Value{}, out, errUnknown
}
b, n := protowire.ConsumeGroup(num, b)
if n < 0 {
- return pref.Value{}, out, errDecode
+ return protoreflect.Value{}, out, errDecode
}
m := list.NewElement()
- o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
+ o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{
Buf: b,
Message: m.Message(),
})
if err != nil {
- return pref.Value{}, out, err
+ return protoreflect.Value{}, out, err
}
list.Append(m)
out.n = n
- out.initialized = o.Flags&piface.UnmarshalInitialized != 0
+ out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0
return listv, out, nil
}
@@ -707,7 +707,7 @@ var coderGroupSliceValue = valueCoderFuncs{
merge: mergeMessageListValue,
}
-func makeGroupSliceFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
+func makeGroupSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
num := fd.Number()
if mi := getMessageInfo(ft); mi != nil {
funcs := pointerCoderFuncs{
@@ -772,7 +772,7 @@ func consumeGroupSlice(b []byte, p pointer, num protowire.Number, wtyp protowire
return out, errDecode
}
mp := reflect.New(goType.Elem())
- o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
+ o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{
Buf: b,
Message: asMessage(mp).ProtoReflect(),
})
@@ -781,7 +781,7 @@ func consumeGroupSlice(b []byte, p pointer, num protowire.Number, wtyp protowire
}
p.AppendPointerSlice(pointerOfValue(mp))
out.n = n
- out.initialized = o.Flags&piface.UnmarshalInitialized != 0
+ out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0
return out, nil
}
@@ -822,8 +822,8 @@ func consumeGroupSliceInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFie
return out, nil
}
-func asMessage(v reflect.Value) pref.ProtoMessage {
- if m, ok := v.Interface().(pref.ProtoMessage); ok {
+func asMessage(v reflect.Value) protoreflect.ProtoMessage {
+ if m, ok := v.Interface().(protoreflect.ProtoMessage); ok {
return m
}
return legacyWrapMessage(v).Interface()
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go b/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go
index 1a509b63..f55dc01e 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go
@@ -162,11 +162,20 @@ func appendBoolSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions
func consumeBoolSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.BoolSlice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := 0
+ for _, v := range b {
+ if v < 0x80 {
+ count++
+ }
+ }
+ if count > 0 {
+ p.growBoolSlice(count)
+ }
+ s := *sp
for len(b) > 0 {
var v uint64
var n int
@@ -732,11 +741,20 @@ func appendInt32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOption
func consumeInt32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Int32Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := 0
+ for _, v := range b {
+ if v < 0x80 {
+ count++
+ }
+ }
+ if count > 0 {
+ p.growInt32Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
var v uint64
var n int
@@ -1138,11 +1156,20 @@ func appendSint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio
func consumeSint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Int32Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := 0
+ for _, v := range b {
+ if v < 0x80 {
+ count++
+ }
+ }
+ if count > 0 {
+ p.growInt32Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
var v uint64
var n int
@@ -1544,11 +1571,20 @@ func appendUint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio
func consumeUint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Uint32Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := 0
+ for _, v := range b {
+ if v < 0x80 {
+ count++
+ }
+ }
+ if count > 0 {
+ p.growUint32Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
var v uint64
var n int
@@ -1950,11 +1986,20 @@ func appendInt64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOption
func consumeInt64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Int64Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := 0
+ for _, v := range b {
+ if v < 0x80 {
+ count++
+ }
+ }
+ if count > 0 {
+ p.growInt64Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
var v uint64
var n int
@@ -2356,11 +2401,20 @@ func appendSint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio
func consumeSint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Int64Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := 0
+ for _, v := range b {
+ if v < 0x80 {
+ count++
+ }
+ }
+ if count > 0 {
+ p.growInt64Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
var v uint64
var n int
@@ -2762,11 +2816,20 @@ func appendUint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio
func consumeUint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Uint64Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := 0
+ for _, v := range b {
+ if v < 0x80 {
+ count++
+ }
+ }
+ if count > 0 {
+ p.growUint64Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
var v uint64
var n int
@@ -3145,11 +3208,15 @@ func appendSfixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpt
func consumeSfixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Int32Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := len(b) / protowire.SizeFixed32()
+ if count > 0 {
+ p.growInt32Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
v, n := protowire.ConsumeFixed32(b)
if n < 0 {
@@ -3461,11 +3528,15 @@ func appendFixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpti
func consumeFixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Uint32Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := len(b) / protowire.SizeFixed32()
+ if count > 0 {
+ p.growUint32Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
v, n := protowire.ConsumeFixed32(b)
if n < 0 {
@@ -3777,11 +3848,15 @@ func appendFloatSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOption
func consumeFloatSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Float32Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := len(b) / protowire.SizeFixed32()
+ if count > 0 {
+ p.growFloat32Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
v, n := protowire.ConsumeFixed32(b)
if n < 0 {
@@ -4093,11 +4168,15 @@ func appendSfixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpt
func consumeSfixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Int64Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := len(b) / protowire.SizeFixed64()
+ if count > 0 {
+ p.growInt64Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
v, n := protowire.ConsumeFixed64(b)
if n < 0 {
@@ -4409,11 +4488,15 @@ func appendFixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpti
func consumeFixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Uint64Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := len(b) / protowire.SizeFixed64()
+ if count > 0 {
+ p.growUint64Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
v, n := protowire.ConsumeFixed64(b)
if n < 0 {
@@ -4725,11 +4808,15 @@ func appendDoubleSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio
func consumeDoubleSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
sp := p.Float64Slice()
if wtyp == protowire.BytesType {
- s := *sp
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
+ count := len(b) / protowire.SizeFixed64()
+ if count > 0 {
+ p.growFloat64Slice(count)
+ }
+ s := *sp
for len(b) > 0 {
v, n := protowire.ConsumeFixed64(b)
if n < 0 {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go
index c1245fef..111b9d16 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go
@@ -10,7 +10,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/genid"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type mapInfo struct {
@@ -19,12 +19,12 @@ type mapInfo struct {
valWiretag uint64
keyFuncs valueCoderFuncs
valFuncs valueCoderFuncs
- keyZero pref.Value
- keyKind pref.Kind
+ keyZero protoreflect.Value
+ keyKind protoreflect.Kind
conv *mapConverter
}
-func encoderFuncsForMap(fd pref.FieldDescriptor, ft reflect.Type) (valueMessage *MessageInfo, funcs pointerCoderFuncs) {
+func encoderFuncsForMap(fd protoreflect.FieldDescriptor, ft reflect.Type) (valueMessage *MessageInfo, funcs pointerCoderFuncs) {
// TODO: Consider generating specialized map coders.
keyField := fd.MapKey()
valField := fd.MapValue()
@@ -44,7 +44,7 @@ func encoderFuncsForMap(fd pref.FieldDescriptor, ft reflect.Type) (valueMessage
keyKind: keyField.Kind(),
conv: conv,
}
- if valField.Kind() == pref.MessageKind {
+ if valField.Kind() == protoreflect.MessageKind {
valueMessage = getMessageInfo(ft.Elem())
}
@@ -68,9 +68,9 @@ func encoderFuncsForMap(fd pref.FieldDescriptor, ft reflect.Type) (valueMessage
},
}
switch valField.Kind() {
- case pref.MessageKind:
+ case protoreflect.MessageKind:
funcs.merge = mergeMapOfMessage
- case pref.BytesKind:
+ case protoreflect.BytesKind:
funcs.merge = mergeMapOfBytes
default:
funcs.merge = mergeMap
@@ -135,7 +135,7 @@ func consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo
err := errUnknown
switch num {
case genid.MapEntry_Key_field_number:
- var v pref.Value
+ var v protoreflect.Value
var o unmarshalOutput
v, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts)
if err != nil {
@@ -144,7 +144,7 @@ func consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo
key = v
n = o.n
case genid.MapEntry_Value_field_number:
- var v pref.Value
+ var v protoreflect.Value
var o unmarshalOutput
v, o, err = mapi.valFuncs.unmarshal(b, val, num, wtyp, opts)
if err != nil {
@@ -192,7 +192,7 @@ func consumeMapOfMessage(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi
err := errUnknown
switch num {
case 1:
- var v pref.Value
+ var v protoreflect.Value
var o unmarshalOutput
v, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts)
if err != nil {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go
index 2706bb67..4b15493f 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.12
// +build !go1.12
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go
index 1533ef60..0b31b66e 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.12
// +build go1.12
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go
index cd40527f..6b2fdbb7 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go
@@ -12,15 +12,15 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/encoding/messageset"
"google.golang.org/protobuf/internal/order"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/runtime/protoiface"
)
// coderMessageInfo contains per-message information used by the fast-path functions.
// This is a different type from MessageInfo to keep MessageInfo as general-purpose as
// possible.
type coderMessageInfo struct {
- methods piface.Methods
+ methods protoiface.Methods
orderedCoderFields []*coderFieldInfo
denseCoderFields []*coderFieldInfo
@@ -38,13 +38,13 @@ type coderFieldInfo struct {
funcs pointerCoderFuncs // fast-path per-field functions
mi *MessageInfo // field's message
ft reflect.Type
- validation validationInfo // information used by message validation
- num pref.FieldNumber // field number
- offset offset // struct field offset
- wiretag uint64 // field tag (number + wire type)
- tagsize int // size of the varint-encoded tag
- isPointer bool // true if IsNil may be called on the struct field
- isRequired bool // true if field is required
+ validation validationInfo // information used by message validation
+ num protoreflect.FieldNumber // field number
+ offset offset // struct field offset
+ wiretag uint64 // field tag (number + wire type)
+ tagsize int // size of the varint-encoded tag
+ isPointer bool // true if IsNil may be called on the struct field
+ isRequired bool // true if field is required
}
func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) {
@@ -125,8 +125,8 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) {
funcs: funcs,
mi: childMessage,
validation: newFieldValidationInfo(mi, si, fd, ft),
- isPointer: fd.Cardinality() == pref.Repeated || fd.HasPresence(),
- isRequired: fd.Cardinality() == pref.Required,
+ isPointer: fd.Cardinality() == protoreflect.Repeated || fd.HasPresence(),
+ isRequired: fd.Cardinality() == protoreflect.Required,
}
mi.orderedCoderFields = append(mi.orderedCoderFields, cf)
mi.coderFields[cf.num] = cf
@@ -149,7 +149,7 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) {
return mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num
})
- var maxDense pref.FieldNumber
+ var maxDense protoreflect.FieldNumber
for _, cf := range mi.orderedCoderFields {
if cf.num >= 16 && cf.num >= 2*maxDense {
break
@@ -175,12 +175,12 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) {
mi.needsInitCheck = needsInitCheck(mi.Desc)
if mi.methods.Marshal == nil && mi.methods.Size == nil {
- mi.methods.Flags |= piface.SupportMarshalDeterministic
+ mi.methods.Flags |= protoiface.SupportMarshalDeterministic
mi.methods.Marshal = mi.marshal
mi.methods.Size = mi.size
}
if mi.methods.Unmarshal == nil {
- mi.methods.Flags |= piface.SupportUnmarshalDiscardUnknown
+ mi.methods.Flags |= protoiface.SupportUnmarshalDiscardUnknown
mi.methods.Unmarshal = mi.unmarshal
}
if mi.methods.CheckInitialized == nil {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
index 90705e3a..145c577b 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go b/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go
index e8997123..13077751 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go
@@ -10,7 +10,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/strs"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
// pointerCoderFuncs is a set of pointer encoding functions.
@@ -25,83 +25,83 @@ type pointerCoderFuncs struct {
// valueCoderFuncs is a set of protoreflect.Value encoding functions.
type valueCoderFuncs struct {
- size func(v pref.Value, tagsize int, opts marshalOptions) int
- marshal func(b []byte, v pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error)
- unmarshal func(b []byte, v pref.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (pref.Value, unmarshalOutput, error)
- isInit func(v pref.Value) error
- merge func(dst, src pref.Value, opts mergeOptions) pref.Value
+ size func(v protoreflect.Value, tagsize int, opts marshalOptions) int
+ marshal func(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error)
+ unmarshal func(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error)
+ isInit func(v protoreflect.Value) error
+ merge func(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value
}
// fieldCoder returns pointer functions for a field, used for operating on
// struct fields.
-func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) {
+func fieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) {
switch {
case fd.IsMap():
return encoderFuncsForMap(fd, ft)
- case fd.Cardinality() == pref.Repeated && !fd.IsPacked():
+ case fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked():
// Repeated fields (not packed).
if ft.Kind() != reflect.Slice {
break
}
ft := ft.Elem()
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if ft.Kind() == reflect.Bool {
return nil, coderBoolSlice
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if ft.Kind() == reflect.Int32 {
return nil, coderEnumSlice
}
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderInt32Slice
}
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSint32Slice
}
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderUint32Slice
}
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderInt64Slice
}
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSint64Slice
}
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderUint64Slice
}
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSfixed32Slice
}
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderFixed32Slice
}
- case pref.FloatKind:
+ case protoreflect.FloatKind:
if ft.Kind() == reflect.Float32 {
return nil, coderFloatSlice
}
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSfixed64Slice
}
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderFixed64Slice
}
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
if ft.Kind() == reflect.Float64 {
return nil, coderDoubleSlice
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
return nil, coderStringSliceValidateUTF8
}
@@ -114,19 +114,19 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer
if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
return nil, coderBytesSlice
}
- case pref.BytesKind:
+ case protoreflect.BytesKind:
if ft.Kind() == reflect.String {
return nil, coderStringSlice
}
if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
return nil, coderBytesSlice
}
- case pref.MessageKind:
+ case protoreflect.MessageKind:
return getMessageInfo(ft), makeMessageSliceFieldCoder(fd, ft)
- case pref.GroupKind:
+ case protoreflect.GroupKind:
return getMessageInfo(ft), makeGroupSliceFieldCoder(fd, ft)
}
- case fd.Cardinality() == pref.Repeated && fd.IsPacked():
+ case fd.Cardinality() == protoreflect.Repeated && fd.IsPacked():
// Packed repeated fields.
//
// Only repeated fields of primitive numeric types
@@ -136,128 +136,128 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer
}
ft := ft.Elem()
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if ft.Kind() == reflect.Bool {
return nil, coderBoolPackedSlice
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if ft.Kind() == reflect.Int32 {
return nil, coderEnumPackedSlice
}
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderInt32PackedSlice
}
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSint32PackedSlice
}
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderUint32PackedSlice
}
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderInt64PackedSlice
}
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSint64PackedSlice
}
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderUint64PackedSlice
}
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSfixed32PackedSlice
}
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderFixed32PackedSlice
}
- case pref.FloatKind:
+ case protoreflect.FloatKind:
if ft.Kind() == reflect.Float32 {
return nil, coderFloatPackedSlice
}
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSfixed64PackedSlice
}
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderFixed64PackedSlice
}
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
if ft.Kind() == reflect.Float64 {
return nil, coderDoublePackedSlice
}
}
- case fd.Kind() == pref.MessageKind:
+ case fd.Kind() == protoreflect.MessageKind:
return getMessageInfo(ft), makeMessageFieldCoder(fd, ft)
- case fd.Kind() == pref.GroupKind:
+ case fd.Kind() == protoreflect.GroupKind:
return getMessageInfo(ft), makeGroupFieldCoder(fd, ft)
- case fd.Syntax() == pref.Proto3 && fd.ContainingOneof() == nil:
+ case !fd.HasPresence() && fd.ContainingOneof() == nil:
// Populated oneof fields always encode even if set to the zero value,
// which normally are not encoded in proto3.
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if ft.Kind() == reflect.Bool {
return nil, coderBoolNoZero
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if ft.Kind() == reflect.Int32 {
return nil, coderEnumNoZero
}
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderInt32NoZero
}
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSint32NoZero
}
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderUint32NoZero
}
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderInt64NoZero
}
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSint64NoZero
}
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderUint64NoZero
}
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSfixed32NoZero
}
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderFixed32NoZero
}
- case pref.FloatKind:
+ case protoreflect.FloatKind:
if ft.Kind() == reflect.Float32 {
return nil, coderFloatNoZero
}
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSfixed64NoZero
}
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderFixed64NoZero
}
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
if ft.Kind() == reflect.Float64 {
return nil, coderDoubleNoZero
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
return nil, coderStringNoZeroValidateUTF8
}
@@ -270,7 +270,7 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer
if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
return nil, coderBytesNoZero
}
- case pref.BytesKind:
+ case protoreflect.BytesKind:
if ft.Kind() == reflect.String {
return nil, coderStringNoZero
}
@@ -281,133 +281,133 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer
case ft.Kind() == reflect.Ptr:
ft := ft.Elem()
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if ft.Kind() == reflect.Bool {
return nil, coderBoolPtr
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if ft.Kind() == reflect.Int32 {
return nil, coderEnumPtr
}
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderInt32Ptr
}
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSint32Ptr
}
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderUint32Ptr
}
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderInt64Ptr
}
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSint64Ptr
}
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderUint64Ptr
}
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSfixed32Ptr
}
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderFixed32Ptr
}
- case pref.FloatKind:
+ case protoreflect.FloatKind:
if ft.Kind() == reflect.Float32 {
return nil, coderFloatPtr
}
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSfixed64Ptr
}
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderFixed64Ptr
}
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
if ft.Kind() == reflect.Float64 {
return nil, coderDoublePtr
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
return nil, coderStringPtrValidateUTF8
}
if ft.Kind() == reflect.String {
return nil, coderStringPtr
}
- case pref.BytesKind:
+ case protoreflect.BytesKind:
if ft.Kind() == reflect.String {
return nil, coderStringPtr
}
}
default:
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if ft.Kind() == reflect.Bool {
return nil, coderBool
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
if ft.Kind() == reflect.Int32 {
return nil, coderEnum
}
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderInt32
}
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSint32
}
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderUint32
}
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderInt64
}
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSint64
}
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderUint64
}
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
if ft.Kind() == reflect.Int32 {
return nil, coderSfixed32
}
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
if ft.Kind() == reflect.Uint32 {
return nil, coderFixed32
}
- case pref.FloatKind:
+ case protoreflect.FloatKind:
if ft.Kind() == reflect.Float32 {
return nil, coderFloat
}
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
if ft.Kind() == reflect.Int64 {
return nil, coderSfixed64
}
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
if ft.Kind() == reflect.Uint64 {
return nil, coderFixed64
}
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
if ft.Kind() == reflect.Float64 {
return nil, coderDouble
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
return nil, coderStringValidateUTF8
}
@@ -420,7 +420,7 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer
if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
return nil, coderBytes
}
- case pref.BytesKind:
+ case protoreflect.BytesKind:
if ft.Kind() == reflect.String {
return nil, coderString
}
@@ -434,122 +434,122 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer
// encoderFuncsForValue returns value functions for a field, used for
// extension values and map encoding.
-func encoderFuncsForValue(fd pref.FieldDescriptor) valueCoderFuncs {
+func encoderFuncsForValue(fd protoreflect.FieldDescriptor) valueCoderFuncs {
switch {
- case fd.Cardinality() == pref.Repeated && !fd.IsPacked():
+ case fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked():
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
return coderBoolSliceValue
- case pref.EnumKind:
+ case protoreflect.EnumKind:
return coderEnumSliceValue
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
return coderInt32SliceValue
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
return coderSint32SliceValue
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
return coderUint32SliceValue
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
return coderInt64SliceValue
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
return coderSint64SliceValue
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
return coderUint64SliceValue
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
return coderSfixed32SliceValue
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
return coderFixed32SliceValue
- case pref.FloatKind:
+ case protoreflect.FloatKind:
return coderFloatSliceValue
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
return coderSfixed64SliceValue
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
return coderFixed64SliceValue
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
return coderDoubleSliceValue
- case pref.StringKind:
+ case protoreflect.StringKind:
// We don't have a UTF-8 validating coder for repeated string fields.
// Value coders are used for extensions and maps.
// Extensions are never proto3, and maps never contain lists.
return coderStringSliceValue
- case pref.BytesKind:
+ case protoreflect.BytesKind:
return coderBytesSliceValue
- case pref.MessageKind:
+ case protoreflect.MessageKind:
return coderMessageSliceValue
- case pref.GroupKind:
+ case protoreflect.GroupKind:
return coderGroupSliceValue
}
- case fd.Cardinality() == pref.Repeated && fd.IsPacked():
+ case fd.Cardinality() == protoreflect.Repeated && fd.IsPacked():
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
return coderBoolPackedSliceValue
- case pref.EnumKind:
+ case protoreflect.EnumKind:
return coderEnumPackedSliceValue
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
return coderInt32PackedSliceValue
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
return coderSint32PackedSliceValue
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
return coderUint32PackedSliceValue
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
return coderInt64PackedSliceValue
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
return coderSint64PackedSliceValue
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
return coderUint64PackedSliceValue
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
return coderSfixed32PackedSliceValue
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
return coderFixed32PackedSliceValue
- case pref.FloatKind:
+ case protoreflect.FloatKind:
return coderFloatPackedSliceValue
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
return coderSfixed64PackedSliceValue
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
return coderFixed64PackedSliceValue
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
return coderDoublePackedSliceValue
}
default:
switch fd.Kind() {
default:
- case pref.BoolKind:
+ case protoreflect.BoolKind:
return coderBoolValue
- case pref.EnumKind:
+ case protoreflect.EnumKind:
return coderEnumValue
- case pref.Int32Kind:
+ case protoreflect.Int32Kind:
return coderInt32Value
- case pref.Sint32Kind:
+ case protoreflect.Sint32Kind:
return coderSint32Value
- case pref.Uint32Kind:
+ case protoreflect.Uint32Kind:
return coderUint32Value
- case pref.Int64Kind:
+ case protoreflect.Int64Kind:
return coderInt64Value
- case pref.Sint64Kind:
+ case protoreflect.Sint64Kind:
return coderSint64Value
- case pref.Uint64Kind:
+ case protoreflect.Uint64Kind:
return coderUint64Value
- case pref.Sfixed32Kind:
+ case protoreflect.Sfixed32Kind:
return coderSfixed32Value
- case pref.Fixed32Kind:
+ case protoreflect.Fixed32Kind:
return coderFixed32Value
- case pref.FloatKind:
+ case protoreflect.FloatKind:
return coderFloatValue
- case pref.Sfixed64Kind:
+ case protoreflect.Sfixed64Kind:
return coderSfixed64Value
- case pref.Fixed64Kind:
+ case protoreflect.Fixed64Kind:
return coderFixed64Value
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
return coderDoubleValue
- case pref.StringKind:
+ case protoreflect.StringKind:
if strs.EnforceUTF8(fd) {
return coderStringValueValidateUTF8
}
return coderStringValue
- case pref.BytesKind:
+ case protoreflect.BytesKind:
return coderBytesValue
- case pref.MessageKind:
+ case protoreflect.MessageKind:
return coderMessageValue
- case pref.GroupKind:
+ case protoreflect.GroupKind:
return coderGroupValue
}
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
index e118af1e..757642e2 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go
index acd61bb5..185ef2ef 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/convert.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/convert.go
@@ -8,7 +8,7 @@ import (
"fmt"
"reflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
// unwrapper unwraps the value to the underlying value.
@@ -20,13 +20,13 @@ type unwrapper interface {
// A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types.
type Converter interface {
// PBValueOf converts a reflect.Value to a protoreflect.Value.
- PBValueOf(reflect.Value) pref.Value
+ PBValueOf(reflect.Value) protoreflect.Value
// GoValueOf converts a protoreflect.Value to a reflect.Value.
- GoValueOf(pref.Value) reflect.Value
+ GoValueOf(protoreflect.Value) reflect.Value
// IsValidPB returns whether a protoreflect.Value is compatible with this type.
- IsValidPB(pref.Value) bool
+ IsValidPB(protoreflect.Value) bool
// IsValidGo returns whether a reflect.Value is compatible with this type.
IsValidGo(reflect.Value) bool
@@ -34,12 +34,12 @@ type Converter interface {
// New returns a new field value.
// For scalars, it returns the default value of the field.
// For composite types, it returns a new mutable value.
- New() pref.Value
+ New() protoreflect.Value
// Zero returns a new field value.
// For scalars, it returns the default value of the field.
// For composite types, it returns an immutable, empty value.
- Zero() pref.Value
+ Zero() protoreflect.Value
}
// NewConverter matches a Go type with a protobuf field and returns a Converter
@@ -50,7 +50,7 @@ type Converter interface {
// This matcher deliberately supports a wider range of Go types than what
// protoc-gen-go historically generated to be able to automatically wrap some
// v1 messages generated by other forks of protoc-gen-go.
-func NewConverter(t reflect.Type, fd pref.FieldDescriptor) Converter {
+func NewConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter {
switch {
case fd.IsList():
return newListConverter(t, fd)
@@ -59,7 +59,6 @@ func NewConverter(t reflect.Type, fd pref.FieldDescriptor) Converter {
default:
return newSingularConverter(t, fd)
}
- panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName()))
}
var (
@@ -76,68 +75,68 @@ var (
)
var (
- boolZero = pref.ValueOfBool(false)
- int32Zero = pref.ValueOfInt32(0)
- int64Zero = pref.ValueOfInt64(0)
- uint32Zero = pref.ValueOfUint32(0)
- uint64Zero = pref.ValueOfUint64(0)
- float32Zero = pref.ValueOfFloat32(0)
- float64Zero = pref.ValueOfFloat64(0)
- stringZero = pref.ValueOfString("")
- bytesZero = pref.ValueOfBytes(nil)
+ boolZero = protoreflect.ValueOfBool(false)
+ int32Zero = protoreflect.ValueOfInt32(0)
+ int64Zero = protoreflect.ValueOfInt64(0)
+ uint32Zero = protoreflect.ValueOfUint32(0)
+ uint64Zero = protoreflect.ValueOfUint64(0)
+ float32Zero = protoreflect.ValueOfFloat32(0)
+ float64Zero = protoreflect.ValueOfFloat64(0)
+ stringZero = protoreflect.ValueOfString("")
+ bytesZero = protoreflect.ValueOfBytes(nil)
)
-func newSingularConverter(t reflect.Type, fd pref.FieldDescriptor) Converter {
- defVal := func(fd pref.FieldDescriptor, zero pref.Value) pref.Value {
- if fd.Cardinality() == pref.Repeated {
+func newSingularConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter {
+ defVal := func(fd protoreflect.FieldDescriptor, zero protoreflect.Value) protoreflect.Value {
+ if fd.Cardinality() == protoreflect.Repeated {
// Default isn't defined for repeated fields.
return zero
}
return fd.Default()
}
switch fd.Kind() {
- case pref.BoolKind:
+ case protoreflect.BoolKind:
if t.Kind() == reflect.Bool {
return &boolConverter{t, defVal(fd, boolZero)}
}
- case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind:
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
if t.Kind() == reflect.Int32 {
return &int32Converter{t, defVal(fd, int32Zero)}
}
- case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind:
+ case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
if t.Kind() == reflect.Int64 {
return &int64Converter{t, defVal(fd, int64Zero)}
}
- case pref.Uint32Kind, pref.Fixed32Kind:
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
if t.Kind() == reflect.Uint32 {
return &uint32Converter{t, defVal(fd, uint32Zero)}
}
- case pref.Uint64Kind, pref.Fixed64Kind:
+ case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
if t.Kind() == reflect.Uint64 {
return &uint64Converter{t, defVal(fd, uint64Zero)}
}
- case pref.FloatKind:
+ case protoreflect.FloatKind:
if t.Kind() == reflect.Float32 {
return &float32Converter{t, defVal(fd, float32Zero)}
}
- case pref.DoubleKind:
+ case protoreflect.DoubleKind:
if t.Kind() == reflect.Float64 {
return &float64Converter{t, defVal(fd, float64Zero)}
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) {
return &stringConverter{t, defVal(fd, stringZero)}
}
- case pref.BytesKind:
+ case protoreflect.BytesKind:
if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) {
return &bytesConverter{t, defVal(fd, bytesZero)}
}
- case pref.EnumKind:
+ case protoreflect.EnumKind:
// Handle enums, which must be a named int32 type.
if t.Kind() == reflect.Int32 {
return newEnumConverter(t, fd)
}
- case pref.MessageKind, pref.GroupKind:
+ case protoreflect.MessageKind, protoreflect.GroupKind:
return newMessageConverter(t)
}
panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName()))
@@ -145,184 +144,184 @@ func newSingularConverter(t reflect.Type, fd pref.FieldDescriptor) Converter {
type boolConverter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *boolConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *boolConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfBool(v.Bool())
+ return protoreflect.ValueOfBool(v.Bool())
}
-func (c *boolConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *boolConverter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(v.Bool()).Convert(c.goType)
}
-func (c *boolConverter) IsValidPB(v pref.Value) bool {
+func (c *boolConverter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(bool)
return ok
}
func (c *boolConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *boolConverter) New() pref.Value { return c.def }
-func (c *boolConverter) Zero() pref.Value { return c.def }
+func (c *boolConverter) New() protoreflect.Value { return c.def }
+func (c *boolConverter) Zero() protoreflect.Value { return c.def }
type int32Converter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *int32Converter) PBValueOf(v reflect.Value) pref.Value {
+func (c *int32Converter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfInt32(int32(v.Int()))
+ return protoreflect.ValueOfInt32(int32(v.Int()))
}
-func (c *int32Converter) GoValueOf(v pref.Value) reflect.Value {
+func (c *int32Converter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(int32(v.Int())).Convert(c.goType)
}
-func (c *int32Converter) IsValidPB(v pref.Value) bool {
+func (c *int32Converter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(int32)
return ok
}
func (c *int32Converter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *int32Converter) New() pref.Value { return c.def }
-func (c *int32Converter) Zero() pref.Value { return c.def }
+func (c *int32Converter) New() protoreflect.Value { return c.def }
+func (c *int32Converter) Zero() protoreflect.Value { return c.def }
type int64Converter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *int64Converter) PBValueOf(v reflect.Value) pref.Value {
+func (c *int64Converter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfInt64(int64(v.Int()))
+ return protoreflect.ValueOfInt64(int64(v.Int()))
}
-func (c *int64Converter) GoValueOf(v pref.Value) reflect.Value {
+func (c *int64Converter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(int64(v.Int())).Convert(c.goType)
}
-func (c *int64Converter) IsValidPB(v pref.Value) bool {
+func (c *int64Converter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(int64)
return ok
}
func (c *int64Converter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *int64Converter) New() pref.Value { return c.def }
-func (c *int64Converter) Zero() pref.Value { return c.def }
+func (c *int64Converter) New() protoreflect.Value { return c.def }
+func (c *int64Converter) Zero() protoreflect.Value { return c.def }
type uint32Converter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *uint32Converter) PBValueOf(v reflect.Value) pref.Value {
+func (c *uint32Converter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfUint32(uint32(v.Uint()))
+ return protoreflect.ValueOfUint32(uint32(v.Uint()))
}
-func (c *uint32Converter) GoValueOf(v pref.Value) reflect.Value {
+func (c *uint32Converter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(uint32(v.Uint())).Convert(c.goType)
}
-func (c *uint32Converter) IsValidPB(v pref.Value) bool {
+func (c *uint32Converter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(uint32)
return ok
}
func (c *uint32Converter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *uint32Converter) New() pref.Value { return c.def }
-func (c *uint32Converter) Zero() pref.Value { return c.def }
+func (c *uint32Converter) New() protoreflect.Value { return c.def }
+func (c *uint32Converter) Zero() protoreflect.Value { return c.def }
type uint64Converter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *uint64Converter) PBValueOf(v reflect.Value) pref.Value {
+func (c *uint64Converter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfUint64(uint64(v.Uint()))
+ return protoreflect.ValueOfUint64(uint64(v.Uint()))
}
-func (c *uint64Converter) GoValueOf(v pref.Value) reflect.Value {
+func (c *uint64Converter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(uint64(v.Uint())).Convert(c.goType)
}
-func (c *uint64Converter) IsValidPB(v pref.Value) bool {
+func (c *uint64Converter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(uint64)
return ok
}
func (c *uint64Converter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *uint64Converter) New() pref.Value { return c.def }
-func (c *uint64Converter) Zero() pref.Value { return c.def }
+func (c *uint64Converter) New() protoreflect.Value { return c.def }
+func (c *uint64Converter) Zero() protoreflect.Value { return c.def }
type float32Converter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *float32Converter) PBValueOf(v reflect.Value) pref.Value {
+func (c *float32Converter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfFloat32(float32(v.Float()))
+ return protoreflect.ValueOfFloat32(float32(v.Float()))
}
-func (c *float32Converter) GoValueOf(v pref.Value) reflect.Value {
+func (c *float32Converter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(float32(v.Float())).Convert(c.goType)
}
-func (c *float32Converter) IsValidPB(v pref.Value) bool {
+func (c *float32Converter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(float32)
return ok
}
func (c *float32Converter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *float32Converter) New() pref.Value { return c.def }
-func (c *float32Converter) Zero() pref.Value { return c.def }
+func (c *float32Converter) New() protoreflect.Value { return c.def }
+func (c *float32Converter) Zero() protoreflect.Value { return c.def }
type float64Converter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *float64Converter) PBValueOf(v reflect.Value) pref.Value {
+func (c *float64Converter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfFloat64(float64(v.Float()))
+ return protoreflect.ValueOfFloat64(float64(v.Float()))
}
-func (c *float64Converter) GoValueOf(v pref.Value) reflect.Value {
+func (c *float64Converter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(float64(v.Float())).Convert(c.goType)
}
-func (c *float64Converter) IsValidPB(v pref.Value) bool {
+func (c *float64Converter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(float64)
return ok
}
func (c *float64Converter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *float64Converter) New() pref.Value { return c.def }
-func (c *float64Converter) Zero() pref.Value { return c.def }
+func (c *float64Converter) New() protoreflect.Value { return c.def }
+func (c *float64Converter) Zero() protoreflect.Value { return c.def }
type stringConverter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *stringConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *stringConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfString(v.Convert(stringType).String())
+ return protoreflect.ValueOfString(v.Convert(stringType).String())
}
-func (c *stringConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *stringConverter) GoValueOf(v protoreflect.Value) reflect.Value {
// pref.Value.String never panics, so we go through an interface
// conversion here to check the type.
s := v.Interface().(string)
@@ -331,71 +330,71 @@ func (c *stringConverter) GoValueOf(v pref.Value) reflect.Value {
}
return reflect.ValueOf(s).Convert(c.goType)
}
-func (c *stringConverter) IsValidPB(v pref.Value) bool {
+func (c *stringConverter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().(string)
return ok
}
func (c *stringConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *stringConverter) New() pref.Value { return c.def }
-func (c *stringConverter) Zero() pref.Value { return c.def }
+func (c *stringConverter) New() protoreflect.Value { return c.def }
+func (c *stringConverter) Zero() protoreflect.Value { return c.def }
type bytesConverter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func (c *bytesConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *bytesConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
if c.goType.Kind() == reflect.String && v.Len() == 0 {
- return pref.ValueOfBytes(nil) // ensure empty string is []byte(nil)
+ return protoreflect.ValueOfBytes(nil) // ensure empty string is []byte(nil)
}
- return pref.ValueOfBytes(v.Convert(bytesType).Bytes())
+ return protoreflect.ValueOfBytes(v.Convert(bytesType).Bytes())
}
-func (c *bytesConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *bytesConverter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(v.Bytes()).Convert(c.goType)
}
-func (c *bytesConverter) IsValidPB(v pref.Value) bool {
+func (c *bytesConverter) IsValidPB(v protoreflect.Value) bool {
_, ok := v.Interface().([]byte)
return ok
}
func (c *bytesConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *bytesConverter) New() pref.Value { return c.def }
-func (c *bytesConverter) Zero() pref.Value { return c.def }
+func (c *bytesConverter) New() protoreflect.Value { return c.def }
+func (c *bytesConverter) Zero() protoreflect.Value { return c.def }
type enumConverter struct {
goType reflect.Type
- def pref.Value
+ def protoreflect.Value
}
-func newEnumConverter(goType reflect.Type, fd pref.FieldDescriptor) Converter {
- var def pref.Value
- if fd.Cardinality() == pref.Repeated {
- def = pref.ValueOfEnum(fd.Enum().Values().Get(0).Number())
+func newEnumConverter(goType reflect.Type, fd protoreflect.FieldDescriptor) Converter {
+ var def protoreflect.Value
+ if fd.Cardinality() == protoreflect.Repeated {
+ def = protoreflect.ValueOfEnum(fd.Enum().Values().Get(0).Number())
} else {
def = fd.Default()
}
return &enumConverter{goType, def}
}
-func (c *enumConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *enumConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfEnum(pref.EnumNumber(v.Int()))
+ return protoreflect.ValueOfEnum(protoreflect.EnumNumber(v.Int()))
}
-func (c *enumConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *enumConverter) GoValueOf(v protoreflect.Value) reflect.Value {
return reflect.ValueOf(v.Enum()).Convert(c.goType)
}
-func (c *enumConverter) IsValidPB(v pref.Value) bool {
- _, ok := v.Interface().(pref.EnumNumber)
+func (c *enumConverter) IsValidPB(v protoreflect.Value) bool {
+ _, ok := v.Interface().(protoreflect.EnumNumber)
return ok
}
@@ -403,11 +402,11 @@ func (c *enumConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *enumConverter) New() pref.Value {
+func (c *enumConverter) New() protoreflect.Value {
return c.def
}
-func (c *enumConverter) Zero() pref.Value {
+func (c *enumConverter) Zero() protoreflect.Value {
return c.def
}
@@ -419,7 +418,7 @@ func newMessageConverter(goType reflect.Type) Converter {
return &messageConverter{goType}
}
-func (c *messageConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *messageConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
@@ -430,13 +429,13 @@ func (c *messageConverter) PBValueOf(v reflect.Value) pref.Value {
v = reflect.Zero(reflect.PtrTo(v.Type()))
}
}
- if m, ok := v.Interface().(pref.ProtoMessage); ok {
- return pref.ValueOfMessage(m.ProtoReflect())
+ if m, ok := v.Interface().(protoreflect.ProtoMessage); ok {
+ return protoreflect.ValueOfMessage(m.ProtoReflect())
}
- return pref.ValueOfMessage(legacyWrapMessage(v))
+ return protoreflect.ValueOfMessage(legacyWrapMessage(v))
}
-func (c *messageConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *messageConverter) GoValueOf(v protoreflect.Value) reflect.Value {
m := v.Message()
var rv reflect.Value
if u, ok := m.(unwrapper); ok {
@@ -460,7 +459,7 @@ func (c *messageConverter) GoValueOf(v pref.Value) reflect.Value {
return rv
}
-func (c *messageConverter) IsValidPB(v pref.Value) bool {
+func (c *messageConverter) IsValidPB(v protoreflect.Value) bool {
m := v.Message()
var rv reflect.Value
if u, ok := m.(unwrapper); ok {
@@ -478,14 +477,14 @@ func (c *messageConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *messageConverter) New() pref.Value {
+func (c *messageConverter) New() protoreflect.Value {
if c.isNonPointer() {
return c.PBValueOf(reflect.New(c.goType).Elem())
}
return c.PBValueOf(reflect.New(c.goType.Elem()))
}
-func (c *messageConverter) Zero() pref.Value {
+func (c *messageConverter) Zero() protoreflect.Value {
return c.PBValueOf(reflect.Zero(c.goType))
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go
index 6fccab52..f8913651 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go
@@ -8,10 +8,10 @@ import (
"fmt"
"reflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
-func newListConverter(t reflect.Type, fd pref.FieldDescriptor) Converter {
+func newListConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter {
switch {
case t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Slice:
return &listPtrConverter{t, newSingularConverter(t.Elem().Elem(), fd)}
@@ -26,16 +26,16 @@ type listConverter struct {
c Converter
}
-func (c *listConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *listConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
pv := reflect.New(c.goType)
pv.Elem().Set(v)
- return pref.ValueOfList(&listReflect{pv, c.c})
+ return protoreflect.ValueOfList(&listReflect{pv, c.c})
}
-func (c *listConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *listConverter) GoValueOf(v protoreflect.Value) reflect.Value {
rv := v.List().(*listReflect).v
if rv.IsNil() {
return reflect.Zero(c.goType)
@@ -43,7 +43,7 @@ func (c *listConverter) GoValueOf(v pref.Value) reflect.Value {
return rv.Elem()
}
-func (c *listConverter) IsValidPB(v pref.Value) bool {
+func (c *listConverter) IsValidPB(v protoreflect.Value) bool {
list, ok := v.Interface().(*listReflect)
if !ok {
return false
@@ -55,12 +55,12 @@ func (c *listConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *listConverter) New() pref.Value {
- return pref.ValueOfList(&listReflect{reflect.New(c.goType), c.c})
+func (c *listConverter) New() protoreflect.Value {
+ return protoreflect.ValueOfList(&listReflect{reflect.New(c.goType), c.c})
}
-func (c *listConverter) Zero() pref.Value {
- return pref.ValueOfList(&listReflect{reflect.Zero(reflect.PtrTo(c.goType)), c.c})
+func (c *listConverter) Zero() protoreflect.Value {
+ return protoreflect.ValueOfList(&listReflect{reflect.Zero(reflect.PtrTo(c.goType)), c.c})
}
type listPtrConverter struct {
@@ -68,18 +68,18 @@ type listPtrConverter struct {
c Converter
}
-func (c *listPtrConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *listPtrConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfList(&listReflect{v, c.c})
+ return protoreflect.ValueOfList(&listReflect{v, c.c})
}
-func (c *listPtrConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *listPtrConverter) GoValueOf(v protoreflect.Value) reflect.Value {
return v.List().(*listReflect).v
}
-func (c *listPtrConverter) IsValidPB(v pref.Value) bool {
+func (c *listPtrConverter) IsValidPB(v protoreflect.Value) bool {
list, ok := v.Interface().(*listReflect)
if !ok {
return false
@@ -91,11 +91,11 @@ func (c *listPtrConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *listPtrConverter) New() pref.Value {
+func (c *listPtrConverter) New() protoreflect.Value {
return c.PBValueOf(reflect.New(c.goType.Elem()))
}
-func (c *listPtrConverter) Zero() pref.Value {
+func (c *listPtrConverter) Zero() protoreflect.Value {
return c.PBValueOf(reflect.Zero(c.goType))
}
@@ -110,16 +110,16 @@ func (ls *listReflect) Len() int {
}
return ls.v.Elem().Len()
}
-func (ls *listReflect) Get(i int) pref.Value {
+func (ls *listReflect) Get(i int) protoreflect.Value {
return ls.conv.PBValueOf(ls.v.Elem().Index(i))
}
-func (ls *listReflect) Set(i int, v pref.Value) {
+func (ls *listReflect) Set(i int, v protoreflect.Value) {
ls.v.Elem().Index(i).Set(ls.conv.GoValueOf(v))
}
-func (ls *listReflect) Append(v pref.Value) {
+func (ls *listReflect) Append(v protoreflect.Value) {
ls.v.Elem().Set(reflect.Append(ls.v.Elem(), ls.conv.GoValueOf(v)))
}
-func (ls *listReflect) AppendMutable() pref.Value {
+func (ls *listReflect) AppendMutable() protoreflect.Value {
if _, ok := ls.conv.(*messageConverter); !ok {
panic("invalid AppendMutable on list with non-message type")
}
@@ -130,7 +130,7 @@ func (ls *listReflect) AppendMutable() pref.Value {
func (ls *listReflect) Truncate(i int) {
ls.v.Elem().Set(ls.v.Elem().Slice(0, i))
}
-func (ls *listReflect) NewElement() pref.Value {
+func (ls *listReflect) NewElement() protoreflect.Value {
return ls.conv.New()
}
func (ls *listReflect) IsValid() bool {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go
index de06b259..f30b0a05 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go
@@ -8,7 +8,7 @@ import (
"fmt"
"reflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type mapConverter struct {
@@ -16,7 +16,7 @@ type mapConverter struct {
keyConv, valConv Converter
}
-func newMapConverter(t reflect.Type, fd pref.FieldDescriptor) *mapConverter {
+func newMapConverter(t reflect.Type, fd protoreflect.FieldDescriptor) *mapConverter {
if t.Kind() != reflect.Map {
panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName()))
}
@@ -27,18 +27,18 @@ func newMapConverter(t reflect.Type, fd pref.FieldDescriptor) *mapConverter {
}
}
-func (c *mapConverter) PBValueOf(v reflect.Value) pref.Value {
+func (c *mapConverter) PBValueOf(v reflect.Value) protoreflect.Value {
if v.Type() != c.goType {
panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType))
}
- return pref.ValueOfMap(&mapReflect{v, c.keyConv, c.valConv})
+ return protoreflect.ValueOfMap(&mapReflect{v, c.keyConv, c.valConv})
}
-func (c *mapConverter) GoValueOf(v pref.Value) reflect.Value {
+func (c *mapConverter) GoValueOf(v protoreflect.Value) reflect.Value {
return v.Map().(*mapReflect).v
}
-func (c *mapConverter) IsValidPB(v pref.Value) bool {
+func (c *mapConverter) IsValidPB(v protoreflect.Value) bool {
mapv, ok := v.Interface().(*mapReflect)
if !ok {
return false
@@ -50,11 +50,11 @@ func (c *mapConverter) IsValidGo(v reflect.Value) bool {
return v.IsValid() && v.Type() == c.goType
}
-func (c *mapConverter) New() pref.Value {
+func (c *mapConverter) New() protoreflect.Value {
return c.PBValueOf(reflect.MakeMap(c.goType))
}
-func (c *mapConverter) Zero() pref.Value {
+func (c *mapConverter) Zero() protoreflect.Value {
return c.PBValueOf(reflect.Zero(c.goType))
}
@@ -67,29 +67,29 @@ type mapReflect struct {
func (ms *mapReflect) Len() int {
return ms.v.Len()
}
-func (ms *mapReflect) Has(k pref.MapKey) bool {
+func (ms *mapReflect) Has(k protoreflect.MapKey) bool {
rk := ms.keyConv.GoValueOf(k.Value())
rv := ms.v.MapIndex(rk)
return rv.IsValid()
}
-func (ms *mapReflect) Get(k pref.MapKey) pref.Value {
+func (ms *mapReflect) Get(k protoreflect.MapKey) protoreflect.Value {
rk := ms.keyConv.GoValueOf(k.Value())
rv := ms.v.MapIndex(rk)
if !rv.IsValid() {
- return pref.Value{}
+ return protoreflect.Value{}
}
return ms.valConv.PBValueOf(rv)
}
-func (ms *mapReflect) Set(k pref.MapKey, v pref.Value) {
+func (ms *mapReflect) Set(k protoreflect.MapKey, v protoreflect.Value) {
rk := ms.keyConv.GoValueOf(k.Value())
rv := ms.valConv.GoValueOf(v)
ms.v.SetMapIndex(rk, rv)
}
-func (ms *mapReflect) Clear(k pref.MapKey) {
+func (ms *mapReflect) Clear(k protoreflect.MapKey) {
rk := ms.keyConv.GoValueOf(k.Value())
ms.v.SetMapIndex(rk, reflect.Value{})
}
-func (ms *mapReflect) Mutable(k pref.MapKey) pref.Value {
+func (ms *mapReflect) Mutable(k protoreflect.MapKey) protoreflect.Value {
if _, ok := ms.valConv.(*messageConverter); !ok {
panic("invalid Mutable on map with non-message value type")
}
@@ -100,7 +100,7 @@ func (ms *mapReflect) Mutable(k pref.MapKey) pref.Value {
}
return v
}
-func (ms *mapReflect) Range(f func(pref.MapKey, pref.Value) bool) {
+func (ms *mapReflect) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) {
iter := mapRange(ms.v)
for iter.Next() {
k := ms.keyConv.PBValueOf(iter.Key()).MapKey()
@@ -110,7 +110,7 @@ func (ms *mapReflect) Range(f func(pref.MapKey, pref.Value) bool) {
}
}
}
-func (ms *mapReflect) NewValue() pref.Value {
+func (ms *mapReflect) NewValue() protoreflect.Value {
return ms.valConv.New()
}
func (ms *mapReflect) IsValid() bool {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go
index 949dc49a..cda0520c 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/decode.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/decode.go
@@ -12,12 +12,12 @@ import (
"google.golang.org/protobuf/internal/flags"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/reflect/protoregistry"
"google.golang.org/protobuf/runtime/protoiface"
- piface "google.golang.org/protobuf/runtime/protoiface"
)
var errDecode = errors.New("cannot parse invalid wire-format data")
+var errRecursionDepth = errors.New("exceeded maximum recursion depth")
type unmarshalOptions struct {
flags protoiface.UnmarshalInputFlags
@@ -25,6 +25,7 @@ type unmarshalOptions struct {
FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
}
+ depth int
}
func (o unmarshalOptions) Options() proto.UnmarshalOptions {
@@ -36,14 +37,17 @@ func (o unmarshalOptions) Options() proto.UnmarshalOptions {
}
}
-func (o unmarshalOptions) DiscardUnknown() bool { return o.flags&piface.UnmarshalDiscardUnknown != 0 }
+func (o unmarshalOptions) DiscardUnknown() bool {
+ return o.flags&protoiface.UnmarshalDiscardUnknown != 0
+}
func (o unmarshalOptions) IsDefault() bool {
- return o.flags == 0 && o.resolver == preg.GlobalTypes
+ return o.flags == 0 && o.resolver == protoregistry.GlobalTypes
}
var lazyUnmarshalOptions = unmarshalOptions{
- resolver: preg.GlobalTypes,
+ resolver: protoregistry.GlobalTypes,
+ depth: protowire.DefaultRecursionLimit,
}
type unmarshalOutput struct {
@@ -52,7 +56,7 @@ type unmarshalOutput struct {
}
// unmarshal is protoreflect.Methods.Unmarshal.
-func (mi *MessageInfo) unmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutput, error) {
+func (mi *MessageInfo) unmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
var p pointer
if ms, ok := in.Message.(*messageState); ok {
p = ms.pointer()
@@ -62,12 +66,13 @@ func (mi *MessageInfo) unmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutp
out, err := mi.unmarshalPointer(in.Buf, p, 0, unmarshalOptions{
flags: in.Flags,
resolver: in.Resolver,
+ depth: in.Depth,
})
- var flags piface.UnmarshalOutputFlags
+ var flags protoiface.UnmarshalOutputFlags
if out.initialized {
- flags |= piface.UnmarshalInitialized
+ flags |= protoiface.UnmarshalInitialized
}
- return piface.UnmarshalOutput{
+ return protoiface.UnmarshalOutput{
Flags: flags,
}, err
}
@@ -82,6 +87,10 @@ var errUnknown = errors.New("unknown")
func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) {
mi.init()
+ opts.depth--
+ if opts.depth < 0 {
+ return out, errRecursionDepth
+ }
if flags.ProtoLegacy && mi.isMessageSet {
return unmarshalMessageSet(mi, b, p, opts)
}
@@ -202,7 +211,7 @@ func (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp p
var err error
xt, err = opts.resolver.FindExtensionByNumber(mi.Desc.FullName(), num)
if err != nil {
- if err == preg.NotFound {
+ if err == protoregistry.NotFound {
return out, errUnknown
}
return out, errors.New("%v: unable to resolve extension %v: %v", mi.Desc.FullName(), num, err)
diff --git a/vendor/google.golang.org/protobuf/internal/impl/enum.go b/vendor/google.golang.org/protobuf/internal/impl/enum.go
index 8c1eab4b..5f3ef5ad 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/enum.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/enum.go
@@ -7,15 +7,15 @@ package impl
import (
"reflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type EnumInfo struct {
GoReflectType reflect.Type // int32 kind
- Desc pref.EnumDescriptor
+ Desc protoreflect.EnumDescriptor
}
-func (t *EnumInfo) New(n pref.EnumNumber) pref.Enum {
- return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(pref.Enum)
+func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum {
+ return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum)
}
-func (t *EnumInfo) Descriptor() pref.EnumDescriptor { return t.Desc }
+func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc }
diff --git a/vendor/google.golang.org/protobuf/internal/impl/extension.go b/vendor/google.golang.org/protobuf/internal/impl/extension.go
index e904fd99..cb25b0ba 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/extension.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/extension.go
@@ -9,8 +9,8 @@ import (
"sync"
"sync/atomic"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/runtime/protoiface"
)
// ExtensionInfo implements ExtensionType.
@@ -45,7 +45,7 @@ type ExtensionInfo struct {
// since the message may no longer implement the MessageV1 interface.
//
// Deprecated: Use the ExtendedType method instead.
- ExtendedType piface.MessageV1
+ ExtendedType protoiface.MessageV1
// ExtensionType is the zero value of the extension type.
//
@@ -83,31 +83,31 @@ const (
extensionInfoFullInit = 2
)
-func InitExtensionInfo(xi *ExtensionInfo, xd pref.ExtensionDescriptor, goType reflect.Type) {
+func InitExtensionInfo(xi *ExtensionInfo, xd protoreflect.ExtensionDescriptor, goType reflect.Type) {
xi.goType = goType
xi.desc = extensionTypeDescriptor{xd, xi}
xi.init = extensionInfoDescInit
}
-func (xi *ExtensionInfo) New() pref.Value {
+func (xi *ExtensionInfo) New() protoreflect.Value {
return xi.lazyInit().New()
}
-func (xi *ExtensionInfo) Zero() pref.Value {
+func (xi *ExtensionInfo) Zero() protoreflect.Value {
return xi.lazyInit().Zero()
}
-func (xi *ExtensionInfo) ValueOf(v interface{}) pref.Value {
+func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value {
return xi.lazyInit().PBValueOf(reflect.ValueOf(v))
}
-func (xi *ExtensionInfo) InterfaceOf(v pref.Value) interface{} {
+func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} {
return xi.lazyInit().GoValueOf(v).Interface()
}
-func (xi *ExtensionInfo) IsValidValue(v pref.Value) bool {
+func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool {
return xi.lazyInit().IsValidPB(v)
}
func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool {
return xi.lazyInit().IsValidGo(reflect.ValueOf(v))
}
-func (xi *ExtensionInfo) TypeDescriptor() pref.ExtensionTypeDescriptor {
+func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor {
if atomic.LoadUint32(&xi.init) < extensionInfoDescInit {
xi.lazyInitSlow()
}
@@ -144,13 +144,13 @@ func (xi *ExtensionInfo) lazyInitSlow() {
}
type extensionTypeDescriptor struct {
- pref.ExtensionDescriptor
+ protoreflect.ExtensionDescriptor
xi *ExtensionInfo
}
-func (xtd *extensionTypeDescriptor) Type() pref.ExtensionType {
+func (xtd *extensionTypeDescriptor) Type() protoreflect.ExtensionType {
return xtd.xi
}
-func (xtd *extensionTypeDescriptor) Descriptor() pref.ExtensionDescriptor {
+func (xtd *extensionTypeDescriptor) Descriptor() protoreflect.ExtensionDescriptor {
return xtd.ExtensionDescriptor
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go
index f7d7ffb5..c2a803bb 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go
@@ -13,13 +13,12 @@ import (
"google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/internal/strs"
"google.golang.org/protobuf/reflect/protoreflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
)
// legacyEnumName returns the name of enums used in legacy code.
// It is neither the protobuf full name nor the qualified Go name,
// but rather an odd hybrid of both.
-func legacyEnumName(ed pref.EnumDescriptor) string {
+func legacyEnumName(ed protoreflect.EnumDescriptor) string {
var protoPkg string
enumName := string(ed.FullName())
if fd := ed.ParentFile(); fd != nil {
@@ -34,68 +33,68 @@ func legacyEnumName(ed pref.EnumDescriptor) string {
// legacyWrapEnum wraps v as a protoreflect.Enum,
// where v must be a int32 kind and not implement the v2 API already.
-func legacyWrapEnum(v reflect.Value) pref.Enum {
+func legacyWrapEnum(v reflect.Value) protoreflect.Enum {
et := legacyLoadEnumType(v.Type())
- return et.New(pref.EnumNumber(v.Int()))
+ return et.New(protoreflect.EnumNumber(v.Int()))
}
var legacyEnumTypeCache sync.Map // map[reflect.Type]protoreflect.EnumType
// legacyLoadEnumType dynamically loads a protoreflect.EnumType for t,
// where t must be an int32 kind and not implement the v2 API already.
-func legacyLoadEnumType(t reflect.Type) pref.EnumType {
+func legacyLoadEnumType(t reflect.Type) protoreflect.EnumType {
// Fast-path: check if a EnumType is cached for this concrete type.
if et, ok := legacyEnumTypeCache.Load(t); ok {
- return et.(pref.EnumType)
+ return et.(protoreflect.EnumType)
}
// Slow-path: derive enum descriptor and initialize EnumType.
- var et pref.EnumType
+ var et protoreflect.EnumType
ed := LegacyLoadEnumDesc(t)
et = &legacyEnumType{
desc: ed,
goType: t,
}
if et, ok := legacyEnumTypeCache.LoadOrStore(t, et); ok {
- return et.(pref.EnumType)
+ return et.(protoreflect.EnumType)
}
return et
}
type legacyEnumType struct {
- desc pref.EnumDescriptor
+ desc protoreflect.EnumDescriptor
goType reflect.Type
m sync.Map // map[protoreflect.EnumNumber]proto.Enum
}
-func (t *legacyEnumType) New(n pref.EnumNumber) pref.Enum {
+func (t *legacyEnumType) New(n protoreflect.EnumNumber) protoreflect.Enum {
if e, ok := t.m.Load(n); ok {
- return e.(pref.Enum)
+ return e.(protoreflect.Enum)
}
e := &legacyEnumWrapper{num: n, pbTyp: t, goTyp: t.goType}
t.m.Store(n, e)
return e
}
-func (t *legacyEnumType) Descriptor() pref.EnumDescriptor {
+func (t *legacyEnumType) Descriptor() protoreflect.EnumDescriptor {
return t.desc
}
type legacyEnumWrapper struct {
- num pref.EnumNumber
- pbTyp pref.EnumType
+ num protoreflect.EnumNumber
+ pbTyp protoreflect.EnumType
goTyp reflect.Type
}
-func (e *legacyEnumWrapper) Descriptor() pref.EnumDescriptor {
+func (e *legacyEnumWrapper) Descriptor() protoreflect.EnumDescriptor {
return e.pbTyp.Descriptor()
}
-func (e *legacyEnumWrapper) Type() pref.EnumType {
+func (e *legacyEnumWrapper) Type() protoreflect.EnumType {
return e.pbTyp
}
-func (e *legacyEnumWrapper) Number() pref.EnumNumber {
+func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber {
return e.num
}
-func (e *legacyEnumWrapper) ProtoReflect() pref.Enum {
+func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum {
return e
}
func (e *legacyEnumWrapper) protoUnwrap() interface{} {
@@ -105,8 +104,8 @@ func (e *legacyEnumWrapper) protoUnwrap() interface{} {
}
var (
- _ pref.Enum = (*legacyEnumWrapper)(nil)
- _ unwrapper = (*legacyEnumWrapper)(nil)
+ _ protoreflect.Enum = (*legacyEnumWrapper)(nil)
+ _ unwrapper = (*legacyEnumWrapper)(nil)
)
var legacyEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor
@@ -115,15 +114,15 @@ var legacyEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor
// which must be an int32 kind and not implement the v2 API already.
//
// This is exported for testing purposes.
-func LegacyLoadEnumDesc(t reflect.Type) pref.EnumDescriptor {
+func LegacyLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor {
// Fast-path: check if an EnumDescriptor is cached for this concrete type.
if ed, ok := legacyEnumDescCache.Load(t); ok {
- return ed.(pref.EnumDescriptor)
+ return ed.(protoreflect.EnumDescriptor)
}
// Slow-path: initialize EnumDescriptor from the raw descriptor.
ev := reflect.Zero(t).Interface()
- if _, ok := ev.(pref.Enum); ok {
+ if _, ok := ev.(protoreflect.Enum); ok {
panic(fmt.Sprintf("%v already implements proto.Enum", t))
}
edV1, ok := ev.(enumV1)
@@ -132,7 +131,7 @@ func LegacyLoadEnumDesc(t reflect.Type) pref.EnumDescriptor {
}
b, idxs := edV1.EnumDescriptor()
- var ed pref.EnumDescriptor
+ var ed protoreflect.EnumDescriptor
if len(idxs) == 1 {
ed = legacyLoadFileDesc(b).Enums().Get(idxs[0])
} else {
@@ -158,10 +157,10 @@ var aberrantEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescript
// We are unable to use the global enum registry since it is
// unfortunately keyed by the protobuf full name, which we also do not know.
// Thus, this produces some bogus enum descriptor based on the Go type name.
-func aberrantLoadEnumDesc(t reflect.Type) pref.EnumDescriptor {
+func aberrantLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor {
// Fast-path: check if an EnumDescriptor is cached for this concrete type.
if ed, ok := aberrantEnumDescCache.Load(t); ok {
- return ed.(pref.EnumDescriptor)
+ return ed.(protoreflect.EnumDescriptor)
}
// Slow-path: construct a bogus, but unique EnumDescriptor.
@@ -182,7 +181,7 @@ func aberrantLoadEnumDesc(t reflect.Type) pref.EnumDescriptor {
// An exhaustive query is clearly impractical, but can be best-effort.
if ed, ok := aberrantEnumDescCache.LoadOrStore(t, ed); ok {
- return ed.(pref.EnumDescriptor)
+ return ed.(protoreflect.EnumDescriptor)
}
return ed
}
@@ -192,7 +191,7 @@ func aberrantLoadEnumDesc(t reflect.Type) pref.EnumDescriptor {
// It should be sufficiently unique within a program.
//
// This is exported for testing purposes.
-func AberrantDeriveFullName(t reflect.Type) pref.FullName {
+func AberrantDeriveFullName(t reflect.Type) protoreflect.FullName {
sanitize := func(r rune) rune {
switch {
case r == '/':
@@ -215,5 +214,5 @@ func AberrantDeriveFullName(t reflect.Type) pref.FullName {
ss[i] = "x" + s
}
}
- return pref.FullName(strings.Join(ss, "."))
+ return protoreflect.FullName(strings.Join(ss, "."))
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go
index e3fb0b57..9b64ad5b 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go
@@ -12,21 +12,21 @@ import (
"reflect"
"google.golang.org/protobuf/internal/errors"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/runtime/protoiface"
)
// These functions exist to support exported APIs in generated protobufs.
// While these are deprecated, they cannot be removed for compatibility reasons.
// LegacyEnumName returns the name of enums used in legacy code.
-func (Export) LegacyEnumName(ed pref.EnumDescriptor) string {
+func (Export) LegacyEnumName(ed protoreflect.EnumDescriptor) string {
return legacyEnumName(ed)
}
// LegacyMessageTypeOf returns the protoreflect.MessageType for m,
// with name used as the message name if necessary.
-func (Export) LegacyMessageTypeOf(m piface.MessageV1, name pref.FullName) pref.MessageType {
+func (Export) LegacyMessageTypeOf(m protoiface.MessageV1, name protoreflect.FullName) protoreflect.MessageType {
if mv := (Export{}).protoMessageV2Of(m); mv != nil {
return mv.ProtoReflect().Type()
}
@@ -36,9 +36,9 @@ func (Export) LegacyMessageTypeOf(m piface.MessageV1, name pref.FullName) pref.M
// UnmarshalJSONEnum unmarshals an enum from a JSON-encoded input.
// The input can either be a string representing the enum value by name,
// or a number representing the enum number itself.
-func (Export) UnmarshalJSONEnum(ed pref.EnumDescriptor, b []byte) (pref.EnumNumber, error) {
+func (Export) UnmarshalJSONEnum(ed protoreflect.EnumDescriptor, b []byte) (protoreflect.EnumNumber, error) {
if b[0] == '"' {
- var name pref.Name
+ var name protoreflect.Name
if err := json.Unmarshal(b, &name); err != nil {
return 0, errors.New("invalid input for enum %v: %s", ed.FullName(), b)
}
@@ -48,7 +48,7 @@ func (Export) UnmarshalJSONEnum(ed pref.EnumDescriptor, b []byte) (pref.EnumNumb
}
return ev.Number(), nil
} else {
- var num pref.EnumNumber
+ var num protoreflect.EnumNumber
if err := json.Unmarshal(b, &num); err != nil {
return 0, errors.New("invalid input for enum %v: %s", ed.FullName(), b)
}
@@ -81,8 +81,8 @@ func (Export) CompressGZIP(in []byte) (out []byte) {
blockHeader[0] = 0x01 // final bit per RFC 1951, section 3.2.3.
blockSize = len(in)
}
- binary.LittleEndian.PutUint16(blockHeader[1:3], uint16(blockSize)^0x0000)
- binary.LittleEndian.PutUint16(blockHeader[3:5], uint16(blockSize)^0xffff)
+ binary.LittleEndian.PutUint16(blockHeader[1:3], uint16(blockSize))
+ binary.LittleEndian.PutUint16(blockHeader[3:5], ^uint16(blockSize))
out = append(out, blockHeader[:]...)
out = append(out, in[:blockSize]...)
in = in[blockSize:]
diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go
index 49e72316..87b30d05 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go
@@ -12,16 +12,16 @@ import (
ptag "google.golang.org/protobuf/internal/encoding/tag"
"google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/internal/pragma"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/runtime/protoiface"
)
func (xi *ExtensionInfo) initToLegacy() {
xd := xi.desc
- var parent piface.MessageV1
+ var parent protoiface.MessageV1
messageName := xd.ContainingMessage().FullName()
- if mt, _ := preg.GlobalTypes.FindMessageByName(messageName); mt != nil {
+ if mt, _ := protoregistry.GlobalTypes.FindMessageByName(messageName); mt != nil {
// Create a new parent message and unwrap it if possible.
mv := mt.New().Interface()
t := reflect.TypeOf(mv)
@@ -31,7 +31,7 @@ func (xi *ExtensionInfo) initToLegacy() {
// Check whether the message implements the legacy v1 Message interface.
mz := reflect.Zero(t).Interface()
- if mz, ok := mz.(piface.MessageV1); ok {
+ if mz, ok := mz.(protoiface.MessageV1); ok {
parent = mz
}
}
@@ -46,7 +46,7 @@ func (xi *ExtensionInfo) initToLegacy() {
// Reconstruct the legacy enum full name.
var enumName string
- if xd.Kind() == pref.EnumKind {
+ if xd.Kind() == protoreflect.EnumKind {
enumName = legacyEnumName(xd.Enum())
}
@@ -77,16 +77,16 @@ func (xi *ExtensionInfo) initFromLegacy() {
// field number is specified. In such a case, use a placeholder.
if xi.ExtendedType == nil || xi.ExtensionType == nil {
xd := placeholderExtension{
- name: pref.FullName(xi.Name),
- number: pref.FieldNumber(xi.Field),
+ name: protoreflect.FullName(xi.Name),
+ number: protoreflect.FieldNumber(xi.Field),
}
xi.desc = extensionTypeDescriptor{xd, xi}
return
}
// Resolve enum or message dependencies.
- var ed pref.EnumDescriptor
- var md pref.MessageDescriptor
+ var ed protoreflect.EnumDescriptor
+ var md protoreflect.MessageDescriptor
t := reflect.TypeOf(xi.ExtensionType)
isOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct
isRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
@@ -94,18 +94,18 @@ func (xi *ExtensionInfo) initFromLegacy() {
t = t.Elem()
}
switch v := reflect.Zero(t).Interface().(type) {
- case pref.Enum:
+ case protoreflect.Enum:
ed = v.Descriptor()
case enumV1:
ed = LegacyLoadEnumDesc(t)
- case pref.ProtoMessage:
+ case protoreflect.ProtoMessage:
md = v.ProtoReflect().Descriptor()
case messageV1:
md = LegacyLoadMessageDesc(t)
}
// Derive basic field information from the struct tag.
- var evs pref.EnumValueDescriptors
+ var evs protoreflect.EnumValueDescriptors
if ed != nil {
evs = ed.Values()
}
@@ -114,8 +114,8 @@ func (xi *ExtensionInfo) initFromLegacy() {
// Construct a v2 ExtensionType.
xd := &filedesc.Extension{L2: new(filedesc.ExtensionL2)}
xd.L0.ParentFile = filedesc.SurrogateProto2
- xd.L0.FullName = pref.FullName(xi.Name)
- xd.L1.Number = pref.FieldNumber(xi.Field)
+ xd.L0.FullName = protoreflect.FullName(xi.Name)
+ xd.L1.Number = protoreflect.FieldNumber(xi.Field)
xd.L1.Cardinality = fd.L1.Cardinality
xd.L1.Kind = fd.L1.Kind
xd.L2.IsPacked = fd.L1.IsPacked
@@ -138,39 +138,39 @@ func (xi *ExtensionInfo) initFromLegacy() {
}
type placeholderExtension struct {
- name pref.FullName
- number pref.FieldNumber
+ name protoreflect.FullName
+ number protoreflect.FieldNumber
}
-func (x placeholderExtension) ParentFile() pref.FileDescriptor { return nil }
-func (x placeholderExtension) Parent() pref.Descriptor { return nil }
-func (x placeholderExtension) Index() int { return 0 }
-func (x placeholderExtension) Syntax() pref.Syntax { return 0 }
-func (x placeholderExtension) Name() pref.Name { return x.name.Name() }
-func (x placeholderExtension) FullName() pref.FullName { return x.name }
-func (x placeholderExtension) IsPlaceholder() bool { return true }
-func (x placeholderExtension) Options() pref.ProtoMessage { return descopts.Field }
-func (x placeholderExtension) Number() pref.FieldNumber { return x.number }
-func (x placeholderExtension) Cardinality() pref.Cardinality { return 0 }
-func (x placeholderExtension) Kind() pref.Kind { return 0 }
-func (x placeholderExtension) HasJSONName() bool { return false }
-func (x placeholderExtension) JSONName() string { return "[" + string(x.name) + "]" }
-func (x placeholderExtension) TextName() string { return "[" + string(x.name) + "]" }
-func (x placeholderExtension) HasPresence() bool { return false }
-func (x placeholderExtension) HasOptionalKeyword() bool { return false }
-func (x placeholderExtension) IsExtension() bool { return true }
-func (x placeholderExtension) IsWeak() bool { return false }
-func (x placeholderExtension) IsPacked() bool { return false }
-func (x placeholderExtension) IsList() bool { return false }
-func (x placeholderExtension) IsMap() bool { return false }
-func (x placeholderExtension) MapKey() pref.FieldDescriptor { return nil }
-func (x placeholderExtension) MapValue() pref.FieldDescriptor { return nil }
-func (x placeholderExtension) HasDefault() bool { return false }
-func (x placeholderExtension) Default() pref.Value { return pref.Value{} }
-func (x placeholderExtension) DefaultEnumValue() pref.EnumValueDescriptor { return nil }
-func (x placeholderExtension) ContainingOneof() pref.OneofDescriptor { return nil }
-func (x placeholderExtension) ContainingMessage() pref.MessageDescriptor { return nil }
-func (x placeholderExtension) Enum() pref.EnumDescriptor { return nil }
-func (x placeholderExtension) Message() pref.MessageDescriptor { return nil }
-func (x placeholderExtension) ProtoType(pref.FieldDescriptor) { return }
-func (x placeholderExtension) ProtoInternal(pragma.DoNotImplement) { return }
+func (x placeholderExtension) ParentFile() protoreflect.FileDescriptor { return nil }
+func (x placeholderExtension) Parent() protoreflect.Descriptor { return nil }
+func (x placeholderExtension) Index() int { return 0 }
+func (x placeholderExtension) Syntax() protoreflect.Syntax { return 0 }
+func (x placeholderExtension) Name() protoreflect.Name { return x.name.Name() }
+func (x placeholderExtension) FullName() protoreflect.FullName { return x.name }
+func (x placeholderExtension) IsPlaceholder() bool { return true }
+func (x placeholderExtension) Options() protoreflect.ProtoMessage { return descopts.Field }
+func (x placeholderExtension) Number() protoreflect.FieldNumber { return x.number }
+func (x placeholderExtension) Cardinality() protoreflect.Cardinality { return 0 }
+func (x placeholderExtension) Kind() protoreflect.Kind { return 0 }
+func (x placeholderExtension) HasJSONName() bool { return false }
+func (x placeholderExtension) JSONName() string { return "[" + string(x.name) + "]" }
+func (x placeholderExtension) TextName() string { return "[" + string(x.name) + "]" }
+func (x placeholderExtension) HasPresence() bool { return false }
+func (x placeholderExtension) HasOptionalKeyword() bool { return false }
+func (x placeholderExtension) IsExtension() bool { return true }
+func (x placeholderExtension) IsWeak() bool { return false }
+func (x placeholderExtension) IsPacked() bool { return false }
+func (x placeholderExtension) IsList() bool { return false }
+func (x placeholderExtension) IsMap() bool { return false }
+func (x placeholderExtension) MapKey() protoreflect.FieldDescriptor { return nil }
+func (x placeholderExtension) MapValue() protoreflect.FieldDescriptor { return nil }
+func (x placeholderExtension) HasDefault() bool { return false }
+func (x placeholderExtension) Default() protoreflect.Value { return protoreflect.Value{} }
+func (x placeholderExtension) DefaultEnumValue() protoreflect.EnumValueDescriptor { return nil }
+func (x placeholderExtension) ContainingOneof() protoreflect.OneofDescriptor { return nil }
+func (x placeholderExtension) ContainingMessage() protoreflect.MessageDescriptor { return nil }
+func (x placeholderExtension) Enum() protoreflect.EnumDescriptor { return nil }
+func (x placeholderExtension) Message() protoreflect.MessageDescriptor { return nil }
+func (x placeholderExtension) ProtoType(protoreflect.FieldDescriptor) { return }
+func (x placeholderExtension) ProtoInternal(pragma.DoNotImplement) { return }
diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
index 029feeef..2ab2c629 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
@@ -16,14 +16,12 @@ import (
"google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/internal/strs"
"google.golang.org/protobuf/reflect/protoreflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoiface"
- piface "google.golang.org/protobuf/runtime/protoiface"
)
// legacyWrapMessage wraps v as a protoreflect.Message,
// where v must be a *struct kind and not implement the v2 API already.
-func legacyWrapMessage(v reflect.Value) pref.Message {
+func legacyWrapMessage(v reflect.Value) protoreflect.Message {
t := v.Type()
if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {
return aberrantMessage{v: v}
@@ -35,7 +33,7 @@ func legacyWrapMessage(v reflect.Value) pref.Message {
// legacyLoadMessageType dynamically loads a protoreflect.Type for t,
// where t must be not implement the v2 API already.
// The provided name is used if it cannot be determined from the message.
-func legacyLoadMessageType(t reflect.Type, name pref.FullName) protoreflect.MessageType {
+func legacyLoadMessageType(t reflect.Type, name protoreflect.FullName) protoreflect.MessageType {
if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {
return aberrantMessageType{t}
}
@@ -47,7 +45,7 @@ var legacyMessageTypeCache sync.Map // map[reflect.Type]*MessageInfo
// legacyLoadMessageInfo dynamically loads a *MessageInfo for t,
// where t must be a *struct kind and not implement the v2 API already.
// The provided name is used if it cannot be determined from the message.
-func legacyLoadMessageInfo(t reflect.Type, name pref.FullName) *MessageInfo {
+func legacyLoadMessageInfo(t reflect.Type, name protoreflect.FullName) *MessageInfo {
// Fast-path: check if a MessageInfo is cached for this concrete type.
if mt, ok := legacyMessageTypeCache.Load(t); ok {
return mt.(*MessageInfo)
@@ -68,7 +66,7 @@ func legacyLoadMessageInfo(t reflect.Type, name pref.FullName) *MessageInfo {
// supports deterministic serialization or not, but this
// preserves the v1 implementation's behavior of always
// calling Marshal methods when present.
- mi.methods.Flags |= piface.SupportMarshalDeterministic
+ mi.methods.Flags |= protoiface.SupportMarshalDeterministic
}
if _, hasUnmarshal = v.(legacyUnmarshaler); hasUnmarshal {
mi.methods.Unmarshal = legacyUnmarshal
@@ -89,18 +87,18 @@ var legacyMessageDescCache sync.Map // map[reflect.Type]protoreflect.MessageDesc
// which should be a *struct kind and must not implement the v2 API already.
//
// This is exported for testing purposes.
-func LegacyLoadMessageDesc(t reflect.Type) pref.MessageDescriptor {
+func LegacyLoadMessageDesc(t reflect.Type) protoreflect.MessageDescriptor {
return legacyLoadMessageDesc(t, "")
}
-func legacyLoadMessageDesc(t reflect.Type, name pref.FullName) pref.MessageDescriptor {
+func legacyLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor {
// Fast-path: check if a MessageDescriptor is cached for this concrete type.
if mi, ok := legacyMessageDescCache.Load(t); ok {
- return mi.(pref.MessageDescriptor)
+ return mi.(protoreflect.MessageDescriptor)
}
// Slow-path: initialize MessageDescriptor from the raw descriptor.
mv := reflect.Zero(t).Interface()
- if _, ok := mv.(pref.ProtoMessage); ok {
+ if _, ok := mv.(protoreflect.ProtoMessage); ok {
panic(fmt.Sprintf("%v already implements proto.Message", t))
}
mdV1, ok := mv.(messageV1)
@@ -164,7 +162,7 @@ var (
//
// This is a best-effort derivation of the message descriptor using the protobuf
// tags on the struct fields.
-func aberrantLoadMessageDesc(t reflect.Type, name pref.FullName) pref.MessageDescriptor {
+func aberrantLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor {
aberrantMessageDescLock.Lock()
defer aberrantMessageDescLock.Unlock()
if aberrantMessageDescCache == nil {
@@ -172,7 +170,7 @@ func aberrantLoadMessageDesc(t reflect.Type, name pref.FullName) pref.MessageDes
}
return aberrantLoadMessageDescReentrant(t, name)
}
-func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.MessageDescriptor {
+func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor {
// Fast-path: check if an MessageDescriptor is cached for this concrete type.
if md, ok := aberrantMessageDescCache[t]; ok {
return md
@@ -208,13 +206,18 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.M
// Obtain a list of oneof wrapper types.
var oneofWrappers []reflect.Type
- for _, method := range []string{"XXX_OneofFuncs", "XXX_OneofWrappers"} {
- if fn, ok := t.MethodByName(method); ok {
- for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
- if vs, ok := v.Interface().([]interface{}); ok {
- for _, v := range vs {
- oneofWrappers = append(oneofWrappers, reflect.TypeOf(v))
- }
+ methods := make([]reflect.Method, 0, 2)
+ if m, ok := t.MethodByName("XXX_OneofFuncs"); ok {
+ methods = append(methods, m)
+ }
+ if m, ok := t.MethodByName("XXX_OneofWrappers"); ok {
+ methods = append(methods, m)
+ }
+ for _, fn := range methods {
+ for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
+ if vs, ok := v.Interface().([]interface{}); ok {
+ for _, v := range vs {
+ oneofWrappers = append(oneofWrappers, reflect.TypeOf(v))
}
}
}
@@ -225,9 +228,9 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.M
vs := fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0]
for i := 0; i < vs.Len(); i++ {
v := vs.Index(i)
- md.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, [2]pref.FieldNumber{
- pref.FieldNumber(v.FieldByName("Start").Int()),
- pref.FieldNumber(v.FieldByName("End").Int() + 1),
+ md.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{
+ protoreflect.FieldNumber(v.FieldByName("Start").Int()),
+ protoreflect.FieldNumber(v.FieldByName("End").Int() + 1),
})
md.L2.ExtensionRangeOptions = append(md.L2.ExtensionRangeOptions, nil)
}
@@ -245,7 +248,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.M
n := len(md.L2.Oneofs.List)
md.L2.Oneofs.List = append(md.L2.Oneofs.List, filedesc.Oneof{})
od := &md.L2.Oneofs.List[n]
- od.L0.FullName = md.FullName().Append(pref.Name(tag))
+ od.L0.FullName = md.FullName().Append(protoreflect.Name(tag))
od.L0.ParentFile = md.L0.ParentFile
od.L0.Parent = md
od.L0.Index = n
@@ -267,14 +270,14 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.M
return md
}
-func aberrantDeriveMessageName(t reflect.Type, name pref.FullName) pref.FullName {
+func aberrantDeriveMessageName(t reflect.Type, name protoreflect.FullName) protoreflect.FullName {
if name.IsValid() {
return name
}
func() {
defer func() { recover() }() // swallow possible nil panics
if m, ok := reflect.Zero(t).Interface().(interface{ XXX_MessageName() string }); ok {
- name = pref.FullName(m.XXX_MessageName())
+ name = protoreflect.FullName(m.XXX_MessageName())
}
}()
if name.IsValid() {
@@ -305,7 +308,7 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey,
fd.L0.Index = n
if fd.L1.IsWeak || fd.L1.HasPacked {
- fd.L1.Options = func() pref.ProtoMessage {
+ fd.L1.Options = func() protoreflect.ProtoMessage {
opts := descopts.Field.ProtoReflect().New()
if fd.L1.IsWeak {
opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true))
@@ -318,17 +321,17 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey,
}
// Populate Enum and Message.
- if fd.Enum() == nil && fd.Kind() == pref.EnumKind {
+ if fd.Enum() == nil && fd.Kind() == protoreflect.EnumKind {
switch v := reflect.Zero(t).Interface().(type) {
- case pref.Enum:
+ case protoreflect.Enum:
fd.L1.Enum = v.Descriptor()
default:
fd.L1.Enum = LegacyLoadEnumDesc(t)
}
}
- if fd.Message() == nil && (fd.Kind() == pref.MessageKind || fd.Kind() == pref.GroupKind) {
+ if fd.Message() == nil && (fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind) {
switch v := reflect.Zero(t).Interface().(type) {
- case pref.ProtoMessage:
+ case protoreflect.ProtoMessage:
fd.L1.Message = v.ProtoReflect().Descriptor()
case messageV1:
fd.L1.Message = LegacyLoadMessageDesc(t)
@@ -337,13 +340,13 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey,
n := len(md.L1.Messages.List)
md.L1.Messages.List = append(md.L1.Messages.List, filedesc.Message{L2: new(filedesc.MessageL2)})
md2 := &md.L1.Messages.List[n]
- md2.L0.FullName = md.FullName().Append(pref.Name(strs.MapEntryName(string(fd.Name()))))
+ md2.L0.FullName = md.FullName().Append(protoreflect.Name(strs.MapEntryName(string(fd.Name()))))
md2.L0.ParentFile = md.L0.ParentFile
md2.L0.Parent = md
md2.L0.Index = n
md2.L1.IsMapEntry = true
- md2.L2.Options = func() pref.ProtoMessage {
+ md2.L2.Options = func() protoreflect.ProtoMessage {
opts := descopts.Message.ProtoReflect().New()
opts.Set(opts.Descriptor().Fields().ByName("map_entry"), protoreflect.ValueOfBool(true))
return opts.Interface()
@@ -364,8 +367,8 @@ type placeholderEnumValues struct {
protoreflect.EnumValueDescriptors
}
-func (placeholderEnumValues) ByNumber(n pref.EnumNumber) pref.EnumValueDescriptor {
- return filedesc.PlaceholderEnumValue(pref.FullName(fmt.Sprintf("UNKNOWN_%d", n)))
+func (placeholderEnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor {
+ return filedesc.PlaceholderEnumValue(protoreflect.FullName(fmt.Sprintf("UNKNOWN_%d", n)))
}
// legacyMarshaler is the proto.Marshaler interface superseded by protoiface.Methoder.
@@ -383,7 +386,7 @@ type legacyMerger interface {
Merge(protoiface.MessageV1)
}
-var aberrantProtoMethods = &piface.Methods{
+var aberrantProtoMethods = &protoiface.Methods{
Marshal: legacyMarshal,
Unmarshal: legacyUnmarshal,
Merge: legacyMerge,
@@ -392,40 +395,40 @@ var aberrantProtoMethods = &piface.Methods{
// supports deterministic serialization or not, but this
// preserves the v1 implementation's behavior of always
// calling Marshal methods when present.
- Flags: piface.SupportMarshalDeterministic,
+ Flags: protoiface.SupportMarshalDeterministic,
}
-func legacyMarshal(in piface.MarshalInput) (piface.MarshalOutput, error) {
+func legacyMarshal(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
v := in.Message.(unwrapper).protoUnwrap()
marshaler, ok := v.(legacyMarshaler)
if !ok {
- return piface.MarshalOutput{}, errors.New("%T does not implement Marshal", v)
+ return protoiface.MarshalOutput{}, errors.New("%T does not implement Marshal", v)
}
out, err := marshaler.Marshal()
if in.Buf != nil {
out = append(in.Buf, out...)
}
- return piface.MarshalOutput{
+ return protoiface.MarshalOutput{
Buf: out,
}, err
}
-func legacyUnmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutput, error) {
+func legacyUnmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
v := in.Message.(unwrapper).protoUnwrap()
unmarshaler, ok := v.(legacyUnmarshaler)
if !ok {
- return piface.UnmarshalOutput{}, errors.New("%T does not implement Unmarshal", v)
+ return protoiface.UnmarshalOutput{}, errors.New("%T does not implement Unmarshal", v)
}
- return piface.UnmarshalOutput{}, unmarshaler.Unmarshal(in.Buf)
+ return protoiface.UnmarshalOutput{}, unmarshaler.Unmarshal(in.Buf)
}
-func legacyMerge(in piface.MergeInput) piface.MergeOutput {
+func legacyMerge(in protoiface.MergeInput) protoiface.MergeOutput {
// Check whether this supports the legacy merger.
dstv := in.Destination.(unwrapper).protoUnwrap()
merger, ok := dstv.(legacyMerger)
if ok {
merger.Merge(Export{}.ProtoMessageV1Of(in.Source))
- return piface.MergeOutput{Flags: piface.MergeComplete}
+ return protoiface.MergeOutput{Flags: protoiface.MergeComplete}
}
// If legacy merger is unavailable, implement merge in terms of
@@ -433,29 +436,29 @@ func legacyMerge(in piface.MergeInput) piface.MergeOutput {
srcv := in.Source.(unwrapper).protoUnwrap()
marshaler, ok := srcv.(legacyMarshaler)
if !ok {
- return piface.MergeOutput{}
+ return protoiface.MergeOutput{}
}
dstv = in.Destination.(unwrapper).protoUnwrap()
unmarshaler, ok := dstv.(legacyUnmarshaler)
if !ok {
- return piface.MergeOutput{}
+ return protoiface.MergeOutput{}
}
if !in.Source.IsValid() {
// Legacy Marshal methods may not function on nil messages.
// Check for a typed nil source only after we confirm that
// legacy Marshal/Unmarshal methods are present, for
// consistency.
- return piface.MergeOutput{Flags: piface.MergeComplete}
+ return protoiface.MergeOutput{Flags: protoiface.MergeComplete}
}
b, err := marshaler.Marshal()
if err != nil {
- return piface.MergeOutput{}
+ return protoiface.MergeOutput{}
}
err = unmarshaler.Unmarshal(b)
if err != nil {
- return piface.MergeOutput{}
+ return protoiface.MergeOutput{}
}
- return piface.MergeOutput{Flags: piface.MergeComplete}
+ return protoiface.MergeOutput{Flags: protoiface.MergeComplete}
}
// aberrantMessageType implements MessageType for all types other than pointer-to-struct.
@@ -463,19 +466,19 @@ type aberrantMessageType struct {
t reflect.Type
}
-func (mt aberrantMessageType) New() pref.Message {
+func (mt aberrantMessageType) New() protoreflect.Message {
if mt.t.Kind() == reflect.Ptr {
return aberrantMessage{reflect.New(mt.t.Elem())}
}
return aberrantMessage{reflect.Zero(mt.t)}
}
-func (mt aberrantMessageType) Zero() pref.Message {
+func (mt aberrantMessageType) Zero() protoreflect.Message {
return aberrantMessage{reflect.Zero(mt.t)}
}
func (mt aberrantMessageType) GoType() reflect.Type {
return mt.t
}
-func (mt aberrantMessageType) Descriptor() pref.MessageDescriptor {
+func (mt aberrantMessageType) Descriptor() protoreflect.MessageDescriptor {
return LegacyLoadMessageDesc(mt.t)
}
@@ -499,56 +502,56 @@ func (m aberrantMessage) Reset() {
}
}
-func (m aberrantMessage) ProtoReflect() pref.Message {
+func (m aberrantMessage) ProtoReflect() protoreflect.Message {
return m
}
-func (m aberrantMessage) Descriptor() pref.MessageDescriptor {
+func (m aberrantMessage) Descriptor() protoreflect.MessageDescriptor {
return LegacyLoadMessageDesc(m.v.Type())
}
-func (m aberrantMessage) Type() pref.MessageType {
+func (m aberrantMessage) Type() protoreflect.MessageType {
return aberrantMessageType{m.v.Type()}
}
-func (m aberrantMessage) New() pref.Message {
+func (m aberrantMessage) New() protoreflect.Message {
if m.v.Type().Kind() == reflect.Ptr {
return aberrantMessage{reflect.New(m.v.Type().Elem())}
}
return aberrantMessage{reflect.Zero(m.v.Type())}
}
-func (m aberrantMessage) Interface() pref.ProtoMessage {
+func (m aberrantMessage) Interface() protoreflect.ProtoMessage {
return m
}
-func (m aberrantMessage) Range(f func(pref.FieldDescriptor, pref.Value) bool) {
+func (m aberrantMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
return
}
-func (m aberrantMessage) Has(pref.FieldDescriptor) bool {
+func (m aberrantMessage) Has(protoreflect.FieldDescriptor) bool {
return false
}
-func (m aberrantMessage) Clear(pref.FieldDescriptor) {
+func (m aberrantMessage) Clear(protoreflect.FieldDescriptor) {
panic("invalid Message.Clear on " + string(m.Descriptor().FullName()))
}
-func (m aberrantMessage) Get(fd pref.FieldDescriptor) pref.Value {
+func (m aberrantMessage) Get(fd protoreflect.FieldDescriptor) protoreflect.Value {
if fd.Default().IsValid() {
return fd.Default()
}
panic("invalid Message.Get on " + string(m.Descriptor().FullName()))
}
-func (m aberrantMessage) Set(pref.FieldDescriptor, pref.Value) {
+func (m aberrantMessage) Set(protoreflect.FieldDescriptor, protoreflect.Value) {
panic("invalid Message.Set on " + string(m.Descriptor().FullName()))
}
-func (m aberrantMessage) Mutable(pref.FieldDescriptor) pref.Value {
+func (m aberrantMessage) Mutable(protoreflect.FieldDescriptor) protoreflect.Value {
panic("invalid Message.Mutable on " + string(m.Descriptor().FullName()))
}
-func (m aberrantMessage) NewField(pref.FieldDescriptor) pref.Value {
+func (m aberrantMessage) NewField(protoreflect.FieldDescriptor) protoreflect.Value {
panic("invalid Message.NewField on " + string(m.Descriptor().FullName()))
}
-func (m aberrantMessage) WhichOneof(pref.OneofDescriptor) pref.FieldDescriptor {
+func (m aberrantMessage) WhichOneof(protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
panic("invalid Message.WhichOneof descriptor on " + string(m.Descriptor().FullName()))
}
-func (m aberrantMessage) GetUnknown() pref.RawFields {
+func (m aberrantMessage) GetUnknown() protoreflect.RawFields {
return nil
}
-func (m aberrantMessage) SetUnknown(pref.RawFields) {
+func (m aberrantMessage) SetUnknown(protoreflect.RawFields) {
// SetUnknown discards its input on messages which don't support unknown field storage.
}
func (m aberrantMessage) IsValid() bool {
@@ -557,7 +560,7 @@ func (m aberrantMessage) IsValid() bool {
}
return false
}
-func (m aberrantMessage) ProtoMethods() *piface.Methods {
+func (m aberrantMessage) ProtoMethods() *protoiface.Methods {
return aberrantProtoMethods
}
func (m aberrantMessage) protoUnwrap() interface{} {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/merge.go b/vendor/google.golang.org/protobuf/internal/impl/merge.go
index c65bbc04..7e65f64f 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/merge.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/merge.go
@@ -9,8 +9,8 @@ import (
"reflect"
"google.golang.org/protobuf/proto"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/runtime/protoiface"
)
type mergeOptions struct{}
@@ -20,17 +20,17 @@ func (o mergeOptions) Merge(dst, src proto.Message) {
}
// merge is protoreflect.Methods.Merge.
-func (mi *MessageInfo) merge(in piface.MergeInput) piface.MergeOutput {
+func (mi *MessageInfo) merge(in protoiface.MergeInput) protoiface.MergeOutput {
dp, ok := mi.getPointer(in.Destination)
if !ok {
- return piface.MergeOutput{}
+ return protoiface.MergeOutput{}
}
sp, ok := mi.getPointer(in.Source)
if !ok {
- return piface.MergeOutput{}
+ return protoiface.MergeOutput{}
}
mi.mergePointer(dp, sp, mergeOptions{})
- return piface.MergeOutput{Flags: piface.MergeComplete}
+ return protoiface.MergeOutput{Flags: protoiface.MergeComplete}
}
func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) {
@@ -64,7 +64,7 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) {
continue
}
dx := (*dext)[num]
- var dv pref.Value
+ var dv protoreflect.Value
if dx.Type() == sx.Type() {
dv = dx.Value()
}
@@ -85,15 +85,15 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) {
}
}
-func mergeScalarValue(dst, src pref.Value, opts mergeOptions) pref.Value {
+func mergeScalarValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
return src
}
-func mergeBytesValue(dst, src pref.Value, opts mergeOptions) pref.Value {
- return pref.ValueOfBytes(append(emptyBuf[:], src.Bytes()...))
+func mergeBytesValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
+ return protoreflect.ValueOfBytes(append(emptyBuf[:], src.Bytes()...))
}
-func mergeListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
+func mergeListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
dstl := dst.List()
srcl := src.List()
for i, llen := 0, srcl.Len(); i < llen; i++ {
@@ -102,29 +102,29 @@ func mergeListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
return dst
}
-func mergeBytesListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
+func mergeBytesListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
dstl := dst.List()
srcl := src.List()
for i, llen := 0, srcl.Len(); i < llen; i++ {
sb := srcl.Get(i).Bytes()
db := append(emptyBuf[:], sb...)
- dstl.Append(pref.ValueOfBytes(db))
+ dstl.Append(protoreflect.ValueOfBytes(db))
}
return dst
}
-func mergeMessageListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
+func mergeMessageListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
dstl := dst.List()
srcl := src.List()
for i, llen := 0, srcl.Len(); i < llen; i++ {
sm := srcl.Get(i).Message()
dm := proto.Clone(sm.Interface()).ProtoReflect()
- dstl.Append(pref.ValueOfMessage(dm))
+ dstl.Append(protoreflect.ValueOfMessage(dm))
}
return dst
}
-func mergeMessageValue(dst, src pref.Value, opts mergeOptions) pref.Value {
+func mergeMessageValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
opts.Merge(dst.Message().Interface(), src.Message().Interface())
return dst
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go
index a104e28e..629bacdc 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/message.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/message.go
@@ -14,8 +14,7 @@ import (
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/reflect/protoreflect"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/reflect/protoregistry"
)
// MessageInfo provides protobuf related functionality for a given Go type
@@ -29,7 +28,7 @@ type MessageInfo struct {
GoReflectType reflect.Type // pointer to struct
// Desc is the underlying message descriptor type and must be populated.
- Desc pref.MessageDescriptor
+ Desc protoreflect.MessageDescriptor
// Exporter must be provided in a purego environment in order to provide
// access to unexported fields.
@@ -54,7 +53,7 @@ type exporter func(v interface{}, i int) interface{}
// is generated by our implementation of protoc-gen-go (for v2 and on).
// If it is unable to obtain a MessageInfo, it returns nil.
func getMessageInfo(mt reflect.Type) *MessageInfo {
- m, ok := reflect.Zero(mt).Interface().(pref.ProtoMessage)
+ m, ok := reflect.Zero(mt).Interface().(protoreflect.ProtoMessage)
if !ok {
return nil
}
@@ -97,7 +96,7 @@ func (mi *MessageInfo) initOnce() {
// getPointer returns the pointer for a message, which should be of
// the type of the MessageInfo. If the message is of a different type,
// it returns ok==false.
-func (mi *MessageInfo) getPointer(m pref.Message) (p pointer, ok bool) {
+func (mi *MessageInfo) getPointer(m protoreflect.Message) (p pointer, ok bool) {
switch m := m.(type) {
case *messageState:
return m.pointer(), m.messageInfo() == mi
@@ -134,10 +133,10 @@ type structInfo struct {
extensionOffset offset
extensionType reflect.Type
- fieldsByNumber map[pref.FieldNumber]reflect.StructField
- oneofsByName map[pref.Name]reflect.StructField
- oneofWrappersByType map[reflect.Type]pref.FieldNumber
- oneofWrappersByNumber map[pref.FieldNumber]reflect.Type
+ fieldsByNumber map[protoreflect.FieldNumber]reflect.StructField
+ oneofsByName map[protoreflect.Name]reflect.StructField
+ oneofWrappersByType map[reflect.Type]protoreflect.FieldNumber
+ oneofWrappersByNumber map[protoreflect.FieldNumber]reflect.Type
}
func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo {
@@ -147,10 +146,10 @@ func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo {
unknownOffset: invalidOffset,
extensionOffset: invalidOffset,
- fieldsByNumber: map[pref.FieldNumber]reflect.StructField{},
- oneofsByName: map[pref.Name]reflect.StructField{},
- oneofWrappersByType: map[reflect.Type]pref.FieldNumber{},
- oneofWrappersByNumber: map[pref.FieldNumber]reflect.Type{},
+ fieldsByNumber: map[protoreflect.FieldNumber]reflect.StructField{},
+ oneofsByName: map[protoreflect.Name]reflect.StructField{},
+ oneofWrappersByType: map[reflect.Type]protoreflect.FieldNumber{},
+ oneofWrappersByNumber: map[protoreflect.FieldNumber]reflect.Type{},
}
fieldLoop:
@@ -180,12 +179,12 @@ fieldLoop:
for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") {
if len(s) > 0 && strings.Trim(s, "0123456789") == "" {
n, _ := strconv.ParseUint(s, 10, 64)
- si.fieldsByNumber[pref.FieldNumber(n)] = f
+ si.fieldsByNumber[protoreflect.FieldNumber(n)] = f
continue fieldLoop
}
}
if s := f.Tag.Get("protobuf_oneof"); len(s) > 0 {
- si.oneofsByName[pref.Name(s)] = f
+ si.oneofsByName[protoreflect.Name(s)] = f
continue fieldLoop
}
}
@@ -193,12 +192,17 @@ fieldLoop:
// Derive a mapping of oneof wrappers to fields.
oneofWrappers := mi.OneofWrappers
- for _, method := range []string{"XXX_OneofFuncs", "XXX_OneofWrappers"} {
- if fn, ok := reflect.PtrTo(t).MethodByName(method); ok {
- for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
- if vs, ok := v.Interface().([]interface{}); ok {
- oneofWrappers = vs
- }
+ methods := make([]reflect.Method, 0, 2)
+ if m, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok {
+ methods = append(methods, m)
+ }
+ if m, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok {
+ methods = append(methods, m)
+ }
+ for _, fn := range methods {
+ for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
+ if vs, ok := v.Interface().([]interface{}); ok {
+ oneofWrappers = vs
}
}
}
@@ -208,8 +212,8 @@ fieldLoop:
for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") {
if len(s) > 0 && strings.Trim(s, "0123456789") == "" {
n, _ := strconv.ParseUint(s, 10, 64)
- si.oneofWrappersByType[tf] = pref.FieldNumber(n)
- si.oneofWrappersByNumber[pref.FieldNumber(n)] = tf
+ si.oneofWrappersByType[tf] = protoreflect.FieldNumber(n)
+ si.oneofWrappersByNumber[protoreflect.FieldNumber(n)] = tf
break
}
}
@@ -219,7 +223,11 @@ fieldLoop:
}
func (mi *MessageInfo) New() protoreflect.Message {
- return mi.MessageOf(reflect.New(mi.GoReflectType.Elem()).Interface())
+ m := reflect.New(mi.GoReflectType.Elem()).Interface()
+ if r, ok := m.(protoreflect.ProtoMessage); ok {
+ return r.ProtoReflect()
+ }
+ return mi.MessageOf(m)
}
func (mi *MessageInfo) Zero() protoreflect.Message {
return mi.MessageOf(reflect.Zero(mi.GoReflectType).Interface())
@@ -237,7 +245,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType {
fd := mi.Desc.Fields().Get(i)
switch {
case fd.IsWeak():
- mt, _ := preg.GlobalTypes.FindMessageByName(fd.Message().FullName())
+ mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName())
return mt
case fd.IsMap():
return mapEntryType{fd.Message(), mi.fieldTypes[fd.Number()]}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
index 9488b726..d9ea010b 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
@@ -10,17 +10,17 @@ import (
"google.golang.org/protobuf/internal/detrand"
"google.golang.org/protobuf/internal/pragma"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type reflectMessageInfo struct {
- fields map[pref.FieldNumber]*fieldInfo
- oneofs map[pref.Name]*oneofInfo
+ fields map[protoreflect.FieldNumber]*fieldInfo
+ oneofs map[protoreflect.Name]*oneofInfo
// fieldTypes contains the zero value of an enum or message field.
// For lists, it contains the element type.
// For maps, it contains the entry value type.
- fieldTypes map[pref.FieldNumber]interface{}
+ fieldTypes map[protoreflect.FieldNumber]interface{}
// denseFields is a subset of fields where:
// 0 < fieldDesc.Number() < len(denseFields)
@@ -30,8 +30,8 @@ type reflectMessageInfo struct {
// rangeInfos is a list of all fields (not belonging to a oneof) and oneofs.
rangeInfos []interface{} // either *fieldInfo or *oneofInfo
- getUnknown func(pointer) pref.RawFields
- setUnknown func(pointer, pref.RawFields)
+ getUnknown func(pointer) protoreflect.RawFields
+ setUnknown func(pointer, protoreflect.RawFields)
extensionMap func(pointer) *extensionMap
nilMessage atomicNilMessage
@@ -52,7 +52,7 @@ func (mi *MessageInfo) makeReflectFuncs(t reflect.Type, si structInfo) {
// This code assumes that the struct is well-formed and panics if there are
// any discrepancies.
func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) {
- mi.fields = map[pref.FieldNumber]*fieldInfo{}
+ mi.fields = map[protoreflect.FieldNumber]*fieldInfo{}
md := mi.Desc
fds := md.Fields()
for i := 0; i < fds.Len(); i++ {
@@ -82,7 +82,7 @@ func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) {
mi.fields[fd.Number()] = &fi
}
- mi.oneofs = map[pref.Name]*oneofInfo{}
+ mi.oneofs = map[protoreflect.Name]*oneofInfo{}
for i := 0; i < md.Oneofs().Len(); i++ {
od := md.Oneofs().Get(i)
mi.oneofs[od.Name()] = makeOneofInfo(od, si, mi.Exporter)
@@ -117,13 +117,13 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) {
switch {
case si.unknownOffset.IsValid() && si.unknownType == unknownFieldsAType:
// Handle as []byte.
- mi.getUnknown = func(p pointer) pref.RawFields {
+ mi.getUnknown = func(p pointer) protoreflect.RawFields {
if p.IsNil() {
return nil
}
return *p.Apply(mi.unknownOffset).Bytes()
}
- mi.setUnknown = func(p pointer, b pref.RawFields) {
+ mi.setUnknown = func(p pointer, b protoreflect.RawFields) {
if p.IsNil() {
panic("invalid SetUnknown on nil Message")
}
@@ -131,7 +131,7 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) {
}
case si.unknownOffset.IsValid() && si.unknownType == unknownFieldsBType:
// Handle as *[]byte.
- mi.getUnknown = func(p pointer) pref.RawFields {
+ mi.getUnknown = func(p pointer) protoreflect.RawFields {
if p.IsNil() {
return nil
}
@@ -141,7 +141,7 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) {
}
return **bp
}
- mi.setUnknown = func(p pointer, b pref.RawFields) {
+ mi.setUnknown = func(p pointer, b protoreflect.RawFields) {
if p.IsNil() {
panic("invalid SetUnknown on nil Message")
}
@@ -152,10 +152,10 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) {
**bp = b
}
default:
- mi.getUnknown = func(pointer) pref.RawFields {
+ mi.getUnknown = func(pointer) protoreflect.RawFields {
return nil
}
- mi.setUnknown = func(p pointer, _ pref.RawFields) {
+ mi.setUnknown = func(p pointer, _ protoreflect.RawFields) {
if p.IsNil() {
panic("invalid SetUnknown on nil Message")
}
@@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) {
}
if ft != nil {
if mi.fieldTypes == nil {
- mi.fieldTypes = make(map[pref.FieldNumber]interface{})
+ mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{})
}
mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface()
}
@@ -233,7 +233,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) {
type extensionMap map[int32]ExtensionField
-func (m *extensionMap) Range(f func(pref.FieldDescriptor, pref.Value) bool) {
+func (m *extensionMap) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if m != nil {
for _, x := range *m {
xd := x.Type().TypeDescriptor()
@@ -247,7 +247,7 @@ func (m *extensionMap) Range(f func(pref.FieldDescriptor, pref.Value) bool) {
}
}
}
-func (m *extensionMap) Has(xt pref.ExtensionType) (ok bool) {
+func (m *extensionMap) Has(xt protoreflect.ExtensionType) (ok bool) {
if m == nil {
return false
}
@@ -266,10 +266,10 @@ func (m *extensionMap) Has(xt pref.ExtensionType) (ok bool) {
}
return true
}
-func (m *extensionMap) Clear(xt pref.ExtensionType) {
+func (m *extensionMap) Clear(xt protoreflect.ExtensionType) {
delete(*m, int32(xt.TypeDescriptor().Number()))
}
-func (m *extensionMap) Get(xt pref.ExtensionType) pref.Value {
+func (m *extensionMap) Get(xt protoreflect.ExtensionType) protoreflect.Value {
xd := xt.TypeDescriptor()
if m != nil {
if x, ok := (*m)[int32(xd.Number())]; ok {
@@ -278,7 +278,7 @@ func (m *extensionMap) Get(xt pref.ExtensionType) pref.Value {
}
return xt.Zero()
}
-func (m *extensionMap) Set(xt pref.ExtensionType, v pref.Value) {
+func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) {
xd := xt.TypeDescriptor()
isValid := true
switch {
@@ -302,9 +302,9 @@ func (m *extensionMap) Set(xt pref.ExtensionType, v pref.Value) {
x.Set(xt, v)
(*m)[int32(xd.Number())] = x
}
-func (m *extensionMap) Mutable(xt pref.ExtensionType) pref.Value {
+func (m *extensionMap) Mutable(xt protoreflect.ExtensionType) protoreflect.Value {
xd := xt.TypeDescriptor()
- if xd.Kind() != pref.MessageKind && xd.Kind() != pref.GroupKind && !xd.IsList() && !xd.IsMap() {
+ if xd.Kind() != protoreflect.MessageKind && xd.Kind() != protoreflect.GroupKind && !xd.IsList() && !xd.IsMap() {
panic("invalid Mutable on field with non-composite type")
}
if x, ok := (*m)[int32(xd.Number())]; ok {
@@ -320,7 +320,6 @@ func (m *extensionMap) Mutable(xt pref.ExtensionType) pref.Value {
// in an allocation-free way without needing to have a shadow Go type generated
// for every message type. This technique only works using unsafe.
//
-//
// Example generated code:
//
// type M struct {
@@ -351,12 +350,11 @@ func (m *extensionMap) Mutable(xt pref.ExtensionType) pref.Value {
// It has access to the message info as its first field, and a pointer to the
// MessageState is identical to a pointer to the concrete message value.
//
-//
// Requirements:
-// • The type M must implement protoreflect.ProtoMessage.
-// • The address of m must not be nil.
-// • The address of m and the address of m.state must be equal,
-// even though they are different Go types.
+// - The type M must implement protoreflect.ProtoMessage.
+// - The address of m must not be nil.
+// - The address of m and the address of m.state must be equal,
+// even though they are different Go types.
type MessageState struct {
pragma.NoUnkeyedLiterals
pragma.DoNotCompare
@@ -368,8 +366,8 @@ type MessageState struct {
type messageState MessageState
var (
- _ pref.Message = (*messageState)(nil)
- _ unwrapper = (*messageState)(nil)
+ _ protoreflect.Message = (*messageState)(nil)
+ _ unwrapper = (*messageState)(nil)
)
// messageDataType is a tuple of a pointer to the message data and
@@ -387,16 +385,16 @@ type (
)
var (
- _ pref.Message = (*messageReflectWrapper)(nil)
- _ unwrapper = (*messageReflectWrapper)(nil)
- _ pref.ProtoMessage = (*messageIfaceWrapper)(nil)
- _ unwrapper = (*messageIfaceWrapper)(nil)
+ _ protoreflect.Message = (*messageReflectWrapper)(nil)
+ _ unwrapper = (*messageReflectWrapper)(nil)
+ _ protoreflect.ProtoMessage = (*messageIfaceWrapper)(nil)
+ _ unwrapper = (*messageIfaceWrapper)(nil)
)
// MessageOf returns a reflective view over a message. The input must be a
// pointer to a named Go struct. If the provided type has a ProtoReflect method,
// it must be implemented by calling this method.
-func (mi *MessageInfo) MessageOf(m interface{}) pref.Message {
+func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message {
if reflect.TypeOf(m) != mi.GoReflectType {
panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType))
}
@@ -421,7 +419,7 @@ func (m *messageIfaceWrapper) Reset() {
rv.Elem().Set(reflect.Zero(rv.Type().Elem()))
}
}
-func (m *messageIfaceWrapper) ProtoReflect() pref.Message {
+func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message {
return (*messageReflectWrapper)(m)
}
func (m *messageIfaceWrapper) protoUnwrap() interface{} {
@@ -430,7 +428,7 @@ func (m *messageIfaceWrapper) protoUnwrap() interface{} {
// checkField verifies that the provided field descriptor is valid.
// Exactly one of the returned values is populated.
-func (mi *MessageInfo) checkField(fd pref.FieldDescriptor) (*fieldInfo, pref.ExtensionType) {
+func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionType) {
var fi *fieldInfo
if n := fd.Number(); 0 < n && int(n) < len(mi.denseFields) {
fi = mi.denseFields[n]
@@ -455,7 +453,7 @@ func (mi *MessageInfo) checkField(fd pref.FieldDescriptor) (*fieldInfo, pref.Ext
if !mi.Desc.ExtensionRanges().Has(fd.Number()) {
panic(fmt.Sprintf("extension %v extends %v outside the extension range", fd.FullName(), mi.Desc.FullName()))
}
- xtd, ok := fd.(pref.ExtensionTypeDescriptor)
+ xtd, ok := fd.(protoreflect.ExtensionTypeDescriptor)
if !ok {
panic(fmt.Sprintf("extension %v does not implement protoreflect.ExtensionTypeDescriptor", fd.FullName()))
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go
index 343cf872..986322b1 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go
@@ -11,24 +11,24 @@ import (
"sync"
"google.golang.org/protobuf/internal/flags"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
)
type fieldInfo struct {
- fieldDesc pref.FieldDescriptor
+ fieldDesc protoreflect.FieldDescriptor
// These fields are used for protobuf reflection support.
has func(pointer) bool
clear func(pointer)
- get func(pointer) pref.Value
- set func(pointer, pref.Value)
- mutable func(pointer) pref.Value
- newMessage func() pref.Message
- newField func() pref.Value
+ get func(pointer) protoreflect.Value
+ set func(pointer, protoreflect.Value)
+ mutable func(pointer) protoreflect.Value
+ newMessage func() protoreflect.Message
+ newField func() protoreflect.Value
}
-func fieldInfoForMissing(fd pref.FieldDescriptor) fieldInfo {
+func fieldInfoForMissing(fd protoreflect.FieldDescriptor) fieldInfo {
// This never occurs for generated message types.
// It implies that a hand-crafted type has missing Go fields
// for specific protobuf message fields.
@@ -40,19 +40,19 @@ func fieldInfoForMissing(fd pref.FieldDescriptor) fieldInfo {
clear: func(p pointer) {
panic("missing Go struct field for " + string(fd.FullName()))
},
- get: func(p pointer) pref.Value {
+ get: func(p pointer) protoreflect.Value {
return fd.Default()
},
- set: func(p pointer, v pref.Value) {
+ set: func(p pointer, v protoreflect.Value) {
panic("missing Go struct field for " + string(fd.FullName()))
},
- mutable: func(p pointer) pref.Value {
+ mutable: func(p pointer) protoreflect.Value {
panic("missing Go struct field for " + string(fd.FullName()))
},
- newMessage: func() pref.Message {
+ newMessage: func() protoreflect.Message {
panic("missing Go struct field for " + string(fd.FullName()))
},
- newField: func() pref.Value {
+ newField: func() protoreflect.Value {
if v := fd.Default(); v.IsValid() {
return v
}
@@ -61,7 +61,7 @@ func fieldInfoForMissing(fd pref.FieldDescriptor) fieldInfo {
}
}
-func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x exporter, ot reflect.Type) fieldInfo {
+func fieldInfoForOneof(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter, ot reflect.Type) fieldInfo {
ft := fs.Type
if ft.Kind() != reflect.Interface {
panic(fmt.Sprintf("field %v has invalid type: got %v, want interface kind", fd.FullName(), ft))
@@ -102,7 +102,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export
}
rv.Set(reflect.Zero(rv.Type()))
},
- get: func(p pointer) pref.Value {
+ get: func(p pointer) protoreflect.Value {
if p.IsNil() {
return conv.Zero()
}
@@ -113,7 +113,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export
rv = rv.Elem().Elem().Field(0)
return conv.PBValueOf(rv)
},
- set: func(p pointer, v pref.Value) {
+ set: func(p pointer, v protoreflect.Value) {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
if rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() {
rv.Set(reflect.New(ot))
@@ -121,7 +121,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export
rv = rv.Elem().Elem().Field(0)
rv.Set(conv.GoValueOf(v))
},
- mutable: func(p pointer) pref.Value {
+ mutable: func(p pointer) protoreflect.Value {
if !isMessage {
panic(fmt.Sprintf("field %v with invalid Mutable call on field with non-composite type", fd.FullName()))
}
@@ -131,20 +131,20 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export
}
rv = rv.Elem().Elem().Field(0)
if rv.Kind() == reflect.Ptr && rv.IsNil() {
- rv.Set(conv.GoValueOf(pref.ValueOfMessage(conv.New().Message())))
+ rv.Set(conv.GoValueOf(protoreflect.ValueOfMessage(conv.New().Message())))
}
return conv.PBValueOf(rv)
},
- newMessage: func() pref.Message {
+ newMessage: func() protoreflect.Message {
return conv.New().Message()
},
- newField: func() pref.Value {
+ newField: func() protoreflect.Value {
return conv.New()
},
}
}
-func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
+func fieldInfoForMap(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
ft := fs.Type
if ft.Kind() != reflect.Map {
panic(fmt.Sprintf("field %v has invalid type: got %v, want map kind", fd.FullName(), ft))
@@ -166,7 +166,7 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
rv.Set(reflect.Zero(rv.Type()))
},
- get: func(p pointer) pref.Value {
+ get: func(p pointer) protoreflect.Value {
if p.IsNil() {
return conv.Zero()
}
@@ -176,7 +176,7 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter
}
return conv.PBValueOf(rv)
},
- set: func(p pointer, v pref.Value) {
+ set: func(p pointer, v protoreflect.Value) {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
pv := conv.GoValueOf(v)
if pv.IsNil() {
@@ -184,20 +184,20 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter
}
rv.Set(pv)
},
- mutable: func(p pointer) pref.Value {
+ mutable: func(p pointer) protoreflect.Value {
v := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
if v.IsNil() {
v.Set(reflect.MakeMap(fs.Type))
}
return conv.PBValueOf(v)
},
- newField: func() pref.Value {
+ newField: func() protoreflect.Value {
return conv.New()
},
}
}
-func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
+func fieldInfoForList(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
ft := fs.Type
if ft.Kind() != reflect.Slice {
panic(fmt.Sprintf("field %v has invalid type: got %v, want slice kind", fd.FullName(), ft))
@@ -219,7 +219,7 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporte
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
rv.Set(reflect.Zero(rv.Type()))
},
- get: func(p pointer) pref.Value {
+ get: func(p pointer) protoreflect.Value {
if p.IsNil() {
return conv.Zero()
}
@@ -229,7 +229,7 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporte
}
return conv.PBValueOf(rv)
},
- set: func(p pointer, v pref.Value) {
+ set: func(p pointer, v protoreflect.Value) {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
pv := conv.GoValueOf(v)
if pv.IsNil() {
@@ -237,11 +237,11 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporte
}
rv.Set(pv.Elem())
},
- mutable: func(p pointer) pref.Value {
+ mutable: func(p pointer) protoreflect.Value {
v := p.Apply(fieldOffset).AsValueOf(fs.Type)
return conv.PBValueOf(v)
},
- newField: func() pref.Value {
+ newField: func() protoreflect.Value {
return conv.New()
},
}
@@ -252,7 +252,7 @@ var (
emptyBytes = reflect.ValueOf([]byte{})
)
-func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
+func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
ft := fs.Type
nullable := fd.HasPresence()
isBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8
@@ -300,7 +300,7 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x expor
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
rv.Set(reflect.Zero(rv.Type()))
},
- get: func(p pointer) pref.Value {
+ get: func(p pointer) protoreflect.Value {
if p.IsNil() {
return conv.Zero()
}
@@ -315,7 +315,7 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x expor
}
return conv.PBValueOf(rv)
},
- set: func(p pointer, v pref.Value) {
+ set: func(p pointer, v protoreflect.Value) {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
if nullable && rv.Kind() == reflect.Ptr {
if rv.IsNil() {
@@ -332,23 +332,23 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x expor
}
}
},
- newField: func() pref.Value {
+ newField: func() protoreflect.Value {
return conv.New()
},
}
}
-func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldInfo {
+func fieldInfoForWeakMessage(fd protoreflect.FieldDescriptor, weakOffset offset) fieldInfo {
if !flags.ProtoLegacy {
panic("no support for proto1 weak fields")
}
var once sync.Once
- var messageType pref.MessageType
+ var messageType protoreflect.MessageType
lazyInit := func() {
once.Do(func() {
messageName := fd.Message().FullName()
- messageType, _ = preg.GlobalTypes.FindMessageByName(messageName)
+ messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName)
if messageType == nil {
panic(fmt.Sprintf("weak message %v for field %v is not linked in", messageName, fd.FullName()))
}
@@ -368,18 +368,18 @@ func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldIn
clear: func(p pointer) {
p.Apply(weakOffset).WeakFields().clear(num)
},
- get: func(p pointer) pref.Value {
+ get: func(p pointer) protoreflect.Value {
lazyInit()
if p.IsNil() {
- return pref.ValueOfMessage(messageType.Zero())
+ return protoreflect.ValueOfMessage(messageType.Zero())
}
m, ok := p.Apply(weakOffset).WeakFields().get(num)
if !ok {
- return pref.ValueOfMessage(messageType.Zero())
+ return protoreflect.ValueOfMessage(messageType.Zero())
}
- return pref.ValueOfMessage(m.ProtoReflect())
+ return protoreflect.ValueOfMessage(m.ProtoReflect())
},
- set: func(p pointer, v pref.Value) {
+ set: func(p pointer, v protoreflect.Value) {
lazyInit()
m := v.Message()
if m.Descriptor() != messageType.Descriptor() {
@@ -390,7 +390,7 @@ func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldIn
}
p.Apply(weakOffset).WeakFields().set(num, m.Interface())
},
- mutable: func(p pointer) pref.Value {
+ mutable: func(p pointer) protoreflect.Value {
lazyInit()
fs := p.Apply(weakOffset).WeakFields()
m, ok := fs.get(num)
@@ -398,20 +398,20 @@ func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldIn
m = messageType.New().Interface()
fs.set(num, m)
}
- return pref.ValueOfMessage(m.ProtoReflect())
+ return protoreflect.ValueOfMessage(m.ProtoReflect())
},
- newMessage: func() pref.Message {
+ newMessage: func() protoreflect.Message {
lazyInit()
return messageType.New()
},
- newField: func() pref.Value {
+ newField: func() protoreflect.Value {
lazyInit()
- return pref.ValueOfMessage(messageType.New())
+ return protoreflect.ValueOfMessage(messageType.New())
},
}
}
-func fieldInfoForMessage(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
+func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
ft := fs.Type
conv := NewConverter(ft, fd)
@@ -433,47 +433,47 @@ func fieldInfoForMessage(fd pref.FieldDescriptor, fs reflect.StructField, x expo
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
rv.Set(reflect.Zero(rv.Type()))
},
- get: func(p pointer) pref.Value {
+ get: func(p pointer) protoreflect.Value {
if p.IsNil() {
return conv.Zero()
}
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
return conv.PBValueOf(rv)
},
- set: func(p pointer, v pref.Value) {
+ set: func(p pointer, v protoreflect.Value) {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
rv.Set(conv.GoValueOf(v))
if fs.Type.Kind() == reflect.Ptr && rv.IsNil() {
panic(fmt.Sprintf("field %v has invalid nil pointer", fd.FullName()))
}
},
- mutable: func(p pointer) pref.Value {
+ mutable: func(p pointer) protoreflect.Value {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
if fs.Type.Kind() == reflect.Ptr && rv.IsNil() {
rv.Set(conv.GoValueOf(conv.New()))
}
return conv.PBValueOf(rv)
},
- newMessage: func() pref.Message {
+ newMessage: func() protoreflect.Message {
return conv.New().Message()
},
- newField: func() pref.Value {
+ newField: func() protoreflect.Value {
return conv.New()
},
}
}
type oneofInfo struct {
- oneofDesc pref.OneofDescriptor
- which func(pointer) pref.FieldNumber
+ oneofDesc protoreflect.OneofDescriptor
+ which func(pointer) protoreflect.FieldNumber
}
-func makeOneofInfo(od pref.OneofDescriptor, si structInfo, x exporter) *oneofInfo {
+func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo {
oi := &oneofInfo{oneofDesc: od}
if od.IsSynthetic() {
fs := si.fieldsByNumber[od.Fields().Get(0).Number()]
fieldOffset := offsetOf(fs, x)
- oi.which = func(p pointer) pref.FieldNumber {
+ oi.which = func(p pointer) protoreflect.FieldNumber {
if p.IsNil() {
return 0
}
@@ -486,7 +486,7 @@ func makeOneofInfo(od pref.OneofDescriptor, si structInfo, x exporter) *oneofInf
} else {
fs := si.oneofsByName[od.Name()]
fieldOffset := offsetOf(fs, x)
- oi.which = func(p pointer) pref.FieldNumber {
+ oi.which = func(p pointer) protoreflect.FieldNumber {
if p.IsNil() {
return 0
}
@@ -538,6 +538,6 @@ func isZero(v reflect.Value) bool {
}
return true
default:
- panic(&reflect.ValueError{"reflect.Value.IsZero", v.Kind()})
+ panic(&reflect.ValueError{Method: "reflect.Value.IsZero", Kind: v.Kind()})
}
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
index 9e3ed821..517e9443 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package impl
@@ -158,6 +159,42 @@ func (p pointer) SetPointer(v pointer) {
p.v.Elem().Set(v.v)
}
+func growSlice(p pointer, addCap int) {
+ // TODO: Once we only support Go 1.20 and newer, use reflect.Grow.
+ in := p.v.Elem()
+ out := reflect.MakeSlice(in.Type(), in.Len(), in.Len()+addCap)
+ reflect.Copy(out, in)
+ p.v.Elem().Set(out)
+}
+
+func (p pointer) growBoolSlice(addCap int) {
+ growSlice(p, addCap)
+}
+
+func (p pointer) growInt32Slice(addCap int) {
+ growSlice(p, addCap)
+}
+
+func (p pointer) growUint32Slice(addCap int) {
+ growSlice(p, addCap)
+}
+
+func (p pointer) growInt64Slice(addCap int) {
+ growSlice(p, addCap)
+}
+
+func (p pointer) growUint64Slice(addCap int) {
+ growSlice(p, addCap)
+}
+
+func (p pointer) growFloat64Slice(addCap int) {
+ growSlice(p, addCap)
+}
+
+func (p pointer) growFloat32Slice(addCap int) {
+ growSlice(p, addCap)
+}
+
func (Export) MessageStateOf(p Pointer) *messageState { panic("not supported") }
func (ms *messageState) pointer() pointer { panic("not supported") }
func (ms *messageState) messageInfo() *MessageInfo { panic("not supported") }
diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
index 9ecf23a8..4b020e31 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package impl
@@ -137,6 +138,46 @@ func (p pointer) SetPointer(v pointer) {
*(*unsafe.Pointer)(p.p) = (unsafe.Pointer)(v.p)
}
+func (p pointer) growBoolSlice(addCap int) {
+ sp := p.BoolSlice()
+ s := make([]bool, 0, addCap+len(*sp))
+ s = s[:len(*sp)]
+ copy(s, *sp)
+ *sp = s
+}
+
+func (p pointer) growInt32Slice(addCap int) {
+ sp := p.Int32Slice()
+ s := make([]int32, 0, addCap+len(*sp))
+ s = s[:len(*sp)]
+ copy(s, *sp)
+ *sp = s
+}
+
+func (p pointer) growUint32Slice(addCap int) {
+ p.growInt32Slice(addCap)
+}
+
+func (p pointer) growFloat32Slice(addCap int) {
+ p.growInt32Slice(addCap)
+}
+
+func (p pointer) growInt64Slice(addCap int) {
+ sp := p.Int64Slice()
+ s := make([]int64, 0, addCap+len(*sp))
+ s = s[:len(*sp)]
+ copy(s, *sp)
+ *sp = s
+}
+
+func (p pointer) growUint64Slice(addCap int) {
+ p.growInt64Slice(addCap)
+}
+
+func (p pointer) growFloat64Slice(addCap int) {
+ p.growInt64Slice(addCap)
+}
+
// Static check that MessageState does not exceed the size of a pointer.
const _ = uint(unsafe.Sizeof(unsafe.Pointer(nil)) - unsafe.Sizeof(MessageState{}))
diff --git a/vendor/google.golang.org/protobuf/internal/impl/validate.go b/vendor/google.golang.org/protobuf/internal/impl/validate.go
index 08cfb605..a24e6bbd 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/validate.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/validate.go
@@ -16,9 +16,9 @@ import (
"google.golang.org/protobuf/internal/flags"
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/internal/strs"
- pref "google.golang.org/protobuf/reflect/protoreflect"
- preg "google.golang.org/protobuf/reflect/protoregistry"
- piface "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/runtime/protoiface"
)
// ValidationStatus is the result of validating the wire-format encoding of a message.
@@ -56,20 +56,20 @@ func (v ValidationStatus) String() string {
// of the message type.
//
// This function is exposed for testing.
-func Validate(mt pref.MessageType, in piface.UnmarshalInput) (out piface.UnmarshalOutput, _ ValidationStatus) {
+func Validate(mt protoreflect.MessageType, in protoiface.UnmarshalInput) (out protoiface.UnmarshalOutput, _ ValidationStatus) {
mi, ok := mt.(*MessageInfo)
if !ok {
return out, ValidationUnknown
}
if in.Resolver == nil {
- in.Resolver = preg.GlobalTypes
+ in.Resolver = protoregistry.GlobalTypes
}
o, st := mi.validate(in.Buf, 0, unmarshalOptions{
flags: in.Flags,
resolver: in.Resolver,
})
if o.initialized {
- out.Flags |= piface.UnmarshalInitialized
+ out.Flags |= protoiface.UnmarshalInitialized
}
return out, st
}
@@ -106,22 +106,22 @@ const (
validationTypeMessageSetItem
)
-func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd pref.FieldDescriptor, ft reflect.Type) validationInfo {
+func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo {
var vi validationInfo
switch {
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
switch fd.Kind() {
- case pref.MessageKind:
+ case protoreflect.MessageKind:
vi.typ = validationTypeMessage
if ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok {
vi.mi = getMessageInfo(ot.Field(0).Type)
}
- case pref.GroupKind:
+ case protoreflect.GroupKind:
vi.typ = validationTypeGroup
if ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok {
vi.mi = getMessageInfo(ot.Field(0).Type)
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if strs.EnforceUTF8(fd) {
vi.typ = validationTypeUTF8String
}
@@ -129,7 +129,7 @@ func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd pref.FieldDescrip
default:
vi = newValidationInfo(fd, ft)
}
- if fd.Cardinality() == pref.Required {
+ if fd.Cardinality() == protoreflect.Required {
// Avoid overflow. The required field check is done with a 64-bit mask, with
// any message containing more than 64 required fields always reported as
// potentially uninitialized, so it is not important to get a precise count
@@ -142,22 +142,22 @@ func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd pref.FieldDescrip
return vi
}
-func newValidationInfo(fd pref.FieldDescriptor, ft reflect.Type) validationInfo {
+func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo {
var vi validationInfo
switch {
case fd.IsList():
switch fd.Kind() {
- case pref.MessageKind:
+ case protoreflect.MessageKind:
vi.typ = validationTypeMessage
if ft.Kind() == reflect.Slice {
vi.mi = getMessageInfo(ft.Elem())
}
- case pref.GroupKind:
+ case protoreflect.GroupKind:
vi.typ = validationTypeGroup
if ft.Kind() == reflect.Slice {
vi.mi = getMessageInfo(ft.Elem())
}
- case pref.StringKind:
+ case protoreflect.StringKind:
vi.typ = validationTypeBytes
if strs.EnforceUTF8(fd) {
vi.typ = validationTypeUTF8String
@@ -175,33 +175,33 @@ func newValidationInfo(fd pref.FieldDescriptor, ft reflect.Type) validationInfo
case fd.IsMap():
vi.typ = validationTypeMap
switch fd.MapKey().Kind() {
- case pref.StringKind:
+ case protoreflect.StringKind:
if strs.EnforceUTF8(fd) {
vi.keyType = validationTypeUTF8String
}
}
switch fd.MapValue().Kind() {
- case pref.MessageKind:
+ case protoreflect.MessageKind:
vi.valType = validationTypeMessage
if ft.Kind() == reflect.Map {
vi.mi = getMessageInfo(ft.Elem())
}
- case pref.StringKind:
+ case protoreflect.StringKind:
if strs.EnforceUTF8(fd) {
vi.valType = validationTypeUTF8String
}
}
default:
switch fd.Kind() {
- case pref.MessageKind:
+ case protoreflect.MessageKind:
vi.typ = validationTypeMessage
if !fd.IsWeak() {
vi.mi = getMessageInfo(ft)
}
- case pref.GroupKind:
+ case protoreflect.GroupKind:
vi.typ = validationTypeGroup
vi.mi = getMessageInfo(ft)
- case pref.StringKind:
+ case protoreflect.StringKind:
vi.typ = validationTypeBytes
if strs.EnforceUTF8(fd) {
vi.typ = validationTypeUTF8String
@@ -314,11 +314,11 @@ State:
break
}
messageName := fd.Message().FullName()
- messageType, err := preg.GlobalTypes.FindMessageByName(messageName)
+ messageType, err := protoregistry.GlobalTypes.FindMessageByName(messageName)
switch err {
case nil:
vi.mi, _ = messageType.(*MessageInfo)
- case preg.NotFound:
+ case protoregistry.NotFound:
vi.typ = validationTypeBytes
default:
return out, ValidationUnknown
@@ -335,7 +335,7 @@ State:
// unmarshaling to begin failing. Supporting this requires some way to
// determine if the resolver is frozen.
xt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), num)
- if err != nil && err != preg.NotFound {
+ if err != nil && err != protoregistry.NotFound {
return out, ValidationUnknown
}
if err == nil {
@@ -513,7 +513,7 @@ State:
}
xt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), typeid)
switch {
- case err == preg.NotFound:
+ case err == protoregistry.NotFound:
b = b[n:]
case err != nil:
return out, ValidationUnknown
diff --git a/vendor/google.golang.org/protobuf/internal/impl/weak.go b/vendor/google.golang.org/protobuf/internal/impl/weak.go
index 009cbefd..eb79a7ba 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/weak.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/weak.go
@@ -7,7 +7,7 @@ package impl
import (
"fmt"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/reflect/protoregistry"
)
@@ -17,32 +17,32 @@ import (
// defined directly on it.
type weakFields WeakFields
-func (w weakFields) get(num pref.FieldNumber) (pref.ProtoMessage, bool) {
+func (w weakFields) get(num protoreflect.FieldNumber) (protoreflect.ProtoMessage, bool) {
m, ok := w[int32(num)]
return m, ok
}
-func (w *weakFields) set(num pref.FieldNumber, m pref.ProtoMessage) {
+func (w *weakFields) set(num protoreflect.FieldNumber, m protoreflect.ProtoMessage) {
if *w == nil {
*w = make(weakFields)
}
(*w)[int32(num)] = m
}
-func (w *weakFields) clear(num pref.FieldNumber) {
+func (w *weakFields) clear(num protoreflect.FieldNumber) {
delete(*w, int32(num))
}
-func (Export) HasWeak(w WeakFields, num pref.FieldNumber) bool {
+func (Export) HasWeak(w WeakFields, num protoreflect.FieldNumber) bool {
_, ok := w[int32(num)]
return ok
}
-func (Export) ClearWeak(w *WeakFields, num pref.FieldNumber) {
+func (Export) ClearWeak(w *WeakFields, num protoreflect.FieldNumber) {
delete(*w, int32(num))
}
-func (Export) GetWeak(w WeakFields, num pref.FieldNumber, name pref.FullName) pref.ProtoMessage {
+func (Export) GetWeak(w WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName) protoreflect.ProtoMessage {
if m, ok := w[int32(num)]; ok {
return m
}
@@ -53,7 +53,7 @@ func (Export) GetWeak(w WeakFields, num pref.FieldNumber, name pref.FullName) pr
return mt.Zero().Interface()
}
-func (Export) SetWeak(w *WeakFields, num pref.FieldNumber, name pref.FullName, m pref.ProtoMessage) {
+func (Export) SetWeak(w *WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName, m protoreflect.ProtoMessage) {
if m != nil {
mt, _ := protoregistry.GlobalTypes.FindMessageByName(name)
if mt == nil {
diff --git a/vendor/google.golang.org/protobuf/internal/order/order.go b/vendor/google.golang.org/protobuf/internal/order/order.go
index 2a24953f..dea522e1 100644
--- a/vendor/google.golang.org/protobuf/internal/order/order.go
+++ b/vendor/google.golang.org/protobuf/internal/order/order.go
@@ -5,12 +5,12 @@
package order
import (
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
// FieldOrder specifies the ordering to visit message fields.
// It is a function that reports whether x is ordered before y.
-type FieldOrder func(x, y pref.FieldDescriptor) bool
+type FieldOrder func(x, y protoreflect.FieldDescriptor) bool
var (
// AnyFieldOrder specifies no specific field ordering.
@@ -18,9 +18,9 @@ var (
// LegacyFieldOrder sorts fields in the same ordering as emitted by
// wire serialization in the github.com/golang/protobuf implementation.
- LegacyFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool {
+ LegacyFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {
ox, oy := x.ContainingOneof(), y.ContainingOneof()
- inOneof := func(od pref.OneofDescriptor) bool {
+ inOneof := func(od protoreflect.OneofDescriptor) bool {
return od != nil && !od.IsSynthetic()
}
@@ -33,7 +33,7 @@ var (
return !inOneof(ox) && inOneof(oy)
}
// Fields in disjoint oneof sets are sorted by declaration index.
- if ox != nil && oy != nil && ox != oy {
+ if inOneof(ox) && inOneof(oy) && ox != oy {
return ox.Index() < oy.Index()
}
// Fields sorted by field number.
@@ -41,14 +41,14 @@ var (
}
// NumberFieldOrder sorts fields by their field number.
- NumberFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool {
+ NumberFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {
return x.Number() < y.Number()
}
// IndexNameFieldOrder sorts non-extension fields before extension fields.
// Non-extensions are sorted according to their declaration index.
// Extensions are sorted according to their full name.
- IndexNameFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool {
+ IndexNameFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {
// Non-extension fields sort before extension fields.
if x.IsExtension() != y.IsExtension() {
return !x.IsExtension() && y.IsExtension()
@@ -64,7 +64,7 @@ var (
// KeyOrder specifies the ordering to visit map entries.
// It is a function that reports whether x is ordered before y.
-type KeyOrder func(x, y pref.MapKey) bool
+type KeyOrder func(x, y protoreflect.MapKey) bool
var (
// AnyKeyOrder specifies no specific key ordering.
@@ -72,7 +72,7 @@ var (
// GenericKeyOrder sorts false before true, numeric keys in ascending order,
// and strings in lexicographical ordering according to UTF-8 codepoints.
- GenericKeyOrder KeyOrder = func(x, y pref.MapKey) bool {
+ GenericKeyOrder KeyOrder = func(x, y protoreflect.MapKey) bool {
switch x.Interface().(type) {
case bool:
return !x.Bool() && y.Bool()
diff --git a/vendor/google.golang.org/protobuf/internal/order/range.go b/vendor/google.golang.org/protobuf/internal/order/range.go
index c8090e0c..1665a68e 100644
--- a/vendor/google.golang.org/protobuf/internal/order/range.go
+++ b/vendor/google.golang.org/protobuf/internal/order/range.go
@@ -9,12 +9,12 @@ import (
"sort"
"sync"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type messageField struct {
- fd pref.FieldDescriptor
- v pref.Value
+ fd protoreflect.FieldDescriptor
+ v protoreflect.Value
}
var messageFieldPool = sync.Pool{
@@ -25,8 +25,8 @@ type (
// FieldRnger is an interface for visiting all fields in a message.
// The protoreflect.Message type implements this interface.
FieldRanger interface{ Range(VisitField) }
- // VisitField is called everytime a message field is visited.
- VisitField = func(pref.FieldDescriptor, pref.Value) bool
+ // VisitField is called every time a message field is visited.
+ VisitField = func(protoreflect.FieldDescriptor, protoreflect.Value) bool
)
// RangeFields iterates over the fields of fs according to the specified order.
@@ -47,7 +47,7 @@ func RangeFields(fs FieldRanger, less FieldOrder, fn VisitField) {
}()
// Collect all fields in the message and sort them.
- fs.Range(func(fd pref.FieldDescriptor, v pref.Value) bool {
+ fs.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
fields = append(fields, messageField{fd, v})
return true
})
@@ -64,8 +64,8 @@ func RangeFields(fs FieldRanger, less FieldOrder, fn VisitField) {
}
type mapEntry struct {
- k pref.MapKey
- v pref.Value
+ k protoreflect.MapKey
+ v protoreflect.Value
}
var mapEntryPool = sync.Pool{
@@ -76,8 +76,8 @@ type (
// EntryRanger is an interface for visiting all fields in a message.
// The protoreflect.Map type implements this interface.
EntryRanger interface{ Range(VisitEntry) }
- // VisitEntry is called everytime a map entry is visited.
- VisitEntry = func(pref.MapKey, pref.Value) bool
+ // VisitEntry is called every time a map entry is visited.
+ VisitEntry = func(protoreflect.MapKey, protoreflect.Value) bool
)
// RangeEntries iterates over the entries of es according to the specified order.
@@ -98,7 +98,7 @@ func RangeEntries(es EntryRanger, less KeyOrder, fn VisitEntry) {
}()
// Collect all entries in the map and sort them.
- es.Range(func(k pref.MapKey, v pref.Value) bool {
+ es.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {
entries = append(entries, mapEntry{k, v})
return true
})
diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings.go b/vendor/google.golang.org/protobuf/internal/strs/strings.go
index 0b74e765..a6e7df24 100644
--- a/vendor/google.golang.org/protobuf/internal/strs/strings.go
+++ b/vendor/google.golang.org/protobuf/internal/strs/strings.go
@@ -17,7 +17,7 @@ import (
// EnforceUTF8 reports whether to enforce strict UTF-8 validation.
func EnforceUTF8(fd protoreflect.FieldDescriptor) bool {
- if flags.ProtoLegacy {
+ if flags.ProtoLegacy || fd.Syntax() == protoreflect.Editions {
if fd, ok := fd.(interface{ EnforceUTF8() bool }); ok {
return fd.EnforceUTF8()
}
diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
index 85e074c9..a1f6f333 100644
--- a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
+++ b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package strs
diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go
similarity index 87%
rename from vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go
rename to vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go
index 2160c701..a008acd0 100644
--- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go
+++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go
@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !purego,!appengine
+//go:build !purego && !appengine && !go1.21
+// +build !purego,!appengine,!go1.21
package strs
import (
"unsafe"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
type (
@@ -58,7 +59,7 @@ type Builder struct {
// AppendFullName is equivalent to protoreflect.FullName.Append,
// but optimized for large batches where each name has a shared lifetime.
-func (sb *Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName {
+func (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName {
n := len(prefix) + len(".") + len(name)
if len(prefix) == 0 {
n -= len(".")
@@ -67,7 +68,7 @@ func (sb *Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.Ful
sb.buf = append(sb.buf, prefix...)
sb.buf = append(sb.buf, '.')
sb.buf = append(sb.buf, name...)
- return pref.FullName(sb.last(n))
+ return protoreflect.FullName(sb.last(n))
}
// MakeString is equivalent to string(b), but optimized for large batches
@@ -86,7 +87,7 @@ func (sb *Builder) grow(n int) {
// Unlike strings.Builder, we do not need to copy over the contents
// of the old buffer since our builder provides no API for
// retrieving previously created strings.
- sb.buf = make([]byte, 2*(cap(sb.buf)+n))
+ sb.buf = make([]byte, 0, 2*(cap(sb.buf)+n))
}
func (sb *Builder) last(n int) string {
diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go
new file mode 100644
index 00000000..60166f2b
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go
@@ -0,0 +1,74 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !purego && !appengine && go1.21
+// +build !purego,!appengine,go1.21
+
+package strs
+
+import (
+ "unsafe"
+
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+// UnsafeString returns an unsafe string reference of b.
+// The caller must treat the input slice as immutable.
+//
+// WARNING: Use carefully. The returned result must not leak to the end user
+// unless the input slice is provably immutable.
+func UnsafeString(b []byte) string {
+ return unsafe.String(unsafe.SliceData(b), len(b))
+}
+
+// UnsafeBytes returns an unsafe bytes slice reference of s.
+// The caller must treat returned slice as immutable.
+//
+// WARNING: Use carefully. The returned result must not leak to the end user.
+func UnsafeBytes(s string) []byte {
+ return unsafe.Slice(unsafe.StringData(s), len(s))
+}
+
+// Builder builds a set of strings with shared lifetime.
+// This differs from strings.Builder, which is for building a single string.
+type Builder struct {
+ buf []byte
+}
+
+// AppendFullName is equivalent to protoreflect.FullName.Append,
+// but optimized for large batches where each name has a shared lifetime.
+func (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName {
+ n := len(prefix) + len(".") + len(name)
+ if len(prefix) == 0 {
+ n -= len(".")
+ }
+ sb.grow(n)
+ sb.buf = append(sb.buf, prefix...)
+ sb.buf = append(sb.buf, '.')
+ sb.buf = append(sb.buf, name...)
+ return protoreflect.FullName(sb.last(n))
+}
+
+// MakeString is equivalent to string(b), but optimized for large batches
+// with a shared lifetime.
+func (sb *Builder) MakeString(b []byte) string {
+ sb.grow(len(b))
+ sb.buf = append(sb.buf, b...)
+ return sb.last(len(b))
+}
+
+func (sb *Builder) grow(n int) {
+ if cap(sb.buf)-len(sb.buf) >= n {
+ return
+ }
+
+ // Unlike strings.Builder, we do not need to copy over the contents
+ // of the old buffer since our builder provides no API for
+ // retrieving previously created strings.
+ sb.buf = make([]byte, 0, 2*(cap(sb.buf)+n))
+}
+
+func (sb *Builder) last(n int) string {
+ return UnsafeString(sb.buf[len(sb.buf)-n:])
+}
diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go
index 14e774fb..a50fcfb4 100644
--- a/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -12,54 +12,54 @@ import (
// These constants determine the current version of this module.
//
-//
// For our release process, we enforce the following rules:
-// * Tagged releases use a tag that is identical to String.
-// * Tagged releases never reference a commit where the String
-// contains "devel".
-// * The set of all commits in this repository where String
-// does not contain "devel" must have a unique String.
-//
+// - Tagged releases use a tag that is identical to String.
+// - Tagged releases never reference a commit where the String
+// contains "devel".
+// - The set of all commits in this repository where String
+// does not contain "devel" must have a unique String.
//
// Steps for tagging a new release:
-// 1. Create a new CL.
//
-// 2. Update Minor, Patch, and/or PreRelease as necessary.
-// PreRelease must not contain the string "devel".
+// 1. Create a new CL.
//
-// 3. Since the last released minor version, have there been any changes to
-// generator that relies on new functionality in the runtime?
-// If yes, then increment RequiredGenerated.
+// 2. Update Minor, Patch, and/or PreRelease as necessary.
+// PreRelease must not contain the string "devel".
//
-// 4. Since the last released minor version, have there been any changes to
-// the runtime that removes support for old .pb.go source code?
-// If yes, then increment SupportMinimum.
+// 3. Since the last released minor version, have there been any changes to
+// generator that relies on new functionality in the runtime?
+// If yes, then increment RequiredGenerated.
//
-// 5. Send out the CL for review and submit it.
-// Note that the next CL in step 8 must be submitted after this CL
-// without any other CLs in-between.
+// 4. Since the last released minor version, have there been any changes to
+// the runtime that removes support for old .pb.go source code?
+// If yes, then increment SupportMinimum.
//
-// 6. Tag a new version, where the tag is is the current String.
+// 5. Send out the CL for review and submit it.
+// Note that the next CL in step 8 must be submitted after this CL
+// without any other CLs in-between.
//
-// 7. Write release notes for all notable changes
-// between this release and the last release.
+// 6. Tag a new version, where the tag is is the current String.
//
-// 8. Create a new CL.
+// 7. Write release notes for all notable changes
+// between this release and the last release.
//
-// 9. Update PreRelease to include the string "devel".
-// For example: "" -> "devel" or "rc.1" -> "rc.1.devel"
+// 8. Create a new CL.
//
-// 10. Send out the CL for review and submit it.
+// 9. Update PreRelease to include the string "devel".
+// For example: "" -> "devel" or "rc.1" -> "rc.1.devel"
+//
+// 10. Send out the CL for review and submit it.
const (
Major = 1
- Minor = 27
- Patch = 1
+ Minor = 33
+ Patch = 0
PreRelease = ""
)
// String formats the version string for this module in semver format.
//
// Examples:
+//
// v1.20.1
// v1.21.0-rc.1
func String() string {
diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go
index 49f9b8c8..e5b03b56 100644
--- a/vendor/google.golang.org/protobuf/proto/decode.go
+++ b/vendor/google.golang.org/protobuf/proto/decode.go
@@ -19,7 +19,8 @@ import (
// UnmarshalOptions configures the unmarshaler.
//
// Example usage:
-// err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m)
+//
+// err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m)
type UnmarshalOptions struct {
pragma.NoUnkeyedLiterals
@@ -42,18 +43,25 @@ type UnmarshalOptions struct {
FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
}
+
+ // RecursionLimit limits how deeply messages may be nested.
+ // If zero, a default limit is applied.
+ RecursionLimit int
}
// Unmarshal parses the wire-format message in b and places the result in m.
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func Unmarshal(b []byte, m Message) error {
- _, err := UnmarshalOptions{}.unmarshal(b, m.ProtoReflect())
+ _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect())
return err
}
// Unmarshal parses the wire-format message in b and places the result in m.
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {
+ if o.RecursionLimit == 0 {
+ o.RecursionLimit = protowire.DefaultRecursionLimit
+ }
_, err := o.unmarshal(b, m.ProtoReflect())
return err
}
@@ -61,8 +69,11 @@ func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {
// UnmarshalState parses a wire-format message and places the result in m.
//
// This method permits fine-grained control over the unmarshaler.
-// Most users should use Unmarshal instead.
+// Most users should use [Unmarshal] instead.
func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
+ if o.RecursionLimit == 0 {
+ o.RecursionLimit = protowire.DefaultRecursionLimit
+ }
return o.unmarshal(in.Buf, in.Message)
}
@@ -86,12 +97,17 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto
Message: m,
Buf: b,
Resolver: o.Resolver,
+ Depth: o.RecursionLimit,
}
if o.DiscardUnknown {
in.Flags |= protoiface.UnmarshalDiscardUnknown
}
out, err = methods.Unmarshal(in)
} else {
+ o.RecursionLimit--
+ if o.RecursionLimit < 0 {
+ return out, errors.New("exceeded max recursion depth")
+ }
err = o.unmarshalMessageSlow(b, m)
}
if err != nil {
diff --git a/vendor/google.golang.org/protobuf/proto/doc.go b/vendor/google.golang.org/protobuf/proto/doc.go
index c52d8c4a..80ed16a0 100644
--- a/vendor/google.golang.org/protobuf/proto/doc.go
+++ b/vendor/google.golang.org/protobuf/proto/doc.go
@@ -5,89 +5,81 @@
// Package proto provides functions operating on protocol buffer messages.
//
// For documentation on protocol buffers in general, see:
-//
-// https://developers.google.com/protocol-buffers
+// https://protobuf.dev.
//
// For a tutorial on using protocol buffers with Go, see:
-//
-// https://developers.google.com/protocol-buffers/docs/gotutorial
+// https://protobuf.dev/getting-started/gotutorial.
//
// For a guide to generated Go protocol buffer code, see:
+// https://protobuf.dev/reference/go/go-generated.
//
-// https://developers.google.com/protocol-buffers/docs/reference/go-generated
-//
-//
-// Binary serialization
+// # Binary serialization
//
// This package contains functions to convert to and from the wire format,
// an efficient binary serialization of protocol buffers.
//
-// • Size reports the size of a message in the wire format.
+// - [Size] reports the size of a message in the wire format.
//
-// • Marshal converts a message to the wire format.
-// The MarshalOptions type provides more control over wire marshaling.
+// - [Marshal] converts a message to the wire format.
+// The [MarshalOptions] type provides more control over wire marshaling.
//
-// • Unmarshal converts a message from the wire format.
-// The UnmarshalOptions type provides more control over wire unmarshaling.
+// - [Unmarshal] converts a message from the wire format.
+// The [UnmarshalOptions] type provides more control over wire unmarshaling.
//
+// # Basic message operations
//
-// Basic message operations
+// - [Clone] makes a deep copy of a message.
//
-// • Clone makes a deep copy of a message.
+// - [Merge] merges the content of a message into another.
//
-// • Merge merges the content of a message into another.
+// - [Equal] compares two messages. For more control over comparisons
+// and detailed reporting of differences, see package
+// [google.golang.org/protobuf/testing/protocmp].
//
-// • Equal compares two messages. For more control over comparisons
-// and detailed reporting of differences, see package
-// "google.golang.org/protobuf/testing/protocmp".
+// - [Reset] clears the content of a message.
//
-// • Reset clears the content of a message.
+// - [CheckInitialized] reports whether all required fields in a message are set.
//
-// • CheckInitialized reports whether all required fields in a message are set.
-//
-//
-// Optional scalar constructors
+// # Optional scalar constructors
//
// The API for some generated messages represents optional scalar fields
// as pointers to a value. For example, an optional string field has the
// Go type *string.
//
-// • Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, and String
-// take a value and return a pointer to a new instance of it,
-// to simplify construction of optional field values.
+// - [Bool], [Int32], [Int64], [Uint32], [Uint64], [Float32], [Float64], and [String]
+// take a value and return a pointer to a new instance of it,
+// to simplify construction of optional field values.
//
// Generated enum types usually have an Enum method which performs the
// same operation.
//
// Optional scalar fields are only supported in proto2.
//
+// # Extension accessors
//
-// Extension accessors
-//
-// • HasExtension, GetExtension, SetExtension, and ClearExtension
-// access extension field values in a protocol buffer message.
+// - [HasExtension], [GetExtension], [SetExtension], and [ClearExtension]
+// access extension field values in a protocol buffer message.
//
// Extension fields are only supported in proto2.
//
+// # Related packages
//
-// Related packages
-//
-// • Package "google.golang.org/protobuf/encoding/protojson" converts messages to
-// and from JSON.
+// - Package [google.golang.org/protobuf/encoding/protojson] converts messages to
+// and from JSON.
//
-// • Package "google.golang.org/protobuf/encoding/prototext" converts messages to
-// and from the text format.
+// - Package [google.golang.org/protobuf/encoding/prototext] converts messages to
+// and from the text format.
//
-// • Package "google.golang.org/protobuf/reflect/protoreflect" provides a
-// reflection interface for protocol buffer data types.
+// - Package [google.golang.org/protobuf/reflect/protoreflect] provides a
+// reflection interface for protocol buffer data types.
//
-// • Package "google.golang.org/protobuf/testing/protocmp" provides features
-// to compare protocol buffer messages with the "github.com/google/go-cmp/cmp"
-// package.
+// - Package [google.golang.org/protobuf/testing/protocmp] provides features
+// to compare protocol buffer messages with the [github.com/google/go-cmp/cmp]
+// package.
//
-// • Package "google.golang.org/protobuf/types/dynamicpb" provides a dynamic
-// message type, suitable for working with messages where the protocol buffer
-// type is only known at runtime.
+// - Package [google.golang.org/protobuf/types/dynamicpb] provides a dynamic
+// message type, suitable for working with messages where the protocol buffer
+// type is only known at runtime.
//
// This module contains additional packages for more specialized use cases.
// Consult the individual package documentation for details.
diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go
index d18239c2..4fed202f 100644
--- a/vendor/google.golang.org/protobuf/proto/encode.go
+++ b/vendor/google.golang.org/protobuf/proto/encode.go
@@ -16,7 +16,8 @@ import (
// MarshalOptions configures the marshaler.
//
// Example usage:
-// b, err := MarshalOptions{Deterministic: true}.Marshal(m)
+//
+// b, err := MarshalOptions{Deterministic: true}.Marshal(m)
type MarshalOptions struct {
pragma.NoUnkeyedLiterals
@@ -101,7 +102,9 @@ func (o MarshalOptions) Marshal(m Message) ([]byte, error) {
// otherwise it returns a non-nil empty buffer.
//
// This is to assist the edge-case where user-code does the following:
+//
// m1.OptionalBytes, _ = proto.Marshal(m2)
+//
// where they expect the proto2 "optional_bytes" field to be populated
// if any only if m2 is a valid message.
func emptyBytesForMessage(m Message) []byte {
@@ -126,7 +129,7 @@ func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) {
// MarshalState returns the wire-format encoding of a message.
//
// This method permits fine-grained control over the marshaler.
-// Most users should use Marshal instead.
+// Most users should use [Marshal] instead.
func (o MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
return o.marshal(in.Buf, in.Message)
}
diff --git a/vendor/google.golang.org/protobuf/proto/equal.go b/vendor/google.golang.org/protobuf/proto/equal.go
index 4dba2b96..1a0be1b0 100644
--- a/vendor/google.golang.org/protobuf/proto/equal.go
+++ b/vendor/google.golang.org/protobuf/proto/equal.go
@@ -5,163 +5,53 @@
package proto
import (
- "bytes"
- "math"
"reflect"
- "google.golang.org/protobuf/encoding/protowire"
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
-// Equal reports whether two messages are equal.
-// If two messages marshal to the same bytes under deterministic serialization,
-// then Equal is guaranteed to report true.
+// Equal reports whether two messages are equal,
+// by recursively comparing the fields of the message.
//
-// Two messages are equal if they belong to the same message descriptor,
-// have the same set of populated known and extension field values,
-// and the same set of unknown fields values. If either of the top-level
-// messages are invalid, then Equal reports true only if both are invalid.
+// - Bytes fields are equal if they contain identical bytes.
+// Empty bytes (regardless of nil-ness) are considered equal.
//
-// Scalar values are compared with the equivalent of the == operator in Go,
-// except bytes values which are compared using bytes.Equal and
-// floating point values which specially treat NaNs as equal.
-// Message values are compared by recursively calling Equal.
-// Lists are equal if each element value is also equal.
-// Maps are equal if they have the same set of keys, where the pair of values
-// for each key is also equal.
+// - Floating-point fields are equal if they contain the same value.
+// Unlike the == operator, a NaN is equal to another NaN.
+//
+// - Other scalar fields are equal if they contain the same value.
+//
+// - Message fields are equal if they have
+// the same set of populated known and extension field values, and
+// the same set of unknown fields values.
+//
+// - Lists are equal if they are the same length and
+// each corresponding element is equal.
+//
+// - Maps are equal if they have the same set of keys and
+// the corresponding value for each key is equal.
+//
+// An invalid message is not equal to a valid message.
+// An invalid message is only equal to another invalid message of the
+// same type. An invalid message often corresponds to a nil pointer
+// of the concrete message type. For example, (*pb.M)(nil) is not equal
+// to &pb.M{}.
+// If two valid messages marshal to the same bytes under deterministic
+// serialization, then Equal is guaranteed to report true.
func Equal(x, y Message) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
+ if reflect.TypeOf(x).Kind() == reflect.Ptr && x == y {
+ // Avoid an expensive comparison if both inputs are identical pointers.
+ return true
+ }
mx := x.ProtoReflect()
my := y.ProtoReflect()
if mx.IsValid() != my.IsValid() {
return false
}
- return equalMessage(mx, my)
-}
-
-// equalMessage compares two messages.
-func equalMessage(mx, my pref.Message) bool {
- if mx.Descriptor() != my.Descriptor() {
- return false
- }
-
- nx := 0
- equal := true
- mx.Range(func(fd pref.FieldDescriptor, vx pref.Value) bool {
- nx++
- vy := my.Get(fd)
- equal = my.Has(fd) && equalField(fd, vx, vy)
- return equal
- })
- if !equal {
- return false
- }
- ny := 0
- my.Range(func(fd pref.FieldDescriptor, vx pref.Value) bool {
- ny++
- return true
- })
- if nx != ny {
- return false
- }
-
- return equalUnknown(mx.GetUnknown(), my.GetUnknown())
-}
-
-// equalField compares two fields.
-func equalField(fd pref.FieldDescriptor, x, y pref.Value) bool {
- switch {
- case fd.IsList():
- return equalList(fd, x.List(), y.List())
- case fd.IsMap():
- return equalMap(fd, x.Map(), y.Map())
- default:
- return equalValue(fd, x, y)
- }
-}
-
-// equalMap compares two maps.
-func equalMap(fd pref.FieldDescriptor, x, y pref.Map) bool {
- if x.Len() != y.Len() {
- return false
- }
- equal := true
- x.Range(func(k pref.MapKey, vx pref.Value) bool {
- vy := y.Get(k)
- equal = y.Has(k) && equalValue(fd.MapValue(), vx, vy)
- return equal
- })
- return equal
-}
-
-// equalList compares two lists.
-func equalList(fd pref.FieldDescriptor, x, y pref.List) bool {
- if x.Len() != y.Len() {
- return false
- }
- for i := x.Len() - 1; i >= 0; i-- {
- if !equalValue(fd, x.Get(i), y.Get(i)) {
- return false
- }
- }
- return true
-}
-
-// equalValue compares two singular values.
-func equalValue(fd pref.FieldDescriptor, x, y pref.Value) bool {
- switch fd.Kind() {
- case pref.BoolKind:
- return x.Bool() == y.Bool()
- case pref.EnumKind:
- return x.Enum() == y.Enum()
- case pref.Int32Kind, pref.Sint32Kind,
- pref.Int64Kind, pref.Sint64Kind,
- pref.Sfixed32Kind, pref.Sfixed64Kind:
- return x.Int() == y.Int()
- case pref.Uint32Kind, pref.Uint64Kind,
- pref.Fixed32Kind, pref.Fixed64Kind:
- return x.Uint() == y.Uint()
- case pref.FloatKind, pref.DoubleKind:
- fx := x.Float()
- fy := y.Float()
- if math.IsNaN(fx) || math.IsNaN(fy) {
- return math.IsNaN(fx) && math.IsNaN(fy)
- }
- return fx == fy
- case pref.StringKind:
- return x.String() == y.String()
- case pref.BytesKind:
- return bytes.Equal(x.Bytes(), y.Bytes())
- case pref.MessageKind, pref.GroupKind:
- return equalMessage(x.Message(), y.Message())
- default:
- return x.Interface() == y.Interface()
- }
-}
-
-// equalUnknown compares unknown fields by direct comparison on the raw bytes
-// of each individual field number.
-func equalUnknown(x, y pref.RawFields) bool {
- if len(x) != len(y) {
- return false
- }
- if bytes.Equal([]byte(x), []byte(y)) {
- return true
- }
-
- mx := make(map[pref.FieldNumber]pref.RawFields)
- my := make(map[pref.FieldNumber]pref.RawFields)
- for len(x) > 0 {
- fnum, _, n := protowire.ConsumeField(x)
- mx[fnum] = append(mx[fnum], x[:n]...)
- x = x[n:]
- }
- for len(y) > 0 {
- fnum, _, n := protowire.ConsumeField(y)
- my[fnum] = append(my[fnum], y[:n]...)
- y = y[n:]
- }
- return reflect.DeepEqual(mx, my)
+ vx := protoreflect.ValueOfMessage(mx)
+ vy := protoreflect.ValueOfMessage(my)
+ return vx.Equal(vy)
}
diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go
index 5f293cda..17899a3a 100644
--- a/vendor/google.golang.org/protobuf/proto/extension.go
+++ b/vendor/google.golang.org/protobuf/proto/extension.go
@@ -26,7 +26,7 @@ func HasExtension(m Message, xt protoreflect.ExtensionType) bool {
}
// ClearExtension clears an extension field such that subsequent
-// HasExtension calls return false.
+// [HasExtension] calls return false.
// It panics if m is invalid or if xt does not extend m.
func ClearExtension(m Message, xt protoreflect.ExtensionType) {
m.ProtoReflect().Clear(xt.TypeDescriptor())
diff --git a/vendor/google.golang.org/protobuf/proto/merge.go b/vendor/google.golang.org/protobuf/proto/merge.go
index d761ab33..3c6fe578 100644
--- a/vendor/google.golang.org/protobuf/proto/merge.go
+++ b/vendor/google.golang.org/protobuf/proto/merge.go
@@ -21,7 +21,7 @@ import (
// The unknown fields of src are appended to the unknown fields of dst.
//
// It is semantically equivalent to unmarshaling the encoded form of src
-// into dst with the UnmarshalOptions.Merge option specified.
+// into dst with the [UnmarshalOptions.Merge] option specified.
func Merge(dst, src Message) {
// TODO: Should nil src be treated as semantically equivalent to a
// untyped, read-only, empty message? What about a nil dst?
diff --git a/vendor/google.golang.org/protobuf/proto/proto.go b/vendor/google.golang.org/protobuf/proto/proto.go
index 1f0d183b..7543ee6b 100644
--- a/vendor/google.golang.org/protobuf/proto/proto.go
+++ b/vendor/google.golang.org/protobuf/proto/proto.go
@@ -15,18 +15,20 @@ import (
// protobuf module that accept a Message, except where otherwise specified.
//
// This is the v2 interface definition for protobuf messages.
-// The v1 interface definition is "github.com/golang/protobuf/proto".Message.
+// The v1 interface definition is [github.com/golang/protobuf/proto.Message].
//
-// To convert a v1 message to a v2 message,
-// use "github.com/golang/protobuf/proto".MessageV2.
-// To convert a v2 message to a v1 message,
-// use "github.com/golang/protobuf/proto".MessageV1.
+// - To convert a v1 message to a v2 message,
+// use [google.golang.org/protobuf/protoadapt.MessageV2Of].
+// - To convert a v2 message to a v1 message,
+// use [google.golang.org/protobuf/protoadapt.MessageV1Of].
type Message = protoreflect.ProtoMessage
-// Error matches all errors produced by packages in the protobuf module.
+// Error matches all errors produced by packages in the protobuf module
+// according to [errors.Is].
//
-// That is, errors.Is(err, Error) reports whether an error is produced
-// by this module.
+// Example usage:
+//
+// if errors.Is(err, proto.Error) { ... }
var Error error
func init() {
diff --git a/vendor/google.golang.org/protobuf/proto/proto_methods.go b/vendor/google.golang.org/protobuf/proto/proto_methods.go
index d8dd604f..465e057b 100644
--- a/vendor/google.golang.org/protobuf/proto/proto_methods.go
+++ b/vendor/google.golang.org/protobuf/proto/proto_methods.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// The protoreflect build tag disables use of fast-path methods.
+//go:build !protoreflect
// +build !protoreflect
package proto
diff --git a/vendor/google.golang.org/protobuf/proto/proto_reflect.go b/vendor/google.golang.org/protobuf/proto/proto_reflect.go
index b103d432..494d6cee 100644
--- a/vendor/google.golang.org/protobuf/proto/proto_reflect.go
+++ b/vendor/google.golang.org/protobuf/proto/proto_reflect.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// The protoreflect build tag disables use of fast-path methods.
+//go:build protoreflect
// +build protoreflect
package proto
diff --git a/vendor/google.golang.org/protobuf/proto/size.go b/vendor/google.golang.org/protobuf/proto/size.go
index 554b9c6c..f1692b49 100644
--- a/vendor/google.golang.org/protobuf/proto/size.go
+++ b/vendor/google.golang.org/protobuf/proto/size.go
@@ -73,23 +73,27 @@ func (o MarshalOptions) sizeField(fd protoreflect.FieldDescriptor, value protore
}
func (o MarshalOptions) sizeList(num protowire.Number, fd protoreflect.FieldDescriptor, list protoreflect.List) (size int) {
+ sizeTag := protowire.SizeTag(num)
+
if fd.IsPacked() && list.Len() > 0 {
content := 0
for i, llen := 0, list.Len(); i < llen; i++ {
content += o.sizeSingular(num, fd.Kind(), list.Get(i))
}
- return protowire.SizeTag(num) + protowire.SizeBytes(content)
+ return sizeTag + protowire.SizeBytes(content)
}
for i, llen := 0, list.Len(); i < llen; i++ {
- size += protowire.SizeTag(num) + o.sizeSingular(num, fd.Kind(), list.Get(i))
+ size += sizeTag + o.sizeSingular(num, fd.Kind(), list.Get(i))
}
return size
}
func (o MarshalOptions) sizeMap(num protowire.Number, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) (size int) {
+ sizeTag := protowire.SizeTag(num)
+
mapv.Range(func(key protoreflect.MapKey, value protoreflect.Value) bool {
- size += protowire.SizeTag(num)
+ size += sizeTag
size += protowire.SizeBytes(o.sizeField(fd.MapKey(), key.Value()) + o.sizeField(fd.MapValue(), value))
return true
})
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
index e4dfb120..baa0cc62 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
@@ -3,11 +3,11 @@
// license that can be found in the LICENSE file.
// Package protodesc provides functionality for converting
-// FileDescriptorProto messages to/from protoreflect.FileDescriptor values.
+// FileDescriptorProto messages to/from [protoreflect.FileDescriptor] values.
//
// The google.protobuf.FileDescriptorProto is a protobuf message that describes
// the type information for a .proto file in a form that is easily serializable.
-// The protoreflect.FileDescriptor is a more structured representation of
+// The [protoreflect.FileDescriptor] is a more structured representation of
// the FileDescriptorProto message where references and remote dependencies
// can be directly followed.
package protodesc
@@ -24,11 +24,11 @@ import (
"google.golang.org/protobuf/types/descriptorpb"
)
-// Resolver is the resolver used by NewFile to resolve dependencies.
+// Resolver is the resolver used by [NewFile] to resolve dependencies.
// The enums and messages provided must belong to some parent file,
// which is also registered.
//
-// It is implemented by protoregistry.Files.
+// It is implemented by [protoregistry.Files].
type Resolver interface {
FindFileByPath(string) (protoreflect.FileDescriptor, error)
FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error)
@@ -61,19 +61,19 @@ type FileOptions struct {
AllowUnresolvable bool
}
-// NewFile creates a new protoreflect.FileDescriptor from the provided
-// file descriptor message. See FileOptions.New for more information.
+// NewFile creates a new [protoreflect.FileDescriptor] from the provided
+// file descriptor message. See [FileOptions.New] for more information.
func NewFile(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) {
return FileOptions{}.New(fd, r)
}
-// NewFiles creates a new protoregistry.Files from the provided
-// FileDescriptorSet message. See FileOptions.NewFiles for more information.
+// NewFiles creates a new [protoregistry.Files] from the provided
+// FileDescriptorSet message. See [FileOptions.NewFiles] for more information.
func NewFiles(fd *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) {
return FileOptions{}.NewFiles(fd)
}
-// New creates a new protoreflect.FileDescriptor from the provided
+// New creates a new [protoreflect.FileDescriptor] from the provided
// file descriptor message. The file must represent a valid proto file according
// to protobuf semantics. The returned descriptor is a deep copy of the input.
//
@@ -93,9 +93,15 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot
f.L1.Syntax = protoreflect.Proto2
case "proto3":
f.L1.Syntax = protoreflect.Proto3
+ case "editions":
+ f.L1.Syntax = protoreflect.Editions
+ f.L1.Edition = fromEditionProto(fd.GetEdition())
default:
return nil, errors.New("invalid syntax: %q", fd.GetSyntax())
}
+ if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < SupportedEditionsMinimum || fd.GetEdition() > SupportedEditionsMaximum) {
+ return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition())
+ }
f.L1.Path = fd.GetName()
if f.L1.Path == "" {
return nil, errors.New("file path must be populated")
@@ -108,6 +114,9 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot
opts = proto.Clone(opts).(*descriptorpb.FileOptions)
f.L2.Options = func() protoreflect.ProtoMessage { return opts }
}
+ if f.L1.Syntax == protoreflect.Editions {
+ initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures())
+ }
f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency()))
for _, i := range fd.GetPublicDependency() {
@@ -231,7 +240,7 @@ func (is importSet) importPublic(imps protoreflect.FileImports) {
}
}
-// NewFiles creates a new protoregistry.Files from the provided
+// NewFiles creates a new [protoregistry.Files] from the provided
// FileDescriptorSet message. The descriptor set must include only
// valid files according to protobuf semantics. The returned descriptors
// are a deep copy of the input.
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go
index 37efda1a..b3278163 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go
@@ -28,6 +28,7 @@ func (r descsByName) initEnumDeclarations(eds []*descriptorpb.EnumDescriptorProt
opts = proto.Clone(opts).(*descriptorpb.EnumOptions)
e.L2.Options = func() protoreflect.ProtoMessage { return opts }
}
+ e.L1.EditionFeatures = mergeEditionFeatures(parent, ed.GetOptions().GetFeatures())
for _, s := range ed.GetReservedName() {
e.L2.ReservedNames.List = append(e.L2.ReservedNames.List, protoreflect.Name(s))
}
@@ -68,6 +69,9 @@ func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProt
if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil {
return nil, err
}
+ if m.Base.L0.ParentFile.Syntax() == protoreflect.Editions {
+ m.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures())
+ }
if opts := md.GetOptions(); opts != nil {
opts = proto.Clone(opts).(*descriptorpb.MessageOptions)
m.L2.Options = func() protoreflect.ProtoMessage { return opts }
@@ -114,6 +118,27 @@ func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProt
return ms, nil
}
+// canBePacked returns whether the field can use packed encoding:
+// https://protobuf.dev/programming-guides/encoding/#packed
+func canBePacked(fd *descriptorpb.FieldDescriptorProto) bool {
+ if fd.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
+ return false // not a repeated field
+ }
+
+ switch protoreflect.Kind(fd.GetType()) {
+ case protoreflect.MessageKind, protoreflect.GroupKind:
+ return false // not a scalar type field
+
+ case protoreflect.StringKind, protoreflect.BytesKind:
+ // string and bytes can explicitly not be declared as packed,
+ // see https://protobuf.dev/programming-guides/encoding/#packed
+ return false
+
+ default:
+ return true
+ }
+}
+
func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (fs []filedesc.Field, err error) {
fs = make([]filedesc.Field, len(fds)) // allocate up-front to ensure stable pointers
for i, fd := range fds {
@@ -137,6 +162,34 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc
if fd.JsonName != nil {
f.L1.StringName.InitJSON(fd.GetJsonName())
}
+
+ if f.Base.L0.ParentFile.Syntax() == protoreflect.Editions {
+ f.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures())
+
+ if f.L1.EditionFeatures.IsLegacyRequired {
+ f.L1.Cardinality = protoreflect.Required
+ }
+ // We reuse the existing field because the old option `[packed =
+ // true]` is mutually exclusive with the editions feature.
+ if canBePacked(fd) {
+ f.L1.HasPacked = true
+ f.L1.IsPacked = f.L1.EditionFeatures.IsPacked
+ }
+
+ // We pretend this option is always explicitly set because the only
+ // use of HasEnforceUTF8 is to determine whether to use EnforceUTF8
+ // or to return the appropriate default.
+ // When using editions we either parse the option or resolve the
+ // appropriate default here (instead of later when this option is
+ // requested from the descriptor).
+ // In proto2/proto3 syntax HasEnforceUTF8 might be false.
+ f.L1.HasEnforceUTF8 = true
+ f.L1.EnforceUTF8 = f.L1.EditionFeatures.IsUTF8Validated
+
+ if f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded {
+ f.L1.Kind = protoreflect.GroupKind
+ }
+ }
}
return fs, nil
}
@@ -151,6 +204,9 @@ func (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDesc
if opts := od.GetOptions(); opts != nil {
opts = proto.Clone(opts).(*descriptorpb.OneofOptions)
o.L1.Options = func() protoreflect.ProtoMessage { return opts }
+ if parent.Syntax() == protoreflect.Editions {
+ o.L1.EditionFeatures = mergeEditionFeatures(parent, opts.GetFeatures())
+ }
}
}
return os, nil
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
index cebb36cd..254ca585 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
@@ -155,9 +155,9 @@ func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName,
//
// Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar",
// then the following full names are searched:
-// * fizz.buzz.Foo.Bar
-// * fizz.Foo.Bar
-// * Foo.Bar
+// - fizz.buzz.Foo.Bar
+// - fizz.Foo.Bar
+// - Foo.Bar
func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) {
if !ref.IsValid() {
return nil, errors.New("invalid name reference: %q", ref)
@@ -276,8 +276,8 @@ func unmarshalDefault(s string, fd protoreflect.FieldDescriptor, allowUnresolvab
} else if err != nil {
return v, ev, err
}
- if fd.Syntax() == protoreflect.Proto3 {
- return v, ev, errors.New("cannot be specified under proto3 semantics")
+ if !fd.HasPresence() {
+ return v, ev, errors.New("cannot be specified with implicit field presence")
}
if fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind || fd.Cardinality() == protoreflect.Repeated {
return v, ev, errors.New("cannot be specified on composite types")
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
index 9af1d564..e4dcaf87 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
@@ -107,7 +107,7 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc
if isMessageSet && !flags.ProtoLegacy {
return errors.New("message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported", m.FullName())
}
- if isMessageSet && (m.Syntax() != protoreflect.Proto2 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) {
+ if isMessageSet && (m.Syntax() == protoreflect.Proto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) {
return errors.New("message %q is an invalid proto1 MessageSet", m.FullName())
}
if m.Syntax() == protoreflect.Proto3 {
@@ -314,8 +314,8 @@ func checkValidGroup(fd protoreflect.FieldDescriptor) error {
switch {
case fd.Kind() != protoreflect.GroupKind:
return nil
- case fd.Syntax() != protoreflect.Proto2:
- return errors.New("invalid under proto2 semantics")
+ case fd.Syntax() == protoreflect.Proto3:
+ return errors.New("invalid under proto3 semantics")
case md == nil || md.IsPlaceholder():
return errors.New("message must be resolvable")
case fd.FullName().Parent() != md.FullName().Parent():
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go
new file mode 100644
index 00000000..2a6b29d1
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go
@@ -0,0 +1,148 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package protodesc
+
+import (
+ "fmt"
+ "os"
+ "sync"
+
+ "google.golang.org/protobuf/internal/editiondefaults"
+ "google.golang.org/protobuf/internal/filedesc"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+ gofeaturespb "google.golang.org/protobuf/types/gofeaturespb"
+)
+
+const (
+ SupportedEditionsMinimum = descriptorpb.Edition_EDITION_PROTO2
+ SupportedEditionsMaximum = descriptorpb.Edition_EDITION_2023
+)
+
+var defaults = &descriptorpb.FeatureSetDefaults{}
+var defaultsCacheMu sync.Mutex
+var defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet)
+
+func init() {
+ err := proto.Unmarshal(editiondefaults.Defaults, defaults)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "unmarshal editions defaults: %v\n", err)
+ os.Exit(1)
+ }
+}
+
+func fromEditionProto(epb descriptorpb.Edition) filedesc.Edition {
+ return filedesc.Edition(epb)
+}
+
+func toEditionProto(ed filedesc.Edition) descriptorpb.Edition {
+ switch ed {
+ case filedesc.EditionUnknown:
+ return descriptorpb.Edition_EDITION_UNKNOWN
+ case filedesc.EditionProto2:
+ return descriptorpb.Edition_EDITION_PROTO2
+ case filedesc.EditionProto3:
+ return descriptorpb.Edition_EDITION_PROTO3
+ case filedesc.Edition2023:
+ return descriptorpb.Edition_EDITION_2023
+ default:
+ panic(fmt.Sprintf("unknown value for edition: %v", ed))
+ }
+}
+
+func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet {
+ defaultsCacheMu.Lock()
+ defer defaultsCacheMu.Unlock()
+ if def, ok := defaultsCache[ed]; ok {
+ return def
+ }
+ edpb := toEditionProto(ed)
+ if defaults.GetMinimumEdition() > edpb || defaults.GetMaximumEdition() < edpb {
+ // This should never happen protodesc.(FileOptions).New would fail when
+ // initializing the file descriptor.
+ // This most likely means the embedded defaults were not updated.
+ fmt.Fprintf(os.Stderr, "internal error: unsupported edition %v (did you forget to update the embedded defaults (i.e. the bootstrap descriptor proto)?)\n", edpb)
+ os.Exit(1)
+ }
+ fs := defaults.GetDefaults()[0].GetFeatures()
+ // Using a linear search for now.
+ // Editions are guaranteed to be sorted and thus we could use a binary search.
+ // Given that there are only a handful of editions (with one more per year)
+ // there is not much reason to use a binary search.
+ for _, def := range defaults.GetDefaults() {
+ if def.GetEdition() <= edpb {
+ fs = def.GetFeatures()
+ } else {
+ break
+ }
+ }
+ defaultsCache[ed] = fs
+ return fs
+}
+
+// mergeEditionFeatures merges the parent and child feature sets. This function
+// should be used when initializing Go descriptors from descriptor protos which
+// is why the parent is a filedesc.EditionsFeatures (Go representation) while
+// the child is a descriptorproto.FeatureSet (protoc representation).
+// Any feature set by the child overwrites what is set by the parent.
+func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorpb.FeatureSet) filedesc.EditionFeatures {
+ var parentFS filedesc.EditionFeatures
+ switch p := parentDesc.(type) {
+ case *filedesc.File:
+ parentFS = p.L1.EditionFeatures
+ case *filedesc.Message:
+ parentFS = p.L1.EditionFeatures
+ default:
+ panic(fmt.Sprintf("unknown parent type %T", parentDesc))
+ }
+ if child == nil {
+ return parentFS
+ }
+ if fp := child.FieldPresence; fp != nil {
+ parentFS.IsFieldPresence = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED ||
+ *fp == descriptorpb.FeatureSet_EXPLICIT
+ parentFS.IsLegacyRequired = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED
+ }
+ if et := child.EnumType; et != nil {
+ parentFS.IsOpenEnum = *et == descriptorpb.FeatureSet_OPEN
+ }
+
+ if rfe := child.RepeatedFieldEncoding; rfe != nil {
+ parentFS.IsPacked = *rfe == descriptorpb.FeatureSet_PACKED
+ }
+
+ if utf8val := child.Utf8Validation; utf8val != nil {
+ parentFS.IsUTF8Validated = *utf8val == descriptorpb.FeatureSet_VERIFY
+ }
+
+ if me := child.MessageEncoding; me != nil {
+ parentFS.IsDelimitedEncoded = *me == descriptorpb.FeatureSet_DELIMITED
+ }
+
+ if jf := child.JsonFormat; jf != nil {
+ parentFS.IsJSONCompliant = *jf == descriptorpb.FeatureSet_ALLOW
+ }
+
+ if goFeatures, ok := proto.GetExtension(child, gofeaturespb.E_Go).(*gofeaturespb.GoFeatures); ok && goFeatures != nil {
+ if luje := goFeatures.LegacyUnmarshalJsonEnum; luje != nil {
+ parentFS.GenerateLegacyUnmarshalJSON = *luje
+ }
+ }
+
+ return parentFS
+}
+
+// initFileDescFromFeatureSet initializes editions related fields in fd based
+// on fs. If fs is nil it is assumed to be an empty featureset and all fields
+// will be initialized with the appropriate default. fd.L1.Edition must be set
+// before calling this function.
+func initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) {
+ dfs := getFeatureSetFor(fd.L1.Edition)
+ // initialize the featureset with the defaults
+ fd.L1.EditionFeatures = mergeEditionFeatures(fd, dfs)
+ // overwrite any options explicitly specified
+ fd.L1.EditionFeatures = mergeEditionFeatures(fd, fs)
+}
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
index a7c5ceff..9d6e0542 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
@@ -16,7 +16,7 @@ import (
"google.golang.org/protobuf/types/descriptorpb"
)
-// ToFileDescriptorProto copies a protoreflect.FileDescriptor into a
+// ToFileDescriptorProto copies a [protoreflect.FileDescriptor] into a
// google.protobuf.FileDescriptorProto message.
func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileDescriptorProto {
p := &descriptorpb.FileDescriptorProto{
@@ -70,13 +70,13 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD
for i, exts := 0, file.Extensions(); i < exts.Len(); i++ {
p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i)))
}
- if syntax := file.Syntax(); syntax != protoreflect.Proto2 {
+ if syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() {
p.Syntax = proto.String(file.Syntax().String())
}
return p
}
-// ToDescriptorProto copies a protoreflect.MessageDescriptor into a
+// ToDescriptorProto copies a [protoreflect.MessageDescriptor] into a
// google.protobuf.DescriptorProto message.
func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto {
p := &descriptorpb.DescriptorProto{
@@ -119,7 +119,7 @@ func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.Des
return p
}
-// ToFieldDescriptorProto copies a protoreflect.FieldDescriptor into a
+// ToFieldDescriptorProto copies a [protoreflect.FieldDescriptor] into a
// google.protobuf.FieldDescriptorProto message.
func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.FieldDescriptorProto {
p := &descriptorpb.FieldDescriptorProto{
@@ -168,7 +168,7 @@ func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.Fi
return p
}
-// ToOneofDescriptorProto copies a protoreflect.OneofDescriptor into a
+// ToOneofDescriptorProto copies a [protoreflect.OneofDescriptor] into a
// google.protobuf.OneofDescriptorProto message.
func ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.OneofDescriptorProto {
return &descriptorpb.OneofDescriptorProto{
@@ -177,7 +177,7 @@ func ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.On
}
}
-// ToEnumDescriptorProto copies a protoreflect.EnumDescriptor into a
+// ToEnumDescriptorProto copies a [protoreflect.EnumDescriptor] into a
// google.protobuf.EnumDescriptorProto message.
func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumDescriptorProto {
p := &descriptorpb.EnumDescriptorProto{
@@ -200,7 +200,7 @@ func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumD
return p
}
-// ToEnumValueDescriptorProto copies a protoreflect.EnumValueDescriptor into a
+// ToEnumValueDescriptorProto copies a [protoreflect.EnumValueDescriptor] into a
// google.protobuf.EnumValueDescriptorProto message.
func ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto {
return &descriptorpb.EnumValueDescriptorProto{
@@ -210,7 +210,7 @@ func ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descrip
}
}
-// ToServiceDescriptorProto copies a protoreflect.ServiceDescriptor into a
+// ToServiceDescriptorProto copies a [protoreflect.ServiceDescriptor] into a
// google.protobuf.ServiceDescriptorProto message.
func ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descriptorpb.ServiceDescriptorProto {
p := &descriptorpb.ServiceDescriptorProto{
@@ -223,7 +223,7 @@ func ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descripto
return p
}
-// ToMethodDescriptorProto copies a protoreflect.MethodDescriptor into a
+// ToMethodDescriptorProto copies a [protoreflect.MethodDescriptor] into a
// google.protobuf.MethodDescriptorProto message.
func ToMethodDescriptorProto(method protoreflect.MethodDescriptor) *descriptorpb.MethodDescriptorProto {
p := &descriptorpb.MethodDescriptorProto{
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
index 6be5d16e..d5d5af6e 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
@@ -53,6 +53,7 @@ type (
FindExtensionByName(field FullName) (ExtensionType, error)
FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error)
}
+ Depth int
}
unmarshalOutput = struct {
pragma.NoUnkeyedLiterals
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
index dd85915b..00b01fbd 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
@@ -8,60 +8,55 @@
// defined in proto source files and value interfaces which provide the
// ability to examine and manipulate the contents of messages.
//
+// # Protocol Buffer Descriptors
//
-// Protocol Buffer Descriptors
-//
-// Protobuf descriptors (e.g., EnumDescriptor or MessageDescriptor)
+// Protobuf descriptors (e.g., [EnumDescriptor] or [MessageDescriptor])
// are immutable objects that represent protobuf type information.
// They are wrappers around the messages declared in descriptor.proto.
// Protobuf descriptors alone lack any information regarding Go types.
//
-// Enums and messages generated by this module implement Enum and ProtoMessage,
+// Enums and messages generated by this module implement [Enum] and [ProtoMessage],
// where the Descriptor and ProtoReflect.Descriptor accessors respectively
// return the protobuf descriptor for the values.
//
// The protobuf descriptor interfaces are not meant to be implemented by
// user code since they might need to be extended in the future to support
// additions to the protobuf language.
-// The "google.golang.org/protobuf/reflect/protodesc" package converts between
+// The [google.golang.org/protobuf/reflect/protodesc] package converts between
// google.protobuf.DescriptorProto messages and protobuf descriptors.
//
+// # Go Type Descriptors
//
-// Go Type Descriptors
-//
-// A type descriptor (e.g., EnumType or MessageType) is a constructor for
+// A type descriptor (e.g., [EnumType] or [MessageType]) is a constructor for
// a concrete Go type that represents the associated protobuf descriptor.
// There is commonly a one-to-one relationship between protobuf descriptors and
// Go type descriptors, but it can potentially be a one-to-many relationship.
//
-// Enums and messages generated by this module implement Enum and ProtoMessage,
+// Enums and messages generated by this module implement [Enum] and [ProtoMessage],
// where the Type and ProtoReflect.Type accessors respectively
// return the protobuf descriptor for the values.
//
-// The "google.golang.org/protobuf/types/dynamicpb" package can be used to
+// The [google.golang.org/protobuf/types/dynamicpb] package can be used to
// create Go type descriptors from protobuf descriptors.
//
+// # Value Interfaces
//
-// Value Interfaces
-//
-// The Enum and Message interfaces provide a reflective view over an
+// The [Enum] and [Message] interfaces provide a reflective view over an
// enum or message instance. For enums, it provides the ability to retrieve
// the enum value number for any concrete enum type. For messages, it provides
// the ability to access or manipulate fields of the message.
//
-// To convert a proto.Message to a protoreflect.Message, use the
+// To convert a [google.golang.org/protobuf/proto.Message] to a [protoreflect.Message], use the
// former's ProtoReflect method. Since the ProtoReflect method is new to the
// v2 message interface, it may not be present on older message implementations.
-// The "github.com/golang/protobuf/proto".MessageReflect function can be used
+// The [github.com/golang/protobuf/proto.MessageReflect] function can be used
// to obtain a reflective view on older messages.
//
-//
-// Relationships
+// # Relationships
//
// The following diagrams demonstrate the relationships between
// various types declared in this package.
//
-//
// ┌───────────────────────────────────┐
// V │
// ┌────────────── New(n) ─────────────┐ │
@@ -76,13 +71,12 @@
// │ │
// └────────────────── Type() ───────┘
//
-// • An EnumType describes a concrete Go enum type.
+// • An [EnumType] describes a concrete Go enum type.
// It has an EnumDescriptor and can construct an Enum instance.
//
-// • An EnumDescriptor describes an abstract protobuf enum type.
-//
-// • An Enum is a concrete enum instance. Generated enums implement Enum.
+// • An [EnumDescriptor] describes an abstract protobuf enum type.
//
+// • An [Enum] is a concrete enum instance. Generated enums implement Enum.
//
// ┌──────────────── New() ─────────────────┐
// │ │
@@ -96,14 +90,26 @@
// │ │
// └─────────────────── Type() ─────────┘
//
-// • A MessageType describes a concrete Go message type.
-// It has a MessageDescriptor and can construct a Message instance.
-//
-// • A MessageDescriptor describes an abstract protobuf message type.
-//
-// • A Message is a concrete message instance. Generated messages implement
-// ProtoMessage, which can convert to/from a Message.
-//
+// • A [MessageType] describes a concrete Go message type.
+// It has a [MessageDescriptor] and can construct a [Message] instance.
+// Just as how Go's [reflect.Type] is a reflective description of a Go type,
+// a [MessageType] is a reflective description of a Go type for a protobuf message.
+//
+// • A [MessageDescriptor] describes an abstract protobuf message type.
+// It has no understanding of Go types. In order to construct a [MessageType]
+// from just a [MessageDescriptor], you can consider looking up the message type
+// in the global registry using the FindMessageByName method on
+// [google.golang.org/protobuf/reflect/protoregistry.GlobalTypes]
+// or constructing a dynamic [MessageType] using
+// [google.golang.org/protobuf/types/dynamicpb.NewMessageType].
+//
+// • A [Message] is a reflective view over a concrete message instance.
+// Generated messages implement [ProtoMessage], which can convert to a [Message].
+// Just as how Go's [reflect.Value] is a reflective view over a Go value,
+// a [Message] is a reflective view over a concrete protobuf message instance.
+// Using Go reflection as an analogy, the [ProtoMessage.ProtoReflect] method is similar to
+// calling [reflect.ValueOf], and the [Message.Interface] method is similar to
+// calling [reflect.Value.Interface].
//
// ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐
// │ V │ V
@@ -115,15 +121,15 @@
// │ │
// └────── implements ────────┘
//
-// • An ExtensionType describes a concrete Go implementation of an extension.
-// It has an ExtensionTypeDescriptor and can convert to/from
-// abstract Values and Go values.
+// • An [ExtensionType] describes a concrete Go implementation of an extension.
+// It has an [ExtensionTypeDescriptor] and can convert to/from
+// an abstract [Value] and a Go value.
//
-// • An ExtensionTypeDescriptor is an ExtensionDescriptor
-// which also has an ExtensionType.
+// • An [ExtensionTypeDescriptor] is an [ExtensionDescriptor]
+// which also has an [ExtensionType].
//
-// • An ExtensionDescriptor describes an abstract protobuf extension field and
-// may not always be an ExtensionTypeDescriptor.
+// • An [ExtensionDescriptor] describes an abstract protobuf extension field and
+// may not always be an [ExtensionTypeDescriptor].
package protoreflect
import (
@@ -138,7 +144,7 @@ type doNotImplement pragma.DoNotImplement
// ProtoMessage is the top-level interface that all proto messages implement.
// This is declared in the protoreflect package to avoid a cyclic dependency;
-// use the proto.Message type instead, which aliases this type.
+// use the [google.golang.org/protobuf/proto.Message] type instead, which aliases this type.
type ProtoMessage interface{ ProtoReflect() Message }
// Syntax is the language version of the proto file.
@@ -147,8 +153,9 @@ type Syntax syntax
type syntax int8 // keep exact type opaque as the int type may change
const (
- Proto2 Syntax = 2
- Proto3 Syntax = 3
+ Proto2 Syntax = 2
+ Proto3 Syntax = 3
+ Editions Syntax = 4
)
// IsValid reports whether the syntax is valid.
@@ -168,6 +175,8 @@ func (s Syntax) String() string {
return "proto2"
case Proto3:
return "proto3"
+ case Editions:
+ return "editions"
default:
return fmt.Sprintf("", s)
}
@@ -432,7 +441,7 @@ type Names interface {
// FullName is a qualified name that uniquely identifies a proto declaration.
// A qualified name is the concatenation of the proto package along with the
// fully-declared name (i.e., name of parent preceding the name of the child),
-// with a '.' delimiter placed between each Name.
+// with a '.' delimiter placed between each [Name].
//
// This should not have any leading or trailing dots.
type FullName string // e.g., "google.protobuf.Field.Kind"
@@ -476,7 +485,7 @@ func isLetterDigit(c byte) bool {
}
// Name returns the short name, which is the last identifier segment.
-// A single segment FullName is the Name itself.
+// A single segment FullName is the [Name] itself.
func (n FullName) Name() Name {
if i := strings.LastIndexByte(string(n), '.'); i >= 0 {
return Name(n[i+1:])
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go
index 121ba3a0..0b994288 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go
@@ -87,6 +87,7 @@ func (p1 SourcePath) Equal(p2 SourcePath) bool {
// in a future version of this module.
//
// Example output:
+//
// .message_type[6].nested_type[15].field[3]
func (p SourcePath) String() string {
b := p.appendFileDescriptorProto(nil)
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
index b03c1223..7dcc2ff0 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
@@ -35,6 +35,8 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {
b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo)
case 12:
b = p.appendSingularField(b, "syntax", nil)
+ case 14:
+ b = p.appendSingularField(b, "edition", nil)
}
return b
}
@@ -158,8 +160,6 @@ func (p *SourcePath) appendFileOptions(b []byte) []byte {
b = p.appendSingularField(b, "java_generic_services", nil)
case 18:
b = p.appendSingularField(b, "py_generic_services", nil)
- case 42:
- b = p.appendSingularField(b, "php_generic_services", nil)
case 23:
b = p.appendSingularField(b, "deprecated", nil)
case 31:
@@ -178,6 +178,8 @@ func (p *SourcePath) appendFileOptions(b []byte) []byte {
b = p.appendSingularField(b, "php_metadata_namespace", nil)
case 45:
b = p.appendSingularField(b, "ruby_package", nil)
+ case 50:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
@@ -236,6 +238,10 @@ func (p *SourcePath) appendMessageOptions(b []byte) []byte {
b = p.appendSingularField(b, "deprecated", nil)
case 7:
b = p.appendSingularField(b, "map_entry", nil)
+ case 11:
+ b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil)
+ case 12:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
@@ -279,6 +285,10 @@ func (p *SourcePath) appendEnumOptions(b []byte) []byte {
b = p.appendSingularField(b, "allow_alias", nil)
case 3:
b = p.appendSingularField(b, "deprecated", nil)
+ case 6:
+ b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil)
+ case 7:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
@@ -324,6 +334,8 @@ func (p *SourcePath) appendServiceOptions(b []byte) []byte {
return b
}
switch (*p)[0] {
+ case 34:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 33:
b = p.appendSingularField(b, "deprecated", nil)
case 999:
@@ -345,16 +357,49 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte {
b = p.appendSingularField(b, "jstype", nil)
case 5:
b = p.appendSingularField(b, "lazy", nil)
+ case 15:
+ b = p.appendSingularField(b, "unverified_lazy", nil)
case 3:
b = p.appendSingularField(b, "deprecated", nil)
case 10:
b = p.appendSingularField(b, "weak", nil)
+ case 16:
+ b = p.appendSingularField(b, "debug_redact", nil)
+ case 17:
+ b = p.appendSingularField(b, "retention", nil)
+ case 19:
+ b = p.appendRepeatedField(b, "targets", nil)
+ case 20:
+ b = p.appendRepeatedField(b, "edition_defaults", (*SourcePath).appendFieldOptions_EditionDefault)
+ case 21:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
return b
}
+func (p *SourcePath) appendFeatureSet(b []byte) []byte {
+ if len(*p) == 0 {
+ return b
+ }
+ switch (*p)[0] {
+ case 1:
+ b = p.appendSingularField(b, "field_presence", nil)
+ case 2:
+ b = p.appendSingularField(b, "enum_type", nil)
+ case 3:
+ b = p.appendSingularField(b, "repeated_field_encoding", nil)
+ case 4:
+ b = p.appendSingularField(b, "utf8_validation", nil)
+ case 5:
+ b = p.appendSingularField(b, "message_encoding", nil)
+ case 6:
+ b = p.appendSingularField(b, "json_format", nil)
+ }
+ return b
+}
+
func (p *SourcePath) appendUninterpretedOption(b []byte) []byte {
if len(*p) == 0 {
return b
@@ -404,6 +449,12 @@ func (p *SourcePath) appendExtensionRangeOptions(b []byte) []byte {
switch (*p)[0] {
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
+ case 2:
+ b = p.appendRepeatedField(b, "declaration", (*SourcePath).appendExtensionRangeOptions_Declaration)
+ case 50:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
+ case 3:
+ b = p.appendSingularField(b, "verification", nil)
}
return b
}
@@ -413,6 +464,8 @@ func (p *SourcePath) appendOneofOptions(b []byte) []byte {
return b
}
switch (*p)[0] {
+ case 1:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
@@ -426,6 +479,10 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte {
switch (*p)[0] {
case 1:
b = p.appendSingularField(b, "deprecated", nil)
+ case 2:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
+ case 3:
+ b = p.appendSingularField(b, "debug_redact", nil)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
@@ -441,12 +498,27 @@ func (p *SourcePath) appendMethodOptions(b []byte) []byte {
b = p.appendSingularField(b, "deprecated", nil)
case 34:
b = p.appendSingularField(b, "idempotency_level", nil)
+ case 35:
+ b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
return b
}
+func (p *SourcePath) appendFieldOptions_EditionDefault(b []byte) []byte {
+ if len(*p) == 0 {
+ return b
+ }
+ switch (*p)[0] {
+ case 3:
+ b = p.appendSingularField(b, "edition", nil)
+ case 2:
+ b = p.appendSingularField(b, "value", nil)
+ }
+ return b
+}
+
func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte {
if len(*p) == 0 {
return b
@@ -459,3 +531,22 @@ func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte {
}
return b
}
+
+func (p *SourcePath) appendExtensionRangeOptions_Declaration(b []byte) []byte {
+ if len(*p) == 0 {
+ return b
+ }
+ switch (*p)[0] {
+ case 1:
+ b = p.appendSingularField(b, "number", nil)
+ case 2:
+ b = p.appendSingularField(b, "full_name", nil)
+ case 3:
+ b = p.appendSingularField(b, "type", nil)
+ case 5:
+ b = p.appendSingularField(b, "reserved", nil)
+ case 6:
+ b = p.appendSingularField(b, "repeated", nil)
+ }
+ return b
+}
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
index 8e53c44a..60ff62b4 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
@@ -12,7 +12,7 @@ package protoreflect
// exactly identical. However, it is possible for the same semantically
// identical proto type to be represented by multiple type descriptors.
//
-// For example, suppose we have t1 and t2 which are both MessageDescriptors.
+// For example, suppose we have t1 and t2 which are both an [MessageDescriptor].
// If t1 == t2, then the types are definitely equal and all accessors return
// the same information. However, if t1 != t2, then it is still possible that
// they still represent the same proto type (e.g., t1.FullName == t2.FullName).
@@ -115,7 +115,7 @@ type Descriptor interface {
// corresponds with the google.protobuf.FileDescriptorProto message.
//
// Top-level declarations:
-// EnumDescriptor, MessageDescriptor, FieldDescriptor, and/or ServiceDescriptor.
+// [EnumDescriptor], [MessageDescriptor], [FieldDescriptor], and/or [ServiceDescriptor].
type FileDescriptor interface {
Descriptor // Descriptor.FullName is identical to Package
@@ -180,8 +180,8 @@ type FileImport struct {
// corresponds with the google.protobuf.DescriptorProto message.
//
// Nested declarations:
-// FieldDescriptor, OneofDescriptor, FieldDescriptor, EnumDescriptor,
-// and/or MessageDescriptor.
+// [FieldDescriptor], [OneofDescriptor], [FieldDescriptor], [EnumDescriptor],
+// and/or [MessageDescriptor].
type MessageDescriptor interface {
Descriptor
@@ -214,7 +214,7 @@ type MessageDescriptor interface {
ExtensionRanges() FieldRanges
// ExtensionRangeOptions returns the ith extension range options.
//
- // To avoid a dependency cycle, this method returns a proto.Message value,
+ // To avoid a dependency cycle, this method returns a proto.Message] value,
// which always contains a google.protobuf.ExtensionRangeOptions message.
// This method returns a typed nil-pointer if no options are present.
// The caller must import the descriptorpb package to use this.
@@ -231,9 +231,9 @@ type MessageDescriptor interface {
}
type isMessageDescriptor interface{ ProtoType(MessageDescriptor) }
-// MessageType encapsulates a MessageDescriptor with a concrete Go implementation.
+// MessageType encapsulates a [MessageDescriptor] with a concrete Go implementation.
// It is recommended that implementations of this interface also implement the
-// MessageFieldTypes interface.
+// [MessageFieldTypes] interface.
type MessageType interface {
// New returns a newly allocated empty message.
// It may return nil for synthetic messages representing a map entry.
@@ -249,19 +249,19 @@ type MessageType interface {
Descriptor() MessageDescriptor
}
-// MessageFieldTypes extends a MessageType by providing type information
+// MessageFieldTypes extends a [MessageType] by providing type information
// regarding enums and messages referenced by the message fields.
type MessageFieldTypes interface {
MessageType
- // Enum returns the EnumType for the ith field in Descriptor.Fields.
+ // Enum returns the EnumType for the ith field in MessageDescriptor.Fields.
// It returns nil if the ith field is not an enum kind.
// It panics if out of bounds.
//
// Invariant: mt.Enum(i).Descriptor() == mt.Descriptor().Fields(i).Enum()
Enum(i int) EnumType
- // Message returns the MessageType for the ith field in Descriptor.Fields.
+ // Message returns the MessageType for the ith field in MessageDescriptor.Fields.
// It returns nil if the ith field is not a message or group kind.
// It panics if out of bounds.
//
@@ -286,8 +286,8 @@ type MessageDescriptors interface {
// corresponds with the google.protobuf.FieldDescriptorProto message.
//
// It is used for both normal fields defined within the parent message
-// (e.g., MessageDescriptor.Fields) and fields that extend some remote message
-// (e.g., FileDescriptor.Extensions or MessageDescriptor.Extensions).
+// (e.g., [MessageDescriptor.Fields]) and fields that extend some remote message
+// (e.g., [FileDescriptor.Extensions] or [MessageDescriptor.Extensions]).
type FieldDescriptor interface {
Descriptor
@@ -344,7 +344,7 @@ type FieldDescriptor interface {
// IsMap reports whether this field represents a map,
// where the value type for the associated field is a Map.
// It is equivalent to checking whether Cardinality is Repeated,
- // that the Kind is MessageKind, and that Message.IsMapEntry reports true.
+ // that the Kind is MessageKind, and that MessageDescriptor.IsMapEntry reports true.
IsMap() bool
// MapKey returns the field descriptor for the key in the map entry.
@@ -419,7 +419,7 @@ type OneofDescriptor interface {
// IsSynthetic reports whether this is a synthetic oneof created to support
// proto3 optional semantics. If true, Fields contains exactly one field
- // with HasOptionalKeyword specified.
+ // with FieldDescriptor.HasOptionalKeyword specified.
IsSynthetic() bool
// Fields is a list of fields belonging to this oneof.
@@ -442,10 +442,10 @@ type OneofDescriptors interface {
doNotImplement
}
-// ExtensionDescriptor is an alias of FieldDescriptor for documentation.
+// ExtensionDescriptor is an alias of [FieldDescriptor] for documentation.
type ExtensionDescriptor = FieldDescriptor
-// ExtensionTypeDescriptor is an ExtensionDescriptor with an associated ExtensionType.
+// ExtensionTypeDescriptor is an [ExtensionDescriptor] with an associated [ExtensionType].
type ExtensionTypeDescriptor interface {
ExtensionDescriptor
@@ -470,16 +470,17 @@ type ExtensionDescriptors interface {
doNotImplement
}
-// ExtensionType encapsulates an ExtensionDescriptor with a concrete
+// ExtensionType encapsulates an [ExtensionDescriptor] with a concrete
// Go implementation. The nested field descriptor must be for a extension field.
//
// While a normal field is a member of the parent message that it is declared
-// within (see Descriptor.Parent), an extension field is a member of some other
-// target message (see ExtensionDescriptor.Extendee) and may have no
+// within (see [Descriptor.Parent]), an extension field is a member of some other
+// target message (see [FieldDescriptor.ContainingMessage]) and may have no
// relationship with the parent. However, the full name of an extension field is
// relative to the parent that it is declared within.
//
// For example:
+//
// syntax = "proto2";
// package example;
// message FooMessage {
@@ -531,7 +532,7 @@ type ExtensionType interface {
// corresponds with the google.protobuf.EnumDescriptorProto message.
//
// Nested declarations:
-// EnumValueDescriptor.
+// [EnumValueDescriptor].
type EnumDescriptor interface {
Descriptor
@@ -547,7 +548,7 @@ type EnumDescriptor interface {
}
type isEnumDescriptor interface{ ProtoType(EnumDescriptor) }
-// EnumType encapsulates an EnumDescriptor with a concrete Go implementation.
+// EnumType encapsulates an [EnumDescriptor] with a concrete Go implementation.
type EnumType interface {
// New returns an instance of this enum type with its value set to n.
New(n EnumNumber) Enum
@@ -609,7 +610,7 @@ type EnumValueDescriptors interface {
// ServiceDescriptor describes a service and
// corresponds with the google.protobuf.ServiceDescriptorProto message.
//
-// Nested declarations: MethodDescriptor.
+// Nested declarations: [MethodDescriptor].
type ServiceDescriptor interface {
Descriptor
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go
index f3198107..a7b0d06f 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go
@@ -27,16 +27,16 @@ type Enum interface {
// Message is a reflective interface for a concrete message value,
// encapsulating both type and value information for the message.
//
-// Accessor/mutators for individual fields are keyed by FieldDescriptor.
+// Accessor/mutators for individual fields are keyed by [FieldDescriptor].
// For non-extension fields, the descriptor must exactly match the
// field known by the parent message.
-// For extension fields, the descriptor must implement ExtensionTypeDescriptor,
-// extend the parent message (i.e., have the same message FullName), and
+// For extension fields, the descriptor must implement [ExtensionTypeDescriptor],
+// extend the parent message (i.e., have the same message [FullName]), and
// be within the parent's extension range.
//
-// Each field Value can be a scalar or a composite type (Message, List, or Map).
-// See Value for the Go types associated with a FieldDescriptor.
-// Providing a Value that is invalid or of an incorrect type panics.
+// Each field [Value] can be a scalar or a composite type ([Message], [List], or [Map]).
+// See [Value] for the Go types associated with a [FieldDescriptor].
+// Providing a [Value] that is invalid or of an incorrect type panics.
type Message interface {
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
@@ -148,11 +148,11 @@ type Message interface {
// be preserved in marshaling or other operations.
IsValid() bool
- // ProtoMethods returns optional fast-path implementions of various operations.
+ // ProtoMethods returns optional fast-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
- // "google.golang.org/protobuf/runtime/protoiface".Methods.
+ // google.golang.org/protobuf/runtime/protoiface.Methods.
// Consult the protoiface package documentation for details.
ProtoMethods() *methods
}
@@ -175,8 +175,8 @@ func (b RawFields) IsValid() bool {
}
// List is a zero-indexed, ordered list.
-// The element Value type is determined by FieldDescriptor.Kind.
-// Providing a Value that is invalid or of an incorrect type panics.
+// The element [Value] type is determined by [FieldDescriptor.Kind].
+// Providing a [Value] that is invalid or of an incorrect type panics.
type List interface {
// Len reports the number of entries in the List.
// Get, Set, and Truncate panic with out of bound indexes.
@@ -226,9 +226,9 @@ type List interface {
}
// Map is an unordered, associative map.
-// The entry MapKey type is determined by FieldDescriptor.MapKey.Kind.
-// The entry Value type is determined by FieldDescriptor.MapValue.Kind.
-// Providing a MapKey or Value that is invalid or of an incorrect type panics.
+// The entry [MapKey] type is determined by [FieldDescriptor.MapKey].Kind.
+// The entry [Value] type is determined by [FieldDescriptor.MapValue].Kind.
+// Providing a [MapKey] or [Value] that is invalid or of an incorrect type panics.
type Map interface {
// Len reports the number of elements in the map.
Len() int
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go
new file mode 100644
index 00000000..654599d4
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go
@@ -0,0 +1,168 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package protoreflect
+
+import (
+ "bytes"
+ "fmt"
+ "math"
+ "reflect"
+
+ "google.golang.org/protobuf/encoding/protowire"
+)
+
+// Equal reports whether v1 and v2 are recursively equal.
+//
+// - Values of different types are always unequal.
+//
+// - Bytes values are equal if they contain identical bytes.
+// Empty bytes (regardless of nil-ness) are considered equal.
+//
+// - Floating point values are equal if they contain the same value.
+// Unlike the == operator, a NaN is equal to another NaN.
+//
+// - Enums are equal if they contain the same number.
+// Since [Value] does not contain an enum descriptor,
+// enum values do not consider the type of the enum.
+//
+// - Other scalar values are equal if they contain the same value.
+//
+// - [Message] values are equal if they belong to the same message descriptor,
+// have the same set of populated known and extension field values,
+// and the same set of unknown fields values.
+//
+// - [List] values are equal if they are the same length and
+// each corresponding element is equal.
+//
+// - [Map] values are equal if they have the same set of keys and
+// the corresponding value for each key is equal.
+func (v1 Value) Equal(v2 Value) bool {
+ return equalValue(v1, v2)
+}
+
+func equalValue(x, y Value) bool {
+ eqType := x.typ == y.typ
+ switch x.typ {
+ case nilType:
+ return eqType
+ case boolType:
+ return eqType && x.Bool() == y.Bool()
+ case int32Type, int64Type:
+ return eqType && x.Int() == y.Int()
+ case uint32Type, uint64Type:
+ return eqType && x.Uint() == y.Uint()
+ case float32Type, float64Type:
+ return eqType && equalFloat(x.Float(), y.Float())
+ case stringType:
+ return eqType && x.String() == y.String()
+ case bytesType:
+ return eqType && bytes.Equal(x.Bytes(), y.Bytes())
+ case enumType:
+ return eqType && x.Enum() == y.Enum()
+ default:
+ switch x := x.Interface().(type) {
+ case Message:
+ y, ok := y.Interface().(Message)
+ return ok && equalMessage(x, y)
+ case List:
+ y, ok := y.Interface().(List)
+ return ok && equalList(x, y)
+ case Map:
+ y, ok := y.Interface().(Map)
+ return ok && equalMap(x, y)
+ default:
+ panic(fmt.Sprintf("unknown type: %T", x))
+ }
+ }
+}
+
+// equalFloat compares two floats, where NaNs are treated as equal.
+func equalFloat(x, y float64) bool {
+ if math.IsNaN(x) || math.IsNaN(y) {
+ return math.IsNaN(x) && math.IsNaN(y)
+ }
+ return x == y
+}
+
+// equalMessage compares two messages.
+func equalMessage(mx, my Message) bool {
+ if mx.Descriptor() != my.Descriptor() {
+ return false
+ }
+
+ nx := 0
+ equal := true
+ mx.Range(func(fd FieldDescriptor, vx Value) bool {
+ nx++
+ vy := my.Get(fd)
+ equal = my.Has(fd) && equalValue(vx, vy)
+ return equal
+ })
+ if !equal {
+ return false
+ }
+ ny := 0
+ my.Range(func(fd FieldDescriptor, vx Value) bool {
+ ny++
+ return true
+ })
+ if nx != ny {
+ return false
+ }
+
+ return equalUnknown(mx.GetUnknown(), my.GetUnknown())
+}
+
+// equalList compares two lists.
+func equalList(x, y List) bool {
+ if x.Len() != y.Len() {
+ return false
+ }
+ for i := x.Len() - 1; i >= 0; i-- {
+ if !equalValue(x.Get(i), y.Get(i)) {
+ return false
+ }
+ }
+ return true
+}
+
+// equalMap compares two maps.
+func equalMap(x, y Map) bool {
+ if x.Len() != y.Len() {
+ return false
+ }
+ equal := true
+ x.Range(func(k MapKey, vx Value) bool {
+ vy := y.Get(k)
+ equal = y.Has(k) && equalValue(vx, vy)
+ return equal
+ })
+ return equal
+}
+
+// equalUnknown compares unknown fields by direct comparison on the raw bytes
+// of each individual field number.
+func equalUnknown(x, y RawFields) bool {
+ if len(x) != len(y) {
+ return false
+ }
+ if bytes.Equal([]byte(x), []byte(y)) {
+ return true
+ }
+
+ mx := make(map[FieldNumber]RawFields)
+ my := make(map[FieldNumber]RawFields)
+ for len(x) > 0 {
+ fnum, _, n := protowire.ConsumeField(x)
+ mx[fnum] = append(mx[fnum], x[:n]...)
+ x = x[n:]
+ }
+ for len(y) > 0 {
+ fnum, _, n := protowire.ConsumeField(y)
+ my[fnum] = append(my[fnum], y[:n]...)
+ y = y[n:]
+ }
+ return reflect.DeepEqual(mx, my)
+}
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
index 918e685e..7ced876f 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package protoreflect
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
index 5a341472..16030973 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
@@ -11,7 +11,7 @@ import (
// Value is a union where only one Go type may be set at a time.
// The Value is used to represent all possible values a field may take.
-// The following shows which Go type is used to represent each proto Kind:
+// The following shows which Go type is used to represent each proto [Kind]:
//
// ╔════════════╤═════════════════════════════════════╗
// ║ Go type │ Protobuf kind ║
@@ -31,16 +31,42 @@ import (
//
// Multiple protobuf Kinds may be represented by a single Go type if the type
// can losslessly represent the information for the proto kind. For example,
-// Int64Kind, Sint64Kind, and Sfixed64Kind are all represented by int64,
+// [Int64Kind], [Sint64Kind], and [Sfixed64Kind] are all represented by int64,
// but use different integer encoding methods.
//
-// The List or Map types are used if the field cardinality is repeated.
-// A field is a List if FieldDescriptor.IsList reports true.
-// A field is a Map if FieldDescriptor.IsMap reports true.
+// The [List] or [Map] types are used if the field cardinality is repeated.
+// A field is a [List] if [FieldDescriptor.IsList] reports true.
+// A field is a [Map] if [FieldDescriptor.IsMap] reports true.
//
// Converting to/from a Value and a concrete Go value panics on type mismatch.
-// For example, ValueOf("hello").Int() panics because this attempts to
+// For example, [ValueOf]("hello").Int() panics because this attempts to
// retrieve an int64 from a string.
+//
+// [List], [Map], and [Message] Values are called "composite" values.
+//
+// A composite Value may alias (reference) memory at some location,
+// such that changes to the Value updates the that location.
+// A composite value acquired with a Mutable method, such as [Message.Mutable],
+// always references the source object.
+//
+// For example:
+//
+// // Append a 0 to a "repeated int32" field.
+// // Since the Value returned by Mutable is guaranteed to alias
+// // the source message, modifying the Value modifies the message.
+// message.Mutable(fieldDesc).List().Append(protoreflect.ValueOfInt32(0))
+//
+// // Assign [0] to a "repeated int32" field by creating a new Value,
+// // modifying it, and assigning it.
+// list := message.NewField(fieldDesc).List()
+// list.Append(protoreflect.ValueOfInt32(0))
+// message.Set(fieldDesc, list)
+// // ERROR: Since it is not defined whether Set aliases the source,
+// // appending to the List here may or may not modify the message.
+// list.Append(protoreflect.ValueOfInt32(0))
+//
+// Some operations, such as [Message.Get], may return an "empty, read-only"
+// composite Value. Modifying an empty, read-only value panics.
type Value value
// The protoreflect API uses a custom Value union type instead of interface{}
@@ -280,7 +306,7 @@ func (v Value) Float() float64 {
}
}
-// String returns v as a string. Since this method implements fmt.Stringer,
+// String returns v as a string. Since this method implements [fmt.Stringer],
// this returns the formatted string value for any non-string type.
func (v Value) String() string {
switch v.typ {
@@ -301,7 +327,7 @@ func (v Value) Bytes() []byte {
}
}
-// Enum returns v as a EnumNumber and panics if the type is not a EnumNumber.
+// Enum returns v as a [EnumNumber] and panics if the type is not a [EnumNumber].
func (v Value) Enum() EnumNumber {
switch v.typ {
case enumType:
@@ -311,7 +337,7 @@ func (v Value) Enum() EnumNumber {
}
}
-// Message returns v as a Message and panics if the type is not a Message.
+// Message returns v as a [Message] and panics if the type is not a [Message].
func (v Value) Message() Message {
switch vi := v.getIface().(type) {
case Message:
@@ -321,7 +347,7 @@ func (v Value) Message() Message {
}
}
-// List returns v as a List and panics if the type is not a List.
+// List returns v as a [List] and panics if the type is not a [List].
func (v Value) List() List {
switch vi := v.getIface().(type) {
case List:
@@ -331,7 +357,7 @@ func (v Value) List() List {
}
}
-// Map returns v as a Map and panics if the type is not a Map.
+// Map returns v as a [Map] and panics if the type is not a [Map].
func (v Value) Map() Map {
switch vi := v.getIface().(type) {
case Map:
@@ -341,7 +367,7 @@ func (v Value) Map() Map {
}
}
-// MapKey returns v as a MapKey and panics for invalid MapKey types.
+// MapKey returns v as a [MapKey] and panics for invalid [MapKey] types.
func (v Value) MapKey() MapKey {
switch v.typ {
case boolType, int32Type, int64Type, uint32Type, uint64Type, stringType:
@@ -352,8 +378,8 @@ func (v Value) MapKey() MapKey {
}
// MapKey is used to index maps, where the Go type of the MapKey must match
-// the specified key Kind (see MessageDescriptor.IsMapEntry).
-// The following shows what Go type is used to represent each proto Kind:
+// the specified key [Kind] (see [MessageDescriptor.IsMapEntry]).
+// The following shows what Go type is used to represent each proto [Kind]:
//
// ╔═════════╤═════════════════════════════════════╗
// ║ Go type │ Protobuf kind ║
@@ -366,12 +392,13 @@ func (v Value) MapKey() MapKey {
// ║ string │ StringKind ║
// ╚═════════╧═════════════════════════════════════╝
//
-// A MapKey is constructed and accessed through a Value:
+// A MapKey is constructed and accessed through a [Value]:
+//
// k := ValueOf("hash").MapKey() // convert string to MapKey
// s := k.String() // convert MapKey to string
//
-// The MapKey is a strict subset of valid types used in Value;
-// converting a Value to a MapKey with an invalid type panics.
+// The MapKey is a strict subset of valid types used in [Value];
+// converting a [Value] to a MapKey with an invalid type panics.
type MapKey value
// IsValid reports whether k is populated with a value.
@@ -399,13 +426,13 @@ func (k MapKey) Uint() uint64 {
return Value(k).Uint()
}
-// String returns k as a string. Since this method implements fmt.Stringer,
+// String returns k as a string. Since this method implements [fmt.Stringer],
// this returns the formatted string value for any non-string type.
func (k MapKey) String() string {
return Value(k).String()
}
-// Value returns k as a Value.
+// Value returns k as a [Value].
func (k MapKey) Value() Value {
return Value(k)
}
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go
similarity index 97%
rename from vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go
rename to vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go
index c45debdc..b1fdbe3e 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !purego,!appengine
+//go:build !purego && !appengine && !go1.21
+// +build !purego,!appengine,!go1.21
package protoreflect
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go
new file mode 100644
index 00000000..43547011
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go
@@ -0,0 +1,87 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !purego && !appengine && go1.21
+// +build !purego,!appengine,go1.21
+
+package protoreflect
+
+import (
+ "unsafe"
+
+ "google.golang.org/protobuf/internal/pragma"
+)
+
+type (
+ ifaceHeader struct {
+ _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it.
+ Type unsafe.Pointer
+ Data unsafe.Pointer
+ }
+)
+
+var (
+ nilType = typeOf(nil)
+ boolType = typeOf(*new(bool))
+ int32Type = typeOf(*new(int32))
+ int64Type = typeOf(*new(int64))
+ uint32Type = typeOf(*new(uint32))
+ uint64Type = typeOf(*new(uint64))
+ float32Type = typeOf(*new(float32))
+ float64Type = typeOf(*new(float64))
+ stringType = typeOf(*new(string))
+ bytesType = typeOf(*new([]byte))
+ enumType = typeOf(*new(EnumNumber))
+)
+
+// typeOf returns a pointer to the Go type information.
+// The pointer is comparable and equal if and only if the types are identical.
+func typeOf(t interface{}) unsafe.Pointer {
+ return (*ifaceHeader)(unsafe.Pointer(&t)).Type
+}
+
+// value is a union where only one type can be represented at a time.
+// The struct is 24B large on 64-bit systems and requires the minimum storage
+// necessary to represent each possible type.
+//
+// The Go GC needs to be able to scan variables containing pointers.
+// As such, pointers and non-pointers cannot be intermixed.
+type value struct {
+ pragma.DoNotCompare // 0B
+
+ // typ stores the type of the value as a pointer to the Go type.
+ typ unsafe.Pointer // 8B
+
+ // ptr stores the data pointer for a String, Bytes, or interface value.
+ ptr unsafe.Pointer // 8B
+
+ // num stores a Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, or
+ // Enum value as a raw uint64.
+ //
+ // It is also used to store the length of a String or Bytes value;
+ // the capacity is ignored.
+ num uint64 // 8B
+}
+
+func valueOfString(v string) Value {
+ return Value{typ: stringType, ptr: unsafe.Pointer(unsafe.StringData(v)), num: uint64(len(v))}
+}
+func valueOfBytes(v []byte) Value {
+ return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))}
+}
+func valueOfIface(v interface{}) Value {
+ p := (*ifaceHeader)(unsafe.Pointer(&v))
+ return Value{typ: p.Type, ptr: p.Data}
+}
+
+func (v Value) getString() string {
+ return unsafe.String((*byte)(v.ptr), v.num)
+}
+func (v Value) getBytes() []byte {
+ return unsafe.Slice((*byte)(v.ptr), v.num)
+}
+func (v Value) getIface() (x interface{}) {
+ *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
+ return x
+}
diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
index 59f024c4..6267dc52 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
@@ -5,12 +5,12 @@
// Package protoregistry provides data structures to register and lookup
// protobuf descriptor types.
//
-// The Files registry contains file descriptors and provides the ability
+// The [Files] registry contains file descriptors and provides the ability
// to iterate over the files or lookup a specific descriptor within the files.
-// Files only contains protobuf descriptors and has no understanding of Go
+// [Files] only contains protobuf descriptors and has no understanding of Go
// type information that may be associated with each descriptor.
//
-// The Types registry contains descriptor types for which there is a known
+// The [Types] registry contains descriptor types for which there is a known
// Go type associated with that descriptor. It provides the ability to iterate
// over the registered types or lookup a type by name.
package protoregistry
@@ -30,9 +30,11 @@ import (
// conflictPolicy configures the policy for handling registration conflicts.
//
// It can be over-written at compile time with a linker-initialized variable:
+//
// go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn"
//
// It can be over-written at program execution with an environment variable:
+//
// GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main
//
// Neither of the above are covered by the compatibility promise and
@@ -44,7 +46,7 @@ var conflictPolicy = "panic" // "panic" | "warn" | "ignore"
// It is a variable so that the behavior is easily overridden in another file.
var ignoreConflict = func(d protoreflect.Descriptor, err error) bool {
const env = "GOLANG_PROTOBUF_REGISTRATION_CONFLICT"
- const faq = "https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict"
+ const faq = "https://protobuf.dev/reference/go/faq#namespace-conflict"
policy := conflictPolicy
if v := os.Getenv(env); v != "" {
policy = v
@@ -216,7 +218,7 @@ func (r *Files) checkGenProtoConflict(path string) {
// FindDescriptorByName looks up a descriptor by the full name.
//
-// This returns (nil, NotFound) if not found.
+// This returns (nil, [NotFound]) if not found.
func (r *Files) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) {
if r == nil {
return nil, NotFound
@@ -308,7 +310,7 @@ func (s *nameSuffix) Pop() (name protoreflect.Name) {
// FindFileByPath looks up a file by the path.
//
-// This returns (nil, NotFound) if not found.
+// This returns (nil, [NotFound]) if not found.
// This returns an error if multiple files have the same path.
func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) {
if r == nil {
@@ -429,7 +431,7 @@ func rangeTopLevelDescriptors(fd protoreflect.FileDescriptor, f func(protoreflec
// A compliant implementation must deterministically return the same type
// if no error is encountered.
//
-// The Types type implements this interface.
+// The [Types] type implements this interface.
type MessageTypeResolver interface {
// FindMessageByName looks up a message by its full name.
// E.g., "google.protobuf.Any"
@@ -449,7 +451,7 @@ type MessageTypeResolver interface {
// A compliant implementation must deterministically return the same type
// if no error is encountered.
//
-// The Types type implements this interface.
+// The [Types] type implements this interface.
type ExtensionTypeResolver interface {
// FindExtensionByName looks up a extension field by the field's full name.
// Note that this is the full name of the field as determined by
@@ -588,7 +590,7 @@ func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interfac
// FindEnumByName looks up an enum by its full name.
// E.g., "google.protobuf.Field.Kind".
//
-// This returns (nil, NotFound) if not found.
+// This returns (nil, [NotFound]) if not found.
func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) {
if r == nil {
return nil, NotFound
@@ -609,7 +611,7 @@ func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumTyp
// FindMessageByName looks up a message by its full name,
// e.g. "google.protobuf.Any".
//
-// This returns (nil, NotFound) if not found.
+// This returns (nil, [NotFound]) if not found.
func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {
if r == nil {
return nil, NotFound
@@ -630,7 +632,7 @@ func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.M
// FindMessageByURL looks up a message by a URL identifier.
// See documentation on google.protobuf.Any.type_url for the URL format.
//
-// This returns (nil, NotFound) if not found.
+// This returns (nil, [NotFound]) if not found.
func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) {
// This function is similar to FindMessageByName but
// truncates anything before and including '/' in the URL.
@@ -660,7 +662,7 @@ func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) {
// where the extension is declared and is unrelated to the full name of the
// message being extended.
//
-// This returns (nil, NotFound) if not found.
+// This returns (nil, [NotFound]) if not found.
func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
if r == nil {
return nil, NotFound
@@ -701,7 +703,7 @@ func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.E
// FindExtensionByNumber looks up a extension field by the field number
// within some parent message, identified by full name.
//
-// This returns (nil, NotFound) if not found.
+// This returns (nil, [NotFound]) if not found.
func (r *Types) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
if r == nil {
return nil, NotFound
diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
index 32c04f67..44cf467d 100644
--- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
+++ b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
@@ -103,6 +103,7 @@ type UnmarshalInput = struct {
FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
}
+ Depth int
}
// UnmarshalOutput is output from the Unmarshal method.
diff --git a/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go b/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go
index ff094e1b..a105cb23 100644
--- a/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go
+++ b/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go
@@ -26,16 +26,19 @@ const (
// EnforceVersion is used by code generated by protoc-gen-go
// to statically enforce minimum and maximum versions of this package.
// A compilation failure implies either that:
-// * the runtime package is too old and needs to be updated OR
-// * the generated code is too old and needs to be regenerated.
+// - the runtime package is too old and needs to be updated OR
+// - the generated code is too old and needs to be regenerated.
//
// The runtime package can be upgraded by running:
+//
// go get google.golang.org/protobuf
//
// The generated code can be regenerated by running:
+//
// protoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES}
//
// Example usage by generated code:
+//
// const (
// // Verify that this generated code is sufficiently up-to-date.
// _ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion)
@@ -49,6 +52,7 @@ const (
type EnforceVersion uint
// This enforces the following invariant:
+//
// MinVersion ≤ GenVersion ≤ MaxVersion
const (
_ = EnforceVersion(GenVersion - MinVersion)
diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
index abe4ab51..78624cf6 100644
--- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
+++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
@@ -48,6 +48,161 @@ import (
sync "sync"
)
+// The full set of known editions.
+type Edition int32
+
+const (
+ // A placeholder for an unknown edition value.
+ Edition_EDITION_UNKNOWN Edition = 0
+ // Legacy syntax "editions". These pre-date editions, but behave much like
+ // distinct editions. These can't be used to specify the edition of proto
+ // files, but feature definitions must supply proto2/proto3 defaults for
+ // backwards compatibility.
+ Edition_EDITION_PROTO2 Edition = 998
+ Edition_EDITION_PROTO3 Edition = 999
+ // Editions that have been released. The specific values are arbitrary and
+ // should not be depended on, but they will always be time-ordered for easy
+ // comparison.
+ Edition_EDITION_2023 Edition = 1000
+ Edition_EDITION_2024 Edition = 1001
+ // Placeholder editions for testing feature resolution. These should not be
+ // used or relyed on outside of tests.
+ Edition_EDITION_1_TEST_ONLY Edition = 1
+ Edition_EDITION_2_TEST_ONLY Edition = 2
+ Edition_EDITION_99997_TEST_ONLY Edition = 99997
+ Edition_EDITION_99998_TEST_ONLY Edition = 99998
+ Edition_EDITION_99999_TEST_ONLY Edition = 99999
+ // Placeholder for specifying unbounded edition support. This should only
+ // ever be used by plugins that can expect to never require any changes to
+ // support a new edition.
+ Edition_EDITION_MAX Edition = 2147483647
+)
+
+// Enum value maps for Edition.
+var (
+ Edition_name = map[int32]string{
+ 0: "EDITION_UNKNOWN",
+ 998: "EDITION_PROTO2",
+ 999: "EDITION_PROTO3",
+ 1000: "EDITION_2023",
+ 1001: "EDITION_2024",
+ 1: "EDITION_1_TEST_ONLY",
+ 2: "EDITION_2_TEST_ONLY",
+ 99997: "EDITION_99997_TEST_ONLY",
+ 99998: "EDITION_99998_TEST_ONLY",
+ 99999: "EDITION_99999_TEST_ONLY",
+ 2147483647: "EDITION_MAX",
+ }
+ Edition_value = map[string]int32{
+ "EDITION_UNKNOWN": 0,
+ "EDITION_PROTO2": 998,
+ "EDITION_PROTO3": 999,
+ "EDITION_2023": 1000,
+ "EDITION_2024": 1001,
+ "EDITION_1_TEST_ONLY": 1,
+ "EDITION_2_TEST_ONLY": 2,
+ "EDITION_99997_TEST_ONLY": 99997,
+ "EDITION_99998_TEST_ONLY": 99998,
+ "EDITION_99999_TEST_ONLY": 99999,
+ "EDITION_MAX": 2147483647,
+ }
+)
+
+func (x Edition) Enum() *Edition {
+ p := new(Edition)
+ *p = x
+ return p
+}
+
+func (x Edition) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Edition) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor()
+}
+
+func (Edition) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[0]
+}
+
+func (x Edition) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Edition) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Edition(num)
+ return nil
+}
+
+// Deprecated: Use Edition.Descriptor instead.
+func (Edition) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0}
+}
+
+// The verification state of the extension range.
+type ExtensionRangeOptions_VerificationState int32
+
+const (
+ // All the extensions of the range must be declared.
+ ExtensionRangeOptions_DECLARATION ExtensionRangeOptions_VerificationState = 0
+ ExtensionRangeOptions_UNVERIFIED ExtensionRangeOptions_VerificationState = 1
+)
+
+// Enum value maps for ExtensionRangeOptions_VerificationState.
+var (
+ ExtensionRangeOptions_VerificationState_name = map[int32]string{
+ 0: "DECLARATION",
+ 1: "UNVERIFIED",
+ }
+ ExtensionRangeOptions_VerificationState_value = map[string]int32{
+ "DECLARATION": 0,
+ "UNVERIFIED": 1,
+ }
+)
+
+func (x ExtensionRangeOptions_VerificationState) Enum() *ExtensionRangeOptions_VerificationState {
+ p := new(ExtensionRangeOptions_VerificationState)
+ *p = x
+ return p
+}
+
+func (x ExtensionRangeOptions_VerificationState) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExtensionRangeOptions_VerificationState) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor()
+}
+
+func (ExtensionRangeOptions_VerificationState) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[1]
+}
+
+func (x ExtensionRangeOptions_VerificationState) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ExtensionRangeOptions_VerificationState) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ExtensionRangeOptions_VerificationState(num)
+ return nil
+}
+
+// Deprecated: Use ExtensionRangeOptions_VerificationState.Descriptor instead.
+func (ExtensionRangeOptions_VerificationState) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0}
+}
+
type FieldDescriptorProto_Type int32
const (
@@ -67,9 +222,10 @@ const (
FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8
FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9
// Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
+ // Group type is deprecated and not supported after google.protobuf. However, Proto3
// implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
+ // treat group fields as unknown fields. In Editions, the group wire format
+ // can be enabled via the `message_encoding` feature.
FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10
FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 // Length-delimited aggregate.
// New in version 2.
@@ -137,11 +293,11 @@ func (x FieldDescriptorProto_Type) String() string {
}
func (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor()
}
func (FieldDescriptorProto_Type) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[0]
+ return &file_google_protobuf_descriptor_proto_enumTypes[2]
}
func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber {
@@ -168,21 +324,24 @@ type FieldDescriptorProto_Label int32
const (
// 0 is reserved for errors
FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1
- FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2
FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3
+ // The required label is only allowed in google.protobuf. In proto3 and Editions
+ // it's explicitly prohibited. In Editions, the `field_presence` feature
+ // can be used to get this behavior.
+ FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2
)
// Enum value maps for FieldDescriptorProto_Label.
var (
FieldDescriptorProto_Label_name = map[int32]string{
1: "LABEL_OPTIONAL",
- 2: "LABEL_REQUIRED",
3: "LABEL_REPEATED",
+ 2: "LABEL_REQUIRED",
}
FieldDescriptorProto_Label_value = map[string]int32{
"LABEL_OPTIONAL": 1,
- "LABEL_REQUIRED": 2,
"LABEL_REPEATED": 3,
+ "LABEL_REQUIRED": 2,
}
)
@@ -197,11 +356,11 @@ func (x FieldDescriptorProto_Label) String() string {
}
func (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor()
}
func (FieldDescriptorProto_Label) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[1]
+ return &file_google_protobuf_descriptor_proto_enumTypes[3]
}
func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber {
@@ -258,11 +417,11 @@ func (x FileOptions_OptimizeMode) String() string {
}
func (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor()
}
func (FileOptions_OptimizeMode) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[2]
+ return &file_google_protobuf_descriptor_proto_enumTypes[4]
}
func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber {
@@ -288,7 +447,13 @@ type FieldOptions_CType int32
const (
// Default mode.
- FieldOptions_STRING FieldOptions_CType = 0
+ FieldOptions_STRING FieldOptions_CType = 0
+ // The option [ctype=CORD] may be applied to a non-repeated field of type
+ // "bytes". It indicates that in C++, the data should be stored in a Cord
+ // instead of a string. For very large strings, this may reduce memory
+ // fragmentation. It may also allow better performance when parsing from a
+ // Cord, or when parsing with aliasing enabled, as the parsed Cord may then
+ // alias the original buffer.
FieldOptions_CORD FieldOptions_CType = 1
FieldOptions_STRING_PIECE FieldOptions_CType = 2
)
@@ -318,11 +483,11 @@ func (x FieldOptions_CType) String() string {
}
func (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor()
}
func (FieldOptions_CType) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[3]
+ return &file_google_protobuf_descriptor_proto_enumTypes[5]
}
func (x FieldOptions_CType) Number() protoreflect.EnumNumber {
@@ -380,11 +545,11 @@ func (x FieldOptions_JSType) String() string {
}
func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor()
}
func (FieldOptions_JSType) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[4]
+ return &file_google_protobuf_descriptor_proto_enumTypes[6]
}
func (x FieldOptions_JSType) Number() protoreflect.EnumNumber {
@@ -406,6 +571,152 @@ func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1}
}
+// If set to RETENTION_SOURCE, the option will be omitted from the binary.
+// Note: as of January 2023, support for this is in progress and does not yet
+// have an effect (b/264593489).
+type FieldOptions_OptionRetention int32
+
+const (
+ FieldOptions_RETENTION_UNKNOWN FieldOptions_OptionRetention = 0
+ FieldOptions_RETENTION_RUNTIME FieldOptions_OptionRetention = 1
+ FieldOptions_RETENTION_SOURCE FieldOptions_OptionRetention = 2
+)
+
+// Enum value maps for FieldOptions_OptionRetention.
+var (
+ FieldOptions_OptionRetention_name = map[int32]string{
+ 0: "RETENTION_UNKNOWN",
+ 1: "RETENTION_RUNTIME",
+ 2: "RETENTION_SOURCE",
+ }
+ FieldOptions_OptionRetention_value = map[string]int32{
+ "RETENTION_UNKNOWN": 0,
+ "RETENTION_RUNTIME": 1,
+ "RETENTION_SOURCE": 2,
+ }
+)
+
+func (x FieldOptions_OptionRetention) Enum() *FieldOptions_OptionRetention {
+ p := new(FieldOptions_OptionRetention)
+ *p = x
+ return p
+}
+
+func (x FieldOptions_OptionRetention) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor()
+}
+
+func (FieldOptions_OptionRetention) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[7]
+}
+
+func (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FieldOptions_OptionRetention) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FieldOptions_OptionRetention(num)
+ return nil
+}
+
+// Deprecated: Use FieldOptions_OptionRetention.Descriptor instead.
+func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 2}
+}
+
+// This indicates the types of entities that the field may apply to when used
+// as an option. If it is unset, then the field may be freely used as an
+// option on any kind of entity. Note: as of January 2023, support for this is
+// in progress and does not yet have an effect (b/264593489).
+type FieldOptions_OptionTargetType int32
+
+const (
+ FieldOptions_TARGET_TYPE_UNKNOWN FieldOptions_OptionTargetType = 0
+ FieldOptions_TARGET_TYPE_FILE FieldOptions_OptionTargetType = 1
+ FieldOptions_TARGET_TYPE_EXTENSION_RANGE FieldOptions_OptionTargetType = 2
+ FieldOptions_TARGET_TYPE_MESSAGE FieldOptions_OptionTargetType = 3
+ FieldOptions_TARGET_TYPE_FIELD FieldOptions_OptionTargetType = 4
+ FieldOptions_TARGET_TYPE_ONEOF FieldOptions_OptionTargetType = 5
+ FieldOptions_TARGET_TYPE_ENUM FieldOptions_OptionTargetType = 6
+ FieldOptions_TARGET_TYPE_ENUM_ENTRY FieldOptions_OptionTargetType = 7
+ FieldOptions_TARGET_TYPE_SERVICE FieldOptions_OptionTargetType = 8
+ FieldOptions_TARGET_TYPE_METHOD FieldOptions_OptionTargetType = 9
+)
+
+// Enum value maps for FieldOptions_OptionTargetType.
+var (
+ FieldOptions_OptionTargetType_name = map[int32]string{
+ 0: "TARGET_TYPE_UNKNOWN",
+ 1: "TARGET_TYPE_FILE",
+ 2: "TARGET_TYPE_EXTENSION_RANGE",
+ 3: "TARGET_TYPE_MESSAGE",
+ 4: "TARGET_TYPE_FIELD",
+ 5: "TARGET_TYPE_ONEOF",
+ 6: "TARGET_TYPE_ENUM",
+ 7: "TARGET_TYPE_ENUM_ENTRY",
+ 8: "TARGET_TYPE_SERVICE",
+ 9: "TARGET_TYPE_METHOD",
+ }
+ FieldOptions_OptionTargetType_value = map[string]int32{
+ "TARGET_TYPE_UNKNOWN": 0,
+ "TARGET_TYPE_FILE": 1,
+ "TARGET_TYPE_EXTENSION_RANGE": 2,
+ "TARGET_TYPE_MESSAGE": 3,
+ "TARGET_TYPE_FIELD": 4,
+ "TARGET_TYPE_ONEOF": 5,
+ "TARGET_TYPE_ENUM": 6,
+ "TARGET_TYPE_ENUM_ENTRY": 7,
+ "TARGET_TYPE_SERVICE": 8,
+ "TARGET_TYPE_METHOD": 9,
+ }
+)
+
+func (x FieldOptions_OptionTargetType) Enum() *FieldOptions_OptionTargetType {
+ p := new(FieldOptions_OptionTargetType)
+ *p = x
+ return p
+}
+
+func (x FieldOptions_OptionTargetType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor()
+}
+
+func (FieldOptions_OptionTargetType) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[8]
+}
+
+func (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FieldOptions_OptionTargetType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FieldOptions_OptionTargetType(num)
+ return nil
+}
+
+// Deprecated: Use FieldOptions_OptionTargetType.Descriptor instead.
+func (FieldOptions_OptionTargetType) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 3}
+}
+
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
// or neither? HTTP based RPC implementation may choose GET verb for safe
// methods, and PUT verb for idempotent methods instead of the default POST.
@@ -442,11 +753,11 @@ func (x MethodOptions_IdempotencyLevel) String() string {
}
func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor()
}
func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[5]
+ return &file_google_protobuf_descriptor_proto_enumTypes[9]
}
func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber {
@@ -468,6 +779,427 @@ func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0}
}
+type FeatureSet_FieldPresence int32
+
+const (
+ FeatureSet_FIELD_PRESENCE_UNKNOWN FeatureSet_FieldPresence = 0
+ FeatureSet_EXPLICIT FeatureSet_FieldPresence = 1
+ FeatureSet_IMPLICIT FeatureSet_FieldPresence = 2
+ FeatureSet_LEGACY_REQUIRED FeatureSet_FieldPresence = 3
+)
+
+// Enum value maps for FeatureSet_FieldPresence.
+var (
+ FeatureSet_FieldPresence_name = map[int32]string{
+ 0: "FIELD_PRESENCE_UNKNOWN",
+ 1: "EXPLICIT",
+ 2: "IMPLICIT",
+ 3: "LEGACY_REQUIRED",
+ }
+ FeatureSet_FieldPresence_value = map[string]int32{
+ "FIELD_PRESENCE_UNKNOWN": 0,
+ "EXPLICIT": 1,
+ "IMPLICIT": 2,
+ "LEGACY_REQUIRED": 3,
+ }
+)
+
+func (x FeatureSet_FieldPresence) Enum() *FeatureSet_FieldPresence {
+ p := new(FeatureSet_FieldPresence)
+ *p = x
+ return p
+}
+
+func (x FeatureSet_FieldPresence) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FeatureSet_FieldPresence) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor()
+}
+
+func (FeatureSet_FieldPresence) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[10]
+}
+
+func (x FeatureSet_FieldPresence) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FeatureSet_FieldPresence) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FeatureSet_FieldPresence(num)
+ return nil
+}
+
+// Deprecated: Use FeatureSet_FieldPresence.Descriptor instead.
+func (FeatureSet_FieldPresence) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0}
+}
+
+type FeatureSet_EnumType int32
+
+const (
+ FeatureSet_ENUM_TYPE_UNKNOWN FeatureSet_EnumType = 0
+ FeatureSet_OPEN FeatureSet_EnumType = 1
+ FeatureSet_CLOSED FeatureSet_EnumType = 2
+)
+
+// Enum value maps for FeatureSet_EnumType.
+var (
+ FeatureSet_EnumType_name = map[int32]string{
+ 0: "ENUM_TYPE_UNKNOWN",
+ 1: "OPEN",
+ 2: "CLOSED",
+ }
+ FeatureSet_EnumType_value = map[string]int32{
+ "ENUM_TYPE_UNKNOWN": 0,
+ "OPEN": 1,
+ "CLOSED": 2,
+ }
+)
+
+func (x FeatureSet_EnumType) Enum() *FeatureSet_EnumType {
+ p := new(FeatureSet_EnumType)
+ *p = x
+ return p
+}
+
+func (x FeatureSet_EnumType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FeatureSet_EnumType) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor()
+}
+
+func (FeatureSet_EnumType) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[11]
+}
+
+func (x FeatureSet_EnumType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FeatureSet_EnumType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FeatureSet_EnumType(num)
+ return nil
+}
+
+// Deprecated: Use FeatureSet_EnumType.Descriptor instead.
+func (FeatureSet_EnumType) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 1}
+}
+
+type FeatureSet_RepeatedFieldEncoding int32
+
+const (
+ FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN FeatureSet_RepeatedFieldEncoding = 0
+ FeatureSet_PACKED FeatureSet_RepeatedFieldEncoding = 1
+ FeatureSet_EXPANDED FeatureSet_RepeatedFieldEncoding = 2
+)
+
+// Enum value maps for FeatureSet_RepeatedFieldEncoding.
+var (
+ FeatureSet_RepeatedFieldEncoding_name = map[int32]string{
+ 0: "REPEATED_FIELD_ENCODING_UNKNOWN",
+ 1: "PACKED",
+ 2: "EXPANDED",
+ }
+ FeatureSet_RepeatedFieldEncoding_value = map[string]int32{
+ "REPEATED_FIELD_ENCODING_UNKNOWN": 0,
+ "PACKED": 1,
+ "EXPANDED": 2,
+ }
+)
+
+func (x FeatureSet_RepeatedFieldEncoding) Enum() *FeatureSet_RepeatedFieldEncoding {
+ p := new(FeatureSet_RepeatedFieldEncoding)
+ *p = x
+ return p
+}
+
+func (x FeatureSet_RepeatedFieldEncoding) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FeatureSet_RepeatedFieldEncoding) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor()
+}
+
+func (FeatureSet_RepeatedFieldEncoding) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[12]
+}
+
+func (x FeatureSet_RepeatedFieldEncoding) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FeatureSet_RepeatedFieldEncoding) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FeatureSet_RepeatedFieldEncoding(num)
+ return nil
+}
+
+// Deprecated: Use FeatureSet_RepeatedFieldEncoding.Descriptor instead.
+func (FeatureSet_RepeatedFieldEncoding) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 2}
+}
+
+type FeatureSet_Utf8Validation int32
+
+const (
+ FeatureSet_UTF8_VALIDATION_UNKNOWN FeatureSet_Utf8Validation = 0
+ FeatureSet_VERIFY FeatureSet_Utf8Validation = 2
+ FeatureSet_NONE FeatureSet_Utf8Validation = 3
+)
+
+// Enum value maps for FeatureSet_Utf8Validation.
+var (
+ FeatureSet_Utf8Validation_name = map[int32]string{
+ 0: "UTF8_VALIDATION_UNKNOWN",
+ 2: "VERIFY",
+ 3: "NONE",
+ }
+ FeatureSet_Utf8Validation_value = map[string]int32{
+ "UTF8_VALIDATION_UNKNOWN": 0,
+ "VERIFY": 2,
+ "NONE": 3,
+ }
+)
+
+func (x FeatureSet_Utf8Validation) Enum() *FeatureSet_Utf8Validation {
+ p := new(FeatureSet_Utf8Validation)
+ *p = x
+ return p
+}
+
+func (x FeatureSet_Utf8Validation) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FeatureSet_Utf8Validation) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor()
+}
+
+func (FeatureSet_Utf8Validation) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[13]
+}
+
+func (x FeatureSet_Utf8Validation) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FeatureSet_Utf8Validation) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FeatureSet_Utf8Validation(num)
+ return nil
+}
+
+// Deprecated: Use FeatureSet_Utf8Validation.Descriptor instead.
+func (FeatureSet_Utf8Validation) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 3}
+}
+
+type FeatureSet_MessageEncoding int32
+
+const (
+ FeatureSet_MESSAGE_ENCODING_UNKNOWN FeatureSet_MessageEncoding = 0
+ FeatureSet_LENGTH_PREFIXED FeatureSet_MessageEncoding = 1
+ FeatureSet_DELIMITED FeatureSet_MessageEncoding = 2
+)
+
+// Enum value maps for FeatureSet_MessageEncoding.
+var (
+ FeatureSet_MessageEncoding_name = map[int32]string{
+ 0: "MESSAGE_ENCODING_UNKNOWN",
+ 1: "LENGTH_PREFIXED",
+ 2: "DELIMITED",
+ }
+ FeatureSet_MessageEncoding_value = map[string]int32{
+ "MESSAGE_ENCODING_UNKNOWN": 0,
+ "LENGTH_PREFIXED": 1,
+ "DELIMITED": 2,
+ }
+)
+
+func (x FeatureSet_MessageEncoding) Enum() *FeatureSet_MessageEncoding {
+ p := new(FeatureSet_MessageEncoding)
+ *p = x
+ return p
+}
+
+func (x FeatureSet_MessageEncoding) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FeatureSet_MessageEncoding) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor()
+}
+
+func (FeatureSet_MessageEncoding) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[14]
+}
+
+func (x FeatureSet_MessageEncoding) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FeatureSet_MessageEncoding) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FeatureSet_MessageEncoding(num)
+ return nil
+}
+
+// Deprecated: Use FeatureSet_MessageEncoding.Descriptor instead.
+func (FeatureSet_MessageEncoding) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 4}
+}
+
+type FeatureSet_JsonFormat int32
+
+const (
+ FeatureSet_JSON_FORMAT_UNKNOWN FeatureSet_JsonFormat = 0
+ FeatureSet_ALLOW FeatureSet_JsonFormat = 1
+ FeatureSet_LEGACY_BEST_EFFORT FeatureSet_JsonFormat = 2
+)
+
+// Enum value maps for FeatureSet_JsonFormat.
+var (
+ FeatureSet_JsonFormat_name = map[int32]string{
+ 0: "JSON_FORMAT_UNKNOWN",
+ 1: "ALLOW",
+ 2: "LEGACY_BEST_EFFORT",
+ }
+ FeatureSet_JsonFormat_value = map[string]int32{
+ "JSON_FORMAT_UNKNOWN": 0,
+ "ALLOW": 1,
+ "LEGACY_BEST_EFFORT": 2,
+ }
+)
+
+func (x FeatureSet_JsonFormat) Enum() *FeatureSet_JsonFormat {
+ p := new(FeatureSet_JsonFormat)
+ *p = x
+ return p
+}
+
+func (x FeatureSet_JsonFormat) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FeatureSet_JsonFormat) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor()
+}
+
+func (FeatureSet_JsonFormat) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[15]
+}
+
+func (x FeatureSet_JsonFormat) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FeatureSet_JsonFormat) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FeatureSet_JsonFormat(num)
+ return nil
+}
+
+// Deprecated: Use FeatureSet_JsonFormat.Descriptor instead.
+func (FeatureSet_JsonFormat) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 5}
+}
+
+// Represents the identified object's effect on the element in the original
+// .proto file.
+type GeneratedCodeInfo_Annotation_Semantic int32
+
+const (
+ // There is no effect or the effect is indescribable.
+ GeneratedCodeInfo_Annotation_NONE GeneratedCodeInfo_Annotation_Semantic = 0
+ // The element is set or otherwise mutated.
+ GeneratedCodeInfo_Annotation_SET GeneratedCodeInfo_Annotation_Semantic = 1
+ // An alias to the element is returned.
+ GeneratedCodeInfo_Annotation_ALIAS GeneratedCodeInfo_Annotation_Semantic = 2
+)
+
+// Enum value maps for GeneratedCodeInfo_Annotation_Semantic.
+var (
+ GeneratedCodeInfo_Annotation_Semantic_name = map[int32]string{
+ 0: "NONE",
+ 1: "SET",
+ 2: "ALIAS",
+ }
+ GeneratedCodeInfo_Annotation_Semantic_value = map[string]int32{
+ "NONE": 0,
+ "SET": 1,
+ "ALIAS": 2,
+ }
+)
+
+func (x GeneratedCodeInfo_Annotation_Semantic) Enum() *GeneratedCodeInfo_Annotation_Semantic {
+ p := new(GeneratedCodeInfo_Annotation_Semantic)
+ *p = x
+ return p
+}
+
+func (x GeneratedCodeInfo_Annotation_Semantic) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor()
+}
+
+func (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[16]
+}
+
+func (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *GeneratedCodeInfo_Annotation_Semantic) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = GeneratedCodeInfo_Annotation_Semantic(num)
+ return nil
+}
+
+// Deprecated: Use GeneratedCodeInfo_Annotation_Semantic.Descriptor instead.
+func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0, 0}
+}
+
// The protocol compiler can output a FileDescriptorSet containing the .proto
// files it parses.
type FileDescriptorSet struct {
@@ -544,8 +1276,12 @@ type FileDescriptorProto struct {
// development tools.
SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"`
// The syntax of the proto file.
- // The supported values are "proto2" and "proto3".
+ // The supported values are "proto2", "proto3", and "editions".
+ //
+ // If `edition` is present, this value must be "editions".
Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
+ // The edition of the proto file.
+ Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"`
}
func (x *FileDescriptorProto) Reset() {
@@ -664,6 +1400,13 @@ func (x *FileDescriptorProto) GetSyntax() string {
return ""
}
+func (x *FileDescriptorProto) GetEdition() Edition {
+ if x != nil && x.Edition != nil {
+ return *x.Edition
+ }
+ return Edition_EDITION_UNKNOWN
+}
+
// Describes a message type.
type DescriptorProto struct {
state protoimpl.MessageState
@@ -794,7 +1537,22 @@ type ExtensionRangeOptions struct {
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-}
+ // For external users: DO NOT USE. We are in the process of open sourcing
+ // extension declaration and executing internal cleanups before it can be
+ // used externally.
+ Declaration []*ExtensionRangeOptions_Declaration `protobuf:"bytes,2,rep,name=declaration" json:"declaration,omitempty"`
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"`
+ // The verification state of the range.
+ // TODO: flip the default to DECLARATION once all empty ranges
+ // are marked as UNVERIFIED.
+ Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"`
+}
+
+// Default values for ExtensionRangeOptions fields.
+const (
+ Default_ExtensionRangeOptions_Verification = ExtensionRangeOptions_UNVERIFIED
+)
func (x *ExtensionRangeOptions) Reset() {
*x = ExtensionRangeOptions{}
@@ -835,6 +1593,27 @@ func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption
return nil
}
+func (x *ExtensionRangeOptions) GetDeclaration() []*ExtensionRangeOptions_Declaration {
+ if x != nil {
+ return x.Declaration
+ }
+ return nil
+}
+
+func (x *ExtensionRangeOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
+func (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_VerificationState {
+ if x != nil && x.Verification != nil {
+ return *x.Verification
+ }
+ return Default_ExtensionRangeOptions_Verification
+}
+
// Describes a field within a message.
type FieldDescriptorProto struct {
state protoimpl.MessageState
@@ -860,7 +1639,6 @@ type FieldDescriptorProto struct {
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
- // TODO(kenton): Base-64 encode?
DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"`
// If set, gives the index of a oneof in the containing type's oneof_decl
// list. This field is a member of that oneof.
@@ -874,12 +1652,12 @@ type FieldDescriptorProto struct {
// If true, this is a proto3 "optional". When a proto3 field is optional, it
// tracks presence regardless of field type.
//
- // When proto3_optional is true, this field must be belong to a oneof to
- // signal to old proto3 clients that presence is tracked for this field. This
- // oneof is known as a "synthetic" oneof, and this field must be its sole
- // member (each proto3 optional field gets its own synthetic oneof). Synthetic
- // oneofs exist in the descriptor only, and do not generate any API. Synthetic
- // oneofs must be ordered after all "real" oneofs.
+ // When proto3_optional is true, this field must belong to a oneof to signal
+ // to old proto3 clients that presence is tracked for this field. This oneof
+ // is known as a "synthetic" oneof, and this field must be its sole member
+ // (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
+ // exist in the descriptor only, and do not generate any API. Synthetic oneofs
+ // must be ordered after all "real" oneofs.
//
// For message fields, proto3_optional doesn't create any semantic change,
// since non-repeated message fields always track presence. However it still
@@ -1382,22 +2160,22 @@ type FileOptions struct {
// inappropriate because proto packages do not normally start with backwards
// domain names.
JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"`
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
+ // Controls the name of the wrapper Java class generated for the .proto file.
+ // That class will always contain the .proto file's getDescriptor() method as
+ // well as any top-level extensions defined in the .proto file.
+ // If java_multiple_files is disabled, then all the other classes from the
+ // .proto file will be nested inside the single wrapper outer class.
JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"`
- // If set true, then the Java code generator will generate a separate .java
+ // If enabled, then the Java code generator will generate a separate .java
// file for each top-level message, enum, and service defined in the .proto
- // file. Thus, these types will *not* be nested inside the outer class
- // named by java_outer_classname. However, the outer class will still be
+ // file. Thus, these types will *not* be nested inside the wrapper class
+ // named by java_outer_classname. However, the wrapper class will still be
// generated to contain the file's getDescriptor() method as well as any
// top-level extensions defined in the file.
JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"`
// This option does nothing.
//
- // Deprecated: Do not use.
+ // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"`
// If set true, then the Java2 code generator will generate code that
// throws an exception whenever an attempt is made to assign a non-UTF-8
@@ -1426,7 +2204,6 @@ type FileOptions struct {
CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"`
JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"`
PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"`
- PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"`
// Is this file deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for everything in the file, or it will be completely ignored; in the very
@@ -1460,6 +2237,8 @@ type FileOptions struct {
// is empty. When this option is not set, the package name will be used for
// determining the ruby package.
RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"`
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"`
// The parser stores options it doesn't recognize here.
// See the documentation for the "Options" section above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
@@ -1473,7 +2252,6 @@ const (
Default_FileOptions_CcGenericServices = bool(false)
Default_FileOptions_JavaGenericServices = bool(false)
Default_FileOptions_PyGenericServices = bool(false)
- Default_FileOptions_PhpGenericServices = bool(false)
Default_FileOptions_Deprecated = bool(false)
Default_FileOptions_CcEnableArenas = bool(true)
)
@@ -1531,7 +2309,7 @@ func (x *FileOptions) GetJavaMultipleFiles() bool {
return Default_FileOptions_JavaMultipleFiles
}
-// Deprecated: Do not use.
+// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
func (x *FileOptions) GetJavaGenerateEqualsAndHash() bool {
if x != nil && x.JavaGenerateEqualsAndHash != nil {
return *x.JavaGenerateEqualsAndHash
@@ -1578,14 +2356,7 @@ func (x *FileOptions) GetPyGenericServices() bool {
if x != nil && x.PyGenericServices != nil {
return *x.PyGenericServices
}
- return Default_FileOptions_PyGenericServices
-}
-
-func (x *FileOptions) GetPhpGenericServices() bool {
- if x != nil && x.PhpGenericServices != nil {
- return *x.PhpGenericServices
- }
- return Default_FileOptions_PhpGenericServices
+ return Default_FileOptions_PyGenericServices
}
func (x *FileOptions) GetDeprecated() bool {
@@ -1651,6 +2422,13 @@ func (x *FileOptions) GetRubyPackage() string {
return ""
}
+func (x *FileOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption {
if x != nil {
return x.UninterpretedOption
@@ -1670,10 +2448,12 @@ type MessageOptions struct {
// efficient, has fewer features, and is more complicated.
//
// The message must be defined exactly as follows:
- // message Foo {
- // option message_set_wire_format = true;
- // extensions 4 to max;
- // }
+ //
+ // message Foo {
+ // option message_set_wire_format = true;
+ // extensions 4 to max;
+ // }
+ //
// Note that the message cannot have any defined fields; MessageSets only
// have extensions.
//
@@ -1696,14 +2476,17 @@ type MessageOptions struct {
// maps field.
//
// For maps fields:
- // map map_field = 1;
+ //
+ // map map_field = 1;
+ //
// The parsed descriptor looks like:
- // message MapFieldEntry {
- // option map_entry = true;
- // optional KeyType key = 1;
- // optional ValueType value = 2;
- // }
- // repeated MapFieldEntry map_field = 1;
+ //
+ // message MapFieldEntry {
+ // option map_entry = true;
+ // optional KeyType key = 1;
+ // optional ValueType value = 2;
+ // }
+ // repeated MapFieldEntry map_field = 1;
//
// Implementations may choose not to generate the map_entry=true message, but
// use a native map in the target language to hold the keys and values.
@@ -1714,6 +2497,21 @@ type MessageOptions struct {
// instead. The option should only be implicitly set by the proto compiler
// parser.
MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"`
+ // Enable the legacy handling of JSON field name conflicts. This lowercases
+ // and strips underscored from the fields before comparison in proto3 only.
+ // The new behavior takes `json_name` into account and applies to proto2 as
+ // well.
+ //
+ // This should only be used as a temporary measure against broken builds due
+ // to the change in behavior for JSON field name conflicts.
+ //
+ // TODO This is legacy behavior we plan to remove once downstream
+ // teams have had time to migrate.
+ //
+ // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
+ DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,11,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"`
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,12,opt,name=features" json:"features,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
}
@@ -1785,6 +2583,21 @@ func (x *MessageOptions) GetMapEntry() bool {
return false
}
+// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
+func (x *MessageOptions) GetDeprecatedLegacyJsonFieldConflicts() bool {
+ if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil {
+ return *x.DeprecatedLegacyJsonFieldConflicts
+ }
+ return false
+}
+
+func (x *MessageOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption {
if x != nil {
return x.UninterpretedOption
@@ -1800,14 +2613,18 @@ type FieldOptions struct {
// The ctype option instructs the C++ code generator to use a different
// representation of the field than it normally would. See the specific
- // options below. This option is not yet implemented in the open source
- // release -- sorry, we'll try to include it in a future version!
+ // options below. This option is only implemented to support use of
+ // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
+ // type "bytes" in the open source release -- sorry, we'll try to include
+ // other types in a future version!
Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"`
// The packed option can be enabled for repeated primitive fields to enable
// a more efficient representation on the wire. Rather than repeatedly
// writing the tag and type for each element, the entire array is encoded as
// a single length-delimited blob. In proto3, only explicit setting it to
- // false will avoid using packed encoding.
+ // false will avoid using packed encoding. This option is prohibited in
+ // Editions, but the `repeated_field_encoding` feature can be used to control
+ // the behavior.
Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"`
// The jstype option determines the JavaScript type used for values of the
// field. The option is permitted only for 64 bit integral and fixed types
@@ -1838,18 +2655,16 @@ type FieldOptions struct {
// call from multiple threads concurrently, while non-const methods continue
// to require exclusive access.
//
- //
- // Note that implementations may choose not to check required fields within
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
- // may return true even if the inner message has missing required fields.
- // This is necessary because otherwise the inner message would have to be
- // parsed in order to perform the check, defeating the purpose of lazy
- // parsing. An implementation which chooses not to check required fields
- // must be consistent about it. That is, for any particular sub-message, the
- // implementation must either *always* check its required fields, or *never*
- // check its required fields, regardless of whether or not the message has
- // been parsed.
+ // Note that lazy message fields are still eagerly verified to check
+ // ill-formed wireformat or missing required fields. Calling IsInitialized()
+ // on the outer message would fail if the inner message has missing required
+ // fields. Failed verification would result in parsing failure (except when
+ // uninitialized messages are acceptable).
Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"`
+ // unverified_lazy does no correctness checks on the byte stream. This should
+ // only be used where lazy with verification is prohibitive for performance
+ // reasons.
+ UnverifiedLazy *bool `protobuf:"varint,15,opt,name=unverified_lazy,json=unverifiedLazy,def=0" json:"unverified_lazy,omitempty"`
// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
@@ -1857,17 +2672,27 @@ type FieldOptions struct {
Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
// For Google-internal migration only. Do not use.
Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"`
+ // Indicate that the field value should not be printed out when using debug
+ // formats, e.g. when the field contains sensitive credentials.
+ DebugRedact *bool `protobuf:"varint,16,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"`
+ Retention *FieldOptions_OptionRetention `protobuf:"varint,17,opt,name=retention,enum=google.protobuf.FieldOptions_OptionRetention" json:"retention,omitempty"`
+ Targets []FieldOptions_OptionTargetType `protobuf:"varint,19,rep,name=targets,enum=google.protobuf.FieldOptions_OptionTargetType" json:"targets,omitempty"`
+ EditionDefaults []*FieldOptions_EditionDefault `protobuf:"bytes,20,rep,name=edition_defaults,json=editionDefaults" json:"edition_defaults,omitempty"`
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
}
// Default values for FieldOptions fields.
const (
- Default_FieldOptions_Ctype = FieldOptions_STRING
- Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL
- Default_FieldOptions_Lazy = bool(false)
- Default_FieldOptions_Deprecated = bool(false)
- Default_FieldOptions_Weak = bool(false)
+ Default_FieldOptions_Ctype = FieldOptions_STRING
+ Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL
+ Default_FieldOptions_Lazy = bool(false)
+ Default_FieldOptions_UnverifiedLazy = bool(false)
+ Default_FieldOptions_Deprecated = bool(false)
+ Default_FieldOptions_Weak = bool(false)
+ Default_FieldOptions_DebugRedact = bool(false)
)
func (x *FieldOptions) Reset() {
@@ -1930,6 +2755,13 @@ func (x *FieldOptions) GetLazy() bool {
return Default_FieldOptions_Lazy
}
+func (x *FieldOptions) GetUnverifiedLazy() bool {
+ if x != nil && x.UnverifiedLazy != nil {
+ return *x.UnverifiedLazy
+ }
+ return Default_FieldOptions_UnverifiedLazy
+}
+
func (x *FieldOptions) GetDeprecated() bool {
if x != nil && x.Deprecated != nil {
return *x.Deprecated
@@ -1944,6 +2776,41 @@ func (x *FieldOptions) GetWeak() bool {
return Default_FieldOptions_Weak
}
+func (x *FieldOptions) GetDebugRedact() bool {
+ if x != nil && x.DebugRedact != nil {
+ return *x.DebugRedact
+ }
+ return Default_FieldOptions_DebugRedact
+}
+
+func (x *FieldOptions) GetRetention() FieldOptions_OptionRetention {
+ if x != nil && x.Retention != nil {
+ return *x.Retention
+ }
+ return FieldOptions_RETENTION_UNKNOWN
+}
+
+func (x *FieldOptions) GetTargets() []FieldOptions_OptionTargetType {
+ if x != nil {
+ return x.Targets
+ }
+ return nil
+}
+
+func (x *FieldOptions) GetEditionDefaults() []*FieldOptions_EditionDefault {
+ if x != nil {
+ return x.EditionDefaults
+ }
+ return nil
+}
+
+func (x *FieldOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {
if x != nil {
return x.UninterpretedOption
@@ -1957,6 +2824,8 @@ type OneofOptions struct {
unknownFields protoimpl.UnknownFields
extensionFields protoimpl.ExtensionFields
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,1,opt,name=features" json:"features,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
}
@@ -1993,6 +2862,13 @@ func (*OneofOptions) Descriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13}
}
+func (x *OneofOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {
if x != nil {
return x.UninterpretedOption
@@ -2014,6 +2890,17 @@ type EnumOptions struct {
// for the enum, or it will be completely ignored; in the very least, this
// is a formalization for deprecating enums.
Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
+ // Enable the legacy handling of JSON field name conflicts. This lowercases
+ // and strips underscored from the fields before comparison in proto3 only.
+ // The new behavior takes `json_name` into account and applies to proto2 as
+ // well.
+ // TODO Remove this legacy behavior once downstream teams have
+ // had time to migrate.
+ //
+ // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
+ DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,6,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"`
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,7,opt,name=features" json:"features,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
}
@@ -2069,6 +2956,21 @@ func (x *EnumOptions) GetDeprecated() bool {
return Default_EnumOptions_Deprecated
}
+// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
+func (x *EnumOptions) GetDeprecatedLegacyJsonFieldConflicts() bool {
+ if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil {
+ return *x.DeprecatedLegacyJsonFieldConflicts
+ }
+ return false
+}
+
+func (x *EnumOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption {
if x != nil {
return x.UninterpretedOption
@@ -2087,13 +2989,20 @@ type EnumValueOptions struct {
// for the enum value, or it will be completely ignored; in the very least,
// this is a formalization for deprecating enum values.
Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"`
+ // Indicate that fields annotated with this enum value should not be printed
+ // out when using debug formats, e.g. when the field contains sensitive
+ // credentials.
+ DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
}
// Default values for EnumValueOptions fields.
const (
- Default_EnumValueOptions_Deprecated = bool(false)
+ Default_EnumValueOptions_Deprecated = bool(false)
+ Default_EnumValueOptions_DebugRedact = bool(false)
)
func (x *EnumValueOptions) Reset() {
@@ -2135,6 +3044,20 @@ func (x *EnumValueOptions) GetDeprecated() bool {
return Default_EnumValueOptions_Deprecated
}
+func (x *EnumValueOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
+func (x *EnumValueOptions) GetDebugRedact() bool {
+ if x != nil && x.DebugRedact != nil {
+ return *x.DebugRedact
+ }
+ return Default_EnumValueOptions_DebugRedact
+}
+
func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption {
if x != nil {
return x.UninterpretedOption
@@ -2148,6 +3071,8 @@ type ServiceOptions struct {
unknownFields protoimpl.UnknownFields
extensionFields protoimpl.ExtensionFields
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,34,opt,name=features" json:"features,omitempty"`
// Is this service deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for the service, or it will be completely ignored; in the very least,
@@ -2194,6 +3119,13 @@ func (*ServiceOptions) Descriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16}
}
+func (x *ServiceOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
func (x *ServiceOptions) GetDeprecated() bool {
if x != nil && x.Deprecated != nil {
return *x.Deprecated
@@ -2220,6 +3152,8 @@ type MethodOptions struct {
// this is a formalization for deprecating methods.
Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"`
+ // Any features defined in the specific edition.
+ Features *FeatureSet `protobuf:"bytes,35,opt,name=features" json:"features,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
}
@@ -2276,6 +3210,13 @@ func (x *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel {
return Default_MethodOptions_IdempotencyLevel
}
+func (x *MethodOptions) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption {
if x != nil {
return x.UninterpretedOption
@@ -2386,6 +3327,171 @@ func (x *UninterpretedOption) GetAggregateValue() string {
return ""
}
+// TODO Enums in C++ gencode (and potentially other languages) are
+// not well scoped. This means that each of the feature enums below can clash
+// with each other. The short names we've chosen maximize call-site
+// readability, but leave us very open to this scenario. A future feature will
+// be designed and implemented to handle this, hopefully before we ever hit a
+// conflict here.
+type FeatureSet struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+ extensionFields protoimpl.ExtensionFields
+
+ FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"`
+ EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"`
+ RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"`
+ Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"`
+ MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"`
+ JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"`
+}
+
+func (x *FeatureSet) Reset() {
+ *x = FeatureSet{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FeatureSet) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FeatureSet) ProtoMessage() {}
+
+func (x *FeatureSet) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[19]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FeatureSet.ProtoReflect.Descriptor instead.
+func (*FeatureSet) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *FeatureSet) GetFieldPresence() FeatureSet_FieldPresence {
+ if x != nil && x.FieldPresence != nil {
+ return *x.FieldPresence
+ }
+ return FeatureSet_FIELD_PRESENCE_UNKNOWN
+}
+
+func (x *FeatureSet) GetEnumType() FeatureSet_EnumType {
+ if x != nil && x.EnumType != nil {
+ return *x.EnumType
+ }
+ return FeatureSet_ENUM_TYPE_UNKNOWN
+}
+
+func (x *FeatureSet) GetRepeatedFieldEncoding() FeatureSet_RepeatedFieldEncoding {
+ if x != nil && x.RepeatedFieldEncoding != nil {
+ return *x.RepeatedFieldEncoding
+ }
+ return FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN
+}
+
+func (x *FeatureSet) GetUtf8Validation() FeatureSet_Utf8Validation {
+ if x != nil && x.Utf8Validation != nil {
+ return *x.Utf8Validation
+ }
+ return FeatureSet_UTF8_VALIDATION_UNKNOWN
+}
+
+func (x *FeatureSet) GetMessageEncoding() FeatureSet_MessageEncoding {
+ if x != nil && x.MessageEncoding != nil {
+ return *x.MessageEncoding
+ }
+ return FeatureSet_MESSAGE_ENCODING_UNKNOWN
+}
+
+func (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat {
+ if x != nil && x.JsonFormat != nil {
+ return *x.JsonFormat
+ }
+ return FeatureSet_JSON_FORMAT_UNKNOWN
+}
+
+// A compiled specification for the defaults of a set of features. These
+// messages are generated from FeatureSet extensions and can be used to seed
+// feature resolution. The resolution with this object becomes a simple search
+// for the closest matching edition, followed by proto merges.
+type FeatureSetDefaults struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Defaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:"bytes,1,rep,name=defaults" json:"defaults,omitempty"`
+ // The minimum supported edition (inclusive) when this was constructed.
+ // Editions before this will not have defaults.
+ MinimumEdition *Edition `protobuf:"varint,4,opt,name=minimum_edition,json=minimumEdition,enum=google.protobuf.Edition" json:"minimum_edition,omitempty"`
+ // The maximum known edition (inclusive) when this was constructed. Editions
+ // after this will not have reliable defaults.
+ MaximumEdition *Edition `protobuf:"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition" json:"maximum_edition,omitempty"`
+}
+
+func (x *FeatureSetDefaults) Reset() {
+ *x = FeatureSetDefaults{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FeatureSetDefaults) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FeatureSetDefaults) ProtoMessage() {}
+
+func (x *FeatureSetDefaults) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[20]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FeatureSetDefaults.ProtoReflect.Descriptor instead.
+func (*FeatureSetDefaults) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *FeatureSetDefaults) GetDefaults() []*FeatureSetDefaults_FeatureSetEditionDefault {
+ if x != nil {
+ return x.Defaults
+ }
+ return nil
+}
+
+func (x *FeatureSetDefaults) GetMinimumEdition() Edition {
+ if x != nil && x.MinimumEdition != nil {
+ return *x.MinimumEdition
+ }
+ return Edition_EDITION_UNKNOWN
+}
+
+func (x *FeatureSetDefaults) GetMaximumEdition() Edition {
+ if x != nil && x.MaximumEdition != nil {
+ return *x.MaximumEdition
+ }
+ return Edition_EDITION_UNKNOWN
+}
+
// Encapsulates information about the original source file from which a
// FileDescriptorProto was generated.
type SourceCodeInfo struct {
@@ -2399,50 +3505,55 @@ type SourceCodeInfo struct {
// tools.
//
// For example, say we have a file like:
- // message Foo {
- // optional string foo = 1;
- // }
+ //
+ // message Foo {
+ // optional string foo = 1;
+ // }
+ //
// Let's look at just the field definition:
- // optional string foo = 1;
- // ^ ^^ ^^ ^ ^^^
- // a bc de f ghi
+ //
+ // optional string foo = 1;
+ // ^ ^^ ^^ ^ ^^^
+ // a bc de f ghi
+ //
// We have the following locations:
- // span path represents
- // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+ //
+ // span path represents
+ // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
//
// Notes:
- // - A location may refer to a repeated field itself (i.e. not to any
- // particular index within it). This is used whenever a set of elements are
- // logically enclosed in a single code segment. For example, an entire
- // extend block (possibly containing multiple extension definitions) will
- // have an outer location whose path refers to the "extensions" repeated
- // field without an index.
- // - Multiple locations may have the same path. This happens when a single
- // logical declaration is spread out across multiple places. The most
- // obvious example is the "extend" block again -- there may be multiple
- // extend blocks in the same scope, each of which will have the same path.
- // - A location's span is not always a subset of its parent's span. For
- // example, the "extendee" of an extension declaration appears at the
- // beginning of the "extend" block and is shared by all extensions within
- // the block.
- // - Just because a location's span is a subset of some other location's span
- // does not mean that it is a descendant. For example, a "group" defines
- // both a type and a field in a single declaration. Thus, the locations
- // corresponding to the type and field and their components will overlap.
- // - Code which tries to interpret locations should probably be designed to
- // ignore those that it doesn't understand, as more types of locations could
- // be recorded in the future.
+ // - A location may refer to a repeated field itself (i.e. not to any
+ // particular index within it). This is used whenever a set of elements are
+ // logically enclosed in a single code segment. For example, an entire
+ // extend block (possibly containing multiple extension definitions) will
+ // have an outer location whose path refers to the "extensions" repeated
+ // field without an index.
+ // - Multiple locations may have the same path. This happens when a single
+ // logical declaration is spread out across multiple places. The most
+ // obvious example is the "extend" block again -- there may be multiple
+ // extend blocks in the same scope, each of which will have the same path.
+ // - A location's span is not always a subset of its parent's span. For
+ // example, the "extendee" of an extension declaration appears at the
+ // beginning of the "extend" block and is shared by all extensions within
+ // the block.
+ // - Just because a location's span is a subset of some other location's span
+ // does not mean that it is a descendant. For example, a "group" defines
+ // both a type and a field in a single declaration. Thus, the locations
+ // corresponding to the type and field and their components will overlap.
+ // - Code which tries to interpret locations should probably be designed to
+ // ignore those that it doesn't understand, as more types of locations could
+ // be recorded in the future.
Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"`
}
func (x *SourceCodeInfo) Reset() {
*x = SourceCodeInfo{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[19]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2455,7 +3566,7 @@ func (x *SourceCodeInfo) String() string {
func (*SourceCodeInfo) ProtoMessage() {}
func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[19]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2468,7 +3579,7 @@ func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use SourceCodeInfo.ProtoReflect.Descriptor instead.
func (*SourceCodeInfo) Descriptor() ([]byte, []int) {
- return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19}
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21}
}
func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {
@@ -2494,7 +3605,7 @@ type GeneratedCodeInfo struct {
func (x *GeneratedCodeInfo) Reset() {
*x = GeneratedCodeInfo{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[20]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2507,7 +3618,7 @@ func (x *GeneratedCodeInfo) String() string {
func (*GeneratedCodeInfo) ProtoMessage() {}
func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[20]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2520,7 +3631,7 @@ func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use GeneratedCodeInfo.ProtoReflect.Descriptor instead.
func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) {
- return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20}
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22}
}
func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {
@@ -2543,7 +3654,7 @@ type DescriptorProto_ExtensionRange struct {
func (x *DescriptorProto_ExtensionRange) Reset() {
*x = DescriptorProto_ExtensionRange{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[21]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2556,7 +3667,7 @@ func (x *DescriptorProto_ExtensionRange) String() string {
func (*DescriptorProto_ExtensionRange) ProtoMessage() {}
func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[21]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2579,49 +3690,118 @@ func (x *DescriptorProto_ExtensionRange) GetStart() int32 {
return 0
}
-func (x *DescriptorProto_ExtensionRange) GetEnd() int32 {
+func (x *DescriptorProto_ExtensionRange) GetEnd() int32 {
+ if x != nil && x.End != nil {
+ return *x.End
+ }
+ return 0
+}
+
+func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+// Range of reserved tag numbers. Reserved tag numbers may not be used by
+// fields or extension ranges in the same message. Reserved ranges may
+// not overlap.
+type DescriptorProto_ReservedRange struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive.
+ End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive.
+}
+
+func (x *DescriptorProto_ReservedRange) Reset() {
+ *x = DescriptorProto_ReservedRange{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DescriptorProto_ReservedRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DescriptorProto_ReservedRange) ProtoMessage() {}
+
+func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[24]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DescriptorProto_ReservedRange.ProtoReflect.Descriptor instead.
+func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 1}
+}
+
+func (x *DescriptorProto_ReservedRange) GetStart() int32 {
+ if x != nil && x.Start != nil {
+ return *x.Start
+ }
+ return 0
+}
+
+func (x *DescriptorProto_ReservedRange) GetEnd() int32 {
if x != nil && x.End != nil {
return *x.End
}
return 0
}
-func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
- if x != nil {
- return x.Options
- }
- return nil
-}
-
-// Range of reserved tag numbers. Reserved tag numbers may not be used by
-// fields or extension ranges in the same message. Reserved ranges may
-// not overlap.
-type DescriptorProto_ReservedRange struct {
+type ExtensionRangeOptions_Declaration struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive.
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive.
-}
-
-func (x *DescriptorProto_ReservedRange) Reset() {
- *x = DescriptorProto_ReservedRange{}
+ // The extension number declared within the extension range.
+ Number *int32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"`
+ // The fully-qualified name of the extension field. There must be a leading
+ // dot in front of the full name.
+ FullName *string `protobuf:"bytes,2,opt,name=full_name,json=fullName" json:"full_name,omitempty"`
+ // The fully-qualified type name of the extension field. Unlike
+ // Metadata.type, Declaration.type must have a leading dot for messages
+ // and enums.
+ Type *string `protobuf:"bytes,3,opt,name=type" json:"type,omitempty"`
+ // If true, indicates that the number is reserved in the extension range,
+ // and any extension field with the number will fail to compile. Set this
+ // when a declared extension field is deleted.
+ Reserved *bool `protobuf:"varint,5,opt,name=reserved" json:"reserved,omitempty"`
+ // If true, indicates that the extension must be defined as repeated.
+ // Otherwise the extension must be defined as optional.
+ Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"`
+}
+
+func (x *ExtensionRangeOptions_Declaration) Reset() {
+ *x = ExtensionRangeOptions_Declaration{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[22]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *DescriptorProto_ReservedRange) String() string {
+func (x *ExtensionRangeOptions_Declaration) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DescriptorProto_ReservedRange) ProtoMessage() {}
+func (*ExtensionRangeOptions_Declaration) ProtoMessage() {}
-func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[22]
+func (x *ExtensionRangeOptions_Declaration) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2632,23 +3812,44 @@ func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DescriptorProto_ReservedRange.ProtoReflect.Descriptor instead.
-func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
- return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 1}
+// Deprecated: Use ExtensionRangeOptions_Declaration.ProtoReflect.Descriptor instead.
+func (*ExtensionRangeOptions_Declaration) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0}
}
-func (x *DescriptorProto_ReservedRange) GetStart() int32 {
- if x != nil && x.Start != nil {
- return *x.Start
+func (x *ExtensionRangeOptions_Declaration) GetNumber() int32 {
+ if x != nil && x.Number != nil {
+ return *x.Number
}
return 0
}
-func (x *DescriptorProto_ReservedRange) GetEnd() int32 {
- if x != nil && x.End != nil {
- return *x.End
+func (x *ExtensionRangeOptions_Declaration) GetFullName() string {
+ if x != nil && x.FullName != nil {
+ return *x.FullName
}
- return 0
+ return ""
+}
+
+func (x *ExtensionRangeOptions_Declaration) GetType() string {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return ""
+}
+
+func (x *ExtensionRangeOptions_Declaration) GetReserved() bool {
+ if x != nil && x.Reserved != nil {
+ return *x.Reserved
+ }
+ return false
+}
+
+func (x *ExtensionRangeOptions_Declaration) GetRepeated() bool {
+ if x != nil && x.Repeated != nil {
+ return *x.Repeated
+ }
+ return false
}
// Range of reserved numeric values. Reserved values may not be used by
@@ -2669,7 +3870,7 @@ type EnumDescriptorProto_EnumReservedRange struct {
func (x *EnumDescriptorProto_EnumReservedRange) Reset() {
*x = EnumDescriptorProto_EnumReservedRange{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[23]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2682,7 +3883,7 @@ func (x *EnumDescriptorProto_EnumReservedRange) String() string {
func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {}
func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[23]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2712,11 +3913,66 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {
return 0
}
+type FieldOptions_EditionDefault struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"`
+ Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value.
+}
+
+func (x *FieldOptions_EditionDefault) Reset() {
+ *x = FieldOptions_EditionDefault{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FieldOptions_EditionDefault) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldOptions_EditionDefault) ProtoMessage() {}
+
+func (x *FieldOptions_EditionDefault) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[27]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldOptions_EditionDefault.ProtoReflect.Descriptor instead.
+func (*FieldOptions_EditionDefault) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0}
+}
+
+func (x *FieldOptions_EditionDefault) GetEdition() Edition {
+ if x != nil && x.Edition != nil {
+ return *x.Edition
+ }
+ return Edition_EDITION_UNKNOWN
+}
+
+func (x *FieldOptions_EditionDefault) GetValue() string {
+ if x != nil && x.Value != nil {
+ return *x.Value
+ }
+ return ""
+}
+
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
-// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
-// "foo.(bar.baz).qux".
+// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
+// "foo.(bar.baz).moo".
type UninterpretedOption_NamePart struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2729,7 +3985,7 @@ type UninterpretedOption_NamePart struct {
func (x *UninterpretedOption_NamePart) Reset() {
*x = UninterpretedOption_NamePart{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[24]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2742,7 +3998,7 @@ func (x *UninterpretedOption_NamePart) String() string {
func (*UninterpretedOption_NamePart) ProtoMessage() {}
func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[24]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2772,6 +4028,65 @@ func (x *UninterpretedOption_NamePart) GetIsExtension() bool {
return false
}
+// A map from every known edition with a unique set of defaults to its
+// defaults. Not all editions may be contained here. For a given edition,
+// the defaults at the closest matching edition ordered at or before it should
+// be used. This field must be in strict ascending order by edition.
+type FeatureSetDefaults_FeatureSetEditionDefault struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"`
+ Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"`
+}
+
+func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() {
+ *x = FeatureSetDefaults_FeatureSetEditionDefault{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {}
+
+func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[29]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FeatureSetDefaults_FeatureSetEditionDefault.ProtoReflect.Descriptor instead.
+func (*FeatureSetDefaults_FeatureSetEditionDefault) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0}
+}
+
+func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetEdition() Edition {
+ if x != nil && x.Edition != nil {
+ return *x.Edition
+ }
+ return Edition_EDITION_UNKNOWN
+}
+
+func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFeatures() *FeatureSet {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
type SourceCodeInfo_Location struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2781,23 +4096,34 @@ type SourceCodeInfo_Location struct {
// location.
//
// Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
- // [ 4, 3, 2, 7, 1 ]
+ // the root FileDescriptorProto to the place where the definition appears.
+ // For example, this path:
+ //
+ // [ 4, 3, 2, 7, 1 ]
+ //
// refers to:
- // file.message_type(3) // 4, 3
- // .field(7) // 2, 7
- // .name() // 1
+ //
+ // file.message_type(3) // 4, 3
+ // .field(7) // 2, 7
+ // .name() // 1
+ //
// This is because FileDescriptorProto.message_type has field number 4:
- // repeated DescriptorProto message_type = 4;
+ //
+ // repeated DescriptorProto message_type = 4;
+ //
// and DescriptorProto.field has field number 2:
- // repeated FieldDescriptorProto field = 2;
+ //
+ // repeated FieldDescriptorProto field = 2;
+ //
// and FieldDescriptorProto.name has field number 1:
- // optional string name = 1;
+ //
+ // optional string name = 1;
//
// Thus, the above path gives the location of a field name. If we removed
// the last element:
- // [ 4, 3, 2, 7 ]
+ //
+ // [ 4, 3, 2, 7 ]
+ //
// this path refers to the whole field declaration (from the beginning
// of the label to the terminating semicolon).
Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"`
@@ -2826,34 +4152,34 @@ type SourceCodeInfo_Location struct {
//
// Examples:
//
- // optional int32 foo = 1; // Comment attached to foo.
- // // Comment attached to bar.
- // optional int32 bar = 2;
+ // optional int32 foo = 1; // Comment attached to foo.
+ // // Comment attached to bar.
+ // optional int32 bar = 2;
//
- // optional string baz = 3;
- // // Comment attached to baz.
- // // Another line attached to baz.
+ // optional string baz = 3;
+ // // Comment attached to baz.
+ // // Another line attached to baz.
//
- // // Comment attached to qux.
- // //
- // // Another line attached to qux.
- // optional double qux = 4;
+ // // Comment attached to moo.
+ // //
+ // // Another line attached to moo.
+ // optional double moo = 4;
//
- // // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
- // // both.
+ // // Detached comment for corge. This is not leading or trailing comments
+ // // to moo or corge because there are blank lines separating it from
+ // // both.
//
- // // Detached comment for corge paragraph 2.
+ // // Detached comment for corge paragraph 2.
//
- // optional string corge = 5;
- // /* Block comment attached
- // * to corge. Leading asterisks
- // * will be removed. */
- // /* Block comment attached to
- // * grault. */
- // optional int32 grault = 6;
+ // optional string corge = 5;
+ // /* Block comment attached
+ // * to corge. Leading asterisks
+ // * will be removed. */
+ // /* Block comment attached to
+ // * grault. */
+ // optional int32 grault = 6;
//
- // // ignored detached comments.
+ // // ignored detached comments.
LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"`
TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"`
LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"`
@@ -2862,7 +4188,7 @@ type SourceCodeInfo_Location struct {
func (x *SourceCodeInfo_Location) Reset() {
*x = SourceCodeInfo_Location{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[25]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2875,7 +4201,7 @@ func (x *SourceCodeInfo_Location) String() string {
func (*SourceCodeInfo_Location) ProtoMessage() {}
func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[25]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2888,7 +4214,7 @@ func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message {
// Deprecated: Use SourceCodeInfo_Location.ProtoReflect.Descriptor instead.
func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) {
- return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0}
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21, 0}
}
func (x *SourceCodeInfo_Location) GetPath() []int32 {
@@ -2940,15 +4266,16 @@ type GeneratedCodeInfo_Annotation struct {
// that relates to the identified object.
Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"`
// Identifies the ending offset in bytes in the generated code that
- // relates to the identified offset. The end offset should be one past
+ // relates to the identified object. The end offset should be one past
// the last relevant byte (so the length of the text = end - begin).
- End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
+ End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
+ Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"`
}
func (x *GeneratedCodeInfo_Annotation) Reset() {
*x = GeneratedCodeInfo_Annotation{}
if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[26]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2961,7 +4288,7 @@ func (x *GeneratedCodeInfo_Annotation) String() string {
func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[26]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2974,7 +4301,7 @@ func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {
// Deprecated: Use GeneratedCodeInfo_Annotation.ProtoReflect.Descriptor instead.
func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
- return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0}
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0}
}
func (x *GeneratedCodeInfo_Annotation) GetPath() []int32 {
@@ -3005,6 +4332,13 @@ func (x *GeneratedCodeInfo_Annotation) GetEnd() int32 {
return 0
}
+func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotation_Semantic {
+ if x != nil && x.Semantic != nil {
+ return *x.Semantic
+ }
+ return GeneratedCodeInfo_Annotation_NONE
+}
+
var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor
var file_google_protobuf_descriptor_proto_rawDesc = []byte{
@@ -3016,7 +4350,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69,
- 0x6c, 0x65, 0x22, 0xe4, 0x04, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72,
+ 0x6c, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18,
0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
@@ -3054,339 +4388,457 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x22, 0xb9, 0x06, 0x0a, 0x0f, 0x44, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
- 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x43,
- 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
- 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
- 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79,
- 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74,
- 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74,
- 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d,
- 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52,
- 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, 0x78, 0x74,
- 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50,
- 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61,
- 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61,
- 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x63,
- 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09,
- 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73,
- 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64,
- 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
+ 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06,
+ 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+ 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65,
+ 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52,
- 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65,
- 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72,
- 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x03,
- 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65,
- 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e,
- 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x6f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a,
+ 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e,
+ 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a,
+ 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65,
+ 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
+ 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e,
+ 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a,
+ 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+ 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65,
+ 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65,
+ 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12,
+ 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64,
+ 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03,
+ 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40,
+ 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67,
+ 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, 0x0a, 0x0d,
- 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a,
- 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74,
- 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x7c, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
- 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58,
+ 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72,
+ 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74,
+ 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a,
+ 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61,
+ 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63,
+ 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74,
+ 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61,
+ 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x73, 0x12, 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
+ 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88,
+ 0x01, 0x02, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x1a, 0x94, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c,
+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c,
+ 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73,
+ 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73,
+ 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
+ 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
+ 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b,
+ 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a,
+ 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08,
+ 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a,
+ 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
+ 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a,
+ 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f,
+ 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
+ 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6,
+ 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f,
+ 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45,
+ 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45,
+ 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45,
+ 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50,
+ 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50,
+ 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54,
+ 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a,
+ 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b,
+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a,
+ 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a,
+ 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12,
+ 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12,
+ 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d,
+ 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12,
+ 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32,
+ 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45,
+ 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49,
+ 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53,
+ 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c,
+ 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e,
+ 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45,
+ 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45,
+ 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14,
+ 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f,
+ 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
+ 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36,
+ 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76,
+ 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65,
+ 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64,
+ 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65,
+ 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65,
+ 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e,
+ 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12,
+ 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
+ 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62,
+ 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
+ 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01,
+ 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06,
+ 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d,
+ 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68,
+ 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x30, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
+ 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65,
+ 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e,
+ 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65,
+ 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c,
+ 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
+ 0x69, 0x6e, 0x67, 0x22, 0x97, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b,
+ 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50,
+ 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f,
+ 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43,
+ 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61,
+ 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18,
+ 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61,
+ 0x76, 0x61, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12,
+ 0x44, 0x0a, 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x5f, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68,
+ 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61,
+ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e,
+ 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74,
+ 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18,
+ 0x1b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61,
+ 0x76, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66,
+ 0x38, 0x12, 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f,
+ 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f,
+ 0x64, 0x65, 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d,
+ 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63,
+ 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61,
+ 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01,
+ 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15,
+ 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c,
+ 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12,
+ 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47,
+ 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25,
+ 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01,
+ 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65,
+ 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62,
+ 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a,
+ 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41,
+ 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c,
+ 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69,
+ 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68,
+ 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c,
+ 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12,
+ 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c,
+ 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70,
+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34,
+ 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14,
+ 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73,
+ 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63,
+ 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79,
+ 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75,
+ 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74,
+ 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
+ 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65,
+ 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72,
+ 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70,
+ 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50,
+ 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49,
+ 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e,
+ 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80,
+ 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03,
+ 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f,
+ 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c,
+ 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f,
+ 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c,
+ 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
+ 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c,
+ 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
+ 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
+ 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43,
+ 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74,
+ 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61,
+ 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74,
+ 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70,
+ 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07,
+ 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05,
+ 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04,
+ 0x08, 0x09, 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e,
+ 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b,
+ 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64,
+ 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41,
+ 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a,
+ 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04,
+ 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69,
+ 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66,
+ 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64,
+ 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52,
+ 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77,
+ 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65,
+ 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f,
+ 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61,
+ 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74,
+ 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a,
+ 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07,
+ 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52,
+ 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73,
+ 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52,
+ 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69,
+ 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74,
+ 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13,
+ 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
+ 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49,
+ 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10,
+ 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02,
+ 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53,
+ 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f,
+ 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e,
+ 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45,
+ 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10,
+ 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52,
+ 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45,
+ 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c,
+ 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59,
+ 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
+ 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45,
+ 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50,
+ 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47,
+ 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59,
+ 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11,
+ 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c,
+ 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59,
+ 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41,
+ 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06,
+ 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
+ 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13,
+ 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56,
+ 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f,
+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08,
+ 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04,
+ 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
+ 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58,
0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f,
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74,
0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80,
- 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65,
- 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c,
- 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x04, 0x74,
- 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c,
- 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f,
- 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74,
- 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
- 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65,
- 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65,
- 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66,
- 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65,
- 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
- 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73,
- 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a,
- 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79,
- 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c,
- 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41,
- 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36,
- 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54,
- 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54,
- 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58,
- 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46,
- 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45,
- 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f,
- 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45,
- 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45,
- 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59,
- 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59,
- 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54,
- 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59,
- 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a,
- 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10,
- 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10,
- 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34,
- 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c,
- 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12,
- 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45,
- 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50,
- 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66,
- 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12,
- 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x02, 0x0a,
- 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50,
- 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f,
- 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75,
- 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61,
- 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d,
- 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
- 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67,
- 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65,
- 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65,
- 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73,
- 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74,
- 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
- 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65,
- 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12,
- 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
- 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72,
- 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
- 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
- 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52,
- 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
- 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65,
- 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x10, 0x63, 0x6c,
- 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x6c, 0x69,
- 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10,
- 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67,
- 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73,
- 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0x91,
- 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21,
- 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
- 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f,
- 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74,
- 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08,
- 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x4d, 0x75, 0x6c,
- 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x6a, 0x61,
- 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x71, 0x75, 0x61,
- 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28,
- 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68,
- 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
- 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08,
- 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, 0x53, 0x0a, 0x0c,
- 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x05, 0x53,
- 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f,
- 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18,
- 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
- 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66,
- 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, 0x76, 0x61, 0x5f,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
- 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a,
- 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63,
- 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a,
- 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69,
- 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, 0x70,
- 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12,
- 0x70, 0x68, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
- 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64,
- 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f,
- 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20,
- 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61,
- 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a,
- 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50,
- 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f,
- 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
- 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
- 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65,
- 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73,
- 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70,
- 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a,
- 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
- 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e,
- 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79,
- 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
- 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x58, 0x0a, 0x14, 0x75,
- 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69,
- 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a,
- 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01,
- 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12,
- 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10,
- 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26,
- 0x10, 0x27, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
- 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d,
- 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72,
- 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61,
- 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63,
- 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61,
- 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f,
- 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65,
- 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f,
- 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72,
- 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72,
- 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e,
- 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a,
- 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09,
- 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64,
- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52,
- 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61,
- 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b,
- 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52,
- 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c,
- 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65,
- 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63,
- 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73,
- 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a,
- 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c,
- 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e,
- 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65,
- 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75,
- 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53,
- 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10,
- 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43,
- 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a,
- 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09,
- 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a,
- 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10,
- 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f,
- 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75,
- 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69,
+ 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69,
+ 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41,
+ 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52,
+ 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64,
+ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79,
+ 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52,
+ 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63,
+ 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69,
+ 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53,
+ 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14,
+ 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80,
+ 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53,
+ 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c,
+ 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67,
+ 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7,
+ 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70,
+ 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02,
- 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61,
- 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65,
- 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e,
- 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65,
- 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75,
- 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08,
- 0x05, 0x10, 0x06, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72,
- 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61,
- 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12,
- 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64,
- 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65,
- 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80,
- 0x80, 0x80, 0x80, 0x02, 0x22, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65,
+ 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37,
+ 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66,
+ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65,
0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c,
0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58,
0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f,
@@ -3395,7 +4847,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74,
0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80,
- 0x80, 0x80, 0x02, 0x22, 0xe0, 0x02, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70,
+ 0x80, 0x80, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65,
0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11,
@@ -3406,84 +4858,217 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f,
0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69,
0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
- 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64,
- 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65,
- 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65,
- 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a,
- 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b,
- 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44,
- 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49,
- 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07,
- 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74,
- 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41,
- 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55,
+ 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08,
+ 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e,
+ 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75,
0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12,
- 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
- 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65,
- 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65,
- 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62,
- 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b,
- 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73,
- 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
- 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27,
- 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,
- 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50,
- 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74,
- 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74,
- 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
- 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
- 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f,
- 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a,
- 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74,
- 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74,
- 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42,
- 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61,
- 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67,
- 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74,
- 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06,
- 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74,
- 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd1, 0x01,
- 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49,
- 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02,
- 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67,
- 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12,
- 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e,
- 0x64, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02,
- 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
- 0x6e,
+ 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63,
+ 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f,
+ 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12,
+ 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43,
+ 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45,
+ 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22,
+ 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65,
+ 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70,
+ 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
+ 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76,
+ 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f,
+ 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65,
+ 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09,
+ 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52,
+ 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52,
+ 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x0a, 0x0a,
+ 0x0a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e,
+ 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65,
+ 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42,
+ 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45,
+ 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49,
+ 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45,
+ 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75,
+ 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46,
+ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79,
+ 0x70, 0x65, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b,
+ 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04,
+ 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74,
+ 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e,
+ 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01,
+ 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6,
+ 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52,
+ 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e,
+ 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66,
+ 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01,
+ 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18,
+ 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07,
+ 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x78, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f,
+ 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61,
+ 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45,
+ 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98,
+ 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52,
+ 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73,
+ 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f,
+ 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98,
+ 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59,
+ 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2,
+ 0x01, 0x0a, 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73,
+ 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c,
+ 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45,
+ 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49,
+ 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10,
+ 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55,
+ 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
+ 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45,
+ 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22,
+ 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64,
+ 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45,
+ 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44,
+ 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a,
+ 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50,
+ 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46,
+ 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b,
+ 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59,
+ 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x0f,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12,
+ 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44,
+ 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a,
+ 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44,
+ 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10,
+ 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
+ 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55,
+ 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f,
+ 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45,
+ 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07,
+ 0x10, 0xe9, 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0xea, 0x07,
+ 0x10, 0xeb, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e,
+ 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12,
+ 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c,
+ 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65,
+ 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
+ 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75,
+ 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f,
+ 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65,
+ 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12,
+ 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53,
+ 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a,
+ 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
+ 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e,
+ 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05,
+ 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70,
+ 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70,
+ 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65,
+ 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a,
+ 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69,
+ 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65,
+ 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c,
+ 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65,
+ 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a,
+ 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61,
+ 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61,
+ 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46,
+ 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73,
+ 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66,
+ 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d,
+ 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22,
+ 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e,
+ 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09,
+ 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0x92, 0x02, 0x0a, 0x07, 0x45, 0x64,
+ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e,
+ 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44,
+ 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12,
+ 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f,
+ 0x33, 0x10, 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
+ 0x32, 0x30, 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44,
+ 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c,
+ 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32,
+ 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17,
+ 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45,
+ 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45,
+ 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53,
+ 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44,
+ 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54,
+ 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49,
+ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e,
+ 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
+ 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50,
+ 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
}
var (
@@ -3498,92 +5083,136 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte {
return file_google_protobuf_descriptor_proto_rawDescData
}
-var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
-var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
+var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17)
+var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 32)
var file_google_protobuf_descriptor_proto_goTypes = []interface{}{
- (FieldDescriptorProto_Type)(0), // 0: google.protobuf.FieldDescriptorProto.Type
- (FieldDescriptorProto_Label)(0), // 1: google.protobuf.FieldDescriptorProto.Label
- (FileOptions_OptimizeMode)(0), // 2: google.protobuf.FileOptions.OptimizeMode
- (FieldOptions_CType)(0), // 3: google.protobuf.FieldOptions.CType
- (FieldOptions_JSType)(0), // 4: google.protobuf.FieldOptions.JSType
- (MethodOptions_IdempotencyLevel)(0), // 5: google.protobuf.MethodOptions.IdempotencyLevel
- (*FileDescriptorSet)(nil), // 6: google.protobuf.FileDescriptorSet
- (*FileDescriptorProto)(nil), // 7: google.protobuf.FileDescriptorProto
- (*DescriptorProto)(nil), // 8: google.protobuf.DescriptorProto
- (*ExtensionRangeOptions)(nil), // 9: google.protobuf.ExtensionRangeOptions
- (*FieldDescriptorProto)(nil), // 10: google.protobuf.FieldDescriptorProto
- (*OneofDescriptorProto)(nil), // 11: google.protobuf.OneofDescriptorProto
- (*EnumDescriptorProto)(nil), // 12: google.protobuf.EnumDescriptorProto
- (*EnumValueDescriptorProto)(nil), // 13: google.protobuf.EnumValueDescriptorProto
- (*ServiceDescriptorProto)(nil), // 14: google.protobuf.ServiceDescriptorProto
- (*MethodDescriptorProto)(nil), // 15: google.protobuf.MethodDescriptorProto
- (*FileOptions)(nil), // 16: google.protobuf.FileOptions
- (*MessageOptions)(nil), // 17: google.protobuf.MessageOptions
- (*FieldOptions)(nil), // 18: google.protobuf.FieldOptions
- (*OneofOptions)(nil), // 19: google.protobuf.OneofOptions
- (*EnumOptions)(nil), // 20: google.protobuf.EnumOptions
- (*EnumValueOptions)(nil), // 21: google.protobuf.EnumValueOptions
- (*ServiceOptions)(nil), // 22: google.protobuf.ServiceOptions
- (*MethodOptions)(nil), // 23: google.protobuf.MethodOptions
- (*UninterpretedOption)(nil), // 24: google.protobuf.UninterpretedOption
- (*SourceCodeInfo)(nil), // 25: google.protobuf.SourceCodeInfo
- (*GeneratedCodeInfo)(nil), // 26: google.protobuf.GeneratedCodeInfo
- (*DescriptorProto_ExtensionRange)(nil), // 27: google.protobuf.DescriptorProto.ExtensionRange
- (*DescriptorProto_ReservedRange)(nil), // 28: google.protobuf.DescriptorProto.ReservedRange
- (*EnumDescriptorProto_EnumReservedRange)(nil), // 29: google.protobuf.EnumDescriptorProto.EnumReservedRange
- (*UninterpretedOption_NamePart)(nil), // 30: google.protobuf.UninterpretedOption.NamePart
- (*SourceCodeInfo_Location)(nil), // 31: google.protobuf.SourceCodeInfo.Location
- (*GeneratedCodeInfo_Annotation)(nil), // 32: google.protobuf.GeneratedCodeInfo.Annotation
+ (Edition)(0), // 0: google.protobuf.Edition
+ (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState
+ (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type
+ (FieldDescriptorProto_Label)(0), // 3: google.protobuf.FieldDescriptorProto.Label
+ (FileOptions_OptimizeMode)(0), // 4: google.protobuf.FileOptions.OptimizeMode
+ (FieldOptions_CType)(0), // 5: google.protobuf.FieldOptions.CType
+ (FieldOptions_JSType)(0), // 6: google.protobuf.FieldOptions.JSType
+ (FieldOptions_OptionRetention)(0), // 7: google.protobuf.FieldOptions.OptionRetention
+ (FieldOptions_OptionTargetType)(0), // 8: google.protobuf.FieldOptions.OptionTargetType
+ (MethodOptions_IdempotencyLevel)(0), // 9: google.protobuf.MethodOptions.IdempotencyLevel
+ (FeatureSet_FieldPresence)(0), // 10: google.protobuf.FeatureSet.FieldPresence
+ (FeatureSet_EnumType)(0), // 11: google.protobuf.FeatureSet.EnumType
+ (FeatureSet_RepeatedFieldEncoding)(0), // 12: google.protobuf.FeatureSet.RepeatedFieldEncoding
+ (FeatureSet_Utf8Validation)(0), // 13: google.protobuf.FeatureSet.Utf8Validation
+ (FeatureSet_MessageEncoding)(0), // 14: google.protobuf.FeatureSet.MessageEncoding
+ (FeatureSet_JsonFormat)(0), // 15: google.protobuf.FeatureSet.JsonFormat
+ (GeneratedCodeInfo_Annotation_Semantic)(0), // 16: google.protobuf.GeneratedCodeInfo.Annotation.Semantic
+ (*FileDescriptorSet)(nil), // 17: google.protobuf.FileDescriptorSet
+ (*FileDescriptorProto)(nil), // 18: google.protobuf.FileDescriptorProto
+ (*DescriptorProto)(nil), // 19: google.protobuf.DescriptorProto
+ (*ExtensionRangeOptions)(nil), // 20: google.protobuf.ExtensionRangeOptions
+ (*FieldDescriptorProto)(nil), // 21: google.protobuf.FieldDescriptorProto
+ (*OneofDescriptorProto)(nil), // 22: google.protobuf.OneofDescriptorProto
+ (*EnumDescriptorProto)(nil), // 23: google.protobuf.EnumDescriptorProto
+ (*EnumValueDescriptorProto)(nil), // 24: google.protobuf.EnumValueDescriptorProto
+ (*ServiceDescriptorProto)(nil), // 25: google.protobuf.ServiceDescriptorProto
+ (*MethodDescriptorProto)(nil), // 26: google.protobuf.MethodDescriptorProto
+ (*FileOptions)(nil), // 27: google.protobuf.FileOptions
+ (*MessageOptions)(nil), // 28: google.protobuf.MessageOptions
+ (*FieldOptions)(nil), // 29: google.protobuf.FieldOptions
+ (*OneofOptions)(nil), // 30: google.protobuf.OneofOptions
+ (*EnumOptions)(nil), // 31: google.protobuf.EnumOptions
+ (*EnumValueOptions)(nil), // 32: google.protobuf.EnumValueOptions
+ (*ServiceOptions)(nil), // 33: google.protobuf.ServiceOptions
+ (*MethodOptions)(nil), // 34: google.protobuf.MethodOptions
+ (*UninterpretedOption)(nil), // 35: google.protobuf.UninterpretedOption
+ (*FeatureSet)(nil), // 36: google.protobuf.FeatureSet
+ (*FeatureSetDefaults)(nil), // 37: google.protobuf.FeatureSetDefaults
+ (*SourceCodeInfo)(nil), // 38: google.protobuf.SourceCodeInfo
+ (*GeneratedCodeInfo)(nil), // 39: google.protobuf.GeneratedCodeInfo
+ (*DescriptorProto_ExtensionRange)(nil), // 40: google.protobuf.DescriptorProto.ExtensionRange
+ (*DescriptorProto_ReservedRange)(nil), // 41: google.protobuf.DescriptorProto.ReservedRange
+ (*ExtensionRangeOptions_Declaration)(nil), // 42: google.protobuf.ExtensionRangeOptions.Declaration
+ (*EnumDescriptorProto_EnumReservedRange)(nil), // 43: google.protobuf.EnumDescriptorProto.EnumReservedRange
+ (*FieldOptions_EditionDefault)(nil), // 44: google.protobuf.FieldOptions.EditionDefault
+ (*UninterpretedOption_NamePart)(nil), // 45: google.protobuf.UninterpretedOption.NamePart
+ (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 46: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
+ (*SourceCodeInfo_Location)(nil), // 47: google.protobuf.SourceCodeInfo.Location
+ (*GeneratedCodeInfo_Annotation)(nil), // 48: google.protobuf.GeneratedCodeInfo.Annotation
}
var file_google_protobuf_descriptor_proto_depIdxs = []int32{
- 7, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto
- 8, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto
- 12, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
- 14, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto
- 10, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
- 16, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions
- 25, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo
- 10, // 7: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto
- 10, // 8: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
- 8, // 9: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto
- 12, // 10: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
- 27, // 11: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange
- 11, // 12: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto
- 17, // 13: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions
- 28, // 14: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange
- 24, // 15: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 1, // 16: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label
- 0, // 17: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type
- 18, // 18: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions
- 19, // 19: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions
- 13, // 20: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto
- 20, // 21: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions
- 29, // 22: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange
- 21, // 23: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions
- 15, // 24: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto
- 22, // 25: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions
- 23, // 26: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions
- 2, // 27: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode
- 24, // 28: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 24, // 29: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 3, // 30: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType
- 4, // 31: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType
- 24, // 32: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 24, // 33: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 24, // 34: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 24, // 35: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 24, // 36: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 5, // 37: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel
- 24, // 38: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 30, // 39: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart
- 31, // 40: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location
- 32, // 41: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation
- 9, // 42: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions
- 43, // [43:43] is the sub-list for method output_type
- 43, // [43:43] is the sub-list for method input_type
- 43, // [43:43] is the sub-list for extension type_name
- 43, // [43:43] is the sub-list for extension extendee
- 0, // [0:43] is the sub-list for field type_name
+ 18, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto
+ 19, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto
+ 23, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
+ 25, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto
+ 21, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
+ 27, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions
+ 38, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo
+ 0, // 7: google.protobuf.FileDescriptorProto.edition:type_name -> google.protobuf.Edition
+ 21, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto
+ 21, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
+ 19, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto
+ 23, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
+ 40, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange
+ 22, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto
+ 28, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions
+ 41, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange
+ 35, // 16: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 42, // 17: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration
+ 36, // 18: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet
+ 1, // 19: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState
+ 3, // 20: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label
+ 2, // 21: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type
+ 29, // 22: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions
+ 30, // 23: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions
+ 24, // 24: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto
+ 31, // 25: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions
+ 43, // 26: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange
+ 32, // 27: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions
+ 26, // 28: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto
+ 33, // 29: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions
+ 34, // 30: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions
+ 4, // 31: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode
+ 36, // 32: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 33: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 36, // 34: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 35: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 5, // 36: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType
+ 6, // 37: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType
+ 7, // 38: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention
+ 8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType
+ 44, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault
+ 36, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 42: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 36, // 43: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 44: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 36, // 45: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 46: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 36, // 47: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 48: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 36, // 49: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 50: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 9, // 51: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel
+ 36, // 52: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet
+ 35, // 53: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 45, // 54: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart
+ 10, // 55: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence
+ 11, // 56: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType
+ 12, // 57: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding
+ 13, // 58: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation
+ 14, // 59: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding
+ 15, // 60: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat
+ 46, // 61: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
+ 0, // 62: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition
+ 0, // 63: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition
+ 47, // 64: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location
+ 48, // 65: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation
+ 20, // 66: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions
+ 0, // 67: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition
+ 0, // 68: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition
+ 36, // 69: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features:type_name -> google.protobuf.FeatureSet
+ 16, // 70: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic
+ 71, // [71:71] is the sub-list for method output_type
+ 71, // [71:71] is the sub-list for method input_type
+ 71, // [71:71] is the sub-list for extension type_name
+ 71, // [71:71] is the sub-list for extension extendee
+ 0, // [0:71] is the sub-list for field type_name
}
func init() { file_google_protobuf_descriptor_proto_init() }
@@ -3839,19 +5468,21 @@ func file_google_protobuf_descriptor_proto_init() {
}
}
file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SourceCodeInfo); i {
+ switch v := v.(*FeatureSet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
+ case 3:
+ return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GeneratedCodeInfo); i {
+ switch v := v.(*FeatureSetDefaults); i {
case 0:
return &v.state
case 1:
@@ -3863,7 +5494,7 @@ func file_google_protobuf_descriptor_proto_init() {
}
}
file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DescriptorProto_ExtensionRange); i {
+ switch v := v.(*SourceCodeInfo); i {
case 0:
return &v.state
case 1:
@@ -3875,7 +5506,7 @@ func file_google_protobuf_descriptor_proto_init() {
}
}
file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DescriptorProto_ReservedRange); i {
+ switch v := v.(*GeneratedCodeInfo); i {
case 0:
return &v.state
case 1:
@@ -3887,7 +5518,7 @@ func file_google_protobuf_descriptor_proto_init() {
}
}
file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EnumDescriptorProto_EnumReservedRange); i {
+ switch v := v.(*DescriptorProto_ExtensionRange); i {
case 0:
return &v.state
case 1:
@@ -3899,7 +5530,7 @@ func file_google_protobuf_descriptor_proto_init() {
}
}
file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UninterpretedOption_NamePart); i {
+ switch v := v.(*DescriptorProto_ReservedRange); i {
case 0:
return &v.state
case 1:
@@ -3911,7 +5542,7 @@ func file_google_protobuf_descriptor_proto_init() {
}
}
file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SourceCodeInfo_Location); i {
+ switch v := v.(*ExtensionRangeOptions_Declaration); i {
case 0:
return &v.state
case 1:
@@ -3923,6 +5554,66 @@ func file_google_protobuf_descriptor_proto_init() {
}
}
file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EnumDescriptorProto_EnumReservedRange); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FieldOptions_EditionDefault); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UninterpretedOption_NamePart); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SourceCodeInfo_Location); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GeneratedCodeInfo_Annotation); i {
case 0:
return &v.state
@@ -3940,8 +5631,8 @@ func file_google_protobuf_descriptor_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc,
- NumEnums: 6,
- NumMessages: 27,
+ NumEnums: 17,
+ NumMessages: 32,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go
new file mode 100644
index 00000000..25de5ae0
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go
@@ -0,0 +1,177 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2023 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: reflect/protodesc/proto/go_features.proto
+
+package proto
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+type GoFeatures struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Whether or not to generate the deprecated UnmarshalJSON method for enums.
+ LegacyUnmarshalJsonEnum *bool `protobuf:"varint,1,opt,name=legacy_unmarshal_json_enum,json=legacyUnmarshalJsonEnum" json:"legacy_unmarshal_json_enum,omitempty"`
+}
+
+func (x *GoFeatures) Reset() {
+ *x = GoFeatures{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GoFeatures) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GoFeatures) ProtoMessage() {}
+
+func (x *GoFeatures) ProtoReflect() protoreflect.Message {
+ mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GoFeatures.ProtoReflect.Descriptor instead.
+func (*GoFeatures) Descriptor() ([]byte, []int) {
+ return file_reflect_protodesc_proto_go_features_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool {
+ if x != nil && x.LegacyUnmarshalJsonEnum != nil {
+ return *x.LegacyUnmarshalJsonEnum
+ }
+ return false
+}
+
+var file_reflect_protodesc_proto_go_features_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FeatureSet)(nil),
+ ExtensionType: (*GoFeatures)(nil),
+ Field: 1002,
+ Name: "google.protobuf.go",
+ Tag: "bytes,1002,opt,name=go",
+ Filename: "reflect/protodesc/proto/go_features.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FeatureSet.
+var (
+ // optional google.protobuf.GoFeatures go = 1002;
+ E_Go = &file_reflect_protodesc_proto_go_features_proto_extTypes[0]
+)
+
+var File_reflect_protodesc_proto_go_features_proto protoreflect.FileDescriptor
+
+var file_reflect_protodesc_proto_go_features_proto_rawDesc = []byte{
+ 0x0a, 0x29, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x64,
+ 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61,
+ 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x20, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a,
+ 0x0a, 0x0a, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x1a,
+ 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c,
+ 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x42, 0x1f, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75,
+ 0x65, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7,
+ 0x07, 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68,
+ 0x61, 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x49, 0x0a, 0x02, 0x67, 0x6f,
+ 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x64, 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+}
+
+var (
+ file_reflect_protodesc_proto_go_features_proto_rawDescOnce sync.Once
+ file_reflect_protodesc_proto_go_features_proto_rawDescData = file_reflect_protodesc_proto_go_features_proto_rawDesc
+)
+
+func file_reflect_protodesc_proto_go_features_proto_rawDescGZIP() []byte {
+ file_reflect_protodesc_proto_go_features_proto_rawDescOnce.Do(func() {
+ file_reflect_protodesc_proto_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_reflect_protodesc_proto_go_features_proto_rawDescData)
+ })
+ return file_reflect_protodesc_proto_go_features_proto_rawDescData
+}
+
+var file_reflect_protodesc_proto_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_reflect_protodesc_proto_go_features_proto_goTypes = []interface{}{
+ (*GoFeatures)(nil), // 0: google.protobuf.GoFeatures
+ (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet
+}
+var file_reflect_protodesc_proto_go_features_proto_depIdxs = []int32{
+ 1, // 0: google.protobuf.go:extendee -> google.protobuf.FeatureSet
+ 0, // 1: google.protobuf.go:type_name -> google.protobuf.GoFeatures
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 1, // [1:2] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_reflect_protodesc_proto_go_features_proto_init() }
+func file_reflect_protodesc_proto_go_features_proto_init() {
+ if File_reflect_protodesc_proto_go_features_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_reflect_protodesc_proto_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GoFeatures); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_reflect_protodesc_proto_go_features_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_reflect_protodesc_proto_go_features_proto_goTypes,
+ DependencyIndexes: file_reflect_protodesc_proto_go_features_proto_depIdxs,
+ MessageInfos: file_reflect_protodesc_proto_go_features_proto_msgTypes,
+ ExtensionInfos: file_reflect_protodesc_proto_go_features_proto_extTypes,
+ }.Build()
+ File_reflect_protodesc_proto_go_features_proto = out.File
+ file_reflect_protodesc_proto_go_features_proto_rawDesc = nil
+ file_reflect_protodesc_proto_go_features_proto_goTypes = nil
+ file_reflect_protodesc_proto_go_features_proto_depIdxs = nil
+}
diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto
new file mode 100644
index 00000000..d2465712
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto
@@ -0,0 +1,28 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2023 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+
+syntax = "proto2";
+
+package google.protobuf;
+
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/protobuf/types/gofeaturespb";
+
+extend google.protobuf.FeatureSet {
+ optional GoFeatures go = 1002;
+}
+
+message GoFeatures {
+ // Whether or not to generate the deprecated UnmarshalJSON method for enums.
+ optional bool legacy_unmarshal_json_enum = 1 [
+ retention = RETENTION_RUNTIME,
+ targets = TARGET_TYPE_ENUM,
+ edition_defaults = { edition: EDITION_PROTO2, value: "true" },
+ edition_defaults = { edition: EDITION_PROTO3, value: "false" }
+ ];
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index de8c6862..74aa471d 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,5 +1,5 @@
-# github.com/GeoNet/kit v0.0.0-20220629232654-4b4c51b3443f
-## explicit; go 1.15
+# github.com/GeoNet/kit v0.0.0-20240512234353-4d4493144f60
+## explicit; go 1.21
github.com/GeoNet/kit/aws/s3
github.com/GeoNet/kit/aws/sqs
github.com/GeoNet/kit/cfg
@@ -10,13 +10,13 @@ github.com/GeoNet/kit/seis/sl
github.com/GeoNet/kit/weft
github.com/GeoNet/kit/weft/wefttest
github.com/GeoNet/kit/wgs84
-# github.com/aws/aws-sdk-go-v2 v1.16.2
-## explicit; go 1.15
-github.com/aws/aws-sdk-go-v2
+# github.com/aws/aws-sdk-go-v2 v1.25.3
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/aws
github.com/aws/aws-sdk-go-v2/aws/arn
github.com/aws/aws-sdk-go-v2/aws/defaults
github.com/aws/aws-sdk-go-v2/aws/middleware
+github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics
github.com/aws/aws-sdk-go-v2/aws/protocol/query
github.com/aws/aws-sdk-go-v2/aws/protocol/restjson
github.com/aws/aws-sdk-go-v2/aws/protocol/xml
@@ -25,22 +25,28 @@ github.com/aws/aws-sdk-go-v2/aws/retry
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4
github.com/aws/aws-sdk-go-v2/aws/signer/v4
github.com/aws/aws-sdk-go-v2/aws/transport/http
+github.com/aws/aws-sdk-go-v2/internal/auth
+github.com/aws/aws-sdk-go-v2/internal/auth/smithy
github.com/aws/aws-sdk-go-v2/internal/awsutil
+github.com/aws/aws-sdk-go-v2/internal/context
+github.com/aws/aws-sdk-go-v2/internal/endpoints
+github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn
github.com/aws/aws-sdk-go-v2/internal/rand
github.com/aws/aws-sdk-go-v2/internal/sdk
github.com/aws/aws-sdk-go-v2/internal/sdkio
+github.com/aws/aws-sdk-go-v2/internal/shareddefaults
github.com/aws/aws-sdk-go-v2/internal/strings
github.com/aws/aws-sdk-go-v2/internal/sync/singleflight
github.com/aws/aws-sdk-go-v2/internal/timeconv
-# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi
-# github.com/aws/aws-sdk-go-v2/config v1.15.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/config v1.27.7
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/config
-# github.com/aws/aws-sdk-go-v2/credentials v1.11.2
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/credentials v1.17.7
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/credentials
github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds
github.com/aws/aws-sdk-go-v2/credentials/endpointcreds
@@ -48,73 +54,88 @@ github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client
github.com/aws/aws-sdk-go-v2/credentials/processcreds
github.com/aws/aws-sdk-go-v2/credentials/ssocreds
github.com/aws/aws-sdk-go-v2/credentials/stscreds
-# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/feature/ec2/imds
github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config
-# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.5
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.11
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/feature/s3/manager
-# github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/internal/configsources
-# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2
-# github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/internal/ini
-# github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.0
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/internal/v4a
github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto
github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4
-# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
-# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/internal/checksum
-# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
-# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/internal/s3shared
github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn
github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config
-# github.com/aws/aws-sdk-go-v2/service/s3 v1.26.5
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/s3
github.com/aws/aws-sdk-go-v2/service/s3/internal/arn
github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations
github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/s3/types
-# github.com/aws/aws-sdk-go-v2/service/sqs v1.18.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/sqs v1.31.2
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/sqs
github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/sqs/types
-# github.com/aws/aws-sdk-go-v2/service/sso v1.11.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/sso v1.20.2
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/sso
github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/sso/types
-# github.com/aws/aws-sdk-go-v2/service/sts v1.16.3
-## explicit; go 1.15
+# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2
+## explicit; go 1.20
+github.com/aws/aws-sdk-go-v2/service/ssooidc
+github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints
+github.com/aws/aws-sdk-go-v2/service/ssooidc/types
+# github.com/aws/aws-sdk-go-v2/service/sts v1.28.4
+## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/sts
github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/sts/types
-# github.com/aws/smithy-go v1.11.2
-## explicit; go 1.15
+# github.com/aws/smithy-go v1.20.1
+## explicit; go 1.20
github.com/aws/smithy-go
+github.com/aws/smithy-go/auth
+github.com/aws/smithy-go/auth/bearer
+github.com/aws/smithy-go/container/private/cache
+github.com/aws/smithy-go/container/private/cache/lru
+github.com/aws/smithy-go/context
github.com/aws/smithy-go/document
github.com/aws/smithy-go/encoding
github.com/aws/smithy-go/encoding/httpbinding
+github.com/aws/smithy-go/encoding/json
github.com/aws/smithy-go/encoding/xml
+github.com/aws/smithy-go/endpoints
+github.com/aws/smithy-go/endpoints/private/rulesfn
+github.com/aws/smithy-go/internal/sync/singleflight
github.com/aws/smithy-go/io
github.com/aws/smithy-go/logging
github.com/aws/smithy-go/middleware
+github.com/aws/smithy-go/private/requestcompression
github.com/aws/smithy-go/ptr
github.com/aws/smithy-go/rand
github.com/aws/smithy-go/sync
@@ -129,8 +150,8 @@ github.com/golang/groupcache/consistenthash
github.com/golang/groupcache/groupcachepb
github.com/golang/groupcache/lru
github.com/golang/groupcache/singleflight
-# github.com/golang/protobuf v1.5.2
-## explicit; go 1.9
+# github.com/golang/protobuf v1.5.4
+## explicit; go 1.17
github.com/golang/protobuf/proto
# github.com/gorilla/schema v1.2.0
## explicit
@@ -143,13 +164,14 @@ github.com/jmespath/go-jmespath
github.com/lib/pq
github.com/lib/pq/oid
github.com/lib/pq/scram
-# google.golang.org/protobuf v1.27.1
-## explicit; go 1.9
+# google.golang.org/protobuf v1.33.0
+## explicit; go 1.17
google.golang.org/protobuf/encoding/prototext
google.golang.org/protobuf/encoding/protowire
google.golang.org/protobuf/internal/descfmt
google.golang.org/protobuf/internal/descopts
google.golang.org/protobuf/internal/detrand
+google.golang.org/protobuf/internal/editiondefaults
google.golang.org/protobuf/internal/encoding/defval
google.golang.org/protobuf/internal/encoding/messageset
google.golang.org/protobuf/internal/encoding/tag
@@ -172,3 +194,4 @@ google.golang.org/protobuf/reflect/protoregistry
google.golang.org/protobuf/runtime/protoiface
google.golang.org/protobuf/runtime/protoimpl
google.golang.org/protobuf/types/descriptorpb
+google.golang.org/protobuf/types/gofeaturespb