capo-codeartifact 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 (294) hide show
  1. capo_codeartifact/__init__.py +72 -0
  2. capo_codeartifact/_async.py +25 -0
  3. capo_codeartifact/_auth/_identity.py +16 -0
  4. capo_codeartifact/_auth/_providers.py +886 -0
  5. capo_codeartifact/_auth/_signers.py +88 -0
  6. capo_codeartifact/_auth/_sigv4.py +434 -0
  7. capo_codeartifact/_auth/_zapros_handler.py +80 -0
  8. capo_codeartifact/_iter.py +113 -0
  9. capo_codeartifact/_operations/code_artifact_control_plane_service/associate_external_connection.py +181 -0
  10. capo_codeartifact/_operations/code_artifact_control_plane_service/copy_package_versions.py +202 -0
  11. capo_codeartifact/_operations/code_artifact_control_plane_service/create_domain.py +182 -0
  12. capo_codeartifact/_operations/code_artifact_control_plane_service/create_package_group.py +182 -0
  13. capo_codeartifact/_operations/code_artifact_control_plane_service/create_repository.py +189 -0
  14. capo_codeartifact/_operations/code_artifact_control_plane_service/delete_domain.py +169 -0
  15. capo_codeartifact/_operations/code_artifact_control_plane_service/delete_domain_permissions_policy.py +174 -0
  16. capo_codeartifact/_operations/code_artifact_control_plane_service/delete_package.py +190 -0
  17. capo_codeartifact/_operations/code_artifact_control_plane_service/delete_package_group.py +179 -0
  18. capo_codeartifact/_operations/code_artifact_control_plane_service/delete_package_versions.py +195 -0
  19. capo_codeartifact/_operations/code_artifact_control_plane_service/delete_repository.py +178 -0
  20. capo_codeartifact/_operations/code_artifact_control_plane_service/delete_repository_permissions_policy.py +176 -0
  21. capo_codeartifact/_operations/code_artifact_control_plane_service/describe_domain.py +169 -0
  22. capo_codeartifact/_operations/code_artifact_control_plane_service/describe_package.py +187 -0
  23. capo_codeartifact/_operations/code_artifact_control_plane_service/describe_package_group.py +169 -0
  24. capo_codeartifact/_operations/code_artifact_control_plane_service/describe_package_version.py +194 -0
  25. capo_codeartifact/_operations/code_artifact_control_plane_service/describe_repository.py +173 -0
  26. capo_codeartifact/_operations/code_artifact_control_plane_service/disassociate_external_connection.py +181 -0
  27. capo_codeartifact/_operations/code_artifact_control_plane_service/dispose_package_versions.py +200 -0
  28. capo_codeartifact/_operations/code_artifact_control_plane_service/get_associated_package_group.py +177 -0
  29. capo_codeartifact/_operations/code_artifact_control_plane_service/get_authorization_token.py +169 -0
  30. capo_codeartifact/_operations/code_artifact_control_plane_service/get_domain_permissions_policy.py +167 -0
  31. capo_codeartifact/_operations/code_artifact_control_plane_service/get_package_version_asset.py +208 -0
  32. capo_codeartifact/_operations/code_artifact_control_plane_service/get_package_version_readme.py +184 -0
  33. capo_codeartifact/_operations/code_artifact_control_plane_service/get_repository_endpoint.py +189 -0
  34. capo_codeartifact/_operations/code_artifact_control_plane_service/get_repository_permissions_policy.py +169 -0
  35. capo_codeartifact/_operations/code_artifact_control_plane_service/list_allowed_repositories_for_group.py +190 -0
  36. capo_codeartifact/_operations/code_artifact_control_plane_service/list_associated_packages.py +174 -0
  37. capo_codeartifact/_operations/code_artifact_control_plane_service/list_domains.py +164 -0
  38. capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_groups.py +177 -0
  39. capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_version_assets.py +189 -0
  40. capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_version_dependencies.py +187 -0
  41. capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_versions.py +220 -0
  42. capo_codeartifact/_operations/code_artifact_control_plane_service/list_packages.py +209 -0
  43. capo_codeartifact/_operations/code_artifact_control_plane_service/list_repositories.py +168 -0
  44. capo_codeartifact/_operations/code_artifact_control_plane_service/list_repositories_in_domain.py +175 -0
  45. capo_codeartifact/_operations/code_artifact_control_plane_service/list_sub_package_groups.py +173 -0
  46. capo_codeartifact/_operations/code_artifact_control_plane_service/list_tags_for_resource.py +160 -0
  47. capo_codeartifact/_operations/code_artifact_control_plane_service/publish_package_version.py +209 -0
  48. capo_codeartifact/_operations/code_artifact_control_plane_service/put_domain_permissions_policy.py +179 -0
  49. capo_codeartifact/_operations/code_artifact_control_plane_service/put_package_origin_configuration.py +190 -0
  50. capo_codeartifact/_operations/code_artifact_control_plane_service/put_repository_permissions_policy.py +185 -0
  51. capo_codeartifact/_operations/code_artifact_control_plane_service/tag_resource.py +163 -0
  52. capo_codeartifact/_operations/code_artifact_control_plane_service/untag_resource.py +158 -0
  53. capo_codeartifact/_operations/code_artifact_control_plane_service/update_package_group.py +176 -0
  54. capo_codeartifact/_operations/code_artifact_control_plane_service/update_package_group_origin_configuration.py +183 -0
  55. capo_codeartifact/_operations/code_artifact_control_plane_service/update_package_versions_status.py +198 -0
  56. capo_codeartifact/_operations/code_artifact_control_plane_service/update_repository.py +188 -0
  57. capo_codeartifact/_pagination.py +21 -0
  58. capo_codeartifact/_protocol/__init__.py +1 -0
  59. capo_codeartifact/_protocol/errors.py +93 -0
  60. capo_codeartifact/_protocol/eventstream.py +238 -0
  61. capo_codeartifact/_protocol/serialize.py +47 -0
  62. capo_codeartifact/_protocol/xml.py +33 -0
  63. capo_codeartifact/_rule_engine/__init__.py +0 -0
  64. capo_codeartifact/_rule_engine/_aws_partition.py +160 -0
  65. capo_codeartifact/_rule_engine/_endpoint_rule_set.py +138 -0
  66. capo_codeartifact/_rule_engine/_endpoint_runtime.py +389 -0
  67. capo_codeartifact/_services/_aws_config.py +160 -0
  68. capo_codeartifact/_services/_pipeline.py +198 -0
  69. capo_codeartifact/_services/async_codeartifact.py +3870 -0
  70. capo_codeartifact/_services/codeartifact.py +3822 -0
  71. capo_codeartifact/errors/__init__.py +36 -0
  72. capo_codeartifact/errors/_base.py +94 -0
  73. capo_codeartifact/errors/access_denied_exception.py +52 -0
  74. capo_codeartifact/errors/conflict_exception.py +71 -0
  75. capo_codeartifact/errors/internal_server_exception.py +52 -0
  76. capo_codeartifact/errors/resource_not_found_exception.py +73 -0
  77. capo_codeartifact/errors/service_quota_exceeded_exception.py +75 -0
  78. capo_codeartifact/errors/throttling_exception.py +55 -0
  79. capo_codeartifact/errors/validation_exception.py +71 -0
  80. capo_codeartifact/py.typed +0 -0
  81. capo_codeartifact/types/_prelude/blob.py +12 -0
  82. capo_codeartifact/types/_prelude/timestamp.py +17 -0
  83. capo_codeartifact/types/account_id.py +5 -0
  84. capo_codeartifact/types/allow_publish.py +17 -0
  85. capo_codeartifact/types/allow_upstream.py +17 -0
  86. capo_codeartifact/types/arn.py +5 -0
  87. capo_codeartifact/types/asset.py +7 -0
  88. capo_codeartifact/types/asset_hashes.py +33 -0
  89. capo_codeartifact/types/asset_name.py +5 -0
  90. capo_codeartifact/types/asset_summary.py +53 -0
  91. capo_codeartifact/types/asset_summary_list.py +29 -0
  92. capo_codeartifact/types/associate_external_connection_request.py +35 -0
  93. capo_codeartifact/types/associate_external_connection_result.py +42 -0
  94. capo_codeartifact/types/associated_package.py +71 -0
  95. capo_codeartifact/types/associated_package_list.py +31 -0
  96. capo_codeartifact/types/authorization_token_duration_seconds.py +5 -0
  97. capo_codeartifact/types/boolean_optional.py +5 -0
  98. capo_codeartifact/types/copy_package_versions_request.py +96 -0
  99. capo_codeartifact/types/copy_package_versions_result.py +63 -0
  100. capo_codeartifact/types/create_domain_request.py +42 -0
  101. capo_codeartifact/types/create_domain_result.py +36 -0
  102. capo_codeartifact/types/create_package_group_request.py +64 -0
  103. capo_codeartifact/types/create_package_group_result.py +42 -0
  104. capo_codeartifact/types/create_repository_request.py +69 -0
  105. capo_codeartifact/types/create_repository_result.py +42 -0
  106. capo_codeartifact/types/delete_domain_permissions_policy_request.py +32 -0
  107. capo_codeartifact/types/delete_domain_permissions_policy_result.py +36 -0
  108. capo_codeartifact/types/delete_domain_request.py +27 -0
  109. capo_codeartifact/types/delete_domain_result.py +36 -0
  110. capo_codeartifact/types/delete_package_group_request.py +30 -0
  111. capo_codeartifact/types/delete_package_group_result.py +42 -0
  112. capo_codeartifact/types/delete_package_request.py +39 -0
  113. capo_codeartifact/types/delete_package_result.py +39 -0
  114. capo_codeartifact/types/delete_package_versions_request.py +78 -0
  115. capo_codeartifact/types/delete_package_versions_result.py +63 -0
  116. capo_codeartifact/types/delete_repository_permissions_policy_request.py +35 -0
  117. capo_codeartifact/types/delete_repository_permissions_policy_result.py +36 -0
  118. capo_codeartifact/types/delete_repository_request.py +30 -0
  119. capo_codeartifact/types/delete_repository_result.py +42 -0
  120. capo_codeartifact/types/describe_domain_request.py +27 -0
  121. capo_codeartifact/types/describe_domain_result.py +35 -0
  122. capo_codeartifact/types/describe_package_group_request.py +30 -0
  123. capo_codeartifact/types/describe_package_group_result.py +42 -0
  124. capo_codeartifact/types/describe_package_request.py +39 -0
  125. capo_codeartifact/types/describe_package_result.py +39 -0
  126. capo_codeartifact/types/describe_package_version_request.py +42 -0
  127. capo_codeartifact/types/describe_package_version_result.py +47 -0
  128. capo_codeartifact/types/describe_repository_request.py +30 -0
  129. capo_codeartifact/types/describe_repository_result.py +42 -0
  130. capo_codeartifact/types/description.py +5 -0
  131. capo_codeartifact/types/disassociate_external_connection_request.py +35 -0
  132. capo_codeartifact/types/disassociate_external_connection_result.py +42 -0
  133. capo_codeartifact/types/dispose_package_versions_request.py +99 -0
  134. capo_codeartifact/types/dispose_package_versions_result.py +63 -0
  135. capo_codeartifact/types/domain_description.py +100 -0
  136. capo_codeartifact/types/domain_entry_point.py +39 -0
  137. capo_codeartifact/types/domain_name.py +5 -0
  138. capo_codeartifact/types/domain_status.py +17 -0
  139. capo_codeartifact/types/domain_summary.py +78 -0
  140. capo_codeartifact/types/domain_summary_list.py +31 -0
  141. capo_codeartifact/types/endpoint_type.py +17 -0
  142. capo_codeartifact/types/error_message.py +5 -0
  143. capo_codeartifact/types/external_connection_name.py +5 -0
  144. capo_codeartifact/types/external_connection_status.py +14 -0
  145. capo_codeartifact/types/get_associated_package_group_request.py +36 -0
  146. capo_codeartifact/types/get_associated_package_group_result.py +63 -0
  147. capo_codeartifact/types/get_authorization_token_request.py +32 -0
  148. capo_codeartifact/types/get_authorization_token_result.py +43 -0
  149. capo_codeartifact/types/get_domain_permissions_policy_request.py +27 -0
  150. capo_codeartifact/types/get_domain_permissions_policy_result.py +36 -0
  151. capo_codeartifact/types/get_package_version_asset_request.py +50 -0
  152. capo_codeartifact/types/get_package_version_asset_result.py +26 -0
  153. capo_codeartifact/types/get_package_version_readme_request.py +42 -0
  154. capo_codeartifact/types/get_package_version_readme_result.py +73 -0
  155. capo_codeartifact/types/get_repository_endpoint_request.py +36 -0
  156. capo_codeartifact/types/get_repository_endpoint_result.py +28 -0
  157. capo_codeartifact/types/get_repository_permissions_policy_request.py +30 -0
  158. capo_codeartifact/types/get_repository_permissions_policy_result.py +36 -0
  159. capo_codeartifact/types/hash_algorithm.py +19 -0
  160. capo_codeartifact/types/hash_value.py +5 -0
  161. capo_codeartifact/types/integer.py +5 -0
  162. capo_codeartifact/types/license_info.py +34 -0
  163. capo_codeartifact/types/license_info_list.py +29 -0
  164. capo_codeartifact/types/list_allowed_repositories_for_group_max_results.py +5 -0
  165. capo_codeartifact/types/list_allowed_repositories_for_group_request.py +41 -0
  166. capo_codeartifact/types/list_allowed_repositories_for_group_result.py +49 -0
  167. capo_codeartifact/types/list_associated_packages_request.py +41 -0
  168. capo_codeartifact/types/list_associated_packages_result.py +49 -0
  169. capo_codeartifact/types/list_domains_max_results.py +5 -0
  170. capo_codeartifact/types/list_domains_request.py +37 -0
  171. capo_codeartifact/types/list_domains_result.py +45 -0
  172. capo_codeartifact/types/list_package_groups_max_results.py +5 -0
  173. capo_codeartifact/types/list_package_groups_request.py +40 -0
  174. capo_codeartifact/types/list_package_groups_result.py +49 -0
  175. capo_codeartifact/types/list_package_version_assets_max_results.py +5 -0
  176. capo_codeartifact/types/list_package_version_assets_request.py +50 -0
  177. capo_codeartifact/types/list_package_version_assets_result.py +88 -0
  178. capo_codeartifact/types/list_package_version_dependencies_request.py +45 -0
  179. capo_codeartifact/types/list_package_version_dependencies_result.py +94 -0
  180. capo_codeartifact/types/list_package_versions_max_results.py +5 -0
  181. capo_codeartifact/types/list_package_versions_request.py +62 -0
  182. capo_codeartifact/types/list_package_versions_result.py +87 -0
  183. capo_codeartifact/types/list_packages_max_results.py +5 -0
  184. capo_codeartifact/types/list_packages_request.py +53 -0
  185. capo_codeartifact/types/list_packages_result.py +45 -0
  186. capo_codeartifact/types/list_repositories_in_domain_max_results.py +5 -0
  187. capo_codeartifact/types/list_repositories_in_domain_request.py +42 -0
  188. capo_codeartifact/types/list_repositories_in_domain_result.py +49 -0
  189. capo_codeartifact/types/list_repositories_max_results.py +5 -0
  190. capo_codeartifact/types/list_repositories_request.py +34 -0
  191. capo_codeartifact/types/list_repositories_result.py +49 -0
  192. capo_codeartifact/types/list_sub_package_groups_request.py +38 -0
  193. capo_codeartifact/types/list_sub_package_groups_result.py +49 -0
  194. capo_codeartifact/types/list_tags_for_resource_request.py +24 -0
  195. capo_codeartifact/types/list_tags_for_resource_result.py +32 -0
  196. capo_codeartifact/types/long.py +5 -0
  197. capo_codeartifact/types/long_optional.py +5 -0
  198. capo_codeartifact/types/origin_restrictions.py +48 -0
  199. capo_codeartifact/types/package_dependency.py +48 -0
  200. capo_codeartifact/types/package_dependency_list.py +31 -0
  201. capo_codeartifact/types/package_description.py +71 -0
  202. capo_codeartifact/types/package_format.py +23 -0
  203. capo_codeartifact/types/package_group_allowed_repository.py +51 -0
  204. capo_codeartifact/types/package_group_allowed_repository_list.py +39 -0
  205. capo_codeartifact/types/package_group_allowed_repository_update.py +44 -0
  206. capo_codeartifact/types/package_group_allowed_repository_update_type.py +17 -0
  207. capo_codeartifact/types/package_group_allowed_repository_updates.py +48 -0
  208. capo_codeartifact/types/package_group_association_type.py +17 -0
  209. capo_codeartifact/types/package_group_contact_info.py +5 -0
  210. capo_codeartifact/types/package_group_description.py +122 -0
  211. capo_codeartifact/types/package_group_origin_configuration.py +42 -0
  212. capo_codeartifact/types/package_group_origin_restriction.py +92 -0
  213. capo_codeartifact/types/package_group_origin_restriction_mode.py +19 -0
  214. capo_codeartifact/types/package_group_origin_restriction_type.py +18 -0
  215. capo_codeartifact/types/package_group_origin_restrictions.py +48 -0
  216. capo_codeartifact/types/package_group_pattern.py +5 -0
  217. capo_codeartifact/types/package_group_pattern_prefix.py +5 -0
  218. capo_codeartifact/types/package_group_reference.py +37 -0
  219. capo_codeartifact/types/package_group_summary.py +122 -0
  220. capo_codeartifact/types/package_group_summary_list.py +31 -0
  221. capo_codeartifact/types/package_name.py +5 -0
  222. capo_codeartifact/types/package_namespace.py +5 -0
  223. capo_codeartifact/types/package_origin_configuration.py +42 -0
  224. capo_codeartifact/types/package_origin_restrictions.py +55 -0
  225. capo_codeartifact/types/package_summary.py +71 -0
  226. capo_codeartifact/types/package_summary_list.py +31 -0
  227. capo_codeartifact/types/package_version.py +5 -0
  228. capo_codeartifact/types/package_version_description.py +156 -0
  229. capo_codeartifact/types/package_version_error.py +49 -0
  230. capo_codeartifact/types/package_version_error_code.py +21 -0
  231. capo_codeartifact/types/package_version_error_map.py +33 -0
  232. capo_codeartifact/types/package_version_list.py +19 -0
  233. capo_codeartifact/types/package_version_origin.py +63 -0
  234. capo_codeartifact/types/package_version_origin_type.py +18 -0
  235. capo_codeartifact/types/package_version_revision.py +5 -0
  236. capo_codeartifact/types/package_version_revision_map.py +29 -0
  237. capo_codeartifact/types/package_version_sort_type.py +14 -0
  238. capo_codeartifact/types/package_version_status.py +21 -0
  239. capo_codeartifact/types/package_version_summary.py +73 -0
  240. capo_codeartifact/types/package_version_summary_list.py +33 -0
  241. capo_codeartifact/types/pagination_token.py +5 -0
  242. capo_codeartifact/types/policy_document.py +5 -0
  243. capo_codeartifact/types/policy_revision.py +5 -0
  244. capo_codeartifact/types/publish_package_version_request.py +43 -0
  245. capo_codeartifact/types/publish_package_version_result.py +98 -0
  246. capo_codeartifact/types/put_domain_permissions_policy_request.py +57 -0
  247. capo_codeartifact/types/put_domain_permissions_policy_result.py +36 -0
  248. capo_codeartifact/types/put_package_origin_configuration_request.py +65 -0
  249. capo_codeartifact/types/put_package_origin_configuration_result.py +42 -0
  250. capo_codeartifact/types/put_repository_permissions_policy_request.py +51 -0
  251. capo_codeartifact/types/put_repository_permissions_policy_result.py +36 -0
  252. capo_codeartifact/types/repository_description.py +119 -0
  253. capo_codeartifact/types/repository_external_connection_info.py +66 -0
  254. capo_codeartifact/types/repository_external_connection_info_list.py +39 -0
  255. capo_codeartifact/types/repository_name.py +5 -0
  256. capo_codeartifact/types/repository_name_list.py +19 -0
  257. capo_codeartifact/types/repository_summary.py +77 -0
  258. capo_codeartifact/types/repository_summary_list.py +31 -0
  259. capo_codeartifact/types/resource_policy.py +42 -0
  260. capo_codeartifact/types/resource_type.py +20 -0
  261. capo_codeartifact/types/retry_after_seconds.py +5 -0
  262. capo_codeartifact/types/sha256.py +5 -0
  263. capo_codeartifact/types/string.py +5 -0
  264. capo_codeartifact/types/string255.py +5 -0
  265. capo_codeartifact/types/successful_package_version_info.py +45 -0
  266. capo_codeartifact/types/successful_package_version_info_map.py +41 -0
  267. capo_codeartifact/types/tag.py +39 -0
  268. capo_codeartifact/types/tag_key.py +5 -0
  269. capo_codeartifact/types/tag_key_list.py +17 -0
  270. capo_codeartifact/types/tag_list.py +29 -0
  271. capo_codeartifact/types/tag_resource_request.py +38 -0
  272. capo_codeartifact/types/tag_resource_result.py +18 -0
  273. capo_codeartifact/types/tag_value.py +5 -0
  274. capo_codeartifact/types/timestamp.py +20 -0
  275. capo_codeartifact/types/untag_resource_request.py +42 -0
  276. capo_codeartifact/types/untag_resource_result.py +18 -0
  277. capo_codeartifact/types/update_package_group_origin_configuration_request.py +92 -0
  278. capo_codeartifact/types/update_package_group_origin_configuration_result.py +63 -0
  279. capo_codeartifact/types/update_package_group_request.py +53 -0
  280. capo_codeartifact/types/update_package_group_result.py +42 -0
  281. capo_codeartifact/types/update_package_versions_status_request.py +120 -0
  282. capo_codeartifact/types/update_package_versions_status_result.py +63 -0
  283. capo_codeartifact/types/update_repository_request.py +58 -0
  284. capo_codeartifact/types/update_repository_result.py +42 -0
  285. capo_codeartifact/types/upstream_repository.py +31 -0
  286. capo_codeartifact/types/upstream_repository_info.py +30 -0
  287. capo_codeartifact/types/upstream_repository_info_list.py +35 -0
  288. capo_codeartifact/types/upstream_repository_list.py +31 -0
  289. capo_codeartifact/types/validation_exception_reason.py +20 -0
  290. capo_codeartifact-0.1.0.dist-info/METADATA +139 -0
  291. capo_codeartifact-0.1.0.dist-info/RECORD +294 -0
  292. capo_codeartifact-0.1.0.dist-info/WHEEL +5 -0
  293. capo_codeartifact-0.1.0.dist-info/licenses/LICENSE +21 -0
  294. capo_codeartifact-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3870 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeartifact#CodeArtifactControlPlaneService``."""
2
+
3
+ import warnings
4
+ from collections.abc import AsyncGenerator, AsyncIterator
5
+ from contextlib import asynccontextmanager
6
+ from typing import TYPE_CHECKING, Any, Iterable, Optional
7
+
8
+ from typing_extensions import Self, TypedDict
9
+ from zapros import AsyncBaseHandler, AsyncClient
10
+
11
+ import capo_codeartifact._auth._signers
12
+ import capo_codeartifact._auth._sigv4
13
+ from capo_codeartifact._auth._identity import Credentials
14
+ from capo_codeartifact._auth._providers import (
15
+ CredentialsProvider,
16
+ IdentityProvider,
17
+ StaticAwsCredentialsProvider,
18
+ default_aws_credentials_chain,
19
+ )
20
+ from capo_codeartifact._auth._zapros_handler import AuthMiddleware
21
+ from capo_codeartifact._iter import ensure_async_iterator
22
+ from capo_codeartifact._pagination import resolve_path as _resolve_path
23
+ from capo_codeartifact._services._aws_config import aaws_config
24
+ from capo_codeartifact._services._pipeline import (
25
+ AsyncInterceptor,
26
+ AsyncOperationOptions,
27
+ AsyncOperationRequest,
28
+ AsyncOperationResponse,
29
+ aexecute_pipeline,
30
+ aretry,
31
+ )
32
+
33
+ if TYPE_CHECKING:
34
+ import capo_codeartifact.types.account_id
35
+ import capo_codeartifact.types.allow_publish
36
+ import capo_codeartifact.types.allow_upstream
37
+ import capo_codeartifact.types.arn
38
+ import capo_codeartifact.types.asset
39
+ import capo_codeartifact.types.asset_name
40
+ import capo_codeartifact.types.asset_summary
41
+ import capo_codeartifact.types.associate_external_connection_request
42
+ import capo_codeartifact.types.associate_external_connection_result
43
+ import capo_codeartifact.types.associated_package
44
+ import capo_codeartifact.types.authorization_token_duration_seconds
45
+ import capo_codeartifact.types.boolean_optional
46
+ import capo_codeartifact.types.copy_package_versions_request
47
+ import capo_codeartifact.types.copy_package_versions_result
48
+ import capo_codeartifact.types.create_domain_request
49
+ import capo_codeartifact.types.create_domain_result
50
+ import capo_codeartifact.types.create_package_group_request
51
+ import capo_codeartifact.types.create_package_group_result
52
+ import capo_codeartifact.types.create_repository_request
53
+ import capo_codeartifact.types.create_repository_result
54
+ import capo_codeartifact.types.delete_domain_permissions_policy_request
55
+ import capo_codeartifact.types.delete_domain_permissions_policy_result
56
+ import capo_codeartifact.types.delete_domain_request
57
+ import capo_codeartifact.types.delete_domain_result
58
+ import capo_codeartifact.types.delete_package_group_request
59
+ import capo_codeartifact.types.delete_package_group_result
60
+ import capo_codeartifact.types.delete_package_request
61
+ import capo_codeartifact.types.delete_package_result
62
+ import capo_codeartifact.types.delete_package_versions_request
63
+ import capo_codeartifact.types.delete_package_versions_result
64
+ import capo_codeartifact.types.delete_repository_permissions_policy_request
65
+ import capo_codeartifact.types.delete_repository_permissions_policy_result
66
+ import capo_codeartifact.types.delete_repository_request
67
+ import capo_codeartifact.types.delete_repository_result
68
+ import capo_codeartifact.types.describe_domain_request
69
+ import capo_codeartifact.types.describe_domain_result
70
+ import capo_codeartifact.types.describe_package_group_request
71
+ import capo_codeartifact.types.describe_package_group_result
72
+ import capo_codeartifact.types.describe_package_request
73
+ import capo_codeartifact.types.describe_package_result
74
+ import capo_codeartifact.types.describe_package_version_request
75
+ import capo_codeartifact.types.describe_package_version_result
76
+ import capo_codeartifact.types.describe_repository_request
77
+ import capo_codeartifact.types.describe_repository_result
78
+ import capo_codeartifact.types.description
79
+ import capo_codeartifact.types.disassociate_external_connection_request
80
+ import capo_codeartifact.types.disassociate_external_connection_result
81
+ import capo_codeartifact.types.dispose_package_versions_request
82
+ import capo_codeartifact.types.dispose_package_versions_result
83
+ import capo_codeartifact.types.domain_name
84
+ import capo_codeartifact.types.domain_summary
85
+ import capo_codeartifact.types.endpoint_type
86
+ import capo_codeartifact.types.external_connection_name
87
+ import capo_codeartifact.types.get_associated_package_group_request
88
+ import capo_codeartifact.types.get_associated_package_group_result
89
+ import capo_codeartifact.types.get_authorization_token_request
90
+ import capo_codeartifact.types.get_authorization_token_result
91
+ import capo_codeartifact.types.get_domain_permissions_policy_request
92
+ import capo_codeartifact.types.get_domain_permissions_policy_result
93
+ import capo_codeartifact.types.get_package_version_asset_request
94
+ import capo_codeartifact.types.get_package_version_asset_result
95
+ import capo_codeartifact.types.get_package_version_readme_request
96
+ import capo_codeartifact.types.get_package_version_readme_result
97
+ import capo_codeartifact.types.get_repository_endpoint_request
98
+ import capo_codeartifact.types.get_repository_endpoint_result
99
+ import capo_codeartifact.types.get_repository_permissions_policy_request
100
+ import capo_codeartifact.types.get_repository_permissions_policy_result
101
+ import capo_codeartifact.types.list_allowed_repositories_for_group_max_results
102
+ import capo_codeartifact.types.list_allowed_repositories_for_group_request
103
+ import capo_codeartifact.types.list_allowed_repositories_for_group_result
104
+ import capo_codeartifact.types.list_associated_packages_request
105
+ import capo_codeartifact.types.list_associated_packages_result
106
+ import capo_codeartifact.types.list_domains_max_results
107
+ import capo_codeartifact.types.list_domains_request
108
+ import capo_codeartifact.types.list_domains_result
109
+ import capo_codeartifact.types.list_package_groups_max_results
110
+ import capo_codeartifact.types.list_package_groups_request
111
+ import capo_codeartifact.types.list_package_groups_result
112
+ import capo_codeartifact.types.list_package_version_assets_max_results
113
+ import capo_codeartifact.types.list_package_version_assets_request
114
+ import capo_codeartifact.types.list_package_version_assets_result
115
+ import capo_codeartifact.types.list_package_version_dependencies_request
116
+ import capo_codeartifact.types.list_package_version_dependencies_result
117
+ import capo_codeartifact.types.list_package_versions_max_results
118
+ import capo_codeartifact.types.list_package_versions_request
119
+ import capo_codeartifact.types.list_package_versions_result
120
+ import capo_codeartifact.types.list_packages_max_results
121
+ import capo_codeartifact.types.list_packages_request
122
+ import capo_codeartifact.types.list_packages_result
123
+ import capo_codeartifact.types.list_repositories_in_domain_max_results
124
+ import capo_codeartifact.types.list_repositories_in_domain_request
125
+ import capo_codeartifact.types.list_repositories_in_domain_result
126
+ import capo_codeartifact.types.list_repositories_max_results
127
+ import capo_codeartifact.types.list_repositories_request
128
+ import capo_codeartifact.types.list_repositories_result
129
+ import capo_codeartifact.types.list_sub_package_groups_request
130
+ import capo_codeartifact.types.list_sub_package_groups_result
131
+ import capo_codeartifact.types.list_tags_for_resource_request
132
+ import capo_codeartifact.types.list_tags_for_resource_result
133
+ import capo_codeartifact.types.origin_restrictions
134
+ import capo_codeartifact.types.package_format
135
+ import capo_codeartifact.types.package_group_allowed_repository_list
136
+ import capo_codeartifact.types.package_group_contact_info
137
+ import capo_codeartifact.types.package_group_origin_restriction_type
138
+ import capo_codeartifact.types.package_group_pattern
139
+ import capo_codeartifact.types.package_group_pattern_prefix
140
+ import capo_codeartifact.types.package_group_summary
141
+ import capo_codeartifact.types.package_name
142
+ import capo_codeartifact.types.package_namespace
143
+ import capo_codeartifact.types.package_origin_restrictions
144
+ import capo_codeartifact.types.package_summary
145
+ import capo_codeartifact.types.package_version
146
+ import capo_codeartifact.types.package_version_list
147
+ import capo_codeartifact.types.package_version_origin_type
148
+ import capo_codeartifact.types.package_version_revision
149
+ import capo_codeartifact.types.package_version_revision_map
150
+ import capo_codeartifact.types.package_version_sort_type
151
+ import capo_codeartifact.types.package_version_status
152
+ import capo_codeartifact.types.package_version_summary
153
+ import capo_codeartifact.types.pagination_token
154
+ import capo_codeartifact.types.policy_document
155
+ import capo_codeartifact.types.policy_revision
156
+ import capo_codeartifact.types.publish_package_version_request
157
+ import capo_codeartifact.types.publish_package_version_result
158
+ import capo_codeartifact.types.put_domain_permissions_policy_request
159
+ import capo_codeartifact.types.put_domain_permissions_policy_result
160
+ import capo_codeartifact.types.put_package_origin_configuration_request
161
+ import capo_codeartifact.types.put_package_origin_configuration_result
162
+ import capo_codeartifact.types.put_repository_permissions_policy_request
163
+ import capo_codeartifact.types.put_repository_permissions_policy_result
164
+ import capo_codeartifact.types.repository_name
165
+ import capo_codeartifact.types.repository_summary
166
+ import capo_codeartifact.types.sha256
167
+ import capo_codeartifact.types.string
168
+ import capo_codeartifact.types.tag_key_list
169
+ import capo_codeartifact.types.tag_list
170
+ import capo_codeartifact.types.tag_resource_request
171
+ import capo_codeartifact.types.tag_resource_result
172
+ import capo_codeartifact.types.untag_resource_request
173
+ import capo_codeartifact.types.untag_resource_result
174
+ import capo_codeartifact.types.update_package_group_origin_configuration_request
175
+ import capo_codeartifact.types.update_package_group_origin_configuration_result
176
+ import capo_codeartifact.types.update_package_group_request
177
+ import capo_codeartifact.types.update_package_group_result
178
+ import capo_codeartifact.types.update_package_versions_status_request
179
+ import capo_codeartifact.types.update_package_versions_status_result
180
+ import capo_codeartifact.types.update_repository_request
181
+ import capo_codeartifact.types.update_repository_result
182
+ import capo_codeartifact.types.upstream_repository_list
183
+
184
+
185
+ class AsynccodeartifactClientConfig(TypedDict, total=False, closed=True):
186
+ operation_interceptors: Iterable[AsyncInterceptor[Any, Any]]
187
+ retry_max_attempts: int | None
188
+ region: str | None
189
+ use_dual_stack: bool | None
190
+ use_fips: bool | None
191
+ endpoint: str | None
192
+ credentials_provider: IdentityProvider[Credentials] | None
193
+
194
+
195
+ class AsynccodeartifactClient:
196
+ """A client for the ``codeartifact`` service.
197
+
198
+ Args:
199
+ http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
200
+ operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
201
+ retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
202
+ region: The value of the ``AWS::Region`` endpoint parameter.
203
+ use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
204
+ use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
205
+ endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
206
+ credentials: AWS credentials for request signing.
207
+ credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
208
+ """
209
+
210
+ def __init__(
211
+ self,
212
+ http_handler: AsyncBaseHandler | None = None,
213
+ operation_interceptors: Iterable[AsyncInterceptor[Any, Any]] | None = None,
214
+ retry_max_attempts: int | None = None,
215
+ region: str | None = None,
216
+ use_dual_stack: bool | None = None,
217
+ use_fips: bool | None = None,
218
+ endpoint: str | None = None,
219
+ credentials: Credentials | None = None,
220
+ credentials_provider: CredentialsProvider | None = None,
221
+ ):
222
+ self._client = AsyncClient(http_handler).wrap_with_middleware(
223
+ lambda next: AuthMiddleware(next)
224
+ )
225
+ if credentials is not None and credentials_provider is not None:
226
+ warnings.warn(
227
+ "Both credentials and credentials_provider given; provider takes precedence"
228
+ )
229
+ resolved_credentials_provider: IdentityProvider[Credentials] | None = (
230
+ credentials_provider
231
+ )
232
+ if resolved_credentials_provider is None and credentials is not None:
233
+ resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
234
+ if resolved_credentials_provider is None and credentials is None:
235
+ resolved_credentials_provider = default_aws_credentials_chain(
236
+ AsyncClient(http_handler)
237
+ )
238
+ self._config = AsynccodeartifactClientConfig(
239
+ {
240
+ "operation_interceptors": operation_interceptors or [],
241
+ "retry_max_attempts": retry_max_attempts,
242
+ "region": region,
243
+ "use_dual_stack": use_dual_stack,
244
+ "use_fips": use_fips,
245
+ "endpoint": endpoint,
246
+ "credentials_provider": resolved_credentials_provider,
247
+ }
248
+ )
249
+
250
+ def operation_options(
251
+ self, config_overrides: Optional[AsynccodeartifactClientConfig] = None
252
+ ) -> tuple[Iterable[AsyncInterceptor[Any, Any]], AsyncOperationOptions]:
253
+ overrides: AsynccodeartifactClientConfig = config_overrides or {}
254
+ interceptors_: list[AsyncInterceptor[Any, Any]] = [
255
+ *overrides.get(
256
+ "operation_interceptors", self._config.get("operation_interceptors", [])
257
+ ),
258
+ aaws_config(),
259
+ aretry(),
260
+ ]
261
+ options_: AsyncOperationOptions = AsyncOperationOptions(
262
+ client=self._client,
263
+ retry_max_attempts=overrides.get(
264
+ "retry_max_attempts", self._config.get("retry_max_attempts")
265
+ ),
266
+ region=overrides.get("region", self._config.get("region")),
267
+ use_dual_stack=overrides.get(
268
+ "use_dual_stack", self._config.get("use_dual_stack")
269
+ ),
270
+ use_fips=overrides.get("use_fips", self._config.get("use_fips")),
271
+ endpoint=overrides.get("endpoint", self._config.get("endpoint")),
272
+ credentials_provider=overrides.get(
273
+ "credentials_provider", self._config.get("credentials_provider")
274
+ ),
275
+ )
276
+ return interceptors_, options_
277
+
278
+ async def associate_external_connection(
279
+ self,
280
+ domain: "capo_codeartifact.types.domain_name.DomainName",
281
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
282
+ external_connection: "capo_codeartifact.types.external_connection_name.ExternalConnectionName",
283
+ *,
284
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
285
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
286
+ ) -> "capo_codeartifact.types.associate_external_connection_result.AssociateExternalConnectionResult":
287
+ """<p>Adds an existing external connection to a repository. One external connection is allowed per repository.</p> <note> <p>A repository can have one or more upstream repositories, or an external connection.</p> </note>
288
+
289
+ Args:
290
+ domain: <p>The name of the domain that contains the repository.</p>
291
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
292
+ repository: <p> The name of the repository to which the external connection is added. </p>
293
+ external_connection: <p> The name of the external connection to add to the repository. The following values are supported: </p> <ul> <li> <p> <code>public:npmjs</code> - for the npm public repository. </p> </li> <li> <p> <code>public:nuget-org</code> - for the NuGet Gallery. </p> </li> <li> <p> <code>public:pypi</code> - for the Python Package Index. </p> </li> <li> <p> <code>public:maven-central</code> - for Maven Central. </p> </li> <li> <p> <code>public:maven-googleandroid</code> - for the Google Android repository. </p> </li> <li> <p> <code>public:maven-gradleplugins</code> - for the Gradle plugins repository. </p> </li> <li> <p> <code>public:maven-commonsware</code> - for the CommonsWare Android repository. </p> </li> <li> <p> <code>public:maven-clojars</code> - for the Clojars repository. </p> </li> <li> <p> <code>public:ruby-gems-org</code> - for RubyGems.org. </p> </li> <li> <p> <code>public:crates-io</code> - for Crates.io. </p> </li> </ul>
294
+
295
+ Raises:
296
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
297
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
298
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
299
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
300
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
301
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
302
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
303
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
304
+ """
305
+
306
+ async def _handler(
307
+ req: "AsyncOperationRequest[capo_codeartifact.types.associate_external_connection_request.AssociateExternalConnectionRequest]",
308
+ ) -> AsyncOperationResponse[
309
+ "capo_codeartifact.types.associate_external_connection_result.AssociateExternalConnectionResult"
310
+ ]:
311
+ import capo_codeartifact._operations.code_artifact_control_plane_service.associate_external_connection
312
+
313
+ (
314
+ output,
315
+ http_response,
316
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.associate_external_connection.async_associate_external_connection(
317
+ req.options, req.input
318
+ )
319
+ return AsyncOperationResponse(output=output, response=http_response)
320
+
321
+ interceptors_, options_ = self.operation_options(config_overrides)
322
+ input_: capo_codeartifact.types.associate_external_connection_request.AssociateExternalConnectionRequest = {
323
+ "domain": domain,
324
+ "repository": repository,
325
+ "external_connection": external_connection,
326
+ }
327
+ if domain_owner is not None:
328
+ input_["domain_owner"] = domain_owner
329
+
330
+ response = await aexecute_pipeline(
331
+ AsyncOperationRequest(input=input_, options=options_),
332
+ handler=_handler,
333
+ interceptors=list(interceptors_),
334
+ )
335
+ await response.response.aclose()
336
+ return response.output
337
+
338
+ async def copy_package_versions(
339
+ self,
340
+ domain: "capo_codeartifact.types.domain_name.DomainName",
341
+ source_repository: "capo_codeartifact.types.repository_name.RepositoryName",
342
+ destination_repository: "capo_codeartifact.types.repository_name.RepositoryName",
343
+ format: "capo_codeartifact.types.package_format.PackageFormat",
344
+ package: "capo_codeartifact.types.package_name.PackageName",
345
+ *,
346
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
347
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
348
+ namespace: Optional[
349
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
350
+ ] = None,
351
+ versions: Optional[
352
+ "capo_codeartifact.types.package_version_list.PackageVersionList"
353
+ ] = None,
354
+ version_revisions: Optional[
355
+ "capo_codeartifact.types.package_version_revision_map.PackageVersionRevisionMap"
356
+ ] = None,
357
+ allow_overwrite: Optional[
358
+ "capo_codeartifact.types.boolean_optional.BooleanOptional"
359
+ ] = None,
360
+ include_from_upstream: Optional[
361
+ "capo_codeartifact.types.boolean_optional.BooleanOptional"
362
+ ] = None,
363
+ ) -> (
364
+ "capo_codeartifact.types.copy_package_versions_result.CopyPackageVersionsResult"
365
+ ):
366
+ r"""<p> Copies package versions from one repository to another repository in the same domain. </p> <note> <p> You must specify <code>versions</code> or <code>versionRevisions</code>. You cannot specify both. </p> </note>
367
+
368
+ Args:
369
+ domain: <p> The name of the domain that contains the source and destination repositories. </p>
370
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
371
+ source_repository: <p> The name of the repository that contains the package versions to be copied. </p>
372
+ destination_repository: <p> The name of the repository into which package versions are copied. </p>
373
+ format: <p> The format of the package versions to be copied. </p>
374
+ namespace: <p>The namespace of the package versions to be copied. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when copying package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
375
+ package: <p> The name of the package that contains the versions to be copied. </p>
376
+ versions: <p> The versions of the package to be copied. </p> <note> <p> You must specify <code>versions</code> or <code>versionRevisions</code>. You cannot specify both. </p> </note>
377
+ version_revisions: <p> A list of key-value pairs. The keys are package versions and the values are package version revisions. A <code>CopyPackageVersion</code> operation succeeds if the specified versions in the source repository match the specified package version revision. </p> <note> <p> You must specify <code>versions</code> or <code>versionRevisions</code>. You cannot specify both. </p> </note>
378
+ allow_overwrite: <p> Set to true to overwrite a package version that already exists in the destination repository. If set to false and the package version already exists in the destination repository, the package version is returned in the <code>failedVersions</code> field of the response with an <code>ALREADY_EXISTS</code> error code. </p>
379
+ include_from_upstream: <p> Set to true to copy packages from repositories that are upstream from the source repository to the destination repository. The default setting is false. For more information, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html\">Working with upstream repositories</a>. </p>
380
+
381
+ Raises:
382
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
383
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
384
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
385
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
386
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
387
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
388
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
389
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
390
+ """
391
+
392
+ async def _handler(
393
+ req: "AsyncOperationRequest[capo_codeartifact.types.copy_package_versions_request.CopyPackageVersionsRequest]",
394
+ ) -> AsyncOperationResponse[
395
+ "capo_codeartifact.types.copy_package_versions_result.CopyPackageVersionsResult"
396
+ ]:
397
+ import capo_codeartifact._operations.code_artifact_control_plane_service.copy_package_versions
398
+
399
+ (
400
+ output,
401
+ http_response,
402
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.copy_package_versions.async_copy_package_versions(
403
+ req.options, req.input
404
+ )
405
+ return AsyncOperationResponse(output=output, response=http_response)
406
+
407
+ interceptors_, options_ = self.operation_options(config_overrides)
408
+ input_: capo_codeartifact.types.copy_package_versions_request.CopyPackageVersionsRequest = {
409
+ "domain": domain,
410
+ "source_repository": source_repository,
411
+ "destination_repository": destination_repository,
412
+ "format": format,
413
+ "package": package,
414
+ }
415
+ if domain_owner is not None:
416
+ input_["domain_owner"] = domain_owner
417
+ if namespace is not None:
418
+ input_["namespace"] = namespace
419
+ if versions is not None:
420
+ input_["versions"] = versions
421
+ if version_revisions is not None:
422
+ input_["version_revisions"] = version_revisions
423
+ if allow_overwrite is not None:
424
+ input_["allow_overwrite"] = allow_overwrite
425
+ if include_from_upstream is not None:
426
+ input_["include_from_upstream"] = include_from_upstream
427
+
428
+ response = await aexecute_pipeline(
429
+ AsyncOperationRequest(input=input_, options=options_),
430
+ handler=_handler,
431
+ interceptors=list(interceptors_),
432
+ )
433
+ await response.response.aclose()
434
+ return response.output
435
+
436
+ async def create_domain(
437
+ self,
438
+ domain: "capo_codeartifact.types.domain_name.DomainName",
439
+ *,
440
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
441
+ encryption_key: Optional["capo_codeartifact.types.arn.Arn"] = None,
442
+ tags: Optional["capo_codeartifact.types.tag_list.TagList"] = None,
443
+ ) -> "capo_codeartifact.types.create_domain_result.CreateDomainResult":
444
+ r"""<p> Creates a domain. CodeArtifact <i>domains</i> make it easier to manage multiple repositories across an organization. You can use a domain to apply permissions across many repositories owned by different Amazon Web Services accounts. An asset is stored only once in a domain, even if it's in multiple repositories. </p> <p>Although you can have multiple domains, we recommend a single production domain that contains all published artifacts so that your development teams can find and share packages. You can use a second pre-production domain to test changes to the production domain configuration. </p>
445
+
446
+ Args:
447
+ domain: <p> The name of the domain to create. All domain names in an Amazon Web Services Region that are in the same Amazon Web Services account must be unique. The domain name is used as the prefix in DNS hostnames. Do not use sensitive information in a domain name because it is publicly discoverable. </p>
448
+ encryption_key: <p> The encryption key for the domain. This is used to encrypt content stored in a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> permissions on the encryption key that is used. For more information, see <a href=\"https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax\">DescribeKey</a> in the <i>Key Management Service API Reference</i> and <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html\">Key Management Service API Permissions Reference</a> in the <i>Key Management Service Developer Guide</i>. </p> <important> <p> CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more information, see <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html\">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>. </p> </important>
449
+ tags: <p>One or more tag key-value pairs for the domain.</p>
450
+
451
+ Raises:
452
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
453
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
454
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
455
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
456
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
457
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
458
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
459
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
460
+ """
461
+
462
+ async def _handler(
463
+ req: "AsyncOperationRequest[capo_codeartifact.types.create_domain_request.CreateDomainRequest]",
464
+ ) -> AsyncOperationResponse[
465
+ "capo_codeartifact.types.create_domain_result.CreateDomainResult"
466
+ ]:
467
+ import capo_codeartifact._operations.code_artifact_control_plane_service.create_domain
468
+
469
+ (
470
+ output,
471
+ http_response,
472
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.create_domain.async_create_domain(
473
+ req.options, req.input
474
+ )
475
+ return AsyncOperationResponse(output=output, response=http_response)
476
+
477
+ interceptors_, options_ = self.operation_options(config_overrides)
478
+ input_: capo_codeartifact.types.create_domain_request.CreateDomainRequest = {
479
+ "domain": domain
480
+ }
481
+ if encryption_key is not None:
482
+ input_["encryption_key"] = encryption_key
483
+ if tags is not None:
484
+ input_["tags"] = tags
485
+
486
+ response = await aexecute_pipeline(
487
+ AsyncOperationRequest(input=input_, options=options_),
488
+ handler=_handler,
489
+ interceptors=list(interceptors_),
490
+ )
491
+ await response.response.aclose()
492
+ return response.output
493
+
494
+ async def create_package_group(
495
+ self,
496
+ domain: "capo_codeartifact.types.domain_name.DomainName",
497
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
498
+ *,
499
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
500
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
501
+ contact_info: Optional[
502
+ "capo_codeartifact.types.package_group_contact_info.PackageGroupContactInfo"
503
+ ] = None,
504
+ description: Optional["capo_codeartifact.types.description.Description"] = None,
505
+ tags: Optional["capo_codeartifact.types.tag_list.TagList"] = None,
506
+ ) -> "capo_codeartifact.types.create_package_group_result.CreatePackageGroupResult":
507
+ r"""<p> Creates a package group. For more information about creating package groups, including example CLI commands, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/create-package-group.html\">Create a package group</a> in the <i>CodeArtifact User Guide</i>. </p>
508
+
509
+ Args:
510
+ domain: <p> The name of the domain in which you want to create a package group. </p>
511
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
512
+ package_group: <p>The pattern of the package group to create. The pattern is also the identifier of the package group. </p>
513
+ contact_info: <p> The contact information for the created package group. </p>
514
+ description: <p> A description of the package group. </p>
515
+ tags: <p>One or more tag key-value pairs for the package group.</p>
516
+
517
+ Raises:
518
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
519
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
520
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
521
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
522
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
523
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
524
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
525
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
526
+ """
527
+
528
+ async def _handler(
529
+ req: "AsyncOperationRequest[capo_codeartifact.types.create_package_group_request.CreatePackageGroupRequest]",
530
+ ) -> AsyncOperationResponse[
531
+ "capo_codeartifact.types.create_package_group_result.CreatePackageGroupResult"
532
+ ]:
533
+ import capo_codeartifact._operations.code_artifact_control_plane_service.create_package_group
534
+
535
+ (
536
+ output,
537
+ http_response,
538
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.create_package_group.async_create_package_group(
539
+ req.options, req.input
540
+ )
541
+ return AsyncOperationResponse(output=output, response=http_response)
542
+
543
+ interceptors_, options_ = self.operation_options(config_overrides)
544
+ input_: capo_codeartifact.types.create_package_group_request.CreatePackageGroupRequest = {
545
+ "domain": domain,
546
+ "package_group": package_group,
547
+ }
548
+ if domain_owner is not None:
549
+ input_["domain_owner"] = domain_owner
550
+ if contact_info is not None:
551
+ input_["contact_info"] = contact_info
552
+ if description is not None:
553
+ input_["description"] = description
554
+ if tags is not None:
555
+ input_["tags"] = tags
556
+
557
+ response = await aexecute_pipeline(
558
+ AsyncOperationRequest(input=input_, options=options_),
559
+ handler=_handler,
560
+ interceptors=list(interceptors_),
561
+ )
562
+ await response.response.aclose()
563
+ return response.output
564
+
565
+ async def create_repository(
566
+ self,
567
+ domain: "capo_codeartifact.types.domain_name.DomainName",
568
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
569
+ *,
570
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
571
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
572
+ description: Optional["capo_codeartifact.types.description.Description"] = None,
573
+ upstreams: Optional[
574
+ "capo_codeartifact.types.upstream_repository_list.UpstreamRepositoryList"
575
+ ] = None,
576
+ tags: Optional["capo_codeartifact.types.tag_list.TagList"] = None,
577
+ ) -> "capo_codeartifact.types.create_repository_result.CreateRepositoryResult":
578
+ r"""<p> Creates a repository. </p>
579
+
580
+ Args:
581
+ domain: <p> The name of the domain that contains the created repository. </p>
582
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
583
+ repository: <p>The name of the repository to create. </p>
584
+ description: <p> A description of the created repository. </p>
585
+ upstreams: <p> A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html\">Working with upstream repositories</a>. </p>
586
+ tags: <p>One or more tag key-value pairs for the repository.</p>
587
+
588
+ Raises:
589
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
590
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
591
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
592
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
593
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
594
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
595
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
596
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
597
+ """
598
+
599
+ async def _handler(
600
+ req: "AsyncOperationRequest[capo_codeartifact.types.create_repository_request.CreateRepositoryRequest]",
601
+ ) -> AsyncOperationResponse[
602
+ "capo_codeartifact.types.create_repository_result.CreateRepositoryResult"
603
+ ]:
604
+ import capo_codeartifact._operations.code_artifact_control_plane_service.create_repository
605
+
606
+ (
607
+ output,
608
+ http_response,
609
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.create_repository.async_create_repository(
610
+ req.options, req.input
611
+ )
612
+ return AsyncOperationResponse(output=output, response=http_response)
613
+
614
+ interceptors_, options_ = self.operation_options(config_overrides)
615
+ input_: capo_codeartifact.types.create_repository_request.CreateRepositoryRequest = {
616
+ "domain": domain,
617
+ "repository": repository,
618
+ }
619
+ if domain_owner is not None:
620
+ input_["domain_owner"] = domain_owner
621
+ if description is not None:
622
+ input_["description"] = description
623
+ if upstreams is not None:
624
+ input_["upstreams"] = upstreams
625
+ if tags is not None:
626
+ input_["tags"] = tags
627
+
628
+ response = await aexecute_pipeline(
629
+ AsyncOperationRequest(input=input_, options=options_),
630
+ handler=_handler,
631
+ interceptors=list(interceptors_),
632
+ )
633
+ await response.response.aclose()
634
+ return response.output
635
+
636
+ async def delete_domain(
637
+ self,
638
+ domain: "capo_codeartifact.types.domain_name.DomainName",
639
+ *,
640
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
641
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
642
+ ) -> "capo_codeartifact.types.delete_domain_result.DeleteDomainResult":
643
+ """<p> Deletes a domain. You cannot delete a domain that contains repositories. If you want to delete a domain with repositories, first delete its repositories. </p>
644
+
645
+ Args:
646
+ domain: <p> The name of the domain to delete. </p>
647
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
648
+
649
+ Raises:
650
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
651
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
652
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
653
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
654
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
655
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
656
+ """
657
+
658
+ async def _handler(
659
+ req: "AsyncOperationRequest[capo_codeartifact.types.delete_domain_request.DeleteDomainRequest]",
660
+ ) -> AsyncOperationResponse[
661
+ "capo_codeartifact.types.delete_domain_result.DeleteDomainResult"
662
+ ]:
663
+ import capo_codeartifact._operations.code_artifact_control_plane_service.delete_domain
664
+
665
+ (
666
+ output,
667
+ http_response,
668
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.delete_domain.async_delete_domain(
669
+ req.options, req.input
670
+ )
671
+ return AsyncOperationResponse(output=output, response=http_response)
672
+
673
+ interceptors_, options_ = self.operation_options(config_overrides)
674
+ input_: capo_codeartifact.types.delete_domain_request.DeleteDomainRequest = {
675
+ "domain": domain
676
+ }
677
+ if domain_owner is not None:
678
+ input_["domain_owner"] = domain_owner
679
+
680
+ response = await aexecute_pipeline(
681
+ AsyncOperationRequest(input=input_, options=options_),
682
+ handler=_handler,
683
+ interceptors=list(interceptors_),
684
+ )
685
+ await response.response.aclose()
686
+ return response.output
687
+
688
+ async def delete_domain_permissions_policy(
689
+ self,
690
+ domain: "capo_codeartifact.types.domain_name.DomainName",
691
+ *,
692
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
693
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
694
+ policy_revision: Optional[
695
+ "capo_codeartifact.types.policy_revision.PolicyRevision"
696
+ ] = None,
697
+ ) -> "capo_codeartifact.types.delete_domain_permissions_policy_result.DeleteDomainPermissionsPolicyResult":
698
+ """<p> Deletes the resource policy set on a domain. </p>
699
+
700
+ Args:
701
+ domain: <p> The name of the domain associated with the resource policy to be deleted. </p>
702
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
703
+ policy_revision: <p> The current revision of the resource policy to be deleted. This revision is used for optimistic locking, which prevents others from overwriting your changes to the domain's resource policy. </p>
704
+
705
+ Raises:
706
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
707
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
708
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
709
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
710
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
711
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
712
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
713
+ """
714
+
715
+ async def _handler(
716
+ req: "AsyncOperationRequest[capo_codeartifact.types.delete_domain_permissions_policy_request.DeleteDomainPermissionsPolicyRequest]",
717
+ ) -> AsyncOperationResponse[
718
+ "capo_codeartifact.types.delete_domain_permissions_policy_result.DeleteDomainPermissionsPolicyResult"
719
+ ]:
720
+ import capo_codeartifact._operations.code_artifact_control_plane_service.delete_domain_permissions_policy
721
+
722
+ (
723
+ output,
724
+ http_response,
725
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.delete_domain_permissions_policy.async_delete_domain_permissions_policy(
726
+ req.options, req.input
727
+ )
728
+ return AsyncOperationResponse(output=output, response=http_response)
729
+
730
+ interceptors_, options_ = self.operation_options(config_overrides)
731
+ input_: capo_codeartifact.types.delete_domain_permissions_policy_request.DeleteDomainPermissionsPolicyRequest = {
732
+ "domain": domain
733
+ }
734
+ if domain_owner is not None:
735
+ input_["domain_owner"] = domain_owner
736
+ if policy_revision is not None:
737
+ input_["policy_revision"] = policy_revision
738
+
739
+ response = await aexecute_pipeline(
740
+ AsyncOperationRequest(input=input_, options=options_),
741
+ handler=_handler,
742
+ interceptors=list(interceptors_),
743
+ )
744
+ await response.response.aclose()
745
+ return response.output
746
+
747
+ async def delete_package(
748
+ self,
749
+ domain: "capo_codeartifact.types.domain_name.DomainName",
750
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
751
+ format: "capo_codeartifact.types.package_format.PackageFormat",
752
+ package: "capo_codeartifact.types.package_name.PackageName",
753
+ *,
754
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
755
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
756
+ namespace: Optional[
757
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
758
+ ] = None,
759
+ ) -> "capo_codeartifact.types.delete_package_result.DeletePackageResult":
760
+ r"""<p>Deletes a package and all associated package versions. A deleted package cannot be restored. To delete one or more package versions, use the <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DeletePackageVersions.html\">DeletePackageVersions</a> API.</p>
761
+
762
+ Args:
763
+ domain: <p>The name of the domain that contains the package to delete.</p>
764
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
765
+ repository: <p>The name of the repository that contains the package to delete.</p>
766
+ format: <p>The format of the requested package to delete.</p>
767
+ namespace: <p>The namespace of the package to delete. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when deleting packages of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
768
+ package: <p>The name of the package to delete.</p>
769
+
770
+ Raises:
771
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
772
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
773
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
774
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
775
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
776
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
777
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
778
+ """
779
+
780
+ async def _handler(
781
+ req: "AsyncOperationRequest[capo_codeartifact.types.delete_package_request.DeletePackageRequest]",
782
+ ) -> AsyncOperationResponse[
783
+ "capo_codeartifact.types.delete_package_result.DeletePackageResult"
784
+ ]:
785
+ import capo_codeartifact._operations.code_artifact_control_plane_service.delete_package
786
+
787
+ (
788
+ output,
789
+ http_response,
790
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.delete_package.async_delete_package(
791
+ req.options, req.input
792
+ )
793
+ return AsyncOperationResponse(output=output, response=http_response)
794
+
795
+ interceptors_, options_ = self.operation_options(config_overrides)
796
+ input_: capo_codeartifact.types.delete_package_request.DeletePackageRequest = {
797
+ "domain": domain,
798
+ "repository": repository,
799
+ "format": format,
800
+ "package": package,
801
+ }
802
+ if domain_owner is not None:
803
+ input_["domain_owner"] = domain_owner
804
+ if namespace is not None:
805
+ input_["namespace"] = namespace
806
+
807
+ response = await aexecute_pipeline(
808
+ AsyncOperationRequest(input=input_, options=options_),
809
+ handler=_handler,
810
+ interceptors=list(interceptors_),
811
+ )
812
+ await response.response.aclose()
813
+ return response.output
814
+
815
+ async def delete_package_group(
816
+ self,
817
+ domain: "capo_codeartifact.types.domain_name.DomainName",
818
+ package_group: "capo_codeartifact.types.string.String",
819
+ *,
820
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
821
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
822
+ ) -> "capo_codeartifact.types.delete_package_group_result.DeletePackageGroupResult":
823
+ """<p>Deletes a package group. Deleting a package group does not delete packages or package versions associated with the package group. When a package group is deleted, the direct child package groups will become children of the package group's direct parent package group. Therefore, if any of the child groups are inheriting any settings from the parent, those settings could change.</p>
824
+
825
+ Args:
826
+ domain: <p> The domain that contains the package group to be deleted. </p>
827
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
828
+ package_group: <p>The pattern of the package group to be deleted.</p>
829
+
830
+ Raises:
831
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
832
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
833
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
834
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
835
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
836
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
837
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
838
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
839
+ """
840
+
841
+ async def _handler(
842
+ req: "AsyncOperationRequest[capo_codeartifact.types.delete_package_group_request.DeletePackageGroupRequest]",
843
+ ) -> AsyncOperationResponse[
844
+ "capo_codeartifact.types.delete_package_group_result.DeletePackageGroupResult"
845
+ ]:
846
+ import capo_codeartifact._operations.code_artifact_control_plane_service.delete_package_group
847
+
848
+ (
849
+ output,
850
+ http_response,
851
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.delete_package_group.async_delete_package_group(
852
+ req.options, req.input
853
+ )
854
+ return AsyncOperationResponse(output=output, response=http_response)
855
+
856
+ interceptors_, options_ = self.operation_options(config_overrides)
857
+ input_: capo_codeartifact.types.delete_package_group_request.DeletePackageGroupRequest = {
858
+ "domain": domain,
859
+ "package_group": package_group,
860
+ }
861
+ if domain_owner is not None:
862
+ input_["domain_owner"] = domain_owner
863
+
864
+ response = await aexecute_pipeline(
865
+ AsyncOperationRequest(input=input_, options=options_),
866
+ handler=_handler,
867
+ interceptors=list(interceptors_),
868
+ )
869
+ await response.response.aclose()
870
+ return response.output
871
+
872
+ async def delete_package_versions(
873
+ self,
874
+ domain: "capo_codeartifact.types.domain_name.DomainName",
875
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
876
+ format: "capo_codeartifact.types.package_format.PackageFormat",
877
+ package: "capo_codeartifact.types.package_name.PackageName",
878
+ versions: "capo_codeartifact.types.package_version_list.PackageVersionList",
879
+ *,
880
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
881
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
882
+ namespace: Optional[
883
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
884
+ ] = None,
885
+ expected_status: Optional[
886
+ "capo_codeartifact.types.package_version_status.PackageVersionStatus"
887
+ ] = None,
888
+ ) -> "capo_codeartifact.types.delete_package_versions_result.DeletePackageVersionsResult":
889
+ r"""<p> Deletes one or more versions of a package. A deleted package version cannot be restored in your repository. If you want to remove a package version from your repository and be able to restore it later, set its status to <code>Archived</code>. Archived packages cannot be downloaded from a repository and don't show up with list package APIs (for example, <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html\">ListPackageVersions</a>), but you can restore them using <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_UpdatePackageVersionsStatus.html\">UpdatePackageVersionsStatus</a>. </p>
890
+
891
+ Args:
892
+ domain: <p> The name of the domain that contains the package to delete. </p>
893
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
894
+ repository: <p> The name of the repository that contains the package versions to delete. </p>
895
+ format: <p> The format of the package versions to delete. </p>
896
+ namespace: <p>The namespace of the package versions to be deleted. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when deleting package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
897
+ package: <p> The name of the package with the versions to delete. </p>
898
+ versions: <p> An array of strings that specify the versions of the package to delete. </p>
899
+ expected_status: <p> The expected status of the package version to delete. </p>
900
+
901
+ Raises:
902
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
903
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
904
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
905
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
906
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
907
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
908
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
909
+ """
910
+
911
+ async def _handler(
912
+ req: "AsyncOperationRequest[capo_codeartifact.types.delete_package_versions_request.DeletePackageVersionsRequest]",
913
+ ) -> AsyncOperationResponse[
914
+ "capo_codeartifact.types.delete_package_versions_result.DeletePackageVersionsResult"
915
+ ]:
916
+ import capo_codeartifact._operations.code_artifact_control_plane_service.delete_package_versions
917
+
918
+ (
919
+ output,
920
+ http_response,
921
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.delete_package_versions.async_delete_package_versions(
922
+ req.options, req.input
923
+ )
924
+ return AsyncOperationResponse(output=output, response=http_response)
925
+
926
+ interceptors_, options_ = self.operation_options(config_overrides)
927
+ input_: capo_codeartifact.types.delete_package_versions_request.DeletePackageVersionsRequest = {
928
+ "domain": domain,
929
+ "repository": repository,
930
+ "format": format,
931
+ "package": package,
932
+ "versions": versions,
933
+ }
934
+ if domain_owner is not None:
935
+ input_["domain_owner"] = domain_owner
936
+ if namespace is not None:
937
+ input_["namespace"] = namespace
938
+ if expected_status is not None:
939
+ input_["expected_status"] = expected_status
940
+
941
+ response = await aexecute_pipeline(
942
+ AsyncOperationRequest(input=input_, options=options_),
943
+ handler=_handler,
944
+ interceptors=list(interceptors_),
945
+ )
946
+ await response.response.aclose()
947
+ return response.output
948
+
949
+ async def delete_repository(
950
+ self,
951
+ domain: "capo_codeartifact.types.domain_name.DomainName",
952
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
953
+ *,
954
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
955
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
956
+ ) -> "capo_codeartifact.types.delete_repository_result.DeleteRepositoryResult":
957
+ """<p> Deletes a repository. </p>
958
+
959
+ Args:
960
+ domain: <p> The name of the domain that contains the repository to delete. </p>
961
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
962
+ repository: <p> The name of the repository to delete. </p>
963
+
964
+ Raises:
965
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
966
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
967
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
968
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
969
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
970
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
971
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
972
+ """
973
+
974
+ async def _handler(
975
+ req: "AsyncOperationRequest[capo_codeartifact.types.delete_repository_request.DeleteRepositoryRequest]",
976
+ ) -> AsyncOperationResponse[
977
+ "capo_codeartifact.types.delete_repository_result.DeleteRepositoryResult"
978
+ ]:
979
+ import capo_codeartifact._operations.code_artifact_control_plane_service.delete_repository
980
+
981
+ (
982
+ output,
983
+ http_response,
984
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.delete_repository.async_delete_repository(
985
+ req.options, req.input
986
+ )
987
+ return AsyncOperationResponse(output=output, response=http_response)
988
+
989
+ interceptors_, options_ = self.operation_options(config_overrides)
990
+ input_: capo_codeartifact.types.delete_repository_request.DeleteRepositoryRequest = {
991
+ "domain": domain,
992
+ "repository": repository,
993
+ }
994
+ if domain_owner is not None:
995
+ input_["domain_owner"] = domain_owner
996
+
997
+ response = await aexecute_pipeline(
998
+ AsyncOperationRequest(input=input_, options=options_),
999
+ handler=_handler,
1000
+ interceptors=list(interceptors_),
1001
+ )
1002
+ await response.response.aclose()
1003
+ return response.output
1004
+
1005
+ async def delete_repository_permissions_policy(
1006
+ self,
1007
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1008
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1009
+ *,
1010
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1011
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1012
+ policy_revision: Optional[
1013
+ "capo_codeartifact.types.policy_revision.PolicyRevision"
1014
+ ] = None,
1015
+ ) -> "capo_codeartifact.types.delete_repository_permissions_policy_result.DeleteRepositoryPermissionsPolicyResult":
1016
+ """<p> Deletes the resource policy that is set on a repository. After a resource policy is deleted, the permissions allowed and denied by the deleted policy are removed. The effect of deleting a resource policy might not be immediate. </p> <important> <p> Use <code>DeleteRepositoryPermissionsPolicy</code> with caution. After a policy is deleted, Amazon Web Services users, roles, and accounts lose permissions to perform the repository actions granted by the deleted policy. </p> </important>
1017
+
1018
+ Args:
1019
+ domain: <p> The name of the domain that contains the repository associated with the resource policy to be deleted. </p>
1020
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1021
+ repository: <p> The name of the repository that is associated with the resource policy to be deleted </p>
1022
+ policy_revision: <p> The revision of the repository's resource policy to be deleted. This revision is used for optimistic locking, which prevents others from accidentally overwriting your changes to the repository's resource policy. </p>
1023
+
1024
+ Raises:
1025
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1026
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
1027
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1028
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1029
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1030
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1031
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1032
+ """
1033
+
1034
+ async def _handler(
1035
+ req: "AsyncOperationRequest[capo_codeartifact.types.delete_repository_permissions_policy_request.DeleteRepositoryPermissionsPolicyRequest]",
1036
+ ) -> AsyncOperationResponse[
1037
+ "capo_codeartifact.types.delete_repository_permissions_policy_result.DeleteRepositoryPermissionsPolicyResult"
1038
+ ]:
1039
+ import capo_codeartifact._operations.code_artifact_control_plane_service.delete_repository_permissions_policy
1040
+
1041
+ (
1042
+ output,
1043
+ http_response,
1044
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.delete_repository_permissions_policy.async_delete_repository_permissions_policy(
1045
+ req.options, req.input
1046
+ )
1047
+ return AsyncOperationResponse(output=output, response=http_response)
1048
+
1049
+ interceptors_, options_ = self.operation_options(config_overrides)
1050
+ input_: capo_codeartifact.types.delete_repository_permissions_policy_request.DeleteRepositoryPermissionsPolicyRequest = {
1051
+ "domain": domain,
1052
+ "repository": repository,
1053
+ }
1054
+ if domain_owner is not None:
1055
+ input_["domain_owner"] = domain_owner
1056
+ if policy_revision is not None:
1057
+ input_["policy_revision"] = policy_revision
1058
+
1059
+ response = await aexecute_pipeline(
1060
+ AsyncOperationRequest(input=input_, options=options_),
1061
+ handler=_handler,
1062
+ interceptors=list(interceptors_),
1063
+ )
1064
+ await response.response.aclose()
1065
+ return response.output
1066
+
1067
+ async def describe_domain(
1068
+ self,
1069
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1070
+ *,
1071
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1072
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1073
+ ) -> "capo_codeartifact.types.describe_domain_result.DescribeDomainResult":
1074
+ r"""<p> Returns a <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DomainDescription.html\">DomainDescription</a> object that contains information about the requested domain. </p>
1075
+
1076
+ Args:
1077
+ domain: <p> A string that specifies the name of the requested domain. </p>
1078
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1079
+
1080
+ Raises:
1081
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1082
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1083
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1084
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1085
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1086
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1087
+ """
1088
+
1089
+ async def _handler(
1090
+ req: "AsyncOperationRequest[capo_codeartifact.types.describe_domain_request.DescribeDomainRequest]",
1091
+ ) -> AsyncOperationResponse[
1092
+ "capo_codeartifact.types.describe_domain_result.DescribeDomainResult"
1093
+ ]:
1094
+ import capo_codeartifact._operations.code_artifact_control_plane_service.describe_domain
1095
+
1096
+ (
1097
+ output,
1098
+ http_response,
1099
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.describe_domain.async_describe_domain(
1100
+ req.options, req.input
1101
+ )
1102
+ return AsyncOperationResponse(output=output, response=http_response)
1103
+
1104
+ interceptors_, options_ = self.operation_options(config_overrides)
1105
+ input_: capo_codeartifact.types.describe_domain_request.DescribeDomainRequest = {
1106
+ "domain": domain
1107
+ }
1108
+ if domain_owner is not None:
1109
+ input_["domain_owner"] = domain_owner
1110
+
1111
+ response = await aexecute_pipeline(
1112
+ AsyncOperationRequest(input=input_, options=options_),
1113
+ handler=_handler,
1114
+ interceptors=list(interceptors_),
1115
+ )
1116
+ await response.response.aclose()
1117
+ return response.output
1118
+
1119
+ async def describe_package(
1120
+ self,
1121
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1122
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1123
+ format: "capo_codeartifact.types.package_format.PackageFormat",
1124
+ package: "capo_codeartifact.types.package_name.PackageName",
1125
+ *,
1126
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1127
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1128
+ namespace: Optional[
1129
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
1130
+ ] = None,
1131
+ ) -> "capo_codeartifact.types.describe_package_result.DescribePackageResult":
1132
+ r"""<p> Returns a <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDescription.html\">PackageDescription</a> object that contains information about the requested package.</p>
1133
+
1134
+ Args:
1135
+ domain: <p>The name of the domain that contains the repository that contains the package.</p>
1136
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1137
+ repository: <p>The name of the repository that contains the requested package. </p>
1138
+ format: <p>A format that specifies the type of the requested package.</p>
1139
+ namespace: <p>The namespace of the requested package. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when requesting packages of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
1140
+ package: <p>The name of the requested package.</p>
1141
+
1142
+ Raises:
1143
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1144
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1145
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1146
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1147
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1148
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1149
+ """
1150
+
1151
+ async def _handler(
1152
+ req: "AsyncOperationRequest[capo_codeartifact.types.describe_package_request.DescribePackageRequest]",
1153
+ ) -> AsyncOperationResponse[
1154
+ "capo_codeartifact.types.describe_package_result.DescribePackageResult"
1155
+ ]:
1156
+ import capo_codeartifact._operations.code_artifact_control_plane_service.describe_package
1157
+
1158
+ (
1159
+ output,
1160
+ http_response,
1161
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.describe_package.async_describe_package(
1162
+ req.options, req.input
1163
+ )
1164
+ return AsyncOperationResponse(output=output, response=http_response)
1165
+
1166
+ interceptors_, options_ = self.operation_options(config_overrides)
1167
+ input_: capo_codeartifact.types.describe_package_request.DescribePackageRequest = {
1168
+ "domain": domain,
1169
+ "repository": repository,
1170
+ "format": format,
1171
+ "package": package,
1172
+ }
1173
+ if domain_owner is not None:
1174
+ input_["domain_owner"] = domain_owner
1175
+ if namespace is not None:
1176
+ input_["namespace"] = namespace
1177
+
1178
+ response = await aexecute_pipeline(
1179
+ AsyncOperationRequest(input=input_, options=options_),
1180
+ handler=_handler,
1181
+ interceptors=list(interceptors_),
1182
+ )
1183
+ await response.response.aclose()
1184
+ return response.output
1185
+
1186
+ async def describe_package_group(
1187
+ self,
1188
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1189
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
1190
+ *,
1191
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1192
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1193
+ ) -> "capo_codeartifact.types.describe_package_group_result.DescribePackageGroupResult":
1194
+ r"""<p>Returns a <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageGroupDescription.html\">PackageGroupDescription</a> object that contains information about the requested package group.</p>
1195
+
1196
+ Args:
1197
+ domain: <p> The name of the domain that contains the package group. </p>
1198
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1199
+ package_group: <p>The pattern of the requested package group.</p>
1200
+
1201
+ Raises:
1202
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1203
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1204
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1205
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1206
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1207
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1208
+ """
1209
+
1210
+ async def _handler(
1211
+ req: "AsyncOperationRequest[capo_codeartifact.types.describe_package_group_request.DescribePackageGroupRequest]",
1212
+ ) -> AsyncOperationResponse[
1213
+ "capo_codeartifact.types.describe_package_group_result.DescribePackageGroupResult"
1214
+ ]:
1215
+ import capo_codeartifact._operations.code_artifact_control_plane_service.describe_package_group
1216
+
1217
+ (
1218
+ output,
1219
+ http_response,
1220
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.describe_package_group.async_describe_package_group(
1221
+ req.options, req.input
1222
+ )
1223
+ return AsyncOperationResponse(output=output, response=http_response)
1224
+
1225
+ interceptors_, options_ = self.operation_options(config_overrides)
1226
+ input_: capo_codeartifact.types.describe_package_group_request.DescribePackageGroupRequest = {
1227
+ "domain": domain,
1228
+ "package_group": package_group,
1229
+ }
1230
+ if domain_owner is not None:
1231
+ input_["domain_owner"] = domain_owner
1232
+
1233
+ response = await aexecute_pipeline(
1234
+ AsyncOperationRequest(input=input_, options=options_),
1235
+ handler=_handler,
1236
+ interceptors=list(interceptors_),
1237
+ )
1238
+ await response.response.aclose()
1239
+ return response.output
1240
+
1241
+ async def describe_package_version(
1242
+ self,
1243
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1244
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1245
+ format: "capo_codeartifact.types.package_format.PackageFormat",
1246
+ package: "capo_codeartifact.types.package_name.PackageName",
1247
+ package_version: "capo_codeartifact.types.package_version.PackageVersion",
1248
+ *,
1249
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1250
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1251
+ namespace: Optional[
1252
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
1253
+ ] = None,
1254
+ ) -> "capo_codeartifact.types.describe_package_version_result.DescribePackageVersionResult":
1255
+ r"""<p> Returns a <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionDescription.html\">PackageVersionDescription</a> object that contains information about the requested package version. </p>
1256
+
1257
+ Args:
1258
+ domain: <p> The name of the domain that contains the repository that contains the package version. </p>
1259
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1260
+ repository: <p> The name of the repository that contains the package version. </p>
1261
+ format: <p> A format that specifies the type of the requested package version. </p>
1262
+ namespace: <p>The namespace of the requested package version. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when requesting package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
1263
+ package: <p> The name of the requested package version. </p>
1264
+ package_version: <p> A string that contains the package version (for example, <code>3.5.2</code>). </p>
1265
+
1266
+ Raises:
1267
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1268
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
1269
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1270
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1271
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1272
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1273
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1274
+ """
1275
+
1276
+ async def _handler(
1277
+ req: "AsyncOperationRequest[capo_codeartifact.types.describe_package_version_request.DescribePackageVersionRequest]",
1278
+ ) -> AsyncOperationResponse[
1279
+ "capo_codeartifact.types.describe_package_version_result.DescribePackageVersionResult"
1280
+ ]:
1281
+ import capo_codeartifact._operations.code_artifact_control_plane_service.describe_package_version
1282
+
1283
+ (
1284
+ output,
1285
+ http_response,
1286
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.describe_package_version.async_describe_package_version(
1287
+ req.options, req.input
1288
+ )
1289
+ return AsyncOperationResponse(output=output, response=http_response)
1290
+
1291
+ interceptors_, options_ = self.operation_options(config_overrides)
1292
+ input_: capo_codeartifact.types.describe_package_version_request.DescribePackageVersionRequest = {
1293
+ "domain": domain,
1294
+ "repository": repository,
1295
+ "format": format,
1296
+ "package": package,
1297
+ "package_version": package_version,
1298
+ }
1299
+ if domain_owner is not None:
1300
+ input_["domain_owner"] = domain_owner
1301
+ if namespace is not None:
1302
+ input_["namespace"] = namespace
1303
+
1304
+ response = await aexecute_pipeline(
1305
+ AsyncOperationRequest(input=input_, options=options_),
1306
+ handler=_handler,
1307
+ interceptors=list(interceptors_),
1308
+ )
1309
+ await response.response.aclose()
1310
+ return response.output
1311
+
1312
+ async def describe_repository(
1313
+ self,
1314
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1315
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1316
+ *,
1317
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1318
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1319
+ ) -> "capo_codeartifact.types.describe_repository_result.DescribeRepositoryResult":
1320
+ """<p> Returns a <code>RepositoryDescription</code> object that contains detailed information about the requested repository. </p>
1321
+
1322
+ Args:
1323
+ domain: <p> The name of the domain that contains the repository to describe. </p>
1324
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1325
+ repository: <p> A string that specifies the name of the requested repository. </p>
1326
+
1327
+ Raises:
1328
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1329
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1330
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1331
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1332
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1333
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1334
+ """
1335
+
1336
+ async def _handler(
1337
+ req: "AsyncOperationRequest[capo_codeartifact.types.describe_repository_request.DescribeRepositoryRequest]",
1338
+ ) -> AsyncOperationResponse[
1339
+ "capo_codeartifact.types.describe_repository_result.DescribeRepositoryResult"
1340
+ ]:
1341
+ import capo_codeartifact._operations.code_artifact_control_plane_service.describe_repository
1342
+
1343
+ (
1344
+ output,
1345
+ http_response,
1346
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.describe_repository.async_describe_repository(
1347
+ req.options, req.input
1348
+ )
1349
+ return AsyncOperationResponse(output=output, response=http_response)
1350
+
1351
+ interceptors_, options_ = self.operation_options(config_overrides)
1352
+ input_: capo_codeartifact.types.describe_repository_request.DescribeRepositoryRequest = {
1353
+ "domain": domain,
1354
+ "repository": repository,
1355
+ }
1356
+ if domain_owner is not None:
1357
+ input_["domain_owner"] = domain_owner
1358
+
1359
+ response = await aexecute_pipeline(
1360
+ AsyncOperationRequest(input=input_, options=options_),
1361
+ handler=_handler,
1362
+ interceptors=list(interceptors_),
1363
+ )
1364
+ await response.response.aclose()
1365
+ return response.output
1366
+
1367
+ async def disassociate_external_connection(
1368
+ self,
1369
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1370
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1371
+ external_connection: "capo_codeartifact.types.external_connection_name.ExternalConnectionName",
1372
+ *,
1373
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1374
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1375
+ ) -> "capo_codeartifact.types.disassociate_external_connection_result.DisassociateExternalConnectionResult":
1376
+ """<p> Removes an existing external connection from a repository. </p>
1377
+
1378
+ Args:
1379
+ domain: <p>The name of the domain that contains the repository from which to remove the external repository. </p>
1380
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1381
+ repository: <p>The name of the repository from which the external connection will be removed. </p>
1382
+ external_connection: <p>The name of the external connection to be removed from the repository. </p>
1383
+
1384
+ Raises:
1385
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1386
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
1387
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1388
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1389
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
1390
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1391
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1392
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1393
+ """
1394
+
1395
+ async def _handler(
1396
+ req: "AsyncOperationRequest[capo_codeartifact.types.disassociate_external_connection_request.DisassociateExternalConnectionRequest]",
1397
+ ) -> AsyncOperationResponse[
1398
+ "capo_codeartifact.types.disassociate_external_connection_result.DisassociateExternalConnectionResult"
1399
+ ]:
1400
+ import capo_codeartifact._operations.code_artifact_control_plane_service.disassociate_external_connection
1401
+
1402
+ (
1403
+ output,
1404
+ http_response,
1405
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.disassociate_external_connection.async_disassociate_external_connection(
1406
+ req.options, req.input
1407
+ )
1408
+ return AsyncOperationResponse(output=output, response=http_response)
1409
+
1410
+ interceptors_, options_ = self.operation_options(config_overrides)
1411
+ input_: capo_codeartifact.types.disassociate_external_connection_request.DisassociateExternalConnectionRequest = {
1412
+ "domain": domain,
1413
+ "repository": repository,
1414
+ "external_connection": external_connection,
1415
+ }
1416
+ if domain_owner is not None:
1417
+ input_["domain_owner"] = domain_owner
1418
+
1419
+ response = await aexecute_pipeline(
1420
+ AsyncOperationRequest(input=input_, options=options_),
1421
+ handler=_handler,
1422
+ interceptors=list(interceptors_),
1423
+ )
1424
+ await response.response.aclose()
1425
+ return response.output
1426
+
1427
+ async def dispose_package_versions(
1428
+ self,
1429
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1430
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1431
+ format: "capo_codeartifact.types.package_format.PackageFormat",
1432
+ package: "capo_codeartifact.types.package_name.PackageName",
1433
+ versions: "capo_codeartifact.types.package_version_list.PackageVersionList",
1434
+ *,
1435
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1436
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1437
+ namespace: Optional[
1438
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
1439
+ ] = None,
1440
+ version_revisions: Optional[
1441
+ "capo_codeartifact.types.package_version_revision_map.PackageVersionRevisionMap"
1442
+ ] = None,
1443
+ expected_status: Optional[
1444
+ "capo_codeartifact.types.package_version_status.PackageVersionStatus"
1445
+ ] = None,
1446
+ ) -> "capo_codeartifact.types.dispose_package_versions_result.DisposePackageVersionsResult":
1447
+ r"""<p> Deletes the assets in package versions and sets the package versions' status to <code>Disposed</code>. A disposed package version cannot be restored in your repository because its assets are deleted. </p> <p> To view all disposed package versions in a repository, use <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html\">ListPackageVersions</a> and set the <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html#API_ListPackageVersions_RequestSyntax\">status</a> parameter to <code>Disposed</code>. </p> <p> To view information about a disposed package version, use <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DescribePackageVersion.html\">DescribePackageVersion</a>. </p>
1448
+
1449
+ Args:
1450
+ domain: <p> The name of the domain that contains the repository you want to dispose. </p>
1451
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1452
+ repository: <p> The name of the repository that contains the package versions you want to dispose. </p>
1453
+ format: <p> A format that specifies the type of package versions you want to dispose. </p>
1454
+ namespace: <p>The namespace of the package versions to be disposed. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when disposing package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
1455
+ package: <p> The name of the package with the versions you want to dispose. </p>
1456
+ versions: <p> The versions of the package you want to dispose. </p>
1457
+ version_revisions: <p> The revisions of the package versions you want to dispose. </p>
1458
+ expected_status: <p> The expected status of the package version to dispose. </p>
1459
+
1460
+ Raises:
1461
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1462
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
1463
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1464
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1465
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1466
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1467
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1468
+ """
1469
+
1470
+ async def _handler(
1471
+ req: "AsyncOperationRequest[capo_codeartifact.types.dispose_package_versions_request.DisposePackageVersionsRequest]",
1472
+ ) -> AsyncOperationResponse[
1473
+ "capo_codeartifact.types.dispose_package_versions_result.DisposePackageVersionsResult"
1474
+ ]:
1475
+ import capo_codeartifact._operations.code_artifact_control_plane_service.dispose_package_versions
1476
+
1477
+ (
1478
+ output,
1479
+ http_response,
1480
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.dispose_package_versions.async_dispose_package_versions(
1481
+ req.options, req.input
1482
+ )
1483
+ return AsyncOperationResponse(output=output, response=http_response)
1484
+
1485
+ interceptors_, options_ = self.operation_options(config_overrides)
1486
+ input_: capo_codeartifact.types.dispose_package_versions_request.DisposePackageVersionsRequest = {
1487
+ "domain": domain,
1488
+ "repository": repository,
1489
+ "format": format,
1490
+ "package": package,
1491
+ "versions": versions,
1492
+ }
1493
+ if domain_owner is not None:
1494
+ input_["domain_owner"] = domain_owner
1495
+ if namespace is not None:
1496
+ input_["namespace"] = namespace
1497
+ if version_revisions is not None:
1498
+ input_["version_revisions"] = version_revisions
1499
+ if expected_status is not None:
1500
+ input_["expected_status"] = expected_status
1501
+
1502
+ response = await aexecute_pipeline(
1503
+ AsyncOperationRequest(input=input_, options=options_),
1504
+ handler=_handler,
1505
+ interceptors=list(interceptors_),
1506
+ )
1507
+ await response.response.aclose()
1508
+ return response.output
1509
+
1510
+ async def get_associated_package_group(
1511
+ self,
1512
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1513
+ format: "capo_codeartifact.types.package_format.PackageFormat",
1514
+ package: "capo_codeartifact.types.package_name.PackageName",
1515
+ *,
1516
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1517
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1518
+ namespace: Optional[
1519
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
1520
+ ] = None,
1521
+ ) -> "capo_codeartifact.types.get_associated_package_group_result.GetAssociatedPackageGroupResult":
1522
+ r"""<p>Returns the most closely associated package group to the specified package. This API does not require that the package exist in any repository in the domain. As such, <code>GetAssociatedPackageGroup</code> can be used to see which package group's origin configuration applies to a package before that package is in a repository. This can be helpful to check if public packages are blocked without ingesting them.</p> <p>For information package group association and matching, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/package-group-definition-syntax-matching-behavior.html\">Package group definition syntax and matching behavior</a> in the <i>CodeArtifact User Guide</i>.</p>
1523
+
1524
+ Args:
1525
+ domain: <p> The name of the domain that contains the package from which to get the associated package group. </p>
1526
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1527
+ format: <p> The format of the package from which to get the associated package group. </p>
1528
+ namespace: <p>The namespace of the package from which to get the associated package group. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when getting associated package groups from packages of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
1529
+ package: <p> The package from which to get the associated package group. </p>
1530
+
1531
+ Raises:
1532
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1533
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1534
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1535
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1536
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1537
+ """
1538
+
1539
+ async def _handler(
1540
+ req: "AsyncOperationRequest[capo_codeartifact.types.get_associated_package_group_request.GetAssociatedPackageGroupRequest]",
1541
+ ) -> AsyncOperationResponse[
1542
+ "capo_codeartifact.types.get_associated_package_group_result.GetAssociatedPackageGroupResult"
1543
+ ]:
1544
+ import capo_codeartifact._operations.code_artifact_control_plane_service.get_associated_package_group
1545
+
1546
+ (
1547
+ output,
1548
+ http_response,
1549
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.get_associated_package_group.async_get_associated_package_group(
1550
+ req.options, req.input
1551
+ )
1552
+ return AsyncOperationResponse(output=output, response=http_response)
1553
+
1554
+ interceptors_, options_ = self.operation_options(config_overrides)
1555
+ input_: capo_codeartifact.types.get_associated_package_group_request.GetAssociatedPackageGroupRequest = {
1556
+ "domain": domain,
1557
+ "format": format,
1558
+ "package": package,
1559
+ }
1560
+ if domain_owner is not None:
1561
+ input_["domain_owner"] = domain_owner
1562
+ if namespace is not None:
1563
+ input_["namespace"] = namespace
1564
+
1565
+ response = await aexecute_pipeline(
1566
+ AsyncOperationRequest(input=input_, options=options_),
1567
+ handler=_handler,
1568
+ interceptors=list(interceptors_),
1569
+ )
1570
+ await response.response.aclose()
1571
+ return response.output
1572
+
1573
+ async def get_authorization_token(
1574
+ self,
1575
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1576
+ *,
1577
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1578
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1579
+ duration_seconds: Optional[
1580
+ "capo_codeartifact.types.authorization_token_duration_seconds.AuthorizationTokenDurationSeconds"
1581
+ ] = None,
1582
+ ) -> "capo_codeartifact.types.get_authorization_token_result.GetAuthorizationTokenResult":
1583
+ r"""<p> Generates a temporary authorization token for accessing repositories in the domain. This API requires the <code>codeartifact:GetAuthorizationToken</code> and <code>sts:GetServiceBearerToken</code> permissions. For more information about authorization tokens, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/tokens-authentication.html\">CodeArtifact authentication and tokens</a>. </p> <note> <p>CodeArtifact authorization tokens are valid for a period of 12 hours when created with the <code>login</code> command. You can call <code>login</code> periodically to refresh the token. When you create an authorization token with the <code>GetAuthorizationToken</code> API, you can set a custom authorization period, up to a maximum of 12 hours, with the <code>durationSeconds</code> parameter.</p> <p>The authorization period begins after <code>login</code> or <code>GetAuthorizationToken</code> is called. If <code>login</code> or <code>GetAuthorizationToken</code> is called while assuming a role, the token lifetime is independent of the maximum session duration of the role. For example, if you call <code>sts assume-role</code> and specify a session duration of 15 minutes, then generate a CodeArtifact authorization token, the token will be valid for the full authorization period even though this is longer than the 15-minute session duration.</p> <p>See <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html\">Using IAM Roles</a> for more information on controlling session duration. </p> </note>
1584
+
1585
+ Args:
1586
+ domain: <p> The name of the domain that is in scope for the generated authorization token. </p>
1587
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1588
+ duration_seconds: <p>The time, in seconds, that the generated authorization token is valid. Valid values are <code>0</code> and any number between <code>900</code> (15 minutes) and <code>43200</code> (12 hours). A value of <code>0</code> will set the expiration of the authorization token to the same expiration of the user's role's temporary credentials.</p>
1589
+
1590
+ Raises:
1591
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1592
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1593
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1594
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1595
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1596
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1597
+ """
1598
+
1599
+ async def _handler(
1600
+ req: "AsyncOperationRequest[capo_codeartifact.types.get_authorization_token_request.GetAuthorizationTokenRequest]",
1601
+ ) -> AsyncOperationResponse[
1602
+ "capo_codeartifact.types.get_authorization_token_result.GetAuthorizationTokenResult"
1603
+ ]:
1604
+ import capo_codeartifact._operations.code_artifact_control_plane_service.get_authorization_token
1605
+
1606
+ (
1607
+ output,
1608
+ http_response,
1609
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.get_authorization_token.async_get_authorization_token(
1610
+ req.options, req.input
1611
+ )
1612
+ return AsyncOperationResponse(output=output, response=http_response)
1613
+
1614
+ interceptors_, options_ = self.operation_options(config_overrides)
1615
+ input_: capo_codeartifact.types.get_authorization_token_request.GetAuthorizationTokenRequest = {
1616
+ "domain": domain
1617
+ }
1618
+ if domain_owner is not None:
1619
+ input_["domain_owner"] = domain_owner
1620
+ if duration_seconds is not None:
1621
+ input_["duration_seconds"] = duration_seconds
1622
+
1623
+ response = await aexecute_pipeline(
1624
+ AsyncOperationRequest(input=input_, options=options_),
1625
+ handler=_handler,
1626
+ interceptors=list(interceptors_),
1627
+ )
1628
+ await response.response.aclose()
1629
+ return response.output
1630
+
1631
+ async def get_domain_permissions_policy(
1632
+ self,
1633
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1634
+ *,
1635
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1636
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1637
+ ) -> "capo_codeartifact.types.get_domain_permissions_policy_result.GetDomainPermissionsPolicyResult":
1638
+ r"""<p> Returns the resource policy attached to the specified domain. </p> <note> <p> The policy is a resource-based policy, not an identity-based policy. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html\">Identity-based policies and resource-based policies </a> in the <i>IAM User Guide</i>. </p> </note>
1639
+
1640
+ Args:
1641
+ domain: <p> The name of the domain to which the resource policy is attached. </p>
1642
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1643
+
1644
+ Raises:
1645
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1646
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1647
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1648
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1649
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1650
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1651
+ """
1652
+
1653
+ async def _handler(
1654
+ req: "AsyncOperationRequest[capo_codeartifact.types.get_domain_permissions_policy_request.GetDomainPermissionsPolicyRequest]",
1655
+ ) -> AsyncOperationResponse[
1656
+ "capo_codeartifact.types.get_domain_permissions_policy_result.GetDomainPermissionsPolicyResult"
1657
+ ]:
1658
+ import capo_codeartifact._operations.code_artifact_control_plane_service.get_domain_permissions_policy
1659
+
1660
+ (
1661
+ output,
1662
+ http_response,
1663
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.get_domain_permissions_policy.async_get_domain_permissions_policy(
1664
+ req.options, req.input
1665
+ )
1666
+ return AsyncOperationResponse(output=output, response=http_response)
1667
+
1668
+ interceptors_, options_ = self.operation_options(config_overrides)
1669
+ input_: capo_codeartifact.types.get_domain_permissions_policy_request.GetDomainPermissionsPolicyRequest = {
1670
+ "domain": domain
1671
+ }
1672
+ if domain_owner is not None:
1673
+ input_["domain_owner"] = domain_owner
1674
+
1675
+ response = await aexecute_pipeline(
1676
+ AsyncOperationRequest(input=input_, options=options_),
1677
+ handler=_handler,
1678
+ interceptors=list(interceptors_),
1679
+ )
1680
+ await response.response.aclose()
1681
+ return response.output
1682
+
1683
+ @asynccontextmanager
1684
+ async def get_package_version_asset(
1685
+ self,
1686
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1687
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1688
+ format: "capo_codeartifact.types.package_format.PackageFormat",
1689
+ package: "capo_codeartifact.types.package_name.PackageName",
1690
+ package_version: "capo_codeartifact.types.package_version.PackageVersion",
1691
+ asset: "capo_codeartifact.types.asset_name.AssetName",
1692
+ *,
1693
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1694
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1695
+ namespace: Optional[
1696
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
1697
+ ] = None,
1698
+ package_version_revision: Optional[
1699
+ "capo_codeartifact.types.package_version_revision.PackageVersionRevision"
1700
+ ] = None,
1701
+ ) -> "AsyncGenerator[capo_codeartifact.types.get_package_version_asset_result.GetPackageVersionAssetResult]":
1702
+ """<p> Returns an asset (or file) that is in a package. For example, for a Maven package version, use <code>GetPackageVersionAsset</code> to download a <code>JAR</code> file, a <code>POM</code> file, or any other assets in the package version. </p>
1703
+
1704
+ Args:
1705
+ domain: <p> The name of the domain that contains the repository that contains the package version with the requested asset. </p>
1706
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1707
+ repository: <p> The repository that contains the package version with the requested asset. </p>
1708
+ format: <p> A format that specifies the type of the package version with the requested asset file. </p>
1709
+ namespace: <p>The namespace of the package version with the requested asset file. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when requesting assets from package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
1710
+ package: <p> The name of the package that contains the requested asset. </p>
1711
+ package_version: <p> A string that contains the package version (for example, <code>3.5.2</code>). </p>
1712
+ asset: <p> The name of the requested asset. </p>
1713
+ package_version_revision: <p> The name of the package version revision that contains the requested asset. </p>
1714
+
1715
+ Raises:
1716
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1717
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
1718
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1719
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1720
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1721
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1722
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1723
+ """
1724
+
1725
+ async def _handler(
1726
+ req: "AsyncOperationRequest[capo_codeartifact.types.get_package_version_asset_request.GetPackageVersionAssetRequest]",
1727
+ ) -> AsyncOperationResponse[
1728
+ "capo_codeartifact.types.get_package_version_asset_result.GetPackageVersionAssetResult"
1729
+ ]:
1730
+ import capo_codeartifact._operations.code_artifact_control_plane_service.get_package_version_asset
1731
+
1732
+ (
1733
+ output,
1734
+ http_response,
1735
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.get_package_version_asset.async_get_package_version_asset(
1736
+ req.options, req.input
1737
+ )
1738
+ return AsyncOperationResponse(output=output, response=http_response)
1739
+
1740
+ interceptors_, options_ = self.operation_options(config_overrides)
1741
+ input_: capo_codeartifact.types.get_package_version_asset_request.GetPackageVersionAssetRequest = {
1742
+ "domain": domain,
1743
+ "repository": repository,
1744
+ "format": format,
1745
+ "package": package,
1746
+ "package_version": package_version,
1747
+ "asset": asset,
1748
+ }
1749
+ if domain_owner is not None:
1750
+ input_["domain_owner"] = domain_owner
1751
+ if namespace is not None:
1752
+ input_["namespace"] = namespace
1753
+ if package_version_revision is not None:
1754
+ input_["package_version_revision"] = package_version_revision
1755
+
1756
+ response = await aexecute_pipeline(
1757
+ AsyncOperationRequest(input=input_, options=options_),
1758
+ handler=_handler,
1759
+ interceptors=list(interceptors_),
1760
+ )
1761
+ try:
1762
+ yield response.output
1763
+ finally:
1764
+ await response.response.aclose()
1765
+
1766
+ async def get_package_version_readme(
1767
+ self,
1768
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1769
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1770
+ format: "capo_codeartifact.types.package_format.PackageFormat",
1771
+ package: "capo_codeartifact.types.package_name.PackageName",
1772
+ package_version: "capo_codeartifact.types.package_version.PackageVersion",
1773
+ *,
1774
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1775
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1776
+ namespace: Optional[
1777
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
1778
+ ] = None,
1779
+ ) -> "capo_codeartifact.types.get_package_version_readme_result.GetPackageVersionReadmeResult":
1780
+ """<p> Gets the readme file or descriptive text for a package version. </p> <p> The returned text might contain formatting. For example, it might contain formatting for Markdown or reStructuredText. </p>
1781
+
1782
+ Args:
1783
+ domain: <p> The name of the domain that contains the repository that contains the package version with the requested readme file. </p>
1784
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1785
+ repository: <p> The repository that contains the package with the requested readme file. </p>
1786
+ format: <p> A format that specifies the type of the package version with the requested readme file. </p>
1787
+ namespace: <p>The namespace of the package version with the requested readme file. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when requesting the readme from package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
1788
+ package: <p> The name of the package version that contains the requested readme file. </p>
1789
+ package_version: <p> A string that contains the package version (for example, <code>3.5.2</code>). </p>
1790
+
1791
+ Raises:
1792
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1793
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1794
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1795
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1796
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1797
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1798
+ """
1799
+
1800
+ async def _handler(
1801
+ req: "AsyncOperationRequest[capo_codeartifact.types.get_package_version_readme_request.GetPackageVersionReadmeRequest]",
1802
+ ) -> AsyncOperationResponse[
1803
+ "capo_codeartifact.types.get_package_version_readme_result.GetPackageVersionReadmeResult"
1804
+ ]:
1805
+ import capo_codeartifact._operations.code_artifact_control_plane_service.get_package_version_readme
1806
+
1807
+ (
1808
+ output,
1809
+ http_response,
1810
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.get_package_version_readme.async_get_package_version_readme(
1811
+ req.options, req.input
1812
+ )
1813
+ return AsyncOperationResponse(output=output, response=http_response)
1814
+
1815
+ interceptors_, options_ = self.operation_options(config_overrides)
1816
+ input_: capo_codeartifact.types.get_package_version_readme_request.GetPackageVersionReadmeRequest = {
1817
+ "domain": domain,
1818
+ "repository": repository,
1819
+ "format": format,
1820
+ "package": package,
1821
+ "package_version": package_version,
1822
+ }
1823
+ if domain_owner is not None:
1824
+ input_["domain_owner"] = domain_owner
1825
+ if namespace is not None:
1826
+ input_["namespace"] = namespace
1827
+
1828
+ response = await aexecute_pipeline(
1829
+ AsyncOperationRequest(input=input_, options=options_),
1830
+ handler=_handler,
1831
+ interceptors=list(interceptors_),
1832
+ )
1833
+ await response.response.aclose()
1834
+ return response.output
1835
+
1836
+ async def get_repository_endpoint(
1837
+ self,
1838
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1839
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1840
+ format: "capo_codeartifact.types.package_format.PackageFormat",
1841
+ *,
1842
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1843
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1844
+ endpoint_type: Optional[
1845
+ "capo_codeartifact.types.endpoint_type.EndpointType"
1846
+ ] = None,
1847
+ ) -> "capo_codeartifact.types.get_repository_endpoint_result.GetRepositoryEndpointResult":
1848
+ """<p> Returns the endpoint of a repository for a specific package format. A repository has one endpoint for each package format: </p> <ul> <li> <p> <code>cargo</code> </p> </li> <li> <p> <code>generic</code> </p> </li> <li> <p> <code>maven</code> </p> </li> <li> <p> <code>npm</code> </p> </li> <li> <p> <code>nuget</code> </p> </li> <li> <p> <code>pypi</code> </p> </li> <li> <p> <code>ruby</code> </p> </li> <li> <p> <code>swift</code> </p> </li> </ul>
1849
+
1850
+ Args:
1851
+ domain: <p> The name of the domain that contains the repository. </p>
1852
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces. </p>
1853
+ repository: <p> The name of the repository. </p>
1854
+ format: <p> Returns which endpoint of a repository to return. A repository has one endpoint for each package format. </p>
1855
+ endpoint_type: <p>A string that specifies the type of endpoint.</p>
1856
+
1857
+ Raises:
1858
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1859
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1860
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1861
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1862
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1863
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1864
+ """
1865
+
1866
+ async def _handler(
1867
+ req: "AsyncOperationRequest[capo_codeartifact.types.get_repository_endpoint_request.GetRepositoryEndpointRequest]",
1868
+ ) -> AsyncOperationResponse[
1869
+ "capo_codeartifact.types.get_repository_endpoint_result.GetRepositoryEndpointResult"
1870
+ ]:
1871
+ import capo_codeartifact._operations.code_artifact_control_plane_service.get_repository_endpoint
1872
+
1873
+ (
1874
+ output,
1875
+ http_response,
1876
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.get_repository_endpoint.async_get_repository_endpoint(
1877
+ req.options, req.input
1878
+ )
1879
+ return AsyncOperationResponse(output=output, response=http_response)
1880
+
1881
+ interceptors_, options_ = self.operation_options(config_overrides)
1882
+ input_: capo_codeartifact.types.get_repository_endpoint_request.GetRepositoryEndpointRequest = {
1883
+ "domain": domain,
1884
+ "repository": repository,
1885
+ "format": format,
1886
+ }
1887
+ if domain_owner is not None:
1888
+ input_["domain_owner"] = domain_owner
1889
+ if endpoint_type is not None:
1890
+ input_["endpoint_type"] = endpoint_type
1891
+
1892
+ response = await aexecute_pipeline(
1893
+ AsyncOperationRequest(input=input_, options=options_),
1894
+ handler=_handler,
1895
+ interceptors=list(interceptors_),
1896
+ )
1897
+ await response.response.aclose()
1898
+ return response.output
1899
+
1900
+ async def get_repository_permissions_policy(
1901
+ self,
1902
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1903
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
1904
+ *,
1905
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1906
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1907
+ ) -> "capo_codeartifact.types.get_repository_permissions_policy_result.GetRepositoryPermissionsPolicyResult":
1908
+ """<p> Returns the resource policy that is set on a repository. </p>
1909
+
1910
+ Args:
1911
+ domain: <p> The name of the domain containing the repository whose associated resource policy is to be retrieved. </p>
1912
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1913
+ repository: <p> The name of the repository whose associated resource policy is to be retrieved. </p>
1914
+
1915
+ Raises:
1916
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1917
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1918
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1919
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1920
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1921
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1922
+ """
1923
+
1924
+ async def _handler(
1925
+ req: "AsyncOperationRequest[capo_codeartifact.types.get_repository_permissions_policy_request.GetRepositoryPermissionsPolicyRequest]",
1926
+ ) -> AsyncOperationResponse[
1927
+ "capo_codeartifact.types.get_repository_permissions_policy_result.GetRepositoryPermissionsPolicyResult"
1928
+ ]:
1929
+ import capo_codeartifact._operations.code_artifact_control_plane_service.get_repository_permissions_policy
1930
+
1931
+ (
1932
+ output,
1933
+ http_response,
1934
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.get_repository_permissions_policy.async_get_repository_permissions_policy(
1935
+ req.options, req.input
1936
+ )
1937
+ return AsyncOperationResponse(output=output, response=http_response)
1938
+
1939
+ interceptors_, options_ = self.operation_options(config_overrides)
1940
+ input_: capo_codeartifact.types.get_repository_permissions_policy_request.GetRepositoryPermissionsPolicyRequest = {
1941
+ "domain": domain,
1942
+ "repository": repository,
1943
+ }
1944
+ if domain_owner is not None:
1945
+ input_["domain_owner"] = domain_owner
1946
+
1947
+ response = await aexecute_pipeline(
1948
+ AsyncOperationRequest(input=input_, options=options_),
1949
+ handler=_handler,
1950
+ interceptors=list(interceptors_),
1951
+ )
1952
+ await response.response.aclose()
1953
+ return response.output
1954
+
1955
+ async def list_allowed_repositories_for_group(
1956
+ self,
1957
+ domain: "capo_codeartifact.types.domain_name.DomainName",
1958
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
1959
+ origin_restriction_type: "capo_codeartifact.types.package_group_origin_restriction_type.PackageGroupOriginRestrictionType",
1960
+ *,
1961
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
1962
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
1963
+ max_results: Optional[
1964
+ "capo_codeartifact.types.list_allowed_repositories_for_group_max_results.ListAllowedRepositoriesForGroupMaxResults"
1965
+ ] = None,
1966
+ next_token: Optional[
1967
+ "capo_codeartifact.types.pagination_token.PaginationToken"
1968
+ ] = None,
1969
+ ) -> "capo_codeartifact.types.list_allowed_repositories_for_group_result.ListAllowedRepositoriesForGroupResult":
1970
+ r"""<p>Lists the repositories in the added repositories list of the specified restriction type for a package group. For more information about restriction types and added repository lists, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/package-group-origin-controls.html\">Package group origin controls</a> in the <i>CodeArtifact User Guide</i>. </p>
1971
+
1972
+ Args:
1973
+ domain: <p> The name of the domain that contains the package group from which to list allowed repositories. </p>
1974
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
1975
+ package_group: <p>The pattern of the package group from which to list allowed repositories.</p>
1976
+ origin_restriction_type: <p>The origin configuration restriction type of which to list allowed repositories.</p>
1977
+ max_results: <p> The maximum number of results to return per page. </p>
1978
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
1979
+
1980
+ Raises:
1981
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
1982
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
1983
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
1984
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
1985
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
1986
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
1987
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
1988
+ """
1989
+
1990
+ async def _handler(
1991
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_allowed_repositories_for_group_request.ListAllowedRepositoriesForGroupRequest]",
1992
+ ) -> AsyncOperationResponse[
1993
+ "capo_codeartifact.types.list_allowed_repositories_for_group_result.ListAllowedRepositoriesForGroupResult"
1994
+ ]:
1995
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_allowed_repositories_for_group
1996
+
1997
+ (
1998
+ output,
1999
+ http_response,
2000
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_allowed_repositories_for_group.async_list_allowed_repositories_for_group(
2001
+ req.options, req.input
2002
+ )
2003
+ return AsyncOperationResponse(output=output, response=http_response)
2004
+
2005
+ interceptors_, options_ = self.operation_options(config_overrides)
2006
+ input_: capo_codeartifact.types.list_allowed_repositories_for_group_request.ListAllowedRepositoriesForGroupRequest = {
2007
+ "domain": domain,
2008
+ "package_group": package_group,
2009
+ "origin_restriction_type": origin_restriction_type,
2010
+ }
2011
+ if domain_owner is not None:
2012
+ input_["domain_owner"] = domain_owner
2013
+ if max_results is not None:
2014
+ input_["max_results"] = max_results
2015
+ if next_token is not None:
2016
+ input_["next_token"] = next_token
2017
+
2018
+ response = await aexecute_pipeline(
2019
+ AsyncOperationRequest(input=input_, options=options_),
2020
+ handler=_handler,
2021
+ interceptors=list(interceptors_),
2022
+ )
2023
+ await response.response.aclose()
2024
+ return response.output
2025
+
2026
+ async def iter_list_allowed_repositories_for_group(
2027
+ self,
2028
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2029
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
2030
+ origin_restriction_type: "capo_codeartifact.types.package_group_origin_restriction_type.PackageGroupOriginRestrictionType",
2031
+ *,
2032
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2033
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2034
+ max_results: Optional[
2035
+ "capo_codeartifact.types.list_allowed_repositories_for_group_max_results.ListAllowedRepositoriesForGroupMaxResults"
2036
+ ] = None,
2037
+ next_token: Optional[
2038
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2039
+ ] = None,
2040
+ ) -> "AsyncIterator[capo_codeartifact.types.repository_name.RepositoryName]":
2041
+ _token = next_token
2042
+ while True:
2043
+ _response = await self.list_allowed_repositories_for_group(
2044
+ domain,
2045
+ package_group,
2046
+ origin_restriction_type,
2047
+ config_overrides=config_overrides,
2048
+ domain_owner=domain_owner,
2049
+ max_results=max_results,
2050
+ next_token=_token,
2051
+ )
2052
+ _page = _resolve_path(_response, ("allowed_repositories",))
2053
+ for _item in _page or []:
2054
+ yield _item
2055
+ _token = _resolve_path(_response, ("next_token",))
2056
+ if not _token:
2057
+ break
2058
+
2059
+ async def list_associated_packages(
2060
+ self,
2061
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2062
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
2063
+ *,
2064
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2065
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2066
+ max_results: Optional[
2067
+ "capo_codeartifact.types.list_packages_max_results.ListPackagesMaxResults"
2068
+ ] = None,
2069
+ next_token: Optional[
2070
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2071
+ ] = None,
2072
+ preview: Optional[
2073
+ "capo_codeartifact.types.boolean_optional.BooleanOptional"
2074
+ ] = None,
2075
+ ) -> "capo_codeartifact.types.list_associated_packages_result.ListAssociatedPackagesResult":
2076
+ r"""<p>Returns a list of packages associated with the requested package group. For information package group association and matching, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/package-group-definition-syntax-matching-behavior.html\">Package group definition syntax and matching behavior</a> in the <i>CodeArtifact User Guide</i>.</p>
2077
+
2078
+ Args:
2079
+ domain: <p> The name of the domain that contains the package group from which to list associated packages. </p>
2080
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
2081
+ package_group: <p> The pattern of the package group from which to list associated packages. </p>
2082
+ max_results: <p> The maximum number of results to return per page. </p>
2083
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2084
+ preview: <p> When this flag is included, <code>ListAssociatedPackages</code> will return a list of packages that would be associated with a package group, even if it does not exist. </p>
2085
+
2086
+ Raises:
2087
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2088
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2089
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
2090
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2091
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2092
+ """
2093
+
2094
+ async def _handler(
2095
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_associated_packages_request.ListAssociatedPackagesRequest]",
2096
+ ) -> AsyncOperationResponse[
2097
+ "capo_codeartifact.types.list_associated_packages_result.ListAssociatedPackagesResult"
2098
+ ]:
2099
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_associated_packages
2100
+
2101
+ (
2102
+ output,
2103
+ http_response,
2104
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_associated_packages.async_list_associated_packages(
2105
+ req.options, req.input
2106
+ )
2107
+ return AsyncOperationResponse(output=output, response=http_response)
2108
+
2109
+ interceptors_, options_ = self.operation_options(config_overrides)
2110
+ input_: capo_codeartifact.types.list_associated_packages_request.ListAssociatedPackagesRequest = {
2111
+ "domain": domain,
2112
+ "package_group": package_group,
2113
+ }
2114
+ if domain_owner is not None:
2115
+ input_["domain_owner"] = domain_owner
2116
+ if max_results is not None:
2117
+ input_["max_results"] = max_results
2118
+ if next_token is not None:
2119
+ input_["next_token"] = next_token
2120
+ if preview is not None:
2121
+ input_["preview"] = preview
2122
+
2123
+ response = await aexecute_pipeline(
2124
+ AsyncOperationRequest(input=input_, options=options_),
2125
+ handler=_handler,
2126
+ interceptors=list(interceptors_),
2127
+ )
2128
+ await response.response.aclose()
2129
+ return response.output
2130
+
2131
+ async def iter_list_associated_packages(
2132
+ self,
2133
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2134
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
2135
+ *,
2136
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2137
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2138
+ max_results: Optional[
2139
+ "capo_codeartifact.types.list_packages_max_results.ListPackagesMaxResults"
2140
+ ] = None,
2141
+ next_token: Optional[
2142
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2143
+ ] = None,
2144
+ preview: Optional[
2145
+ "capo_codeartifact.types.boolean_optional.BooleanOptional"
2146
+ ] = None,
2147
+ ) -> "AsyncIterator[capo_codeartifact.types.associated_package.AssociatedPackage]":
2148
+ _token = next_token
2149
+ while True:
2150
+ _response = await self.list_associated_packages(
2151
+ domain,
2152
+ package_group,
2153
+ config_overrides=config_overrides,
2154
+ domain_owner=domain_owner,
2155
+ max_results=max_results,
2156
+ next_token=_token,
2157
+ preview=preview,
2158
+ )
2159
+ _page = _resolve_path(_response, ("packages",))
2160
+ for _item in _page or []:
2161
+ yield _item
2162
+ _token = _resolve_path(_response, ("next_token",))
2163
+ if not _token:
2164
+ break
2165
+
2166
+ async def list_domains(
2167
+ self,
2168
+ *,
2169
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2170
+ max_results: Optional[
2171
+ "capo_codeartifact.types.list_domains_max_results.ListDomainsMaxResults"
2172
+ ] = None,
2173
+ next_token: Optional[
2174
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2175
+ ] = None,
2176
+ ) -> "capo_codeartifact.types.list_domains_result.ListDomainsResult":
2177
+ r"""<p> Returns a list of <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionDescription.html\">DomainSummary</a> objects for all domains owned by the Amazon Web Services account that makes this call. Each returned <code>DomainSummary</code> object contains information about a domain. </p>
2178
+
2179
+ Args:
2180
+ max_results: <p> The maximum number of results to return per page. </p>
2181
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2182
+
2183
+ Raises:
2184
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2185
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2186
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2187
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2188
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2189
+ """
2190
+
2191
+ async def _handler(
2192
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_domains_request.ListDomainsRequest]",
2193
+ ) -> AsyncOperationResponse[
2194
+ "capo_codeartifact.types.list_domains_result.ListDomainsResult"
2195
+ ]:
2196
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_domains
2197
+
2198
+ (
2199
+ output,
2200
+ http_response,
2201
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_domains.async_list_domains(
2202
+ req.options, req.input
2203
+ )
2204
+ return AsyncOperationResponse(output=output, response=http_response)
2205
+
2206
+ interceptors_, options_ = self.operation_options(config_overrides)
2207
+ input_: capo_codeartifact.types.list_domains_request.ListDomainsRequest = {}
2208
+ if max_results is not None:
2209
+ input_["max_results"] = max_results
2210
+ if next_token is not None:
2211
+ input_["next_token"] = next_token
2212
+
2213
+ response = await aexecute_pipeline(
2214
+ AsyncOperationRequest(input=input_, options=options_),
2215
+ handler=_handler,
2216
+ interceptors=list(interceptors_),
2217
+ )
2218
+ await response.response.aclose()
2219
+ return response.output
2220
+
2221
+ async def iter_list_domains(
2222
+ self,
2223
+ *,
2224
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2225
+ max_results: Optional[
2226
+ "capo_codeartifact.types.list_domains_max_results.ListDomainsMaxResults"
2227
+ ] = None,
2228
+ next_token: Optional[
2229
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2230
+ ] = None,
2231
+ ) -> "AsyncIterator[capo_codeartifact.types.domain_summary.DomainSummary]":
2232
+ _token = next_token
2233
+ while True:
2234
+ _response = await self.list_domains(
2235
+ config_overrides=config_overrides,
2236
+ max_results=max_results,
2237
+ next_token=_token,
2238
+ )
2239
+ _page = _resolve_path(_response, ("domains",))
2240
+ for _item in _page or []:
2241
+ yield _item
2242
+ _token = _resolve_path(_response, ("next_token",))
2243
+ if not _token:
2244
+ break
2245
+
2246
+ async def list_package_groups(
2247
+ self,
2248
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2249
+ *,
2250
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2251
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2252
+ max_results: Optional[
2253
+ "capo_codeartifact.types.list_package_groups_max_results.ListPackageGroupsMaxResults"
2254
+ ] = None,
2255
+ next_token: Optional[
2256
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2257
+ ] = None,
2258
+ prefix: Optional[
2259
+ "capo_codeartifact.types.package_group_pattern_prefix.PackageGroupPatternPrefix"
2260
+ ] = None,
2261
+ ) -> "capo_codeartifact.types.list_package_groups_result.ListPackageGroupsResult":
2262
+ """<p>Returns a list of package groups in the requested domain.</p>
2263
+
2264
+ Args:
2265
+ domain: <p> The domain for which you want to list package groups. </p>
2266
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
2267
+ max_results: <p> The maximum number of results to return per page. </p>
2268
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2269
+ prefix: <p> A prefix for which to search package groups. When included, <code>ListPackageGroups</code> will return only package groups with patterns that match the prefix. </p>
2270
+
2271
+ Raises:
2272
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2273
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2274
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
2275
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2276
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2277
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2278
+ """
2279
+
2280
+ async def _handler(
2281
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_package_groups_request.ListPackageGroupsRequest]",
2282
+ ) -> AsyncOperationResponse[
2283
+ "capo_codeartifact.types.list_package_groups_result.ListPackageGroupsResult"
2284
+ ]:
2285
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_package_groups
2286
+
2287
+ (
2288
+ output,
2289
+ http_response,
2290
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_package_groups.async_list_package_groups(
2291
+ req.options, req.input
2292
+ )
2293
+ return AsyncOperationResponse(output=output, response=http_response)
2294
+
2295
+ interceptors_, options_ = self.operation_options(config_overrides)
2296
+ input_: capo_codeartifact.types.list_package_groups_request.ListPackageGroupsRequest = {
2297
+ "domain": domain
2298
+ }
2299
+ if domain_owner is not None:
2300
+ input_["domain_owner"] = domain_owner
2301
+ if max_results is not None:
2302
+ input_["max_results"] = max_results
2303
+ if next_token is not None:
2304
+ input_["next_token"] = next_token
2305
+ if prefix is not None:
2306
+ input_["prefix"] = prefix
2307
+
2308
+ response = await aexecute_pipeline(
2309
+ AsyncOperationRequest(input=input_, options=options_),
2310
+ handler=_handler,
2311
+ interceptors=list(interceptors_),
2312
+ )
2313
+ await response.response.aclose()
2314
+ return response.output
2315
+
2316
+ async def iter_list_package_groups(
2317
+ self,
2318
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2319
+ *,
2320
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2321
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2322
+ max_results: Optional[
2323
+ "capo_codeartifact.types.list_package_groups_max_results.ListPackageGroupsMaxResults"
2324
+ ] = None,
2325
+ next_token: Optional[
2326
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2327
+ ] = None,
2328
+ prefix: Optional[
2329
+ "capo_codeartifact.types.package_group_pattern_prefix.PackageGroupPatternPrefix"
2330
+ ] = None,
2331
+ ) -> "AsyncIterator[capo_codeartifact.types.package_group_summary.PackageGroupSummary]":
2332
+ _token = next_token
2333
+ while True:
2334
+ _response = await self.list_package_groups(
2335
+ domain,
2336
+ config_overrides=config_overrides,
2337
+ domain_owner=domain_owner,
2338
+ max_results=max_results,
2339
+ next_token=_token,
2340
+ prefix=prefix,
2341
+ )
2342
+ _page = _resolve_path(_response, ("package_groups",))
2343
+ for _item in _page or []:
2344
+ yield _item
2345
+ _token = _resolve_path(_response, ("next_token",))
2346
+ if not _token:
2347
+ break
2348
+
2349
+ async def list_packages(
2350
+ self,
2351
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2352
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
2353
+ *,
2354
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2355
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2356
+ format: Optional["capo_codeartifact.types.package_format.PackageFormat"] = None,
2357
+ namespace: Optional[
2358
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
2359
+ ] = None,
2360
+ package_prefix: Optional[
2361
+ "capo_codeartifact.types.package_name.PackageName"
2362
+ ] = None,
2363
+ max_results: Optional[
2364
+ "capo_codeartifact.types.list_packages_max_results.ListPackagesMaxResults"
2365
+ ] = None,
2366
+ next_token: Optional[
2367
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2368
+ ] = None,
2369
+ publish: Optional["capo_codeartifact.types.allow_publish.AllowPublish"] = None,
2370
+ upstream: Optional[
2371
+ "capo_codeartifact.types.allow_upstream.AllowUpstream"
2372
+ ] = None,
2373
+ ) -> "capo_codeartifact.types.list_packages_result.ListPackagesResult":
2374
+ r"""<p> Returns a list of <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html\">PackageSummary</a> objects for packages in a repository that match the request parameters. </p>
2375
+
2376
+ Args:
2377
+ domain: <p> The name of the domain that contains the repository that contains the requested packages. </p>
2378
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
2379
+ repository: <p> The name of the repository that contains the requested packages. </p>
2380
+ format: <p>The format used to filter requested packages. Only packages from the provided format will be returned.</p>
2381
+ namespace: <p>The namespace prefix used to filter requested packages. Only packages with a namespace that starts with the provided string value are returned. Note that although this option is called <code>--namespace</code> and not <code>--namespace-prefix</code>, it has prefix-matching behavior.</p> <p>Each package format uses namespace as follows:</p> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
2382
+ package_prefix: <p> A prefix used to filter requested packages. Only packages with names that start with <code>packagePrefix</code> are returned. </p>
2383
+ max_results: <p> The maximum number of results to return per page. </p>
2384
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2385
+ publish: <p>The value of the <code>Publish</code> package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html\">PackageOriginRestrictions</a>.</p>
2386
+ upstream: <p>The value of the <code>Upstream</code> package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html\">PackageOriginRestrictions</a>.</p>
2387
+
2388
+ Raises:
2389
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2390
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2391
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
2392
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2393
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2394
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2395
+ """
2396
+
2397
+ async def _handler(
2398
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_packages_request.ListPackagesRequest]",
2399
+ ) -> AsyncOperationResponse[
2400
+ "capo_codeartifact.types.list_packages_result.ListPackagesResult"
2401
+ ]:
2402
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_packages
2403
+
2404
+ (
2405
+ output,
2406
+ http_response,
2407
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_packages.async_list_packages(
2408
+ req.options, req.input
2409
+ )
2410
+ return AsyncOperationResponse(output=output, response=http_response)
2411
+
2412
+ interceptors_, options_ = self.operation_options(config_overrides)
2413
+ input_: capo_codeartifact.types.list_packages_request.ListPackagesRequest = {
2414
+ "domain": domain,
2415
+ "repository": repository,
2416
+ }
2417
+ if domain_owner is not None:
2418
+ input_["domain_owner"] = domain_owner
2419
+ if format is not None:
2420
+ input_["format"] = format
2421
+ if namespace is not None:
2422
+ input_["namespace"] = namespace
2423
+ if package_prefix is not None:
2424
+ input_["package_prefix"] = package_prefix
2425
+ if max_results is not None:
2426
+ input_["max_results"] = max_results
2427
+ if next_token is not None:
2428
+ input_["next_token"] = next_token
2429
+ if publish is not None:
2430
+ input_["publish"] = publish
2431
+ if upstream is not None:
2432
+ input_["upstream"] = upstream
2433
+
2434
+ response = await aexecute_pipeline(
2435
+ AsyncOperationRequest(input=input_, options=options_),
2436
+ handler=_handler,
2437
+ interceptors=list(interceptors_),
2438
+ )
2439
+ await response.response.aclose()
2440
+ return response.output
2441
+
2442
+ async def iter_list_packages(
2443
+ self,
2444
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2445
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
2446
+ *,
2447
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2448
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2449
+ format: Optional["capo_codeartifact.types.package_format.PackageFormat"] = None,
2450
+ namespace: Optional[
2451
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
2452
+ ] = None,
2453
+ package_prefix: Optional[
2454
+ "capo_codeartifact.types.package_name.PackageName"
2455
+ ] = None,
2456
+ max_results: Optional[
2457
+ "capo_codeartifact.types.list_packages_max_results.ListPackagesMaxResults"
2458
+ ] = None,
2459
+ next_token: Optional[
2460
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2461
+ ] = None,
2462
+ publish: Optional["capo_codeartifact.types.allow_publish.AllowPublish"] = None,
2463
+ upstream: Optional[
2464
+ "capo_codeartifact.types.allow_upstream.AllowUpstream"
2465
+ ] = None,
2466
+ ) -> "AsyncIterator[capo_codeartifact.types.package_summary.PackageSummary]":
2467
+ _token = next_token
2468
+ while True:
2469
+ _response = await self.list_packages(
2470
+ domain,
2471
+ repository,
2472
+ config_overrides=config_overrides,
2473
+ domain_owner=domain_owner,
2474
+ format=format,
2475
+ namespace=namespace,
2476
+ package_prefix=package_prefix,
2477
+ max_results=max_results,
2478
+ next_token=_token,
2479
+ publish=publish,
2480
+ upstream=upstream,
2481
+ )
2482
+ _page = _resolve_path(_response, ("packages",))
2483
+ for _item in _page or []:
2484
+ yield _item
2485
+ _token = _resolve_path(_response, ("next_token",))
2486
+ if not _token:
2487
+ break
2488
+
2489
+ async def list_package_version_assets(
2490
+ self,
2491
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2492
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
2493
+ format: "capo_codeartifact.types.package_format.PackageFormat",
2494
+ package: "capo_codeartifact.types.package_name.PackageName",
2495
+ package_version: "capo_codeartifact.types.package_version.PackageVersion",
2496
+ *,
2497
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2498
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2499
+ namespace: Optional[
2500
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
2501
+ ] = None,
2502
+ max_results: Optional[
2503
+ "capo_codeartifact.types.list_package_version_assets_max_results.ListPackageVersionAssetsMaxResults"
2504
+ ] = None,
2505
+ next_token: Optional[
2506
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2507
+ ] = None,
2508
+ ) -> "capo_codeartifact.types.list_package_version_assets_result.ListPackageVersionAssetsResult":
2509
+ r"""<p> Returns a list of <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html\">AssetSummary</a> objects for assets in a package version. </p>
2510
+
2511
+ Args:
2512
+ domain: <p> The name of the domain that contains the repository associated with the package version assets. </p>
2513
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
2514
+ repository: <p> The name of the repository that contains the package that contains the requested package version assets. </p>
2515
+ format: <p> The format of the package that contains the requested package version assets. </p>
2516
+ namespace: <p>The namespace of the package version that contains the requested package version assets. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required requesting assets from package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
2517
+ package: <p> The name of the package that contains the requested package version assets. </p>
2518
+ package_version: <p> A string that contains the package version (for example, <code>3.5.2</code>). </p>
2519
+ max_results: <p> The maximum number of results to return per page. </p>
2520
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2521
+
2522
+ Raises:
2523
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2524
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2525
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
2526
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2527
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2528
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2529
+ """
2530
+
2531
+ async def _handler(
2532
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_package_version_assets_request.ListPackageVersionAssetsRequest]",
2533
+ ) -> AsyncOperationResponse[
2534
+ "capo_codeartifact.types.list_package_version_assets_result.ListPackageVersionAssetsResult"
2535
+ ]:
2536
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_package_version_assets
2537
+
2538
+ (
2539
+ output,
2540
+ http_response,
2541
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_package_version_assets.async_list_package_version_assets(
2542
+ req.options, req.input
2543
+ )
2544
+ return AsyncOperationResponse(output=output, response=http_response)
2545
+
2546
+ interceptors_, options_ = self.operation_options(config_overrides)
2547
+ input_: capo_codeartifact.types.list_package_version_assets_request.ListPackageVersionAssetsRequest = {
2548
+ "domain": domain,
2549
+ "repository": repository,
2550
+ "format": format,
2551
+ "package": package,
2552
+ "package_version": package_version,
2553
+ }
2554
+ if domain_owner is not None:
2555
+ input_["domain_owner"] = domain_owner
2556
+ if namespace is not None:
2557
+ input_["namespace"] = namespace
2558
+ if max_results is not None:
2559
+ input_["max_results"] = max_results
2560
+ if next_token is not None:
2561
+ input_["next_token"] = next_token
2562
+
2563
+ response = await aexecute_pipeline(
2564
+ AsyncOperationRequest(input=input_, options=options_),
2565
+ handler=_handler,
2566
+ interceptors=list(interceptors_),
2567
+ )
2568
+ await response.response.aclose()
2569
+ return response.output
2570
+
2571
+ async def iter_list_package_version_assets(
2572
+ self,
2573
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2574
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
2575
+ format: "capo_codeartifact.types.package_format.PackageFormat",
2576
+ package: "capo_codeartifact.types.package_name.PackageName",
2577
+ package_version: "capo_codeartifact.types.package_version.PackageVersion",
2578
+ *,
2579
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2580
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2581
+ namespace: Optional[
2582
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
2583
+ ] = None,
2584
+ max_results: Optional[
2585
+ "capo_codeartifact.types.list_package_version_assets_max_results.ListPackageVersionAssetsMaxResults"
2586
+ ] = None,
2587
+ next_token: Optional[
2588
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2589
+ ] = None,
2590
+ ) -> "AsyncIterator[capo_codeartifact.types.asset_summary.AssetSummary]":
2591
+ _token = next_token
2592
+ while True:
2593
+ _response = await self.list_package_version_assets(
2594
+ domain,
2595
+ repository,
2596
+ format,
2597
+ package,
2598
+ package_version,
2599
+ config_overrides=config_overrides,
2600
+ domain_owner=domain_owner,
2601
+ namespace=namespace,
2602
+ max_results=max_results,
2603
+ next_token=_token,
2604
+ )
2605
+ _page = _resolve_path(_response, ("assets",))
2606
+ for _item in _page or []:
2607
+ yield _item
2608
+ _token = _resolve_path(_response, ("next_token",))
2609
+ if not _token:
2610
+ break
2611
+
2612
+ async def list_package_version_dependencies(
2613
+ self,
2614
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2615
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
2616
+ format: "capo_codeartifact.types.package_format.PackageFormat",
2617
+ package: "capo_codeartifact.types.package_name.PackageName",
2618
+ package_version: "capo_codeartifact.types.package_version.PackageVersion",
2619
+ *,
2620
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2621
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2622
+ namespace: Optional[
2623
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
2624
+ ] = None,
2625
+ next_token: Optional[
2626
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2627
+ ] = None,
2628
+ ) -> "capo_codeartifact.types.list_package_version_dependencies_result.ListPackageVersionDependenciesResult":
2629
+ r"""<p> Returns the direct dependencies for a package version. The dependencies are returned as <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDependency.html\">PackageDependency</a> objects. CodeArtifact extracts the dependencies for a package version from the metadata file for the package format (for example, the <code>package.json</code> file for npm packages and the <code>pom.xml</code> file for Maven). Any package version dependencies that are not listed in the configuration file are not returned. </p>
2630
+
2631
+ Args:
2632
+ domain: <p> The name of the domain that contains the repository that contains the requested package version dependencies. </p>
2633
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
2634
+ repository: <p> The name of the repository that contains the requested package version. </p>
2635
+ format: <p> The format of the package with the requested dependencies. </p>
2636
+ namespace: <p>The namespace of the package version with the requested dependencies. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when listing dependencies from package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm package version is its <code>scope</code>. </p> </li> <li> <p> Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
2637
+ package: <p> The name of the package versions' package. </p>
2638
+ package_version: <p> A string that contains the package version (for example, <code>3.5.2</code>). </p>
2639
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2640
+
2641
+ Raises:
2642
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2643
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2644
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
2645
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2646
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2647
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2648
+ """
2649
+
2650
+ async def _handler(
2651
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_package_version_dependencies_request.ListPackageVersionDependenciesRequest]",
2652
+ ) -> AsyncOperationResponse[
2653
+ "capo_codeartifact.types.list_package_version_dependencies_result.ListPackageVersionDependenciesResult"
2654
+ ]:
2655
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_package_version_dependencies
2656
+
2657
+ (
2658
+ output,
2659
+ http_response,
2660
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_package_version_dependencies.async_list_package_version_dependencies(
2661
+ req.options, req.input
2662
+ )
2663
+ return AsyncOperationResponse(output=output, response=http_response)
2664
+
2665
+ interceptors_, options_ = self.operation_options(config_overrides)
2666
+ input_: capo_codeartifact.types.list_package_version_dependencies_request.ListPackageVersionDependenciesRequest = {
2667
+ "domain": domain,
2668
+ "repository": repository,
2669
+ "format": format,
2670
+ "package": package,
2671
+ "package_version": package_version,
2672
+ }
2673
+ if domain_owner is not None:
2674
+ input_["domain_owner"] = domain_owner
2675
+ if namespace is not None:
2676
+ input_["namespace"] = namespace
2677
+ if next_token is not None:
2678
+ input_["next_token"] = next_token
2679
+
2680
+ response = await aexecute_pipeline(
2681
+ AsyncOperationRequest(input=input_, options=options_),
2682
+ handler=_handler,
2683
+ interceptors=list(interceptors_),
2684
+ )
2685
+ await response.response.aclose()
2686
+ return response.output
2687
+
2688
+ async def list_package_versions(
2689
+ self,
2690
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2691
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
2692
+ format: "capo_codeartifact.types.package_format.PackageFormat",
2693
+ package: "capo_codeartifact.types.package_name.PackageName",
2694
+ *,
2695
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2696
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2697
+ namespace: Optional[
2698
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
2699
+ ] = None,
2700
+ status: Optional[
2701
+ "capo_codeartifact.types.package_version_status.PackageVersionStatus"
2702
+ ] = None,
2703
+ sort_by: Optional[
2704
+ "capo_codeartifact.types.package_version_sort_type.PackageVersionSortType"
2705
+ ] = None,
2706
+ max_results: Optional[
2707
+ "capo_codeartifact.types.list_package_versions_max_results.ListPackageVersionsMaxResults"
2708
+ ] = None,
2709
+ next_token: Optional[
2710
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2711
+ ] = None,
2712
+ origin_type: Optional[
2713
+ "capo_codeartifact.types.package_version_origin_type.PackageVersionOriginType"
2714
+ ] = None,
2715
+ ) -> (
2716
+ "capo_codeartifact.types.list_package_versions_result.ListPackageVersionsResult"
2717
+ ):
2718
+ r"""<p> Returns a list of <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionSummary.html\">PackageVersionSummary</a> objects for package versions in a repository that match the request parameters. Package versions of all statuses will be returned by default when calling <code>list-package-versions</code> with no <code>--status</code> parameter. </p>
2719
+
2720
+ Args:
2721
+ domain: <p> The name of the domain that contains the repository that contains the requested package versions. </p>
2722
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
2723
+ repository: <p> The name of the repository that contains the requested package versions. </p>
2724
+ format: <p> The format of the package versions you want to list. </p>
2725
+ namespace: <p>The namespace of the package that contains the requested package versions. The package component that specifies its namespace depends on its type. For example:</p> <note> <p>The namespace is required when deleting package versions of the following formats:</p> <ul> <li> <p>Maven</p> </li> <li> <p>Swift</p> </li> <li> <p>generic</p> </li> </ul> </note> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
2726
+ package: <p> The name of the package for which you want to request package versions. </p>
2727
+ status: <p> A string that filters the requested package versions by status. </p>
2728
+ sort_by: <p> How to sort the requested list of package versions. </p>
2729
+ max_results: <p> The maximum number of results to return per page. </p>
2730
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2731
+ origin_type: <p>The <code>originType</code> used to filter package versions. Only package versions with the provided <code>originType</code> will be returned.</p>
2732
+
2733
+ Raises:
2734
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2735
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2736
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
2737
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2738
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2739
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2740
+ """
2741
+
2742
+ async def _handler(
2743
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_package_versions_request.ListPackageVersionsRequest]",
2744
+ ) -> AsyncOperationResponse[
2745
+ "capo_codeartifact.types.list_package_versions_result.ListPackageVersionsResult"
2746
+ ]:
2747
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_package_versions
2748
+
2749
+ (
2750
+ output,
2751
+ http_response,
2752
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_package_versions.async_list_package_versions(
2753
+ req.options, req.input
2754
+ )
2755
+ return AsyncOperationResponse(output=output, response=http_response)
2756
+
2757
+ interceptors_, options_ = self.operation_options(config_overrides)
2758
+ input_: capo_codeartifact.types.list_package_versions_request.ListPackageVersionsRequest = {
2759
+ "domain": domain,
2760
+ "repository": repository,
2761
+ "format": format,
2762
+ "package": package,
2763
+ }
2764
+ if domain_owner is not None:
2765
+ input_["domain_owner"] = domain_owner
2766
+ if namespace is not None:
2767
+ input_["namespace"] = namespace
2768
+ if status is not None:
2769
+ input_["status"] = status
2770
+ if sort_by is not None:
2771
+ input_["sort_by"] = sort_by
2772
+ if max_results is not None:
2773
+ input_["max_results"] = max_results
2774
+ if next_token is not None:
2775
+ input_["next_token"] = next_token
2776
+ if origin_type is not None:
2777
+ input_["origin_type"] = origin_type
2778
+
2779
+ response = await aexecute_pipeline(
2780
+ AsyncOperationRequest(input=input_, options=options_),
2781
+ handler=_handler,
2782
+ interceptors=list(interceptors_),
2783
+ )
2784
+ await response.response.aclose()
2785
+ return response.output
2786
+
2787
+ async def iter_list_package_versions(
2788
+ self,
2789
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2790
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
2791
+ format: "capo_codeartifact.types.package_format.PackageFormat",
2792
+ package: "capo_codeartifact.types.package_name.PackageName",
2793
+ *,
2794
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2795
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2796
+ namespace: Optional[
2797
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
2798
+ ] = None,
2799
+ status: Optional[
2800
+ "capo_codeartifact.types.package_version_status.PackageVersionStatus"
2801
+ ] = None,
2802
+ sort_by: Optional[
2803
+ "capo_codeartifact.types.package_version_sort_type.PackageVersionSortType"
2804
+ ] = None,
2805
+ max_results: Optional[
2806
+ "capo_codeartifact.types.list_package_versions_max_results.ListPackageVersionsMaxResults"
2807
+ ] = None,
2808
+ next_token: Optional[
2809
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2810
+ ] = None,
2811
+ origin_type: Optional[
2812
+ "capo_codeartifact.types.package_version_origin_type.PackageVersionOriginType"
2813
+ ] = None,
2814
+ ) -> "AsyncIterator[capo_codeartifact.types.package_version_summary.PackageVersionSummary]":
2815
+ _token = next_token
2816
+ while True:
2817
+ _response = await self.list_package_versions(
2818
+ domain,
2819
+ repository,
2820
+ format,
2821
+ package,
2822
+ config_overrides=config_overrides,
2823
+ domain_owner=domain_owner,
2824
+ namespace=namespace,
2825
+ status=status,
2826
+ sort_by=sort_by,
2827
+ max_results=max_results,
2828
+ next_token=_token,
2829
+ origin_type=origin_type,
2830
+ )
2831
+ _page = _resolve_path(_response, ("versions",))
2832
+ for _item in _page or []:
2833
+ yield _item
2834
+ _token = _resolve_path(_response, ("next_token",))
2835
+ if not _token:
2836
+ break
2837
+
2838
+ async def list_repositories(
2839
+ self,
2840
+ *,
2841
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2842
+ repository_prefix: Optional[
2843
+ "capo_codeartifact.types.repository_name.RepositoryName"
2844
+ ] = None,
2845
+ max_results: Optional[
2846
+ "capo_codeartifact.types.list_repositories_max_results.ListRepositoriesMaxResults"
2847
+ ] = None,
2848
+ next_token: Optional[
2849
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2850
+ ] = None,
2851
+ ) -> "capo_codeartifact.types.list_repositories_result.ListRepositoriesResult":
2852
+ r"""<p> Returns a list of <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_RepositorySummary.html\">RepositorySummary</a> objects. Each <code>RepositorySummary</code> contains information about a repository in the specified Amazon Web Services account and that matches the input parameters. </p>
2853
+
2854
+ Args:
2855
+ repository_prefix: <p> A prefix used to filter returned repositories. Only repositories with names that start with <code>repositoryPrefix</code> are returned.</p>
2856
+ max_results: <p> The maximum number of results to return per page. </p>
2857
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2858
+
2859
+ Raises:
2860
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2861
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2862
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2863
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2864
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2865
+ """
2866
+
2867
+ async def _handler(
2868
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_repositories_request.ListRepositoriesRequest]",
2869
+ ) -> AsyncOperationResponse[
2870
+ "capo_codeartifact.types.list_repositories_result.ListRepositoriesResult"
2871
+ ]:
2872
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_repositories
2873
+
2874
+ (
2875
+ output,
2876
+ http_response,
2877
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_repositories.async_list_repositories(
2878
+ req.options, req.input
2879
+ )
2880
+ return AsyncOperationResponse(output=output, response=http_response)
2881
+
2882
+ interceptors_, options_ = self.operation_options(config_overrides)
2883
+ input_: capo_codeartifact.types.list_repositories_request.ListRepositoriesRequest = {}
2884
+ if repository_prefix is not None:
2885
+ input_["repository_prefix"] = repository_prefix
2886
+ if max_results is not None:
2887
+ input_["max_results"] = max_results
2888
+ if next_token is not None:
2889
+ input_["next_token"] = next_token
2890
+
2891
+ response = await aexecute_pipeline(
2892
+ AsyncOperationRequest(input=input_, options=options_),
2893
+ handler=_handler,
2894
+ interceptors=list(interceptors_),
2895
+ )
2896
+ await response.response.aclose()
2897
+ return response.output
2898
+
2899
+ async def iter_list_repositories(
2900
+ self,
2901
+ *,
2902
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2903
+ repository_prefix: Optional[
2904
+ "capo_codeartifact.types.repository_name.RepositoryName"
2905
+ ] = None,
2906
+ max_results: Optional[
2907
+ "capo_codeartifact.types.list_repositories_max_results.ListRepositoriesMaxResults"
2908
+ ] = None,
2909
+ next_token: Optional[
2910
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2911
+ ] = None,
2912
+ ) -> "AsyncIterator[capo_codeartifact.types.repository_summary.RepositorySummary]":
2913
+ _token = next_token
2914
+ while True:
2915
+ _response = await self.list_repositories(
2916
+ config_overrides=config_overrides,
2917
+ repository_prefix=repository_prefix,
2918
+ max_results=max_results,
2919
+ next_token=_token,
2920
+ )
2921
+ _page = _resolve_path(_response, ("repositories",))
2922
+ for _item in _page or []:
2923
+ yield _item
2924
+ _token = _resolve_path(_response, ("next_token",))
2925
+ if not _token:
2926
+ break
2927
+
2928
+ async def list_repositories_in_domain(
2929
+ self,
2930
+ domain: "capo_codeartifact.types.domain_name.DomainName",
2931
+ *,
2932
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
2933
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
2934
+ administrator_account: Optional[
2935
+ "capo_codeartifact.types.account_id.AccountId"
2936
+ ] = None,
2937
+ repository_prefix: Optional[
2938
+ "capo_codeartifact.types.repository_name.RepositoryName"
2939
+ ] = None,
2940
+ max_results: Optional[
2941
+ "capo_codeartifact.types.list_repositories_in_domain_max_results.ListRepositoriesInDomainMaxResults"
2942
+ ] = None,
2943
+ next_token: Optional[
2944
+ "capo_codeartifact.types.pagination_token.PaginationToken"
2945
+ ] = None,
2946
+ ) -> "capo_codeartifact.types.list_repositories_in_domain_result.ListRepositoriesInDomainResult":
2947
+ r"""<p> Returns a list of <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_RepositorySummary.html\">RepositorySummary</a> objects. Each <code>RepositorySummary</code> contains information about a repository in the specified domain and that matches the input parameters. </p>
2948
+
2949
+ Args:
2950
+ domain: <p> The name of the domain that contains the returned list of repositories. </p>
2951
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
2952
+ administrator_account: <p> Filter the list of repositories to only include those that are managed by the Amazon Web Services account ID. </p>
2953
+ repository_prefix: <p> A prefix used to filter returned repositories. Only repositories with names that start with <code>repositoryPrefix</code> are returned. </p>
2954
+ max_results: <p> The maximum number of results to return per page. </p>
2955
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
2956
+
2957
+ Raises:
2958
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
2959
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
2960
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
2961
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
2962
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
2963
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
2964
+ """
2965
+
2966
+ async def _handler(
2967
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_repositories_in_domain_request.ListRepositoriesInDomainRequest]",
2968
+ ) -> AsyncOperationResponse[
2969
+ "capo_codeartifact.types.list_repositories_in_domain_result.ListRepositoriesInDomainResult"
2970
+ ]:
2971
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_repositories_in_domain
2972
+
2973
+ (
2974
+ output,
2975
+ http_response,
2976
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_repositories_in_domain.async_list_repositories_in_domain(
2977
+ req.options, req.input
2978
+ )
2979
+ return AsyncOperationResponse(output=output, response=http_response)
2980
+
2981
+ interceptors_, options_ = self.operation_options(config_overrides)
2982
+ input_: capo_codeartifact.types.list_repositories_in_domain_request.ListRepositoriesInDomainRequest = {
2983
+ "domain": domain
2984
+ }
2985
+ if domain_owner is not None:
2986
+ input_["domain_owner"] = domain_owner
2987
+ if administrator_account is not None:
2988
+ input_["administrator_account"] = administrator_account
2989
+ if repository_prefix is not None:
2990
+ input_["repository_prefix"] = repository_prefix
2991
+ if max_results is not None:
2992
+ input_["max_results"] = max_results
2993
+ if next_token is not None:
2994
+ input_["next_token"] = next_token
2995
+
2996
+ response = await aexecute_pipeline(
2997
+ AsyncOperationRequest(input=input_, options=options_),
2998
+ handler=_handler,
2999
+ interceptors=list(interceptors_),
3000
+ )
3001
+ await response.response.aclose()
3002
+ return response.output
3003
+
3004
+ async def iter_list_repositories_in_domain(
3005
+ self,
3006
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3007
+ *,
3008
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3009
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3010
+ administrator_account: Optional[
3011
+ "capo_codeartifact.types.account_id.AccountId"
3012
+ ] = None,
3013
+ repository_prefix: Optional[
3014
+ "capo_codeartifact.types.repository_name.RepositoryName"
3015
+ ] = None,
3016
+ max_results: Optional[
3017
+ "capo_codeartifact.types.list_repositories_in_domain_max_results.ListRepositoriesInDomainMaxResults"
3018
+ ] = None,
3019
+ next_token: Optional[
3020
+ "capo_codeartifact.types.pagination_token.PaginationToken"
3021
+ ] = None,
3022
+ ) -> "AsyncIterator[capo_codeartifact.types.repository_summary.RepositorySummary]":
3023
+ _token = next_token
3024
+ while True:
3025
+ _response = await self.list_repositories_in_domain(
3026
+ domain,
3027
+ config_overrides=config_overrides,
3028
+ domain_owner=domain_owner,
3029
+ administrator_account=administrator_account,
3030
+ repository_prefix=repository_prefix,
3031
+ max_results=max_results,
3032
+ next_token=_token,
3033
+ )
3034
+ _page = _resolve_path(_response, ("repositories",))
3035
+ for _item in _page or []:
3036
+ yield _item
3037
+ _token = _resolve_path(_response, ("next_token",))
3038
+ if not _token:
3039
+ break
3040
+
3041
+ async def list_sub_package_groups(
3042
+ self,
3043
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3044
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
3045
+ *,
3046
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3047
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3048
+ max_results: Optional[
3049
+ "capo_codeartifact.types.list_package_groups_max_results.ListPackageGroupsMaxResults"
3050
+ ] = None,
3051
+ next_token: Optional[
3052
+ "capo_codeartifact.types.pagination_token.PaginationToken"
3053
+ ] = None,
3054
+ ) -> "capo_codeartifact.types.list_sub_package_groups_result.ListSubPackageGroupsResult":
3055
+ r"""<p>Returns a list of direct children of the specified package group.</p> <p>For information package group hierarchy, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/package-group-definition-syntax-matching-behavior.html\">Package group definition syntax and matching behavior</a> in the <i>CodeArtifact User Guide</i>.</p>
3056
+
3057
+ Args:
3058
+ domain: <p> The name of the domain which contains the package group from which to list sub package groups. </p>
3059
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3060
+ package_group: <p> The pattern of the package group from which to list sub package groups. </p>
3061
+ max_results: <p> The maximum number of results to return per page. </p>
3062
+ next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
3063
+
3064
+ Raises:
3065
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3066
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3067
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3068
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3069
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3070
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3071
+ """
3072
+
3073
+ async def _handler(
3074
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_sub_package_groups_request.ListSubPackageGroupsRequest]",
3075
+ ) -> AsyncOperationResponse[
3076
+ "capo_codeartifact.types.list_sub_package_groups_result.ListSubPackageGroupsResult"
3077
+ ]:
3078
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_sub_package_groups
3079
+
3080
+ (
3081
+ output,
3082
+ http_response,
3083
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_sub_package_groups.async_list_sub_package_groups(
3084
+ req.options, req.input
3085
+ )
3086
+ return AsyncOperationResponse(output=output, response=http_response)
3087
+
3088
+ interceptors_, options_ = self.operation_options(config_overrides)
3089
+ input_: capo_codeartifact.types.list_sub_package_groups_request.ListSubPackageGroupsRequest = {
3090
+ "domain": domain,
3091
+ "package_group": package_group,
3092
+ }
3093
+ if domain_owner is not None:
3094
+ input_["domain_owner"] = domain_owner
3095
+ if max_results is not None:
3096
+ input_["max_results"] = max_results
3097
+ if next_token is not None:
3098
+ input_["next_token"] = next_token
3099
+
3100
+ response = await aexecute_pipeline(
3101
+ AsyncOperationRequest(input=input_, options=options_),
3102
+ handler=_handler,
3103
+ interceptors=list(interceptors_),
3104
+ )
3105
+ await response.response.aclose()
3106
+ return response.output
3107
+
3108
+ async def iter_list_sub_package_groups(
3109
+ self,
3110
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3111
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
3112
+ *,
3113
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3114
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3115
+ max_results: Optional[
3116
+ "capo_codeartifact.types.list_package_groups_max_results.ListPackageGroupsMaxResults"
3117
+ ] = None,
3118
+ next_token: Optional[
3119
+ "capo_codeartifact.types.pagination_token.PaginationToken"
3120
+ ] = None,
3121
+ ) -> "AsyncIterator[capo_codeartifact.types.package_group_summary.PackageGroupSummary]":
3122
+ _token = next_token
3123
+ while True:
3124
+ _response = await self.list_sub_package_groups(
3125
+ domain,
3126
+ package_group,
3127
+ config_overrides=config_overrides,
3128
+ domain_owner=domain_owner,
3129
+ max_results=max_results,
3130
+ next_token=_token,
3131
+ )
3132
+ _page = _resolve_path(_response, ("package_groups",))
3133
+ for _item in _page or []:
3134
+ yield _item
3135
+ _token = _resolve_path(_response, ("next_token",))
3136
+ if not _token:
3137
+ break
3138
+
3139
+ async def list_tags_for_resource(
3140
+ self,
3141
+ resource_arn: "capo_codeartifact.types.arn.Arn",
3142
+ *,
3143
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3144
+ ) -> "capo_codeartifact.types.list_tags_for_resource_result.ListTagsForResourceResult":
3145
+ """<p>Gets information about Amazon Web Services tags for a specified Amazon Resource Name (ARN) in CodeArtifact.</p>
3146
+
3147
+ Args:
3148
+ resource_arn: <p>The Amazon Resource Name (ARN) of the resource to get tags for.</p>
3149
+
3150
+ Raises:
3151
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3152
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3153
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3154
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3155
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3156
+ """
3157
+
3158
+ async def _handler(
3159
+ req: "AsyncOperationRequest[capo_codeartifact.types.list_tags_for_resource_request.ListTagsForResourceRequest]",
3160
+ ) -> AsyncOperationResponse[
3161
+ "capo_codeartifact.types.list_tags_for_resource_result.ListTagsForResourceResult"
3162
+ ]:
3163
+ import capo_codeartifact._operations.code_artifact_control_plane_service.list_tags_for_resource
3164
+
3165
+ (
3166
+ output,
3167
+ http_response,
3168
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_tags_for_resource.async_list_tags_for_resource(
3169
+ req.options, req.input
3170
+ )
3171
+ return AsyncOperationResponse(output=output, response=http_response)
3172
+
3173
+ interceptors_, options_ = self.operation_options(config_overrides)
3174
+ input_: capo_codeartifact.types.list_tags_for_resource_request.ListTagsForResourceRequest = {
3175
+ "resource_arn": resource_arn
3176
+ }
3177
+
3178
+ response = await aexecute_pipeline(
3179
+ AsyncOperationRequest(input=input_, options=options_),
3180
+ handler=_handler,
3181
+ interceptors=list(interceptors_),
3182
+ )
3183
+ await response.response.aclose()
3184
+ return response.output
3185
+
3186
+ async def publish_package_version(
3187
+ self,
3188
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3189
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
3190
+ format: "capo_codeartifact.types.package_format.PackageFormat",
3191
+ package: "capo_codeartifact.types.package_name.PackageName",
3192
+ package_version: "capo_codeartifact.types.package_version.PackageVersion",
3193
+ asset_content: AsyncIterator[bytes] | bytes,
3194
+ asset_name: "capo_codeartifact.types.asset_name.AssetName",
3195
+ asset_sha256: "capo_codeartifact.types.sha256.SHA256",
3196
+ *,
3197
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3198
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3199
+ namespace: Optional[
3200
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
3201
+ ] = None,
3202
+ unfinished: Optional[
3203
+ "capo_codeartifact.types.boolean_optional.BooleanOptional"
3204
+ ] = None,
3205
+ ) -> "capo_codeartifact.types.publish_package_version_result.PublishPackageVersionResult":
3206
+ r"""<p>Creates a new package version containing one or more assets (or files).</p> <p>The <code>unfinished</code> flag can be used to keep the package version in the <code>Unfinished</code> state until all of its assets have been uploaded (see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/packages-overview.html#package-version-status.html#package-version-status\">Package version status</a> in the <i>CodeArtifact user guide</i>). To set the package version’s status to <code>Published</code>, omit the <code>unfinished</code> flag when uploading the final asset, or set the status using <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_UpdatePackageVersionsStatus.html\">UpdatePackageVersionStatus</a>. Once a package version’s status is set to <code>Published</code>, it cannot change back to <code>Unfinished</code>.</p> <note> <p>Only generic packages can be published using this API. For more information, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/using-generic.html\">Using generic packages</a> in the <i>CodeArtifact User Guide</i>.</p> </note>
3207
+
3208
+ Args:
3209
+ domain: <p>The name of the domain that contains the repository that contains the package version to publish.</p>
3210
+ domain_owner: <p>The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.</p>
3211
+ repository: <p>The name of the repository that the package version will be published to.</p>
3212
+ format: <p>A format that specifies the type of the package version with the requested asset file.</p> <p>The only supported value is <code>generic</code>.</p>
3213
+ namespace: <p>The namespace of the package version to publish.</p>
3214
+ package: <p>The name of the package version to publish.</p>
3215
+ package_version: <p>The package version to publish (for example, <code>3.5.2</code>).</p>
3216
+ asset_content: <p>The content of the asset to publish.</p>
3217
+ asset_name: <p>The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: <code>~ ! @ ^ & ( ) - ` _ + [ ] { } ; , . `</code> </p>
3218
+ asset_sha256: <p>The SHA256 hash of the <code>assetContent</code> to publish. This value must be calculated by the caller and provided with the request (see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/using-generic.html#publishing-generic-packages\">Publishing a generic package</a> in the <i>CodeArtifact User Guide</i>).</p> <p>This value is used as an integrity check to verify that the <code>assetContent</code> has not changed after it was originally sent.</p>
3219
+ unfinished: <p>Specifies whether the package version should remain in the <code>unfinished</code> state. If omitted, the package version status will be set to <code>Published</code> (see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/packages-overview.html#package-version-status\">Package version status</a> in the <i>CodeArtifact User Guide</i>).</p> <p>Valid values: <code>unfinished</code> </p>
3220
+
3221
+ Raises:
3222
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3223
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
3224
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3225
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3226
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
3227
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3228
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3229
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3230
+ """
3231
+
3232
+ async def _handler(
3233
+ req: "AsyncOperationRequest[capo_codeartifact.types.publish_package_version_request.PublishPackageVersionRequest]",
3234
+ ) -> AsyncOperationResponse[
3235
+ "capo_codeartifact.types.publish_package_version_result.PublishPackageVersionResult"
3236
+ ]:
3237
+ import capo_codeartifact._operations.code_artifact_control_plane_service.publish_package_version
3238
+
3239
+ (
3240
+ output,
3241
+ http_response,
3242
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.publish_package_version.async_publish_package_version(
3243
+ req.options, req.input
3244
+ )
3245
+ return AsyncOperationResponse(output=output, response=http_response)
3246
+
3247
+ interceptors_, options_ = self.operation_options(config_overrides)
3248
+ input_: capo_codeartifact.types.publish_package_version_request.PublishPackageVersionRequest = {
3249
+ "domain": domain,
3250
+ "repository": repository,
3251
+ "format": format,
3252
+ "package": package,
3253
+ "package_version": package_version,
3254
+ "asset_content": ensure_async_iterator(asset_content),
3255
+ "asset_name": asset_name,
3256
+ "asset_sha256": asset_sha256,
3257
+ }
3258
+ if domain_owner is not None:
3259
+ input_["domain_owner"] = domain_owner
3260
+ if namespace is not None:
3261
+ input_["namespace"] = namespace
3262
+ if unfinished is not None:
3263
+ input_["unfinished"] = unfinished
3264
+
3265
+ response = await aexecute_pipeline(
3266
+ AsyncOperationRequest(input=input_, options=options_),
3267
+ handler=_handler,
3268
+ interceptors=list(interceptors_),
3269
+ )
3270
+ await response.response.aclose()
3271
+ return response.output
3272
+
3273
+ async def put_domain_permissions_policy(
3274
+ self,
3275
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3276
+ policy_document: "capo_codeartifact.types.policy_document.PolicyDocument",
3277
+ *,
3278
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3279
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3280
+ policy_revision: Optional[
3281
+ "capo_codeartifact.types.policy_revision.PolicyRevision"
3282
+ ] = None,
3283
+ ) -> "capo_codeartifact.types.put_domain_permissions_policy_result.PutDomainPermissionsPolicyResult":
3284
+ """<p> Sets a resource policy on a domain that specifies permissions to access it. </p> <p> When you call <code>PutDomainPermissionsPolicy</code>, the resource policy on the domain is ignored when evaluting permissions. This ensures that the owner of a domain cannot lock themselves out of the domain, which would prevent them from being able to update the resource policy. </p>
3285
+
3286
+ Args:
3287
+ domain: <p> The name of the domain on which to set the resource policy. </p>
3288
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3289
+ policy_revision: <p> The current revision of the resource policy to be set. This revision is used for optimistic locking, which prevents others from overwriting your changes to the domain's resource policy. </p>
3290
+ policy_document: <p> A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided domain. </p>
3291
+
3292
+ Raises:
3293
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3294
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
3295
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3296
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3297
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
3298
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3299
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3300
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3301
+ """
3302
+
3303
+ async def _handler(
3304
+ req: "AsyncOperationRequest[capo_codeartifact.types.put_domain_permissions_policy_request.PutDomainPermissionsPolicyRequest]",
3305
+ ) -> AsyncOperationResponse[
3306
+ "capo_codeartifact.types.put_domain_permissions_policy_result.PutDomainPermissionsPolicyResult"
3307
+ ]:
3308
+ import capo_codeartifact._operations.code_artifact_control_plane_service.put_domain_permissions_policy
3309
+
3310
+ (
3311
+ output,
3312
+ http_response,
3313
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.put_domain_permissions_policy.async_put_domain_permissions_policy(
3314
+ req.options, req.input
3315
+ )
3316
+ return AsyncOperationResponse(output=output, response=http_response)
3317
+
3318
+ interceptors_, options_ = self.operation_options(config_overrides)
3319
+ input_: capo_codeartifact.types.put_domain_permissions_policy_request.PutDomainPermissionsPolicyRequest = {
3320
+ "domain": domain,
3321
+ "policy_document": policy_document,
3322
+ }
3323
+ if domain_owner is not None:
3324
+ input_["domain_owner"] = domain_owner
3325
+ if policy_revision is not None:
3326
+ input_["policy_revision"] = policy_revision
3327
+
3328
+ response = await aexecute_pipeline(
3329
+ AsyncOperationRequest(input=input_, options=options_),
3330
+ handler=_handler,
3331
+ interceptors=list(interceptors_),
3332
+ )
3333
+ await response.response.aclose()
3334
+ return response.output
3335
+
3336
+ async def put_package_origin_configuration(
3337
+ self,
3338
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3339
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
3340
+ format: "capo_codeartifact.types.package_format.PackageFormat",
3341
+ package: "capo_codeartifact.types.package_name.PackageName",
3342
+ restrictions: "capo_codeartifact.types.package_origin_restrictions.PackageOriginRestrictions",
3343
+ *,
3344
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3345
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3346
+ namespace: Optional[
3347
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
3348
+ ] = None,
3349
+ ) -> "capo_codeartifact.types.put_package_origin_configuration_result.PutPackageOriginConfigurationResult":
3350
+ r"""<p>Sets the package origin configuration for a package.</p> <p>The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package origin controls and configuration, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html\">Editing package origin controls</a> in the <i>CodeArtifact User Guide</i>.</p> <p> <code>PutPackageOriginConfiguration</code> can be called on a package that doesn't yet exist in the repository. When called on a package that does not exist, a package is created in the repository with no versions and the requested restrictions are set on the package. This can be used to preemptively block ingesting or retaining any versions from external connections or upstream repositories, or to block publishing any versions of the package into the repository before connecting any package managers or publishers to the repository.</p>
3351
+
3352
+ Args:
3353
+ domain: <p>The name of the domain that contains the repository that contains the package.</p>
3354
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3355
+ repository: <p>The name of the repository that contains the package.</p>
3356
+ format: <p>A format that specifies the type of the package to be updated.</p>
3357
+ namespace: <p>The namespace of the package to be updated. The package component that specifies its namespace depends on its type. For example:</p> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
3358
+ package: <p>The name of the package to be updated.</p>
3359
+ restrictions: <p>A <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html\">PackageOriginRestrictions</a> object that contains information about the <code>upstream</code> and <code>publish</code> package origin restrictions. The <code>upstream</code> restriction determines if new package versions can be ingested or retained from external connections or upstream repositories. The <code>publish</code> restriction determines if new package versions can be published directly to the repository.</p> <p>You must include both the desired <code>upstream</code> and <code>publish</code> restrictions.</p>
3360
+
3361
+ Raises:
3362
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3363
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3364
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3365
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3366
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3367
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3368
+ """
3369
+
3370
+ async def _handler(
3371
+ req: "AsyncOperationRequest[capo_codeartifact.types.put_package_origin_configuration_request.PutPackageOriginConfigurationRequest]",
3372
+ ) -> AsyncOperationResponse[
3373
+ "capo_codeartifact.types.put_package_origin_configuration_result.PutPackageOriginConfigurationResult"
3374
+ ]:
3375
+ import capo_codeartifact._operations.code_artifact_control_plane_service.put_package_origin_configuration
3376
+
3377
+ (
3378
+ output,
3379
+ http_response,
3380
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.put_package_origin_configuration.async_put_package_origin_configuration(
3381
+ req.options, req.input
3382
+ )
3383
+ return AsyncOperationResponse(output=output, response=http_response)
3384
+
3385
+ interceptors_, options_ = self.operation_options(config_overrides)
3386
+ input_: capo_codeartifact.types.put_package_origin_configuration_request.PutPackageOriginConfigurationRequest = {
3387
+ "domain": domain,
3388
+ "repository": repository,
3389
+ "format": format,
3390
+ "package": package,
3391
+ "restrictions": restrictions,
3392
+ }
3393
+ if domain_owner is not None:
3394
+ input_["domain_owner"] = domain_owner
3395
+ if namespace is not None:
3396
+ input_["namespace"] = namespace
3397
+
3398
+ response = await aexecute_pipeline(
3399
+ AsyncOperationRequest(input=input_, options=options_),
3400
+ handler=_handler,
3401
+ interceptors=list(interceptors_),
3402
+ )
3403
+ await response.response.aclose()
3404
+ return response.output
3405
+
3406
+ async def put_repository_permissions_policy(
3407
+ self,
3408
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3409
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
3410
+ policy_document: "capo_codeartifact.types.policy_document.PolicyDocument",
3411
+ *,
3412
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3413
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3414
+ policy_revision: Optional[
3415
+ "capo_codeartifact.types.policy_revision.PolicyRevision"
3416
+ ] = None,
3417
+ ) -> "capo_codeartifact.types.put_repository_permissions_policy_result.PutRepositoryPermissionsPolicyResult":
3418
+ """<p> Sets the resource policy on a repository that specifies permissions to access it. </p> <p> When you call <code>PutRepositoryPermissionsPolicy</code>, the resource policy on the repository is ignored when evaluting permissions. This ensures that the owner of a repository cannot lock themselves out of the repository, which would prevent them from being able to update the resource policy. </p>
3419
+
3420
+ Args:
3421
+ domain: <p> The name of the domain containing the repository to set the resource policy on. </p>
3422
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3423
+ repository: <p> The name of the repository to set the resource policy on. </p>
3424
+ policy_revision: <p> Sets the revision of the resource policy that specifies permissions to access the repository. This revision is used for optimistic locking, which prevents others from overwriting your changes to the repository's resource policy. </p>
3425
+ policy_document: <p> A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided repository. </p>
3426
+
3427
+ Raises:
3428
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3429
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
3430
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3431
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3432
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
3433
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3434
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3435
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3436
+ """
3437
+
3438
+ async def _handler(
3439
+ req: "AsyncOperationRequest[capo_codeartifact.types.put_repository_permissions_policy_request.PutRepositoryPermissionsPolicyRequest]",
3440
+ ) -> AsyncOperationResponse[
3441
+ "capo_codeartifact.types.put_repository_permissions_policy_result.PutRepositoryPermissionsPolicyResult"
3442
+ ]:
3443
+ import capo_codeartifact._operations.code_artifact_control_plane_service.put_repository_permissions_policy
3444
+
3445
+ (
3446
+ output,
3447
+ http_response,
3448
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.put_repository_permissions_policy.async_put_repository_permissions_policy(
3449
+ req.options, req.input
3450
+ )
3451
+ return AsyncOperationResponse(output=output, response=http_response)
3452
+
3453
+ interceptors_, options_ = self.operation_options(config_overrides)
3454
+ input_: capo_codeartifact.types.put_repository_permissions_policy_request.PutRepositoryPermissionsPolicyRequest = {
3455
+ "domain": domain,
3456
+ "repository": repository,
3457
+ "policy_document": policy_document,
3458
+ }
3459
+ if domain_owner is not None:
3460
+ input_["domain_owner"] = domain_owner
3461
+ if policy_revision is not None:
3462
+ input_["policy_revision"] = policy_revision
3463
+
3464
+ response = await aexecute_pipeline(
3465
+ AsyncOperationRequest(input=input_, options=options_),
3466
+ handler=_handler,
3467
+ interceptors=list(interceptors_),
3468
+ )
3469
+ await response.response.aclose()
3470
+ return response.output
3471
+
3472
+ async def tag_resource(
3473
+ self,
3474
+ resource_arn: "capo_codeartifact.types.arn.Arn",
3475
+ tags: "capo_codeartifact.types.tag_list.TagList",
3476
+ *,
3477
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3478
+ ) -> "capo_codeartifact.types.tag_resource_result.TagResourceResult":
3479
+ """<p>Adds or updates tags for a resource in CodeArtifact.</p>
3480
+
3481
+ Args:
3482
+ resource_arn: <p>The Amazon Resource Name (ARN) of the resource that you want to add or update tags for.</p>
3483
+ tags: <p>The tags you want to modify or add to the resource.</p>
3484
+
3485
+ Raises:
3486
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3487
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3488
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
3489
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3490
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3491
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3492
+ """
3493
+
3494
+ async def _handler(
3495
+ req: "AsyncOperationRequest[capo_codeartifact.types.tag_resource_request.TagResourceRequest]",
3496
+ ) -> AsyncOperationResponse[
3497
+ "capo_codeartifact.types.tag_resource_result.TagResourceResult"
3498
+ ]:
3499
+ import capo_codeartifact._operations.code_artifact_control_plane_service.tag_resource
3500
+
3501
+ (
3502
+ output,
3503
+ http_response,
3504
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.tag_resource.async_tag_resource(
3505
+ req.options, req.input
3506
+ )
3507
+ return AsyncOperationResponse(output=output, response=http_response)
3508
+
3509
+ interceptors_, options_ = self.operation_options(config_overrides)
3510
+ input_: capo_codeartifact.types.tag_resource_request.TagResourceRequest = {
3511
+ "resource_arn": resource_arn,
3512
+ "tags": tags,
3513
+ }
3514
+
3515
+ response = await aexecute_pipeline(
3516
+ AsyncOperationRequest(input=input_, options=options_),
3517
+ handler=_handler,
3518
+ interceptors=list(interceptors_),
3519
+ )
3520
+ await response.response.aclose()
3521
+ return response.output
3522
+
3523
+ async def untag_resource(
3524
+ self,
3525
+ resource_arn: "capo_codeartifact.types.arn.Arn",
3526
+ tag_keys: "capo_codeartifact.types.tag_key_list.TagKeyList",
3527
+ *,
3528
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3529
+ ) -> "capo_codeartifact.types.untag_resource_result.UntagResourceResult":
3530
+ """<p>Removes tags from a resource in CodeArtifact.</p>
3531
+
3532
+ Args:
3533
+ resource_arn: <p>The Amazon Resource Name (ARN) of the resource that you want to remove tags from.</p>
3534
+ tag_keys: <p>The tag key for each tag that you want to remove from the resource.</p>
3535
+
3536
+ Raises:
3537
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3538
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3539
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3540
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3541
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3542
+ """
3543
+
3544
+ async def _handler(
3545
+ req: "AsyncOperationRequest[capo_codeartifact.types.untag_resource_request.UntagResourceRequest]",
3546
+ ) -> AsyncOperationResponse[
3547
+ "capo_codeartifact.types.untag_resource_result.UntagResourceResult"
3548
+ ]:
3549
+ import capo_codeartifact._operations.code_artifact_control_plane_service.untag_resource
3550
+
3551
+ (
3552
+ output,
3553
+ http_response,
3554
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.untag_resource.async_untag_resource(
3555
+ req.options, req.input
3556
+ )
3557
+ return AsyncOperationResponse(output=output, response=http_response)
3558
+
3559
+ interceptors_, options_ = self.operation_options(config_overrides)
3560
+ input_: capo_codeartifact.types.untag_resource_request.UntagResourceRequest = {
3561
+ "resource_arn": resource_arn,
3562
+ "tag_keys": tag_keys,
3563
+ }
3564
+
3565
+ response = await aexecute_pipeline(
3566
+ AsyncOperationRequest(input=input_, options=options_),
3567
+ handler=_handler,
3568
+ interceptors=list(interceptors_),
3569
+ )
3570
+ await response.response.aclose()
3571
+ return response.output
3572
+
3573
+ async def update_package_group(
3574
+ self,
3575
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3576
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
3577
+ *,
3578
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3579
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3580
+ contact_info: Optional[
3581
+ "capo_codeartifact.types.package_group_contact_info.PackageGroupContactInfo"
3582
+ ] = None,
3583
+ description: Optional["capo_codeartifact.types.description.Description"] = None,
3584
+ ) -> "capo_codeartifact.types.update_package_group_result.UpdatePackageGroupResult":
3585
+ r"""<p>Updates a package group. This API cannot be used to update a package group's origin configuration or pattern. To update a package group's origin configuration, use <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_UpdatePackageGroupOriginConfiguration.html\">UpdatePackageGroupOriginConfiguration</a>.</p>
3586
+
3587
+ Args:
3588
+ domain: <p> The name of the domain which contains the package group to be updated. </p>
3589
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3590
+ package_group: <p> The pattern of the package group to be updated. </p>
3591
+ contact_info: <p> Contact information which you want to update the requested package group with. </p>
3592
+ description: <p> The description you want to update the requested package group with. </p>
3593
+
3594
+ Raises:
3595
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3596
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3597
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3598
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
3599
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3600
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3601
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3602
+ """
3603
+
3604
+ async def _handler(
3605
+ req: "AsyncOperationRequest[capo_codeartifact.types.update_package_group_request.UpdatePackageGroupRequest]",
3606
+ ) -> AsyncOperationResponse[
3607
+ "capo_codeartifact.types.update_package_group_result.UpdatePackageGroupResult"
3608
+ ]:
3609
+ import capo_codeartifact._operations.code_artifact_control_plane_service.update_package_group
3610
+
3611
+ (
3612
+ output,
3613
+ http_response,
3614
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.update_package_group.async_update_package_group(
3615
+ req.options, req.input
3616
+ )
3617
+ return AsyncOperationResponse(output=output, response=http_response)
3618
+
3619
+ interceptors_, options_ = self.operation_options(config_overrides)
3620
+ input_: capo_codeartifact.types.update_package_group_request.UpdatePackageGroupRequest = {
3621
+ "domain": domain,
3622
+ "package_group": package_group,
3623
+ }
3624
+ if domain_owner is not None:
3625
+ input_["domain_owner"] = domain_owner
3626
+ if contact_info is not None:
3627
+ input_["contact_info"] = contact_info
3628
+ if description is not None:
3629
+ input_["description"] = description
3630
+
3631
+ response = await aexecute_pipeline(
3632
+ AsyncOperationRequest(input=input_, options=options_),
3633
+ handler=_handler,
3634
+ interceptors=list(interceptors_),
3635
+ )
3636
+ await response.response.aclose()
3637
+ return response.output
3638
+
3639
+ async def update_package_group_origin_configuration(
3640
+ self,
3641
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3642
+ package_group: "capo_codeartifact.types.package_group_pattern.PackageGroupPattern",
3643
+ *,
3644
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3645
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3646
+ restrictions: Optional[
3647
+ "capo_codeartifact.types.origin_restrictions.OriginRestrictions"
3648
+ ] = None,
3649
+ add_allowed_repositories: Optional[
3650
+ "capo_codeartifact.types.package_group_allowed_repository_list.PackageGroupAllowedRepositoryList"
3651
+ ] = None,
3652
+ remove_allowed_repositories: Optional[
3653
+ "capo_codeartifact.types.package_group_allowed_repository_list.PackageGroupAllowedRepositoryList"
3654
+ ] = None,
3655
+ ) -> "capo_codeartifact.types.update_package_group_origin_configuration_result.UpdatePackageGroupOriginConfigurationResult":
3656
+ r"""<p>Updates the package origin configuration for a package group.</p> <p>The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package group origin controls and configuration, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/package-group-origin-controls.html\">Package group origin controls</a> in the <i>CodeArtifact User Guide</i>.</p>
3657
+
3658
+ Args:
3659
+ domain: <p> The name of the domain which contains the package group for which to update the origin configuration. </p>
3660
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3661
+ package_group: <p> The pattern of the package group for which to update the origin configuration. </p>
3662
+ restrictions: <p> The origin configuration settings that determine how package versions can enter repositories. </p>
3663
+ add_allowed_repositories: <p>The repository name and restrictions to add to the allowed repository list of the specified package group.</p>
3664
+ remove_allowed_repositories: <p>The repository name and restrictions to remove from the allowed repository list of the specified package group.</p>
3665
+
3666
+ Raises:
3667
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3668
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3669
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3670
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
3671
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3672
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3673
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3674
+ """
3675
+
3676
+ async def _handler(
3677
+ req: "AsyncOperationRequest[capo_codeartifact.types.update_package_group_origin_configuration_request.UpdatePackageGroupOriginConfigurationRequest]",
3678
+ ) -> AsyncOperationResponse[
3679
+ "capo_codeartifact.types.update_package_group_origin_configuration_result.UpdatePackageGroupOriginConfigurationResult"
3680
+ ]:
3681
+ import capo_codeartifact._operations.code_artifact_control_plane_service.update_package_group_origin_configuration
3682
+
3683
+ (
3684
+ output,
3685
+ http_response,
3686
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.update_package_group_origin_configuration.async_update_package_group_origin_configuration(
3687
+ req.options, req.input
3688
+ )
3689
+ return AsyncOperationResponse(output=output, response=http_response)
3690
+
3691
+ interceptors_, options_ = self.operation_options(config_overrides)
3692
+ input_: capo_codeartifact.types.update_package_group_origin_configuration_request.UpdatePackageGroupOriginConfigurationRequest = {
3693
+ "domain": domain,
3694
+ "package_group": package_group,
3695
+ }
3696
+ if domain_owner is not None:
3697
+ input_["domain_owner"] = domain_owner
3698
+ if restrictions is not None:
3699
+ input_["restrictions"] = restrictions
3700
+ if add_allowed_repositories is not None:
3701
+ input_["add_allowed_repositories"] = add_allowed_repositories
3702
+ if remove_allowed_repositories is not None:
3703
+ input_["remove_allowed_repositories"] = remove_allowed_repositories
3704
+
3705
+ response = await aexecute_pipeline(
3706
+ AsyncOperationRequest(input=input_, options=options_),
3707
+ handler=_handler,
3708
+ interceptors=list(interceptors_),
3709
+ )
3710
+ await response.response.aclose()
3711
+ return response.output
3712
+
3713
+ async def update_package_versions_status(
3714
+ self,
3715
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3716
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
3717
+ format: "capo_codeartifact.types.package_format.PackageFormat",
3718
+ package: "capo_codeartifact.types.package_name.PackageName",
3719
+ versions: "capo_codeartifact.types.package_version_list.PackageVersionList",
3720
+ target_status: "capo_codeartifact.types.package_version_status.PackageVersionStatus",
3721
+ *,
3722
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3723
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3724
+ namespace: Optional[
3725
+ "capo_codeartifact.types.package_namespace.PackageNamespace"
3726
+ ] = None,
3727
+ version_revisions: Optional[
3728
+ "capo_codeartifact.types.package_version_revision_map.PackageVersionRevisionMap"
3729
+ ] = None,
3730
+ expected_status: Optional[
3731
+ "capo_codeartifact.types.package_version_status.PackageVersionStatus"
3732
+ ] = None,
3733
+ ) -> "capo_codeartifact.types.update_package_versions_status_result.UpdatePackageVersionsStatusResult":
3734
+ r"""<p> Updates the status of one or more versions of a package. Using <code>UpdatePackageVersionsStatus</code>, you can update the status of package versions to <code>Archived</code>, <code>Published</code>, or <code>Unlisted</code>. To set the status of a package version to <code>Disposed</code>, use <a href=\"https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DisposePackageVersions.html\">DisposePackageVersions</a>. </p>
3735
+
3736
+ Args:
3737
+ domain: <p> The name of the domain that contains the repository that contains the package versions with a status to be updated. </p>
3738
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3739
+ repository: <p> The repository that contains the package versions with the status you want to update. </p>
3740
+ format: <p> A format that specifies the type of the package with the statuses to update. </p>
3741
+ namespace: <p>The namespace of the package version to be updated. The package component that specifies its namespace depends on its type. For example:</p> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm or Swift package version is its <code>scope</code>. </p> </li> <li> <p>The namespace of a generic package is its <code>namespace</code>.</p> </li> <li> <p> Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> </ul>
3742
+ package: <p> The name of the package with the version statuses to update. </p>
3743
+ versions: <p> An array of strings that specify the versions of the package with the statuses to update. </p>
3744
+ version_revisions: <p> A map of package versions and package version revisions. The map <code>key</code> is the package version (for example, <code>3.5.2</code>), and the map <code>value</code> is the package version revision. </p>
3745
+ expected_status: <p> The package version’s expected status before it is updated. If <code>expectedStatus</code> is provided, the package version's status is updated only if its status at the time <code>UpdatePackageVersionsStatus</code> is called matches <code>expectedStatus</code>. </p>
3746
+ target_status: <p> The status you want to change the package version status to. </p>
3747
+
3748
+ Raises:
3749
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3750
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
3751
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3752
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3753
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3754
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3755
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3756
+ """
3757
+
3758
+ async def _handler(
3759
+ req: "AsyncOperationRequest[capo_codeartifact.types.update_package_versions_status_request.UpdatePackageVersionsStatusRequest]",
3760
+ ) -> AsyncOperationResponse[
3761
+ "capo_codeartifact.types.update_package_versions_status_result.UpdatePackageVersionsStatusResult"
3762
+ ]:
3763
+ import capo_codeartifact._operations.code_artifact_control_plane_service.update_package_versions_status
3764
+
3765
+ (
3766
+ output,
3767
+ http_response,
3768
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.update_package_versions_status.async_update_package_versions_status(
3769
+ req.options, req.input
3770
+ )
3771
+ return AsyncOperationResponse(output=output, response=http_response)
3772
+
3773
+ interceptors_, options_ = self.operation_options(config_overrides)
3774
+ input_: capo_codeartifact.types.update_package_versions_status_request.UpdatePackageVersionsStatusRequest = {
3775
+ "domain": domain,
3776
+ "repository": repository,
3777
+ "format": format,
3778
+ "package": package,
3779
+ "versions": versions,
3780
+ "target_status": target_status,
3781
+ }
3782
+ if domain_owner is not None:
3783
+ input_["domain_owner"] = domain_owner
3784
+ if namespace is not None:
3785
+ input_["namespace"] = namespace
3786
+ if version_revisions is not None:
3787
+ input_["version_revisions"] = version_revisions
3788
+ if expected_status is not None:
3789
+ input_["expected_status"] = expected_status
3790
+
3791
+ response = await aexecute_pipeline(
3792
+ AsyncOperationRequest(input=input_, options=options_),
3793
+ handler=_handler,
3794
+ interceptors=list(interceptors_),
3795
+ )
3796
+ await response.response.aclose()
3797
+ return response.output
3798
+
3799
+ async def update_repository(
3800
+ self,
3801
+ domain: "capo_codeartifact.types.domain_name.DomainName",
3802
+ repository: "capo_codeartifact.types.repository_name.RepositoryName",
3803
+ *,
3804
+ config_overrides: Optional[AsynccodeartifactClientConfig] = None,
3805
+ domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
3806
+ description: Optional["capo_codeartifact.types.description.Description"] = None,
3807
+ upstreams: Optional[
3808
+ "capo_codeartifact.types.upstream_repository_list.UpstreamRepositoryList"
3809
+ ] = None,
3810
+ ) -> "capo_codeartifact.types.update_repository_result.UpdateRepositoryResult":
3811
+ r"""<p> Update the properties of a repository. </p>
3812
+
3813
+ Args:
3814
+ domain: <p> The name of the domain associated with the repository to update. </p>
3815
+ domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>
3816
+ repository: <p> The name of the repository to update. </p>
3817
+ description: <p> An updated repository description. </p>
3818
+ upstreams: <p> A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see <a href=\"https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html\">Working with upstream repositories</a>. </p>
3819
+
3820
+ Raises:
3821
+ capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
3822
+ capo_codeartifact.errors.conflict_exception.ConflictException: <p> The operation did not succeed because prerequisites are not met. </p>
3823
+ capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
3824
+ capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
3825
+ capo_codeartifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The operation did not succeed because it would have exceeded a service limit for your account. </p>
3826
+ capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
3827
+ capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
3828
+ capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
3829
+ """
3830
+
3831
+ async def _handler(
3832
+ req: "AsyncOperationRequest[capo_codeartifact.types.update_repository_request.UpdateRepositoryRequest]",
3833
+ ) -> AsyncOperationResponse[
3834
+ "capo_codeartifact.types.update_repository_result.UpdateRepositoryResult"
3835
+ ]:
3836
+ import capo_codeartifact._operations.code_artifact_control_plane_service.update_repository
3837
+
3838
+ (
3839
+ output,
3840
+ http_response,
3841
+ ) = await capo_codeartifact._operations.code_artifact_control_plane_service.update_repository.async_update_repository(
3842
+ req.options, req.input
3843
+ )
3844
+ return AsyncOperationResponse(output=output, response=http_response)
3845
+
3846
+ interceptors_, options_ = self.operation_options(config_overrides)
3847
+ input_: capo_codeartifact.types.update_repository_request.UpdateRepositoryRequest = {
3848
+ "domain": domain,
3849
+ "repository": repository,
3850
+ }
3851
+ if domain_owner is not None:
3852
+ input_["domain_owner"] = domain_owner
3853
+ if description is not None:
3854
+ input_["description"] = description
3855
+ if upstreams is not None:
3856
+ input_["upstreams"] = upstreams
3857
+
3858
+ response = await aexecute_pipeline(
3859
+ AsyncOperationRequest(input=input_, options=options_),
3860
+ handler=_handler,
3861
+ interceptors=list(interceptors_),
3862
+ )
3863
+ await response.response.aclose()
3864
+ return response.output
3865
+
3866
+ async def __aenter__(self) -> Self:
3867
+ return self
3868
+
3869
+ async def __aexit__(self, exc_type: Any, exc: Any, tb: Any):
3870
+ await self._client.aclose()