capo-acm 0.1.0__tar.gz

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 (196) hide show
  1. capo_acm-0.1.0/LICENSE +21 -0
  2. capo_acm-0.1.0/PKG-INFO +102 -0
  3. capo_acm-0.1.0/README.md +75 -0
  4. capo_acm-0.1.0/pyproject.toml +61 -0
  5. capo_acm-0.1.0/setup.cfg +4 -0
  6. capo_acm-0.1.0/src/capo_acm/__init__.py +70 -0
  7. capo_acm-0.1.0/src/capo_acm/_async.py +25 -0
  8. capo_acm-0.1.0/src/capo_acm/_auth/_identity.py +16 -0
  9. capo_acm-0.1.0/src/capo_acm/_auth/_providers.py +882 -0
  10. capo_acm-0.1.0/src/capo_acm/_auth/_signers.py +88 -0
  11. capo_acm-0.1.0/src/capo_acm/_auth/_sigv4.py +434 -0
  12. capo_acm-0.1.0/src/capo_acm/_auth/_zapros_handler.py +80 -0
  13. capo_acm-0.1.0/src/capo_acm/_iter.py +113 -0
  14. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/add_tags_to_certificate.py +150 -0
  15. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/delete_certificate.py +144 -0
  16. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/describe_certificate.py +154 -0
  17. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/export_certificate.py +164 -0
  18. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/get_account_configuration.py +141 -0
  19. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/get_certificate.py +156 -0
  20. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/import_certificate.py +187 -0
  21. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/list_certificates.py +156 -0
  22. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/list_tags_for_certificate.py +150 -0
  23. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/put_account_configuration.py +135 -0
  24. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/remove_tags_from_certificate.py +147 -0
  25. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/renew_certificate.py +129 -0
  26. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/request_certificate.py +185 -0
  27. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/resend_validation_email.py +134 -0
  28. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/revoke_certificate.py +174 -0
  29. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/search_certificates.py +162 -0
  30. capo_acm-0.1.0/src/capo_acm/_operations/certificate_manager/update_certificate_options.py +137 -0
  31. capo_acm-0.1.0/src/capo_acm/_pagination.py +21 -0
  32. capo_acm-0.1.0/src/capo_acm/_protocol/__init__.py +1 -0
  33. capo_acm-0.1.0/src/capo_acm/_protocol/errors.py +93 -0
  34. capo_acm-0.1.0/src/capo_acm/_protocol/eventstream.py +238 -0
  35. capo_acm-0.1.0/src/capo_acm/_protocol/serialize.py +47 -0
  36. capo_acm-0.1.0/src/capo_acm/_protocol/xml.py +33 -0
  37. capo_acm-0.1.0/src/capo_acm/_rule_engine/__init__.py +0 -0
  38. capo_acm-0.1.0/src/capo_acm/_rule_engine/_aws_partition.py +160 -0
  39. capo_acm-0.1.0/src/capo_acm/_rule_engine/_endpoint_rule_set.py +150 -0
  40. capo_acm-0.1.0/src/capo_acm/_rule_engine/_endpoint_runtime.py +389 -0
  41. capo_acm-0.1.0/src/capo_acm/_services/_aws_config.py +160 -0
  42. capo_acm-0.1.0/src/capo_acm/_services/_pipeline.py +198 -0
  43. capo_acm-0.1.0/src/capo_acm/_services/acm.py +1154 -0
  44. capo_acm-0.1.0/src/capo_acm/_services/async_acm.py +1171 -0
  45. capo_acm-0.1.0/src/capo_acm/errors/__init__.py +47 -0
  46. capo_acm-0.1.0/src/capo_acm/errors/_base.py +94 -0
  47. capo_acm-0.1.0/src/capo_acm/errors/access_denied_exception.py +51 -0
  48. capo_acm-0.1.0/src/capo_acm/errors/conflict_exception.py +51 -0
  49. capo_acm-0.1.0/src/capo_acm/errors/invalid_args_exception.py +51 -0
  50. capo_acm-0.1.0/src/capo_acm/errors/invalid_arn_exception.py +51 -0
  51. capo_acm-0.1.0/src/capo_acm/errors/invalid_domain_validation_options_exception.py +53 -0
  52. capo_acm-0.1.0/src/capo_acm/errors/invalid_parameter_exception.py +51 -0
  53. capo_acm-0.1.0/src/capo_acm/errors/invalid_state_exception.py +51 -0
  54. capo_acm-0.1.0/src/capo_acm/errors/invalid_tag_exception.py +51 -0
  55. capo_acm-0.1.0/src/capo_acm/errors/limit_exceeded_exception.py +51 -0
  56. capo_acm-0.1.0/src/capo_acm/errors/request_in_progress_exception.py +51 -0
  57. capo_acm-0.1.0/src/capo_acm/errors/resource_in_use_exception.py +51 -0
  58. capo_acm-0.1.0/src/capo_acm/errors/resource_not_found_exception.py +51 -0
  59. capo_acm-0.1.0/src/capo_acm/errors/tag_policy_exception.py +51 -0
  60. capo_acm-0.1.0/src/capo_acm/errors/throttling_exception.py +74 -0
  61. capo_acm-0.1.0/src/capo_acm/errors/too_many_tags_exception.py +51 -0
  62. capo_acm-0.1.0/src/capo_acm/errors/validation_exception.py +53 -0
  63. capo_acm-0.1.0/src/capo_acm/py.typed +0 -0
  64. capo_acm-0.1.0/src/capo_acm/types/_prelude/blob.py +12 -0
  65. capo_acm-0.1.0/src/capo_acm/types/_prelude/timestamp.py +17 -0
  66. capo_acm-0.1.0/src/capo_acm/types/acm_certificate_metadata.py +212 -0
  67. capo_acm-0.1.0/src/capo_acm/types/acm_certificate_metadata_filter.py +177 -0
  68. capo_acm-0.1.0/src/capo_acm/types/add_tags_to_certificate_request.py +45 -0
  69. capo_acm-0.1.0/src/capo_acm/types/arn.py +5 -0
  70. capo_acm-0.1.0/src/capo_acm/types/availability_error_message.py +5 -0
  71. capo_acm-0.1.0/src/capo_acm/types/certificate_body.py +5 -0
  72. capo_acm-0.1.0/src/capo_acm/types/certificate_body_blob.py +15 -0
  73. capo_acm-0.1.0/src/capo_acm/types/certificate_chain.py +5 -0
  74. capo_acm-0.1.0/src/capo_acm/types/certificate_chain_blob.py +15 -0
  75. capo_acm-0.1.0/src/capo_acm/types/certificate_detail.py +393 -0
  76. capo_acm-0.1.0/src/capo_acm/types/certificate_export.py +17 -0
  77. capo_acm-0.1.0/src/capo_acm/types/certificate_filter.py +80 -0
  78. capo_acm-0.1.0/src/capo_acm/types/certificate_filter_statement.py +113 -0
  79. capo_acm-0.1.0/src/capo_acm/types/certificate_filter_statement_list.py +35 -0
  80. capo_acm-0.1.0/src/capo_acm/types/certificate_managed_by.py +14 -0
  81. capo_acm-0.1.0/src/capo_acm/types/certificate_metadata.py +46 -0
  82. capo_acm-0.1.0/src/capo_acm/types/certificate_options.py +57 -0
  83. capo_acm-0.1.0/src/capo_acm/types/certificate_search_result.py +66 -0
  84. capo_acm-0.1.0/src/capo_acm/types/certificate_search_result_list.py +35 -0
  85. capo_acm-0.1.0/src/capo_acm/types/certificate_status.py +22 -0
  86. capo_acm-0.1.0/src/capo_acm/types/certificate_statuses.py +31 -0
  87. capo_acm-0.1.0/src/capo_acm/types/certificate_summary.py +304 -0
  88. capo_acm-0.1.0/src/capo_acm/types/certificate_summary_list.py +31 -0
  89. capo_acm-0.1.0/src/capo_acm/types/certificate_transparency_logging_preference.py +17 -0
  90. capo_acm-0.1.0/src/capo_acm/types/certificate_type.py +18 -0
  91. capo_acm-0.1.0/src/capo_acm/types/common_name_filter.py +51 -0
  92. capo_acm-0.1.0/src/capo_acm/types/comparison_operator.py +18 -0
  93. capo_acm-0.1.0/src/capo_acm/types/coral_availability_throttled_resource.py +5 -0
  94. capo_acm-0.1.0/src/capo_acm/types/coral_availability_throttling_reason.py +5 -0
  95. capo_acm-0.1.0/src/capo_acm/types/custom_attribute.py +34 -0
  96. capo_acm-0.1.0/src/capo_acm/types/custom_attribute_list.py +29 -0
  97. capo_acm-0.1.0/src/capo_acm/types/delete_certificate_request.py +31 -0
  98. capo_acm-0.1.0/src/capo_acm/types/describe_certificate_request.py +33 -0
  99. capo_acm-0.1.0/src/capo_acm/types/describe_certificate_response.py +36 -0
  100. capo_acm-0.1.0/src/capo_acm/types/distinguished_name.py +148 -0
  101. capo_acm-0.1.0/src/capo_acm/types/dns_name_filter.py +51 -0
  102. capo_acm-0.1.0/src/capo_acm/types/domain_component_list.py +17 -0
  103. capo_acm-0.1.0/src/capo_acm/types/domain_list.py +17 -0
  104. capo_acm-0.1.0/src/capo_acm/types/domain_name_string.py +5 -0
  105. capo_acm-0.1.0/src/capo_acm/types/domain_status.py +18 -0
  106. capo_acm-0.1.0/src/capo_acm/types/domain_validation.py +126 -0
  107. capo_acm-0.1.0/src/capo_acm/types/domain_validation_list.py +31 -0
  108. capo_acm-0.1.0/src/capo_acm/types/domain_validation_option.py +38 -0
  109. capo_acm-0.1.0/src/capo_acm/types/domain_validation_option_list.py +33 -0
  110. capo_acm-0.1.0/src/capo_acm/types/expiry_events_configuration.py +28 -0
  111. capo_acm-0.1.0/src/capo_acm/types/export_certificate_request.py +47 -0
  112. capo_acm-0.1.0/src/capo_acm/types/export_certificate_response.py +42 -0
  113. capo_acm-0.1.0/src/capo_acm/types/extended_key_usage.py +43 -0
  114. capo_acm-0.1.0/src/capo_acm/types/extended_key_usage_filter_list.py +33 -0
  115. capo_acm-0.1.0/src/capo_acm/types/extended_key_usage_list.py +31 -0
  116. capo_acm-0.1.0/src/capo_acm/types/extended_key_usage_name.py +27 -0
  117. capo_acm-0.1.0/src/capo_acm/types/extended_key_usage_names.py +33 -0
  118. capo_acm-0.1.0/src/capo_acm/types/failure_reason.py +32 -0
  119. capo_acm-0.1.0/src/capo_acm/types/filter_string.py +5 -0
  120. capo_acm-0.1.0/src/capo_acm/types/filters.py +110 -0
  121. capo_acm-0.1.0/src/capo_acm/types/general_name.py +114 -0
  122. capo_acm-0.1.0/src/capo_acm/types/general_name_list.py +29 -0
  123. capo_acm-0.1.0/src/capo_acm/types/get_account_configuration_response.py +42 -0
  124. capo_acm-0.1.0/src/capo_acm/types/get_certificate_request.py +31 -0
  125. capo_acm-0.1.0/src/capo_acm/types/get_certificate_response.py +35 -0
  126. capo_acm-0.1.0/src/capo_acm/types/http_redirect.py +34 -0
  127. capo_acm-0.1.0/src/capo_acm/types/idempotency_token.py +5 -0
  128. capo_acm-0.1.0/src/capo_acm/types/import_certificate_request.py +96 -0
  129. capo_acm-0.1.0/src/capo_acm/types/import_certificate_response.py +28 -0
  130. capo_acm-0.1.0/src/capo_acm/types/in_use_list.py +17 -0
  131. capo_acm-0.1.0/src/capo_acm/types/key_algorithm.py +22 -0
  132. capo_acm-0.1.0/src/capo_acm/types/key_algorithm_list.py +29 -0
  133. capo_acm-0.1.0/src/capo_acm/types/key_usage.py +36 -0
  134. capo_acm-0.1.0/src/capo_acm/types/key_usage_filter_list.py +29 -0
  135. capo_acm-0.1.0/src/capo_acm/types/key_usage_list.py +29 -0
  136. capo_acm-0.1.0/src/capo_acm/types/key_usage_name.py +26 -0
  137. capo_acm-0.1.0/src/capo_acm/types/key_usage_names.py +29 -0
  138. capo_acm-0.1.0/src/capo_acm/types/list_certificates_request.py +97 -0
  139. capo_acm-0.1.0/src/capo_acm/types/list_certificates_response.py +49 -0
  140. capo_acm-0.1.0/src/capo_acm/types/list_tags_for_certificate_request.py +33 -0
  141. capo_acm-0.1.0/src/capo_acm/types/list_tags_for_certificate_response.py +32 -0
  142. capo_acm-0.1.0/src/capo_acm/types/max_items.py +5 -0
  143. capo_acm-0.1.0/src/capo_acm/types/next_token.py +5 -0
  144. capo_acm-0.1.0/src/capo_acm/types/nullable_boolean.py +5 -0
  145. capo_acm-0.1.0/src/capo_acm/types/other_name.py +34 -0
  146. capo_acm-0.1.0/src/capo_acm/types/passphrase_blob.py +15 -0
  147. capo_acm-0.1.0/src/capo_acm/types/pca_arn.py +5 -0
  148. capo_acm-0.1.0/src/capo_acm/types/positive_integer.py +5 -0
  149. capo_acm-0.1.0/src/capo_acm/types/private_key.py +5 -0
  150. capo_acm-0.1.0/src/capo_acm/types/private_key_blob.py +15 -0
  151. capo_acm-0.1.0/src/capo_acm/types/put_account_configuration_request.py +54 -0
  152. capo_acm-0.1.0/src/capo_acm/types/record_type.py +14 -0
  153. capo_acm-0.1.0/src/capo_acm/types/remove_tags_from_certificate_request.py +45 -0
  154. capo_acm-0.1.0/src/capo_acm/types/renew_certificate_request.py +31 -0
  155. capo_acm-0.1.0/src/capo_acm/types/renewal_eligibility.py +17 -0
  156. capo_acm-0.1.0/src/capo_acm/types/renewal_status.py +19 -0
  157. capo_acm-0.1.0/src/capo_acm/types/renewal_summary.py +96 -0
  158. capo_acm-0.1.0/src/capo_acm/types/request_certificate_request.py +164 -0
  159. capo_acm-0.1.0/src/capo_acm/types/request_certificate_response.py +28 -0
  160. capo_acm-0.1.0/src/capo_acm/types/resend_validation_email_request.py +50 -0
  161. capo_acm-0.1.0/src/capo_acm/types/resource_record.py +50 -0
  162. capo_acm-0.1.0/src/capo_acm/types/revocation_reason.py +26 -0
  163. capo_acm-0.1.0/src/capo_acm/types/revoke_certificate_request.py +51 -0
  164. capo_acm-0.1.0/src/capo_acm/types/revoke_certificate_response.py +28 -0
  165. capo_acm-0.1.0/src/capo_acm/types/search_certificates_request.py +97 -0
  166. capo_acm-0.1.0/src/capo_acm/types/search_certificates_response.py +49 -0
  167. capo_acm-0.1.0/src/capo_acm/types/search_certificates_sort_by.py +34 -0
  168. capo_acm-0.1.0/src/capo_acm/types/search_certificates_sort_order.py +18 -0
  169. capo_acm-0.1.0/src/capo_acm/types/search_max_results.py +5 -0
  170. capo_acm-0.1.0/src/capo_acm/types/serial_number.py +5 -0
  171. capo_acm-0.1.0/src/capo_acm/types/service_error_message.py +5 -0
  172. capo_acm-0.1.0/src/capo_acm/types/sort_by.py +14 -0
  173. capo_acm-0.1.0/src/capo_acm/types/sort_order.py +17 -0
  174. capo_acm-0.1.0/src/capo_acm/types/string.py +5 -0
  175. capo_acm-0.1.0/src/capo_acm/types/subject_alternative_name_filter.py +46 -0
  176. capo_acm-0.1.0/src/capo_acm/types/subject_filter.py +44 -0
  177. capo_acm-0.1.0/src/capo_acm/types/t_stamp.py +20 -0
  178. capo_acm-0.1.0/src/capo_acm/types/tag.py +38 -0
  179. capo_acm-0.1.0/src/capo_acm/types/tag_key.py +5 -0
  180. capo_acm-0.1.0/src/capo_acm/types/tag_list.py +29 -0
  181. capo_acm-0.1.0/src/capo_acm/types/tag_value.py +5 -0
  182. capo_acm-0.1.0/src/capo_acm/types/throttling_reason.py +39 -0
  183. capo_acm-0.1.0/src/capo_acm/types/throttling_reason_list.py +31 -0
  184. capo_acm-0.1.0/src/capo_acm/types/timestamp_range.py +42 -0
  185. capo_acm-0.1.0/src/capo_acm/types/update_certificate_options_request.py +49 -0
  186. capo_acm-0.1.0/src/capo_acm/types/validation_email_list.py +17 -0
  187. capo_acm-0.1.0/src/capo_acm/types/validation_exception_message.py +5 -0
  188. capo_acm-0.1.0/src/capo_acm/types/validation_method.py +18 -0
  189. capo_acm-0.1.0/src/capo_acm/types/x509_attribute_filter.py +189 -0
  190. capo_acm-0.1.0/src/capo_acm/types/x509_attributes.py +158 -0
  191. capo_acm-0.1.0/src/capo_acm.egg-info/PKG-INFO +102 -0
  192. capo_acm-0.1.0/src/capo_acm.egg-info/SOURCES.txt +194 -0
  193. capo_acm-0.1.0/src/capo_acm.egg-info/dependency_links.txt +1 -0
  194. capo_acm-0.1.0/src/capo_acm.egg-info/requires.txt +7 -0
  195. capo_acm-0.1.0/src/capo_acm.egg-info/top_level.txt +1 -0
  196. capo_acm-0.1.0/tests/test_sigv4.py +557 -0
capo_acm-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Karen Petrosyan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: capo-acm
3
+ Version: 0.1.0
4
+ Summary: Python SDK for ACM.
5
+ Classifier: Development Status :: 4 - Beta
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Topic :: Software Development :: Code Generators
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: jmespath>=1.0
21
+ Requires-Dist: zapros>=0.13.0
22
+ Provides-Extra: sso
23
+ Requires-Dist: capo-sso>=0.2.0; extra == "sso"
24
+ Requires-Dist: capo-sso-oidc>=0.2.0; extra == "sso"
25
+ Requires-Dist: capo-sts>=0.3.0; extra == "sso"
26
+ Dynamic: license-file
27
+
28
+ # Getting Started
29
+
30
+ ## Installation
31
+
32
+ ```
33
+ pip install capo-acm
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from capo_acm import AsyncACMClient
40
+
41
+
42
+ async def main():
43
+ async with AsyncACMClient() as acm:
44
+ # Example: call the add_tags_to_certificate operation
45
+ response = await acm.add_tags_to_certificate()
46
+ print(response)
47
+ ```
48
+
49
+ ## Pagination
50
+
51
+ Some operations in this SDK support pagination. If the operation supports pagination it will have an `iter_` prefixed method that returns an async iterator.
52
+
53
+ ```python
54
+ from capo_acm import AsyncACMClient
55
+
56
+
57
+ async def main():
58
+ async with AsyncACMClient() as acm:
59
+ # Example: paginate over list_certificates
60
+ async for item in acm.iter_list_certificates():
61
+ print(item)
62
+ ```
63
+
64
+ ## Error Handling
65
+
66
+ The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
67
+
68
+ ```python
69
+ from capo_acm import AsyncACMClient
70
+ from capo_acm.error import InvalidArnException
71
+
72
+
73
+ async def main():
74
+ async with AsyncACMClient() as acm:
75
+ try:
76
+ await acm.add_tags_to_certificate()
77
+ except InvalidArnException as e:
78
+ print(f"Error: {e}")
79
+ print(e.data) # additional error data
80
+ ```
81
+
82
+ ## Retrying
83
+
84
+ The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their `is_retryable` and `is_throttling_error` attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the `@retryable` trait, are raised immediately without further attempts.
85
+
86
+ The number of attempts defaults to 3 and can be changed at the client level via `retry_max_attempts`, or per call via `config_overrides`.
87
+
88
+ ```python
89
+ from capo_acm import AsyncACMClient
90
+
91
+
92
+ async def main():
93
+ async with AsyncACMClient() as acm:
94
+ # Default: 3 attempts for every operation
95
+ response = await acm.add_tags_to_certificate()
96
+
97
+ # Override per operation
98
+ response = await acm.add_tags_to_certificate(config_overrides={"retry_max_attempts": 5})
99
+
100
+ # Disable retries for this call
101
+ response = await acm.add_tags_to_certificate(config_overrides={"retry_max_attempts": 1})
102
+ ```
@@ -0,0 +1,75 @@
1
+ # Getting Started
2
+
3
+ ## Installation
4
+
5
+ ```
6
+ pip install capo-acm
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```python
12
+ from capo_acm import AsyncACMClient
13
+
14
+
15
+ async def main():
16
+ async with AsyncACMClient() as acm:
17
+ # Example: call the add_tags_to_certificate operation
18
+ response = await acm.add_tags_to_certificate()
19
+ print(response)
20
+ ```
21
+
22
+ ## Pagination
23
+
24
+ Some operations in this SDK support pagination. If the operation supports pagination it will have an `iter_` prefixed method that returns an async iterator.
25
+
26
+ ```python
27
+ from capo_acm import AsyncACMClient
28
+
29
+
30
+ async def main():
31
+ async with AsyncACMClient() as acm:
32
+ # Example: paginate over list_certificates
33
+ async for item in acm.iter_list_certificates():
34
+ print(item)
35
+ ```
36
+
37
+ ## Error Handling
38
+
39
+ The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
40
+
41
+ ```python
42
+ from capo_acm import AsyncACMClient
43
+ from capo_acm.error import InvalidArnException
44
+
45
+
46
+ async def main():
47
+ async with AsyncACMClient() as acm:
48
+ try:
49
+ await acm.add_tags_to_certificate()
50
+ except InvalidArnException as e:
51
+ print(f"Error: {e}")
52
+ print(e.data) # additional error data
53
+ ```
54
+
55
+ ## Retrying
56
+
57
+ The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their `is_retryable` and `is_throttling_error` attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the `@retryable` trait, are raised immediately without further attempts.
58
+
59
+ The number of attempts defaults to 3 and can be changed at the client level via `retry_max_attempts`, or per call via `config_overrides`.
60
+
61
+ ```python
62
+ from capo_acm import AsyncACMClient
63
+
64
+
65
+ async def main():
66
+ async with AsyncACMClient() as acm:
67
+ # Default: 3 attempts for every operation
68
+ response = await acm.add_tags_to_certificate()
69
+
70
+ # Override per operation
71
+ response = await acm.add_tags_to_certificate(config_overrides={"retry_max_attempts": 5})
72
+
73
+ # Disable retries for this call
74
+ response = await acm.add_tags_to_certificate(config_overrides={"retry_max_attempts": 1})
75
+ ```
@@ -0,0 +1,61 @@
1
+ [project]
2
+ name = "capo-acm"
3
+ version = "0.1.0"
4
+ description = "Python SDK for ACM."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ classifiers = [
8
+ "Development Status :: 4 - Beta",
9
+ "Intended Audience :: Developers",
10
+ "License :: OSI Approved :: MIT License",
11
+ "Operating System :: OS Independent",
12
+ "Programming Language :: Python :: 3",
13
+ "Programming Language :: Python :: 3.10",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
18
+ "Topic :: Software Development :: Code Generators",
19
+ "Typing :: Typed",
20
+ ]
21
+ dependencies = [
22
+ "jmespath>=1.0",
23
+ "zapros>=0.13.0",
24
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ # IAM Identity Center (SSO), assume-role and web-identity credentials providers
28
+ sso = [
29
+ "capo-sso>=0.2.0",
30
+ "capo-sso-oidc>=0.2.0",
31
+ "capo-sts>=0.3.0",
32
+ ]
33
+
34
+ [tool.pytest.ini_options]
35
+ pythonpath = ["src"]
36
+ testpaths = ["tests"]
37
+
38
+ [tool.ty.environment]
39
+ python-version = "3.14"
40
+ root = ["./src"]
41
+
42
+ [tool.ty.src]
43
+ include = ["src", "tests"]
44
+
45
+ [tool.ty.rules]
46
+ missing-typed-dict-key = "ignore"
47
+ unused-type-ignore-comment = "ignore"
48
+
49
+ [tool.ruff.lint]
50
+ select = ["E", "F", "I"]
51
+ ignore = ["E501", "E741"]
52
+
53
+ [dependency-groups]
54
+ dev = [
55
+ "inline-snapshot>=0.33.0",
56
+ # TODO: fix for 0.0.69
57
+ "ty==0.0.68",
58
+ "pytest>=9.0.3",
59
+ "ruff>=0.15.14",
60
+ "trio",
61
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,70 @@
1
+ from __future__ import annotations
2
+
3
+ from . import _iter as _iter
4
+ from . import _protocol as _protocol
5
+ from ._auth._identity import Credentials as Credentials
6
+ from ._auth._identity import Identity as Identity
7
+ from ._auth._providers import (
8
+ AssumeRoleCredentialsProvider as AssumeRoleCredentialsProvider,
9
+ )
10
+ from ._auth._providers import (
11
+ AssumeRoleError as AssumeRoleError,
12
+ )
13
+ from ._auth._providers import (
14
+ CachedProvider as CachedProvider,
15
+ )
16
+ from ._auth._providers import (
17
+ ChainedProvider as ChainedProvider,
18
+ )
19
+ from ._auth._providers import (
20
+ CredentialsProvider as CredentialsProvider,
21
+ )
22
+ from ._auth._providers import (
23
+ EnvCredentialsProvider as EnvCredentialsProvider,
24
+ )
25
+ from ._auth._providers import (
26
+ IdentityNotFound as IdentityNotFound,
27
+ )
28
+ from ._auth._providers import (
29
+ IdentityProvider as IdentityProvider,
30
+ )
31
+ from ._auth._providers import (
32
+ MissingDependencyError as MissingDependencyError,
33
+ )
34
+ from ._auth._providers import (
35
+ ProfileCredentialsProvider as ProfileCredentialsProvider,
36
+ )
37
+ from ._auth._providers import (
38
+ SsoCredentialsProvider as SsoCredentialsProvider,
39
+ )
40
+ from ._auth._providers import (
41
+ SSOError as SSOError,
42
+ )
43
+ from ._auth._providers import (
44
+ StaticAwsCredentialsProvider as StaticAwsCredentialsProvider,
45
+ )
46
+ from ._auth._providers import (
47
+ WebIdentityCredentialsProvider as WebIdentityCredentialsProvider,
48
+ )
49
+ from ._auth._signers import Signer as Signer
50
+ from ._auth._signers import SigV4Signer as SigV4Signer
51
+ from ._services._pipeline import (
52
+ AsyncOperationOptions as AsyncOperationOptions,
53
+ )
54
+ from ._services._pipeline import (
55
+ AsyncOperationRequest as AsyncOperationRequest,
56
+ )
57
+ from ._services._pipeline import (
58
+ AsyncOperationResponse as AsyncOperationResponse,
59
+ )
60
+ from ._services._pipeline import (
61
+ OperationOptions as OperationOptions,
62
+ )
63
+ from ._services._pipeline import (
64
+ OperationRequest as OperationRequest,
65
+ )
66
+ from ._services._pipeline import (
67
+ OperationResponse as OperationResponse,
68
+ )
69
+ from ._services.acm import ACMClient as ACMClient
70
+ from ._services.async_acm import AsyncACMClient as AsyncACMClient
@@ -0,0 +1,25 @@
1
+ from __future__ import annotations
2
+
3
+ import asyncio
4
+ from typing import TYPE_CHECKING
5
+
6
+ if TYPE_CHECKING:
7
+ import trio
8
+ else:
9
+ try:
10
+ import trio
11
+ except ImportError:
12
+ trio = None
13
+
14
+
15
+ def in_trio_run() -> bool:
16
+ if trio is None:
17
+ return False
18
+ return trio.lowlevel.in_trio_run()
19
+
20
+
21
+ async def anysleep(delay: float) -> None:
22
+ if in_trio_run():
23
+ await trio.sleep(delay)
24
+ else:
25
+ await asyncio.sleep(delay)
@@ -0,0 +1,16 @@
1
+ from __future__ import annotations
2
+
3
+ from datetime import datetime
4
+ from typing import TypedDict
5
+
6
+ from typing_extensions import NotRequired
7
+
8
+
9
+ class Identity(TypedDict):
10
+ expiration: NotRequired[datetime | None]
11
+
12
+
13
+ class Credentials(Identity):
14
+ access_key: str
15
+ secret_key: str
16
+ session_token: NotRequired[str | None]