boto3-errors 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. boto3_errors/__init__.py +6 -0
  2. boto3_errors/_base.py +40 -0
  3. boto3_errors/_patch.py +54 -0
  4. boto3_errors/accessanalyzer.py +118 -0
  5. boto3_errors/account.py +113 -0
  6. boto3_errors/acm.py +125 -0
  7. boto3_errors/acm_pca.py +153 -0
  8. boto3_errors/aiops.py +85 -0
  9. boto3_errors/amp.py +129 -0
  10. boto3_errors/amplify.py +60 -0
  11. boto3_errors/amplifybackend.py +48 -0
  12. boto3_errors/amplifyuibuilder.py +60 -0
  13. boto3_errors/apigateway.py +77 -0
  14. boto3_errors/apigatewaymanagementapi.py +41 -0
  15. boto3_errors/apigatewayv2.py +63 -0
  16. boto3_errors/appconfig.py +96 -0
  17. boto3_errors/appconfigdata.py +60 -0
  18. boto3_errors/appfabric.py +129 -0
  19. boto3_errors/appflow.py +90 -0
  20. boto3_errors/appintegrations.py +62 -0
  21. boto3_errors/application_autoscaling.py +103 -0
  22. boto3_errors/application_insights.py +70 -0
  23. boto3_errors/application_signals.py +60 -0
  24. boto3_errors/applicationcostprofiler.py +47 -0
  25. boto3_errors/appmesh.py +94 -0
  26. boto3_errors/apprunner.py +56 -0
  27. boto3_errors/appstream.py +114 -0
  28. boto3_errors/appsync.py +117 -0
  29. boto3_errors/arc_region_switch.py +62 -0
  30. boto3_errors/arc_zonal_shift.py +71 -0
  31. boto3_errors/artifact.py +126 -0
  32. boto3_errors/athena.py +72 -0
  33. boto3_errors/auditmanager.py +81 -0
  34. boto3_errors/autoscaling.py +100 -0
  35. boto3_errors/autoscaling_plans.py +56 -0
  36. boto3_errors/b2bi.py +111 -0
  37. boto3_errors/backup.py +220 -0
  38. boto3_errors/backup_gateway.py +85 -0
  39. boto3_errors/backupsearch.py +128 -0
  40. boto3_errors/batch.py +30 -0
  41. boto3_errors/bcm_dashboards.py +68 -0
  42. boto3_errors/bcm_data_exports.py +107 -0
  43. boto3_errors/bcm_pricing_calculator.py +145 -0
  44. boto3_errors/bcm_recommended_actions.py +51 -0
  45. boto3_errors/bedrock.py +90 -0
  46. boto3_errors/bedrock_agent.py +66 -0
  47. boto3_errors/bedrock_agent_runtime.py +113 -0
  48. boto3_errors/bedrock_agentcore.py +156 -0
  49. boto3_errors/bedrock_agentcore_control.py +112 -0
  50. boto3_errors/bedrock_data_automation.py +63 -0
  51. boto3_errors/bedrock_data_automation_runtime.py +56 -0
  52. boto3_errors/bedrock_runtime.py +136 -0
  53. boto3_errors/billing.py +130 -0
  54. boto3_errors/billingconductor.py +124 -0
  55. boto3_errors/braket.py +78 -0
  56. boto3_errors/budgets.py +98 -0
  57. boto3_errors/ce.py +131 -0
  58. boto3_errors/chatbot.py +209 -0
  59. boto3_errors/chime.py +127 -0
  60. boto3_errors/chime_sdk_identity.py +107 -0
  61. boto3_errors/chime_sdk_media_pipelines.py +152 -0
  62. boto3_errors/chime_sdk_meetings.py +209 -0
  63. boto3_errors/chime_sdk_messaging.py +107 -0
  64. boto3_errors/chime_sdk_voice.py +89 -0
  65. boto3_errors/cleanrooms.py +106 -0
  66. boto3_errors/cleanroomsml.py +69 -0
  67. boto3_errors/cloud9.py +62 -0
  68. boto3_errors/cloudcontrol.py +183 -0
  69. boto3_errors/clouddirectory.py +290 -0
  70. boto3_errors/cloudformation.py +237 -0
  71. boto3_errors/cloudfront.py +1177 -0
  72. boto3_errors/cloudfront_keyvaluestore.py +50 -0
  73. boto3_errors/cloudhsm.py +37 -0
  74. boto3_errors/cloudhsmv2.py +65 -0
  75. boto3_errors/cloudsearch.py +75 -0
  76. boto3_errors/cloudsearchdomain.py +31 -0
  77. boto3_errors/cloudtrail.py +748 -0
  78. boto3_errors/cloudtrail_data.py +50 -0
  79. boto3_errors/cloudwatch.py +110 -0
  80. boto3_errors/codeartifact.py +104 -0
  81. boto3_errors/codebuild.py +56 -0
  82. boto3_errors/codecatalyst.py +68 -0
  83. boto3_errors/codecommit.py +1486 -0
  84. boto3_errors/codeconnections.py +119 -0
  85. boto3_errors/codedeploy.py +798 -0
  86. boto3_errors/codeguru_reviewer.py +60 -0
  87. boto3_errors/codeguru_security.py +134 -0
  88. boto3_errors/codeguruprofiler.py +58 -0
  89. boto3_errors/codepipeline.py +300 -0
  90. boto3_errors/codestar_connections.py +119 -0
  91. boto3_errors/codestar_notifications.py +78 -0
  92. boto3_errors/cognito_identity.py +99 -0
  93. boto3_errors/cognito_idp.py +456 -0
  94. boto3_errors/cognito_sync.py +100 -0
  95. boto3_errors/comprehend.py +146 -0
  96. boto3_errors/comprehendmedical.py +84 -0
  97. boto3_errors/compute_optimizer.py +71 -0
  98. boto3_errors/compute_optimizer_automation.py +92 -0
  99. boto3_errors/config.py +568 -0
  100. boto3_errors/connect.py +238 -0
  101. boto3_errors/connect_contact_lens.py +44 -0
  102. boto3_errors/connectcampaigns.py +114 -0
  103. boto3_errors/connectcampaignsv2.py +114 -0
  104. boto3_errors/connectcases.py +85 -0
  105. boto3_errors/connectparticipant.py +72 -0
  106. boto3_errors/controlcatalog.py +47 -0
  107. boto3_errors/controltower.py +74 -0
  108. boto3_errors/cost_optimization_hub.py +65 -0
  109. boto3_errors/cur.py +56 -0
  110. boto3_errors/customer_profiles.py +44 -0
  111. boto3_errors/databrew.py +50 -0
  112. boto3_errors/dataexchange.py +94 -0
  113. boto3_errors/datapipeline.py +51 -0
  114. boto3_errors/datasync.py +38 -0
  115. boto3_errors/datazone.py +65 -0
  116. boto3_errors/dax.py +207 -0
  117. boto3_errors/deadline.py +176 -0
  118. boto3_errors/detective.py +105 -0
  119. boto3_errors/devicefarm.py +113 -0
  120. boto3_errors/devops_guru.py +117 -0
  121. boto3_errors/directconnect.py +38 -0
  122. boto3_errors/discovery.py +89 -0
  123. boto3_errors/dlm.py +79 -0
  124. boto3_errors/dms.py +180 -0
  125. boto3_errors/docdb.py +406 -0
  126. boto3_errors/docdb_elastic.py +99 -0
  127. boto3_errors/drs.py +159 -0
  128. boto3_errors/ds.py +470 -0
  129. boto3_errors/ds_data.py +99 -0
  130. boto3_errors/dsql.py +129 -0
  131. boto3_errors/dynamodb.py +480 -0
  132. boto3_errors/dynamodbstreams.py +86 -0
  133. boto3_errors/ebs.py +94 -0
  134. boto3_errors/ec2_instance_connect.py +112 -0
  135. boto3_errors/ecr.py +398 -0
  136. boto3_errors/ecr_public.py +222 -0
  137. boto3_errors/ecs.py +269 -0
  138. boto3_errors/efs.py +427 -0
  139. boto3_errors/eks.py +315 -0
  140. boto3_errors/eks_auth.py +82 -0
  141. boto3_errors/elasticache.py +556 -0
  142. boto3_errors/elasticbeanstalk.py +162 -0
  143. boto3_errors/elb.py +163 -0
  144. boto3_errors/elbv2.py +369 -0
  145. boto3_errors/emr.py +40 -0
  146. boto3_errors/emr_containers.py +44 -0
  147. boto3_errors/emr_serverless.py +50 -0
  148. boto3_errors/entityresolution.py +76 -0
  149. boto3_errors/es.py +107 -0
  150. boto3_errors/events.py +105 -0
  151. boto3_errors/evidently.py +122 -0
  152. boto3_errors/evs.py +111 -0
  153. boto3_errors/finspace.py +83 -0
  154. boto3_errors/finspace_data.py +68 -0
  155. boto3_errors/firehose.py +86 -0
  156. boto3_errors/fis.py +41 -0
  157. boto3_errors/fms.py +64 -0
  158. boto3_errors/forecast.py +56 -0
  159. boto3_errors/forecastquery.py +47 -0
  160. boto3_errors/frauddetector.py +63 -0
  161. boto3_errors/freetier.py +47 -0
  162. boto3_errors/fsx.py +381 -0
  163. boto3_errors/gamelift.py +159 -0
  164. boto3_errors/gameliftstreams.py +75 -0
  165. boto3_errors/geo_maps.py +57 -0
  166. boto3_errors/geo_places.py +48 -0
  167. boto3_errors/geo_routes.py +48 -0
  168. boto3_errors/glacier.py +172 -0
  169. boto3_errors/globalaccelerator.py +146 -0
  170. boto3_errors/glue.py +325 -0
  171. boto3_errors/grafana.py +126 -0
  172. boto3_errors/greengrass.py +36 -0
  173. boto3_errors/greengrassv2.py +148 -0
  174. boto3_errors/groundstation.py +70 -0
  175. boto3_errors/guardduty.py +69 -0
  176. boto3_errors/health.py +36 -0
  177. boto3_errors/healthlake.py +53 -0
  178. boto3_errors/iam.py +319 -0
  179. boto3_errors/identitystore.py +196 -0
  180. boto3_errors/imagebuilder.py +159 -0
  181. boto3_errors/importexport.py +152 -0
  182. boto3_errors/inspector.py +198 -0
  183. boto3_errors/inspector2.py +115 -0
  184. boto3_errors/inspector_scan.py +66 -0
  185. boto3_errors/internetmonitor.py +80 -0
  186. boto3_errors/invoicing.py +110 -0
  187. boto3_errors/iot.py +249 -0
  188. boto3_errors/iot_data.py +80 -0
  189. boto3_errors/iot_jobs_data.py +95 -0
  190. boto3_errors/iot_managed_integrations.py +102 -0
  191. boto3_errors/iotanalytics.py +66 -0
  192. boto3_errors/iotdeviceadvisor.py +38 -0
  193. boto3_errors/iotevents.py +78 -0
  194. boto3_errors/iotevents_data.py +44 -0
  195. boto3_errors/iotfleetwise.py +177 -0
  196. boto3_errors/iotsecuretunneling.py +26 -0
  197. boto3_errors/iotsitewise.py +155 -0
  198. boto3_errors/iotthingsgraph.py +49 -0
  199. boto3_errors/iottwinmaker.py +80 -0
  200. boto3_errors/iotwireless.py +81 -0
  201. boto3_errors/ivs.py +116 -0
  202. boto3_errors/ivs_realtime.py +310 -0
  203. boto3_errors/ivschat.py +102 -0
  204. boto3_errors/kafka.py +201 -0
  205. boto3_errors/kafkaconnect.py +83 -0
  206. boto3_errors/kendra.py +131 -0
  207. boto3_errors/kendra_ranking.py +88 -0
  208. boto3_errors/keyspaces.py +70 -0
  209. boto3_errors/keyspacesstreams.py +82 -0
  210. boto3_errors/kinesis.py +146 -0
  211. boto3_errors/kinesis_video_archived_media.py +98 -0
  212. boto3_errors/kinesis_video_media.py +63 -0
  213. boto3_errors/kinesis_video_signaling.py +57 -0
  214. boto3_errors/kinesis_video_webrtc_storage.py +41 -0
  215. boto3_errors/kinesisanalytics.py +114 -0
  216. boto3_errors/kinesisanalyticsv2.py +125 -0
  217. boto3_errors/kinesisvideo.py +129 -0
  218. boto3_errors/kms.py +554 -0
  219. boto3_errors/lakeformation.py +142 -0
  220. boto3_errors/lambda_.py +576 -0
  221. boto3_errors/launch_wizard.py +47 -0
  222. boto3_errors/lex_models.py +98 -0
  223. boto3_errors/lex_runtime.py +101 -0
  224. boto3_errors/lexv2_models.py +74 -0
  225. boto3_errors/lexv2_runtime.py +54 -0
  226. boto3_errors/license_manager.py +135 -0
  227. boto3_errors/license_manager_linux_subscriptions.py +38 -0
  228. boto3_errors/license_manager_user_subscriptions.py +59 -0
  229. boto3_errors/lightsail.py +180 -0
  230. boto3_errors/location.py +75 -0
  231. boto3_errors/logs.py +189 -0
  232. boto3_errors/lookoutequipment.py +68 -0
  233. boto3_errors/m2.py +143 -0
  234. boto3_errors/machinelearning.py +86 -0
  235. boto3_errors/macie2.py +83 -0
  236. boto3_errors/mailmanager.py +56 -0
  237. boto3_errors/managedblockchain.py +97 -0
  238. boto3_errors/managedblockchain_query.py +115 -0
  239. boto3_errors/marketplace_agreement.py +89 -0
  240. boto3_errors/marketplace_catalog.py +82 -0
  241. boto3_errors/marketplace_deployment.py +69 -0
  242. boto3_errors/marketplace_entitlement.py +35 -0
  243. boto3_errors/marketplace_reporting.py +41 -0
  244. boto3_errors/marketplacecommerceanalytics.py +20 -0
  245. boto3_errors/mediaconnect.py +135 -0
  246. boto3_errors/mediaconvert.py +68 -0
  247. boto3_errors/medialive.py +73 -0
  248. boto3_errors/mediapackage.py +50 -0
  249. boto3_errors/mediapackage_vod.py +50 -0
  250. boto3_errors/mediapackagev2.py +79 -0
  251. boto3_errors/mediastore.py +50 -0
  252. boto3_errors/mediastore_data.py +38 -0
  253. boto3_errors/mediatailor.py +20 -0
  254. boto3_errors/medical_imaging.py +56 -0
  255. boto3_errors/memorydb.py +395 -0
  256. boto3_errors/meteringmarketplace.py +160 -0
  257. boto3_errors/mgh.py +103 -0
  258. boto3_errors/mgn.py +174 -0
  259. boto3_errors/migration_hub_refactor_spaces.py +125 -0
  260. boto3_errors/migrationhub_config.py +67 -0
  261. boto3_errors/migrationhuborchestrator.py +53 -0
  262. boto3_errors/migrationhubstrategy.py +77 -0
  263. boto3_errors/mpa.py +91 -0
  264. boto3_errors/mq.py +80 -0
  265. boto3_errors/mturk.py +37 -0
  266. boto3_errors/mwaa.py +83 -0
  267. boto3_errors/mwaa_serverless.py +162 -0
  268. boto3_errors/neptune.py +472 -0
  269. boto3_errors/neptune_graph.py +97 -0
  270. boto3_errors/neptunedata.py +746 -0
  271. boto3_errors/network_firewall.py +102 -0
  272. boto3_errors/networkflowmonitor.py +56 -0
  273. boto3_errors/networkmanager.py +135 -0
  274. boto3_errors/networkmonitor.py +56 -0
  275. boto3_errors/notifications.py +111 -0
  276. boto3_errors/notificationscontacts.py +121 -0
  277. boto3_errors/nova_act.py +134 -0
  278. boto3_errors/oam.py +92 -0
  279. boto3_errors/observabilityadmin.py +149 -0
  280. boto3_errors/odb.py +128 -0
  281. boto3_errors/omics.py +74 -0
  282. boto3_errors/opensearch.py +126 -0
  283. boto3_errors/opensearchserverless.py +79 -0
  284. boto3_errors/organizations.py +709 -0
  285. boto3_errors/osis.py +71 -0
  286. boto3_errors/outposts.py +60 -0
  287. boto3_errors/panorama.py +125 -0
  288. boto3_errors/partnercentral_account.py +118 -0
  289. boto3_errors/partnercentral_benefits.py +93 -0
  290. boto3_errors/partnercentral_channel.py +119 -0
  291. boto3_errors/partnercentral_selling.py +124 -0
  292. boto3_errors/payment_cryptography.py +118 -0
  293. boto3_errors/payment_cryptography_data.py +68 -0
  294. boto3_errors/pca_connector_ad.py +141 -0
  295. boto3_errors/pca_connector_scep.py +126 -0
  296. boto3_errors/pcs.py +161 -0
  297. boto3_errors/personalize.py +65 -0
  298. boto3_errors/personalize_events.py +32 -0
  299. boto3_errors/personalize_runtime.py +26 -0
  300. boto3_errors/pi.py +32 -0
  301. boto3_errors/pinpoint.py +102 -0
  302. boto3_errors/pinpoint_email.py +80 -0
  303. boto3_errors/pinpoint_sms_voice.py +56 -0
  304. boto3_errors/pinpoint_sms_voice_v2.py +120 -0
  305. boto3_errors/pipes.py +111 -0
  306. boto3_errors/polly.py +182 -0
  307. boto3_errors/pricing.py +65 -0
  308. boto3_errors/proton.py +59 -0
  309. boto3_errors/py.typed +0 -0
  310. boto3_errors/qapps.py +150 -0
  311. boto3_errors/qbusiness.py +138 -0
  312. boto3_errors/qconnect.py +112 -0
  313. boto3_errors/quicksight.py +324 -0
  314. boto3_errors/ram.py +233 -0
  315. boto3_errors/rbin.py +67 -0
  316. boto3_errors/rds.py +1063 -0
  317. boto3_errors/rds_data.py +141 -0
  318. boto3_errors/redshift.py +1039 -0
  319. boto3_errors/redshift_data.py +86 -0
  320. boto3_errors/redshift_serverless.py +115 -0
  321. boto3_errors/rekognition.py +206 -0
  322. boto3_errors/repostspace.py +126 -0
  323. boto3_errors/resiliencehub.py +100 -0
  324. boto3_errors/resource_explorer_2.py +101 -0
  325. boto3_errors/resource_groups.py +59 -0
  326. boto3_errors/resourcegroupstaggingapi.py +86 -0
  327. boto3_errors/rolesanywhere.py +38 -0
  328. boto3_errors/route53.py +635 -0
  329. boto3_errors/route53_recovery_cluster.py +121 -0
  330. boto3_errors/route53_recovery_control_config.py +66 -0
  331. boto3_errors/route53_recovery_readiness.py +50 -0
  332. boto3_errors/route53domains.py +73 -0
  333. boto3_errors/route53globalresolver.py +136 -0
  334. boto3_errors/route53profiles.py +97 -0
  335. boto3_errors/route53resolver.py +171 -0
  336. boto3_errors/rtbfabric.py +68 -0
  337. boto3_errors/rum.py +123 -0
  338. boto3_errors/s3.py +153 -0
  339. boto3_errors/s3control.py +84 -0
  340. boto3_errors/s3outposts.py +59 -0
  341. boto3_errors/s3tables.py +69 -0
  342. boto3_errors/s3vectors.py +126 -0
  343. boto3_errors/sagemaker.py +44 -0
  344. boto3_errors/sagemaker_a2i_runtime.py +66 -0
  345. boto3_errors/sagemaker_edge.py +23 -0
  346. boto3_errors/sagemaker_featurestore_runtime.py +47 -0
  347. boto3_errors/sagemaker_geospatial.py +89 -0
  348. boto3_errors/sagemaker_runtime.py +108 -0
  349. boto3_errors/savingsplans.py +38 -0
  350. boto3_errors/scheduler.py +50 -0
  351. boto3_errors/schemas.py +114 -0
  352. boto3_errors/sdb.py +187 -0
  353. boto3_errors/secretsmanager.py +105 -0
  354. boto3_errors/security_ir.py +119 -0
  355. boto3_errors/securityhub.py +158 -0
  356. boto3_errors/securitylake.py +111 -0
  357. boto3_errors/serverlessrepo.py +83 -0
  358. boto3_errors/service_quotas.py +132 -0
  359. boto3_errors/servicecatalog.py +76 -0
  360. boto3_errors/servicecatalog_appregistry.py +58 -0
  361. boto3_errors/servicediscovery.py +165 -0
  362. boto3_errors/ses.py +455 -0
  363. boto3_errors/sesv2.py +101 -0
  364. boto3_errors/shield.py +157 -0
  365. boto3_errors/signer.py +125 -0
  366. boto3_errors/signin.py +106 -0
  367. boto3_errors/simspaceweaver.py +49 -0
  368. boto3_errors/sms_voice.py +56 -0
  369. boto3_errors/snow_device_management.py +53 -0
  370. boto3_errors/snowball.py +129 -0
  371. boto3_errors/sns.py +265 -0
  372. boto3_errors/socialmessaging.py +71 -0
  373. boto3_errors/sqs.py +221 -0
  374. boto3_errors/ssm.py +1216 -0
  375. boto3_errors/ssm_contacts.py +142 -0
  376. boto3_errors/ssm_guiconnect.py +56 -0
  377. boto3_errors/ssm_incidents.py +114 -0
  378. boto3_errors/ssm_quicksetup.py +56 -0
  379. boto3_errors/ssm_sap.py +44 -0
  380. boto3_errors/sso.py +47 -0
  381. boto3_errors/sso_admin.py +90 -0
  382. boto3_errors/sso_oidc.py +320 -0
  383. boto3_errors/stepfunctions.py +293 -0
  384. boto3_errors/storagegateway.py +60 -0
  385. boto3_errors/sts.py +143 -0
  386. boto3_errors/supplychain.py +56 -0
  387. boto3_errors/support.py +89 -0
  388. boto3_errors/support_app.py +76 -0
  389. boto3_errors/swf.py +113 -0
  390. boto3_errors/synthetics.py +80 -0
  391. boto3_errors/taxsettings.py +84 -0
  392. boto3_errors/textract.py +181 -0
  393. boto3_errors/timestream_influxdb.py +90 -0
  394. boto3_errors/timestream_query.py +73 -0
  395. boto3_errors/timestream_write.py +102 -0
  396. boto3_errors/tnb.py +53 -0
  397. boto3_errors/transcribe.py +60 -0
  398. boto3_errors/transfer.py +101 -0
  399. boto3_errors/translate.py +161 -0
  400. boto3_errors/trustedadvisor.py +53 -0
  401. boto3_errors/verifiedpermissions.py +166 -0
  402. boto3_errors/voice_id.py +100 -0
  403. boto3_errors/vpc_lattice.py +132 -0
  404. boto3_errors/waf.py +258 -0
  405. boto3_errors/waf_regional.py +267 -0
  406. boto3_errors/wafv2.py +259 -0
  407. boto3_errors/wellarchitected.py +104 -0
  408. boto3_errors/wickr.py +91 -0
  409. boto3_errors/wisdom.py +91 -0
  410. boto3_errors/workdocs.py +187 -0
  411. boto3_errors/workmail.py +181 -0
  412. boto3_errors/workmailmessageflow.py +52 -0
  413. boto3_errors/workspaces.py +190 -0
  414. boto3_errors/workspaces_instances.py +126 -0
  415. boto3_errors/workspaces_thin_client.py +130 -0
  416. boto3_errors/workspaces_web.py +137 -0
  417. boto3_errors/xray.py +95 -0
  418. boto3_errors-0.1.0.dist-info/METADATA +117 -0
  419. boto3_errors-0.1.0.dist-info/RECORD +421 -0
  420. boto3_errors-0.1.0.dist-info/WHEEL +4 -0
  421. boto3_errors-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,6 @@
1
+ """Typed, statically-importable exception classes for every AWS service."""
2
+
3
+ from boto3_errors._base import Boto3Error
4
+ from boto3_errors._patch import patch_client
5
+
6
+ __all__ = ["Boto3Error", "patch_client"]
boto3_errors/_base.py ADDED
@@ -0,0 +1,40 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from botocore.exceptions import ClientError
6
+
7
+
8
+ class Boto3Error(ClientError):
9
+ """Base class for all typed boto3 exceptions.
10
+
11
+ Inherits from ClientError so existing ``except ClientError`` handlers
12
+ still catch these exceptions.
13
+ """
14
+
15
+ _SERVICE: str = ""
16
+ _ERROR_CODE: str = ""
17
+
18
+ # Widen from botocore-stubs' TypedDict so that generated properties
19
+ # can ``self.response.get("SomeField")`` without returning ``object``.
20
+ response: dict[str, Any] # type: ignore[assignment]
21
+
22
+ @property
23
+ def message(self) -> str:
24
+ """Human-readable error message from the ``Error.Message`` field."""
25
+ return self.response.get("Error", {}).get("Message", "") # type: ignore[no-any-return]
26
+
27
+ @property
28
+ def error_code(self) -> str:
29
+ """AWS error code from the ``Error.Code`` field."""
30
+ return self.response.get("Error", {}).get("Code", "") # type: ignore[no-any-return]
31
+
32
+ @property
33
+ def http_status_code(self) -> int:
34
+ """HTTP status code from ``ResponseMetadata``."""
35
+ return self.response.get("ResponseMetadata", {}).get("HTTPStatusCode", 0) # type: ignore[no-any-return]
36
+
37
+ @property
38
+ def request_id(self) -> str:
39
+ """AWS request ID from ``ResponseMetadata``."""
40
+ return self.response.get("ResponseMetadata", {}).get("RequestId", "") # type: ignore[no-any-return]
boto3_errors/_patch.py ADDED
@@ -0,0 +1,54 @@
1
+ import functools
2
+ import importlib
3
+ from typing import Any
4
+
5
+ from botocore.client import BaseClient
6
+ from botocore.exceptions import ClientError
7
+
8
+
9
+ def patch_client(client: BaseClient) -> None:
10
+ """Wrap *client*'s ``_make_api_call``.
11
+
12
+ Re-raises ``ClientError`` as a typed :class:`~boto3_errors._base.Boto3Error`
13
+ subclass when a matching exception class exists.
14
+
15
+ Safe to call more than once on the same client (subsequent calls are
16
+ no-ops).
17
+ """
18
+ if getattr(client, "_boto3_errors_patched", False):
19
+ return
20
+
21
+ service: str = client._service_model.service_name # type: ignore[attr-defined]
22
+ module_name = _service_to_module(service)
23
+
24
+ try:
25
+ mod = importlib.import_module(f"boto3_errors.{module_name}")
26
+ except ModuleNotFoundError:
27
+ # No generated module for this service — nothing to patch.
28
+ return
29
+
30
+ exceptions: dict[str, type] = getattr(mod, "EXCEPTIONS", {})
31
+ original = client._make_api_call # type: ignore[attr-defined]
32
+
33
+ @functools.wraps(original)
34
+ def _patched_make_api_call(
35
+ operation_name: str, api_params: dict[str, Any]
36
+ ) -> dict[str, Any]:
37
+ try:
38
+ return original(operation_name, api_params) # type: ignore[no-any-return]
39
+ except ClientError as e:
40
+ code = e.response.get("Error", {}).get("Code", "")
41
+ exc_cls = exceptions.get(code)
42
+ if exc_cls is not None:
43
+ raise exc_cls(e.response, e.operation_name) from e
44
+ raise
45
+
46
+ client._make_api_call = _patched_make_api_call # type: ignore[attr-defined]
47
+ client._boto3_errors_patched = True # type: ignore[attr-defined]
48
+
49
+
50
+ def _service_to_module(service: str) -> str:
51
+ name = service.replace("-", "_")
52
+ if name == "lambda":
53
+ name = "lambda_"
54
+ return name
@@ -0,0 +1,118 @@
1
+ # Auto-generated. Do not edit manually.
2
+ from __future__ import annotations
3
+
4
+ from typing import Any
5
+
6
+ from boto3_errors._base import Boto3Error
7
+
8
+
9
+ class AccessAnalyzerError(Boto3Error):
10
+ _SERVICE = "accessanalyzer"
11
+
12
+
13
+ class AccessDeniedException(AccessAnalyzerError):
14
+ """You do not have sufficient access to perform this action."""
15
+ _ERROR_CODE = "AccessDeniedException"
16
+
17
+
18
+ class ConflictException(AccessAnalyzerError):
19
+ """A conflict exception error."""
20
+ _ERROR_CODE = "ConflictException"
21
+
22
+ @property
23
+ def resource_id(self) -> str | None:
24
+ """The ID of the resource."""
25
+ return self.response.get("resourceId")
26
+
27
+ @property
28
+ def resource_type(self) -> str | None:
29
+ """The resource type."""
30
+ return self.response.get("resourceType")
31
+
32
+
33
+ class InternalServerException(AccessAnalyzerError):
34
+ """Internal server error."""
35
+ _ERROR_CODE = "InternalServerException"
36
+
37
+ @property
38
+ def retry_after_seconds(self) -> int | None:
39
+ """The seconds to wait to retry."""
40
+ return self.response.get("retryAfterSeconds")
41
+
42
+
43
+ class InvalidParameterException(AccessAnalyzerError):
44
+ """The specified parameter is invalid."""
45
+ _ERROR_CODE = "InvalidParameterException"
46
+
47
+
48
+ class ResourceNotFoundException(AccessAnalyzerError):
49
+ """The specified resource could not be found."""
50
+ _ERROR_CODE = "ResourceNotFoundException"
51
+
52
+ @property
53
+ def resource_id(self) -> str | None:
54
+ """The ID of the resource."""
55
+ return self.response.get("resourceId")
56
+
57
+ @property
58
+ def resource_type(self) -> str | None:
59
+ """The type of the resource."""
60
+ return self.response.get("resourceType")
61
+
62
+
63
+ class ServiceQuotaExceededException(AccessAnalyzerError):
64
+ """Service quote met error."""
65
+ _ERROR_CODE = "ServiceQuotaExceededException"
66
+
67
+ @property
68
+ def resource_id(self) -> str | None:
69
+ """The resource ID."""
70
+ return self.response.get("resourceId")
71
+
72
+ @property
73
+ def resource_type(self) -> str | None:
74
+ """The resource type."""
75
+ return self.response.get("resourceType")
76
+
77
+
78
+ class ThrottlingException(AccessAnalyzerError):
79
+ """Throttling limit exceeded error."""
80
+ _ERROR_CODE = "ThrottlingException"
81
+
82
+ @property
83
+ def retry_after_seconds(self) -> int | None:
84
+ """The seconds to wait to retry."""
85
+ return self.response.get("retryAfterSeconds")
86
+
87
+
88
+ class UnprocessableEntityException(AccessAnalyzerError):
89
+ """The specified entity could not be processed."""
90
+ _ERROR_CODE = "UnprocessableEntityException"
91
+
92
+
93
+ class ValidationException(AccessAnalyzerError):
94
+ """Validation exception error."""
95
+ _ERROR_CODE = "ValidationException"
96
+
97
+ @property
98
+ def reason(self) -> str | None:
99
+ """The reason for the exception."""
100
+ return self.response.get("reason")
101
+
102
+ @property
103
+ def field_list(self) -> list[Any] | None:
104
+ """A list of fields that didn't validate."""
105
+ return self.response.get("fieldList")
106
+
107
+
108
+ EXCEPTIONS: dict[str, type[AccessAnalyzerError]] = {
109
+ "AccessDeniedException": AccessDeniedException,
110
+ "ConflictException": ConflictException,
111
+ "InternalServerException": InternalServerException,
112
+ "InvalidParameterException": InvalidParameterException,
113
+ "ResourceNotFoundException": ResourceNotFoundException,
114
+ "ServiceQuotaExceededException": ServiceQuotaExceededException,
115
+ "ThrottlingException": ThrottlingException,
116
+ "UnprocessableEntityException": UnprocessableEntityException,
117
+ "ValidationException": ValidationException,
118
+ }
@@ -0,0 +1,113 @@
1
+ # Auto-generated. Do not edit manually.
2
+ from __future__ import annotations
3
+
4
+ from typing import Any
5
+
6
+ from boto3_errors._base import Boto3Error
7
+
8
+
9
+ class AccountError(Boto3Error):
10
+ _SERVICE = "account"
11
+
12
+
13
+ class AccessDeniedException(AccountError):
14
+ """The operation failed because the calling identity doesn't have the minimum required
15
+ permissions.
16
+ """
17
+
18
+ _ERROR_CODE = "AccessDeniedException"
19
+
20
+ @property
21
+ def error_type(self) -> str | None:
22
+ """The value populated to the `x-amzn-ErrorType` response header by API Gateway."""
23
+ return self.response.get("errorType")
24
+
25
+
26
+ class ConflictException(AccountError):
27
+ """The request could not be processed because of a conflict in the current status of
28
+ the resource. For example, this happens if you try to enable a Region that is
29
+ currently being disabled (in a status of DISABLING) or if you try to change an
30
+ account’s root user email to an email address which is already in use.
31
+ """
32
+
33
+ _ERROR_CODE = "ConflictException"
34
+
35
+ @property
36
+ def error_type(self) -> str | None:
37
+ """The value populated to the `x-amzn-ErrorType` response header by API Gateway."""
38
+ return self.response.get("errorType")
39
+
40
+
41
+ class InternalServerException(AccountError):
42
+ """The operation failed because of an error internal to Amazon Web Services. Try your
43
+ operation again later.
44
+ """
45
+
46
+ _ERROR_CODE = "InternalServerException"
47
+
48
+ @property
49
+ def error_type(self) -> str | None:
50
+ """The value populated to the `x-amzn-ErrorType` response header by API Gateway."""
51
+ return self.response.get("errorType")
52
+
53
+
54
+ class ResourceNotFoundException(AccountError):
55
+ """The operation failed because it specified a resource that can't be found."""
56
+ _ERROR_CODE = "ResourceNotFoundException"
57
+
58
+ @property
59
+ def error_type(self) -> str | None:
60
+ """The value populated to the `x-amzn-ErrorType` response header by API Gateway."""
61
+ return self.response.get("errorType")
62
+
63
+
64
+ class ResourceUnavailableException(AccountError):
65
+ """The operation failed because it specified a resource that is not currently
66
+ available.
67
+ """
68
+
69
+ _ERROR_CODE = "ResourceUnavailableException"
70
+
71
+ @property
72
+ def error_type(self) -> str | None:
73
+ """The value populated to the `x-amzn-ErrorType` response header by API Gateway."""
74
+ return self.response.get("errorType")
75
+
76
+
77
+ class TooManyRequestsException(AccountError):
78
+ """The operation failed because it was called too frequently and exceeded a throttle
79
+ limit.
80
+ """
81
+
82
+ _ERROR_CODE = "TooManyRequestsException"
83
+
84
+ @property
85
+ def error_type(self) -> str | None:
86
+ """The value populated to the `x-amzn-ErrorType` response header by API Gateway."""
87
+ return self.response.get("errorType")
88
+
89
+
90
+ class ValidationException(AccountError):
91
+ """The operation failed because one of the input parameters was invalid."""
92
+ _ERROR_CODE = "ValidationException"
93
+
94
+ @property
95
+ def field_list(self) -> list[Any] | None:
96
+ """The field where the invalid entry was detected."""
97
+ return self.response.get("fieldList")
98
+
99
+ @property
100
+ def reason(self) -> str | None:
101
+ """The reason that validation failed."""
102
+ return self.response.get("reason")
103
+
104
+
105
+ EXCEPTIONS: dict[str, type[AccountError]] = {
106
+ "AccessDeniedException": AccessDeniedException,
107
+ "ConflictException": ConflictException,
108
+ "InternalServerException": InternalServerException,
109
+ "ResourceNotFoundException": ResourceNotFoundException,
110
+ "ResourceUnavailableException": ResourceUnavailableException,
111
+ "TooManyRequestsException": TooManyRequestsException,
112
+ "ValidationException": ValidationException,
113
+ }
boto3_errors/acm.py ADDED
@@ -0,0 +1,125 @@
1
+ # Auto-generated. Do not edit manually.
2
+ from __future__ import annotations
3
+
4
+ from typing import Any
5
+
6
+ from boto3_errors._base import Boto3Error
7
+
8
+
9
+ class ACMError(Boto3Error):
10
+ _SERVICE = "acm"
11
+
12
+
13
+ class AccessDeniedException(ACMError):
14
+ """You do not have access required to perform this action."""
15
+ _ERROR_CODE = "AccessDeniedException"
16
+
17
+
18
+ class ConflictException(ACMError):
19
+ """You are trying to update a resource or configuration that is already being created
20
+ or updated. Wait for the previous operation to finish and try again.
21
+ """
22
+
23
+ _ERROR_CODE = "ConflictException"
24
+
25
+
26
+ class InvalidArgsException(ACMError):
27
+ """One or more of request parameters specified is not valid."""
28
+ _ERROR_CODE = "InvalidArgsException"
29
+
30
+
31
+ class InvalidArnException(ACMError):
32
+ """The requested Amazon Resource Name (ARN) does not refer to an existing resource."""
33
+ _ERROR_CODE = "InvalidArnException"
34
+
35
+
36
+ class InvalidDomainValidationOptionsException(ACMError):
37
+ """One or more values in the DomainValidationOption structure is incorrect."""
38
+ _ERROR_CODE = "InvalidDomainValidationOptionsException"
39
+
40
+
41
+ class InvalidParameterException(ACMError):
42
+ """An input parameter was invalid."""
43
+ _ERROR_CODE = "InvalidParameterException"
44
+
45
+
46
+ class InvalidStateException(ACMError):
47
+ """Processing has reached an invalid state."""
48
+ _ERROR_CODE = "InvalidStateException"
49
+
50
+
51
+ class InvalidTagException(ACMError):
52
+ """One or both of the values that make up the key-value pair is not valid. For example,
53
+ you cannot specify a tag value that begins with `aws:`.
54
+ """
55
+
56
+ _ERROR_CODE = "InvalidTagException"
57
+
58
+
59
+ class LimitExceededException(ACMError):
60
+ """An ACM quota has been exceeded."""
61
+ _ERROR_CODE = "LimitExceededException"
62
+
63
+
64
+ class RequestInProgressException(ACMError):
65
+ """The certificate request is in process and the certificate in your account has not
66
+ yet been issued.
67
+ """
68
+
69
+ _ERROR_CODE = "RequestInProgressException"
70
+
71
+
72
+ class ResourceInUseException(ACMError):
73
+ """The certificate is in use by another Amazon Web Services service in the caller's
74
+ account. Remove the association and try again.
75
+ """
76
+
77
+ _ERROR_CODE = "ResourceInUseException"
78
+
79
+
80
+ class ResourceNotFoundException(ACMError):
81
+ """The specified certificate cannot be found in the caller's account or the caller's
82
+ account cannot be found.
83
+ """
84
+
85
+ _ERROR_CODE = "ResourceNotFoundException"
86
+
87
+
88
+ class TagPolicyException(ACMError):
89
+ """A specified tag did not comply with an existing tag policy and was rejected."""
90
+ _ERROR_CODE = "TagPolicyException"
91
+
92
+
93
+ class ThrottlingException(ACMError):
94
+ """The request was denied because it exceeded a quota."""
95
+ _ERROR_CODE = "ThrottlingException"
96
+
97
+
98
+ class TooManyTagsException(ACMError):
99
+ """The request contains too many tags. Try the request again with fewer tags."""
100
+ _ERROR_CODE = "TooManyTagsException"
101
+
102
+
103
+ class ValidationException(ACMError):
104
+ """The supplied input failed to satisfy constraints of an Amazon Web Services service."""
105
+ _ERROR_CODE = "ValidationException"
106
+
107
+
108
+ EXCEPTIONS: dict[str, type[ACMError]] = {
109
+ "AccessDeniedException": AccessDeniedException,
110
+ "ConflictException": ConflictException,
111
+ "InvalidArgsException": InvalidArgsException,
112
+ "InvalidArnException": InvalidArnException,
113
+ "InvalidDomainValidationOptionsException": InvalidDomainValidationOptionsException,
114
+ "InvalidParameterException": InvalidParameterException,
115
+ "InvalidStateException": InvalidStateException,
116
+ "InvalidTagException": InvalidTagException,
117
+ "LimitExceededException": LimitExceededException,
118
+ "RequestInProgressException": RequestInProgressException,
119
+ "ResourceInUseException": ResourceInUseException,
120
+ "ResourceNotFoundException": ResourceNotFoundException,
121
+ "TagPolicyException": TagPolicyException,
122
+ "ThrottlingException": ThrottlingException,
123
+ "TooManyTagsException": TooManyTagsException,
124
+ "ValidationException": ValidationException,
125
+ }
@@ -0,0 +1,153 @@
1
+ # Auto-generated. Do not edit manually.
2
+ from __future__ import annotations
3
+
4
+ from typing import Any
5
+
6
+ from boto3_errors._base import Boto3Error
7
+
8
+
9
+ class ACMPCAError(Boto3Error):
10
+ _SERVICE = "acm-pca"
11
+
12
+
13
+ class CertificateMismatchException(ACMPCAError):
14
+ """The certificate authority certificate you are importing does not comply with
15
+ conditions specified in the certificate that signed it.
16
+ """
17
+
18
+ _ERROR_CODE = "CertificateMismatchException"
19
+
20
+
21
+ class ConcurrentModificationException(ACMPCAError):
22
+ """A previous update to your private CA is still ongoing."""
23
+ _ERROR_CODE = "ConcurrentModificationException"
24
+
25
+
26
+ class InvalidArgsException(ACMPCAError):
27
+ """One or more of the specified arguments was not valid."""
28
+ _ERROR_CODE = "InvalidArgsException"
29
+
30
+
31
+ class InvalidArnException(ACMPCAError):
32
+ """The requested Amazon Resource Name (ARN) does not refer to an existing resource."""
33
+ _ERROR_CODE = "InvalidArnException"
34
+
35
+
36
+ class InvalidNextTokenException(ACMPCAError):
37
+ """The token specified in the `NextToken` argument is not valid. Use the token returned
38
+ from your previous call to ListCertificateAuthorities.
39
+ """
40
+
41
+ _ERROR_CODE = "InvalidNextTokenException"
42
+
43
+
44
+ class InvalidPolicyException(ACMPCAError):
45
+ """The resource policy is invalid or is missing a required statement. For general
46
+ information about IAM policy and statement structure, see Overview of JSON Policies.
47
+ """
48
+
49
+ _ERROR_CODE = "InvalidPolicyException"
50
+
51
+
52
+ class InvalidRequestException(ACMPCAError):
53
+ """The request action cannot be performed or is prohibited."""
54
+ _ERROR_CODE = "InvalidRequestException"
55
+
56
+
57
+ class InvalidStateException(ACMPCAError):
58
+ """The state of the private CA does not allow this action to occur."""
59
+ _ERROR_CODE = "InvalidStateException"
60
+
61
+
62
+ class InvalidTagException(ACMPCAError):
63
+ """The tag associated with the CA is not valid. The invalid argument is contained in
64
+ the message field.
65
+ """
66
+
67
+ _ERROR_CODE = "InvalidTagException"
68
+
69
+
70
+ class LimitExceededException(ACMPCAError):
71
+ """An Amazon Web Services Private CA quota has been exceeded. See the exception message
72
+ returned to determine the quota that was exceeded.
73
+ """
74
+
75
+ _ERROR_CODE = "LimitExceededException"
76
+
77
+
78
+ class LockoutPreventedException(ACMPCAError):
79
+ """The current action was prevented because it would lock the caller out from
80
+ performing subsequent actions. Verify that the specified parameters would not result
81
+ in the caller being denied access to the resource.
82
+ """
83
+
84
+ _ERROR_CODE = "LockoutPreventedException"
85
+
86
+
87
+ class MalformedCSRException(ACMPCAError):
88
+ """The certificate signing request is invalid."""
89
+ _ERROR_CODE = "MalformedCSRException"
90
+
91
+
92
+ class MalformedCertificateException(ACMPCAError):
93
+ """One or more fields in the certificate are invalid."""
94
+ _ERROR_CODE = "MalformedCertificateException"
95
+
96
+
97
+ class PermissionAlreadyExistsException(ACMPCAError):
98
+ """The designated permission has already been given to the user."""
99
+ _ERROR_CODE = "PermissionAlreadyExistsException"
100
+
101
+
102
+ class RequestAlreadyProcessedException(ACMPCAError):
103
+ """Your request has already been completed."""
104
+ _ERROR_CODE = "RequestAlreadyProcessedException"
105
+
106
+
107
+ class RequestFailedException(ACMPCAError):
108
+ """The request has failed for an unspecified reason."""
109
+ _ERROR_CODE = "RequestFailedException"
110
+
111
+
112
+ class RequestInProgressException(ACMPCAError):
113
+ """Your request is already in progress."""
114
+ _ERROR_CODE = "RequestInProgressException"
115
+
116
+
117
+ class ResourceNotFoundException(ACMPCAError):
118
+ """A resource such as a private CA, S3 bucket, certificate, audit report, or policy
119
+ cannot be found.
120
+ """
121
+
122
+ _ERROR_CODE = "ResourceNotFoundException"
123
+
124
+
125
+ class TooManyTagsException(ACMPCAError):
126
+ """You can associate up to 50 tags with a private CA. Exception information is
127
+ contained in the exception message field.
128
+ """
129
+
130
+ _ERROR_CODE = "TooManyTagsException"
131
+
132
+
133
+ EXCEPTIONS: dict[str, type[ACMPCAError]] = {
134
+ "CertificateMismatchException": CertificateMismatchException,
135
+ "ConcurrentModificationException": ConcurrentModificationException,
136
+ "InvalidArgsException": InvalidArgsException,
137
+ "InvalidArnException": InvalidArnException,
138
+ "InvalidNextTokenException": InvalidNextTokenException,
139
+ "InvalidPolicyException": InvalidPolicyException,
140
+ "InvalidRequestException": InvalidRequestException,
141
+ "InvalidStateException": InvalidStateException,
142
+ "InvalidTagException": InvalidTagException,
143
+ "LimitExceededException": LimitExceededException,
144
+ "LockoutPreventedException": LockoutPreventedException,
145
+ "MalformedCSRException": MalformedCSRException,
146
+ "MalformedCertificateException": MalformedCertificateException,
147
+ "PermissionAlreadyExistsException": PermissionAlreadyExistsException,
148
+ "RequestAlreadyProcessedException": RequestAlreadyProcessedException,
149
+ "RequestFailedException": RequestFailedException,
150
+ "RequestInProgressException": RequestInProgressException,
151
+ "ResourceNotFoundException": ResourceNotFoundException,
152
+ "TooManyTagsException": TooManyTagsException,
153
+ }