azure_mgmt_container_registry 0.18.2 → 0.18.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  3. data/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb +22 -0
  4. data/lib/2017-03-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  5. data/lib/2017-03-01/generated/azure_mgmt_container_registry/operations.rb +4 -0
  6. data/lib/2017-03-01/generated/azure_mgmt_container_registry/registries.rb +22 -0
  7. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  8. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/operations.rb +4 -0
  9. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb +24 -0
  10. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb +12 -0
  11. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb +20 -0
  12. data/lib/2017-10-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  13. data/lib/2017-10-01/generated/azure_mgmt_container_registry/operations.rb +4 -0
  14. data/lib/2017-10-01/generated/azure_mgmt_container_registry/registries.rb +30 -0
  15. data/lib/2017-10-01/generated/azure_mgmt_container_registry/replications.rb +12 -0
  16. data/lib/2017-10-01/generated/azure_mgmt_container_registry/webhooks.rb +20 -0
  17. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb +16 -0
  18. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb +14 -0
  19. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/builds.rb +12 -0
  20. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  21. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/registries.rb +4 -0
  22. data/lib/2018-09-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  23. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/base_image_trigger.rb +2 -1
  24. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/base_image_trigger_update_parameters.rb +2 -1
  25. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/source_trigger.rb +2 -1
  26. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/source_trigger_update_parameters.rb +2 -1
  27. data/lib/2018-09-01/generated/azure_mgmt_container_registry/registries.rb +4 -0
  28. data/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb +12 -0
  29. data/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb +14 -0
  30. data/lib/2019-04-01/generated/azure_mgmt_container_registry.rb +7 -6
  31. data/lib/2019-04-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  32. data/lib/2019-04-01/generated/azure_mgmt_container_registry/models/run.rb +12 -0
  33. data/lib/2019-04-01/generated/azure_mgmt_container_registry/models/timer_trigger_descriptor.rb +58 -0
  34. data/lib/2019-04-01/generated/azure_mgmt_container_registry/registries.rb +4 -0
  35. data/lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb +12 -0
  36. data/lib/2019-04-01/generated/azure_mgmt_container_registry/tasks.rb +14 -0
  37. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry.rb +46 -0
  38. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +139 -0
  39. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/generate_credentials_parameters.rb +75 -0
  40. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/generate_credentials_result.rb +67 -0
  41. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/provisioning_state.rb +20 -0
  42. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/proxy_resource.rb +72 -0
  43. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/scope_map.rb +133 -0
  44. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/scope_map_list_result.rb +101 -0
  45. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/scope_map_update_parameters.rb +68 -0
  46. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/status.rb +16 -0
  47. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token.rb +137 -0
  48. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_certificate.rb +81 -0
  49. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_certificate_name.rb +16 -0
  50. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_credentials_properties.rb +76 -0
  51. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_list_result.rb +101 -0
  52. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_password.rb +82 -0
  53. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_password_name.rb +16 -0
  54. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_update_parameters.rb +72 -0
  55. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/module_definition.rb +9 -0
  56. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/registries.rb +188 -0
  57. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/scope_maps.rb +850 -0
  58. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/tokens.rb +844 -0
  59. data/lib/2019-05-01/generated/azure_mgmt_container_registry.rb +90 -0
  60. data/lib/2019-05-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +143 -0
  61. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/action.rb +15 -0
  62. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/actor.rb +48 -0
  63. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/callback_config.rb +66 -0
  64. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/default_action.rb +16 -0
  65. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event.rb +69 -0
  66. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_content.rb +120 -0
  67. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_info.rb +46 -0
  68. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_list_result.rb +101 -0
  69. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_request_message.rb +101 -0
  70. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_response_message.rb +99 -0
  71. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_image_parameters.rb +104 -0
  72. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_mode.rb +16 -0
  73. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_source.rb +89 -0
  74. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_source_credentials.rb +59 -0
  75. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/iprule.rb +60 -0
  76. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/network_rule_set.rb +89 -0
  77. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_definition.rb +84 -0
  78. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_display_definition.rb +80 -0
  79. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_list_result.rb +101 -0
  80. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_metric_specification_definition.rb +101 -0
  81. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_service_specification_definition.rb +56 -0
  82. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/password_name.rb +16 -0
  83. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/policies.rb +74 -0
  84. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/policy_status.rb +16 -0
  85. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/provisioning_state.rb +20 -0
  86. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/quarantine_policy.rb +47 -0
  87. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/regenerate_credential_parameters.rb +49 -0
  88. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry.rb +202 -0
  89. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_list_credentials_result.rb +67 -0
  90. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_list_result.rb +101 -0
  91. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_name_check_request.rb +66 -0
  92. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_name_status.rb +71 -0
  93. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_password.rb +59 -0
  94. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_update_parameters.rb +102 -0
  95. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_usage.rb +80 -0
  96. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_usage_list_result.rb +56 -0
  97. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_usage_unit.rb +16 -0
  98. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/replication.rb +114 -0
  99. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/replication_list_result.rb +101 -0
  100. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/replication_update_parameters.rb +54 -0
  101. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/request.rb +93 -0
  102. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/resource.rb +111 -0
  103. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/retention_policy.rb +71 -0
  104. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/sku.rb +61 -0
  105. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/sku_name.rb +18 -0
  106. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/sku_tier.rb +18 -0
  107. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/source.rb +61 -0
  108. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/status.rb +73 -0
  109. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/storage_account_properties.rb +47 -0
  110. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/target.rb +137 -0
  111. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/trust_policy.rb +59 -0
  112. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/trust_policy_type.rb +15 -0
  113. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/virtual_network_rule.rb +60 -0
  114. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook.rb +146 -0
  115. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_action.rb +19 -0
  116. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_create_parameters.rb +143 -0
  117. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_list_result.rb +101 -0
  118. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_status.rb +16 -0
  119. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_update_parameters.rb +131 -0
  120. data/lib/2019-05-01/generated/azure_mgmt_container_registry/module_definition.rb +9 -0
  121. data/lib/2019-05-01/generated/azure_mgmt_container_registry/operations.rb +219 -0
  122. data/lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb +1580 -0
  123. data/lib/2019-05-01/generated/azure_mgmt_container_registry/replications.rb +845 -0
  124. data/lib/2019-05-01/generated/azure_mgmt_container_registry/webhooks.rb +1287 -0
  125. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry.rb +100 -0
  126. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +139 -0
  127. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/agent_properties.rb +47 -0
  128. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/architecture.rb +19 -0
  129. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/argument.rb +70 -0
  130. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/auth_info.rb +92 -0
  131. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/auth_info_update_parameters.rb +92 -0
  132. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_dependency.rb +91 -0
  133. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_dependency_type.rb +16 -0
  134. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_trigger.rb +94 -0
  135. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_trigger_type.rb +16 -0
  136. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_trigger_update_parameters.rb +94 -0
  137. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/credentials.rb +74 -0
  138. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/custom_registry_credentials.rb +82 -0
  139. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/docker_build_request.rb +218 -0
  140. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/docker_build_step.rb +175 -0
  141. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/docker_build_step_update_parameters.rb +154 -0
  142. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/encoded_task_run_request.rb +172 -0
  143. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/encoded_task_step.rb +129 -0
  144. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/encoded_task_step_update_parameters.rb +111 -0
  145. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/file_task_run_request.rb +172 -0
  146. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/file_task_step.rb +129 -0
  147. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/file_task_step_update_parameters.rb +111 -0
  148. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/identity_properties.rb +95 -0
  149. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/image_descriptor.rb +79 -0
  150. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/image_update_trigger.rb +78 -0
  151. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/os.rb +16 -0
  152. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/override_task_step_properties.rb +125 -0
  153. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/platform_properties.rb +71 -0
  154. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/platform_update_parameters.rb +71 -0
  155. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/provisioning_state.rb +20 -0
  156. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/proxy_resource.rb +72 -0
  157. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/resource.rb +111 -0
  158. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/resource_identity_type.rb +18 -0
  159. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run.rb +320 -0
  160. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_filter.rb +129 -0
  161. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_get_log_result.rb +47 -0
  162. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_list_result.rb +99 -0
  163. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_request.rb +62 -0
  164. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_status.rb +22 -0
  165. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_type.rb +18 -0
  166. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_update_parameters.rb +47 -0
  167. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/secret_object.rb +63 -0
  168. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/secret_object_type.rb +16 -0
  169. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/set_value.rb +71 -0
  170. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_control_type.rb +16 -0
  171. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_properties.rb +83 -0
  172. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_registry_credentials.rb +52 -0
  173. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_registry_login_mode.rb +16 -0
  174. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger.rb +92 -0
  175. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger_descriptor.rb +112 -0
  176. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger_event.rb +16 -0
  177. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger_update_parameters.rb +92 -0
  178. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_update_parameters.rb +83 -0
  179. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_upload_definition.rb +58 -0
  180. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task.rb +218 -0
  181. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_list_result.rb +99 -0
  182. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_run_request.rb +84 -0
  183. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_status.rb +16 -0
  184. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_step_properties.rb +94 -0
  185. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_step_update_parameters.rb +72 -0
  186. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_update_parameters.rb +155 -0
  187. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/timer_trigger.rb +70 -0
  188. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/timer_trigger_descriptor.rb +58 -0
  189. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/timer_trigger_update_parameters.rb +70 -0
  190. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/token_type.rb +16 -0
  191. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/trigger_properties.rb +89 -0
  192. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/trigger_status.rb +16 -0
  193. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/trigger_update_parameters.rb +90 -0
  194. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/update_trigger_payload_type.rb +16 -0
  195. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/user_identity_properties.rb +58 -0
  196. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/variant.rb +17 -0
  197. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/module_definition.rb +9 -0
  198. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/registries.rb +293 -0
  199. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/runs.rb +778 -0
  200. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/tasks.rb +952 -0
  201. data/lib/azure_mgmt_container_registry.rb +3 -0
  202. data/lib/profiles/latest/modules/containerregistry_profile_module.rb +321 -305
  203. data/lib/version.rb +1 -1
  204. metadata +170 -5
@@ -0,0 +1,952 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerRegistry::Mgmt::V2019_06_01_preview
7
+ #
8
+ # Tasks
9
+ #
10
+ class Tasks
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Tasks class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerRegistryManagementClient] reference to the ContainerRegistryManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all the tasks for a specified container registry.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group to which
28
+ # the container registry belongs.
29
+ # @param registry_name [String] The name of the container registry.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<Task>] operation results.
34
+ #
35
+ def list(resource_group_name, registry_name, custom_headers:nil)
36
+ first_page = list_as_lazy(resource_group_name, registry_name, custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # Lists all the tasks for a specified container registry.
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group to which
44
+ # the container registry belongs.
45
+ # @param registry_name [String] The name of the container registry.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_with_http_info(resource_group_name, registry_name, custom_headers:nil)
52
+ list_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Lists all the tasks for a specified container registry.
57
+ #
58
+ # @param resource_group_name [String] The name of the resource group to which
59
+ # the container registry belongs.
60
+ # @param registry_name [String] The name of the container registry.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_async(resource_group_name, registry_name, custom_headers:nil)
67
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
70
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
71
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
72
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
73
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+
76
+
77
+ request_headers = {}
78
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
87
+ options = {
88
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
90
+ query_params: {'api-version' => @client.api_version},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::TaskListResult.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Get the properties of a specified task.
127
+ #
128
+ # @param resource_group_name [String] The name of the resource group to which
129
+ # the container registry belongs.
130
+ # @param registry_name [String] The name of the container registry.
131
+ # @param task_name [String] The name of the container registry task.
132
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
+ # will be added to the HTTP request.
134
+ #
135
+ # @return [Task] operation results.
136
+ #
137
+ def get(resource_group_name, registry_name, task_name, custom_headers:nil)
138
+ response = get_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
139
+ response.body unless response.nil?
140
+ end
141
+
142
+ #
143
+ # Get the properties of a specified task.
144
+ #
145
+ # @param resource_group_name [String] The name of the resource group to which
146
+ # the container registry belongs.
147
+ # @param registry_name [String] The name of the container registry.
148
+ # @param task_name [String] The name of the container registry task.
149
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
150
+ # will be added to the HTTP request.
151
+ #
152
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
153
+ #
154
+ def get_with_http_info(resource_group_name, registry_name, task_name, custom_headers:nil)
155
+ get_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
156
+ end
157
+
158
+ #
159
+ # Get the properties of a specified task.
160
+ #
161
+ # @param resource_group_name [String] The name of the resource group to which
162
+ # the container registry belongs.
163
+ # @param registry_name [String] The name of the container registry.
164
+ # @param task_name [String] The name of the container registry task.
165
+ # @param [Hash{String => String}] A hash of custom headers that will be added
166
+ # to the HTTP request.
167
+ #
168
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
169
+ #
170
+ def get_async(resource_group_name, registry_name, task_name, custom_headers:nil)
171
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
172
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
173
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
174
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
175
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
176
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
177
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
178
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
179
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
180
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MaxLength': '50'" if !task_name.nil? && task_name.length > 50
181
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MinLength': '5'" if !task_name.nil? && task_name.length < 5
182
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-_]*$'" if !task_name.nil? && task_name.match(Regexp.new('^^[a-zA-Z0-9-_]*$$')).nil?
183
+
184
+
185
+ request_headers = {}
186
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
+
188
+ # Set Headers
189
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'
192
+
193
+ request_url = @base_url || @client.base_url
194
+
195
+ options = {
196
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
197
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'taskName' => task_name},
198
+ query_params: {'api-version' => @client.api_version},
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
201
+ }
202
+ promise = @client.make_request_async(:get, path_template, options)
203
+
204
+ promise = promise.then do |result|
205
+ http_response = result.response
206
+ status_code = http_response.status
207
+ response_content = http_response.body
208
+ unless status_code == 200
209
+ error_model = JSON.load(response_content)
210
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
211
+ end
212
+
213
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
215
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
216
+ # Deserialize Response
217
+ if status_code == 200
218
+ begin
219
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
220
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
221
+ result.body = @client.deserialize(result_mapper, parsed_response)
222
+ rescue Exception => e
223
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
224
+ end
225
+ end
226
+
227
+ result
228
+ end
229
+
230
+ promise.execute
231
+ end
232
+
233
+ #
234
+ # Creates a task for a container registry with the specified parameters.
235
+ #
236
+ # @param resource_group_name [String] The name of the resource group to which
237
+ # the container registry belongs.
238
+ # @param registry_name [String] The name of the container registry.
239
+ # @param task_name [String] The name of the container registry task.
240
+ # @param task_create_parameters [Task] The parameters for creating a task.
241
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
242
+ # will be added to the HTTP request.
243
+ #
244
+ # @return [Task] operation results.
245
+ #
246
+ def create(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
247
+ response = create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
248
+ response.body unless response.nil?
249
+ end
250
+
251
+ #
252
+ # @param resource_group_name [String] The name of the resource group to which
253
+ # the container registry belongs.
254
+ # @param registry_name [String] The name of the container registry.
255
+ # @param task_name [String] The name of the container registry task.
256
+ # @param task_create_parameters [Task] The parameters for creating a task.
257
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
258
+ # will be added to the HTTP request.
259
+ #
260
+ # @return [Concurrent::Promise] promise which provides async access to http
261
+ # response.
262
+ #
263
+ def create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
264
+ # Send request
265
+ promise = begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers)
266
+
267
+ promise = promise.then do |response|
268
+ # Defining deserialization method.
269
+ deserialize_method = lambda do |parsed_response|
270
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
271
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
272
+ end
273
+
274
+ # Waiting for response.
275
+ @client.get_long_running_operation_result(response, deserialize_method)
276
+ end
277
+
278
+ promise
279
+ end
280
+
281
+ #
282
+ # Deletes a specified task.
283
+ #
284
+ # @param resource_group_name [String] The name of the resource group to which
285
+ # the container registry belongs.
286
+ # @param registry_name [String] The name of the container registry.
287
+ # @param task_name [String] The name of the container registry task.
288
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
289
+ # will be added to the HTTP request.
290
+ #
291
+ def delete(resource_group_name, registry_name, task_name, custom_headers:nil)
292
+ response = delete_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
293
+ nil
294
+ end
295
+
296
+ #
297
+ # @param resource_group_name [String] The name of the resource group to which
298
+ # the container registry belongs.
299
+ # @param registry_name [String] The name of the container registry.
300
+ # @param task_name [String] The name of the container registry task.
301
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
302
+ # will be added to the HTTP request.
303
+ #
304
+ # @return [Concurrent::Promise] promise which provides async access to http
305
+ # response.
306
+ #
307
+ def delete_async(resource_group_name, registry_name, task_name, custom_headers:nil)
308
+ # Send request
309
+ promise = begin_delete_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers)
310
+
311
+ promise = promise.then do |response|
312
+ # Defining deserialization method.
313
+ deserialize_method = lambda do |parsed_response|
314
+ end
315
+
316
+ # Waiting for response.
317
+ @client.get_long_running_operation_result(response, deserialize_method)
318
+ end
319
+
320
+ promise
321
+ end
322
+
323
+ #
324
+ # Updates a task with the specified parameters.
325
+ #
326
+ # @param resource_group_name [String] The name of the resource group to which
327
+ # the container registry belongs.
328
+ # @param registry_name [String] The name of the container registry.
329
+ # @param task_name [String] The name of the container registry task.
330
+ # @param task_update_parameters [TaskUpdateParameters] The parameters for
331
+ # updating a task.
332
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
333
+ # will be added to the HTTP request.
334
+ #
335
+ # @return [Task] operation results.
336
+ #
337
+ def update(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:nil)
338
+ response = update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:custom_headers).value!
339
+ response.body unless response.nil?
340
+ end
341
+
342
+ #
343
+ # @param resource_group_name [String] The name of the resource group to which
344
+ # the container registry belongs.
345
+ # @param registry_name [String] The name of the container registry.
346
+ # @param task_name [String] The name of the container registry task.
347
+ # @param task_update_parameters [TaskUpdateParameters] The parameters for
348
+ # updating a task.
349
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
350
+ # will be added to the HTTP request.
351
+ #
352
+ # @return [Concurrent::Promise] promise which provides async access to http
353
+ # response.
354
+ #
355
+ def update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:nil)
356
+ # Send request
357
+ promise = begin_update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:custom_headers)
358
+
359
+ promise = promise.then do |response|
360
+ # Defining deserialization method.
361
+ deserialize_method = lambda do |parsed_response|
362
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
363
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
364
+ end
365
+
366
+ # Waiting for response.
367
+ @client.get_long_running_operation_result(response, deserialize_method)
368
+ end
369
+
370
+ promise
371
+ end
372
+
373
+ #
374
+ # Returns a task with extended information that includes all secrets.
375
+ #
376
+ # @param resource_group_name [String] The name of the resource group to which
377
+ # the container registry belongs.
378
+ # @param registry_name [String] The name of the container registry.
379
+ # @param task_name [String] The name of the container registry task.
380
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
381
+ # will be added to the HTTP request.
382
+ #
383
+ # @return [Task] operation results.
384
+ #
385
+ def get_details(resource_group_name, registry_name, task_name, custom_headers:nil)
386
+ response = get_details_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
387
+ response.body unless response.nil?
388
+ end
389
+
390
+ #
391
+ # Returns a task with extended information that includes all secrets.
392
+ #
393
+ # @param resource_group_name [String] The name of the resource group to which
394
+ # the container registry belongs.
395
+ # @param registry_name [String] The name of the container registry.
396
+ # @param task_name [String] The name of the container registry task.
397
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
398
+ # will be added to the HTTP request.
399
+ #
400
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
401
+ #
402
+ def get_details_with_http_info(resource_group_name, registry_name, task_name, custom_headers:nil)
403
+ get_details_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
404
+ end
405
+
406
+ #
407
+ # Returns a task with extended information that includes all secrets.
408
+ #
409
+ # @param resource_group_name [String] The name of the resource group to which
410
+ # the container registry belongs.
411
+ # @param registry_name [String] The name of the container registry.
412
+ # @param task_name [String] The name of the container registry task.
413
+ # @param [Hash{String => String}] A hash of custom headers that will be added
414
+ # to the HTTP request.
415
+ #
416
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
417
+ #
418
+ def get_details_async(resource_group_name, registry_name, task_name, custom_headers:nil)
419
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
420
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
421
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
422
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
423
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
424
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
425
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
426
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
427
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
428
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MaxLength': '50'" if !task_name.nil? && task_name.length > 50
429
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MinLength': '5'" if !task_name.nil? && task_name.length < 5
430
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-_]*$'" if !task_name.nil? && task_name.match(Regexp.new('^^[a-zA-Z0-9-_]*$$')).nil?
431
+
432
+
433
+ request_headers = {}
434
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
435
+
436
+ # Set Headers
437
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
438
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
439
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}/listDetails'
440
+
441
+ request_url = @base_url || @client.base_url
442
+
443
+ options = {
444
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
445
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'taskName' => task_name},
446
+ query_params: {'api-version' => @client.api_version},
447
+ headers: request_headers.merge(custom_headers || {}),
448
+ base_url: request_url
449
+ }
450
+ promise = @client.make_request_async(:post, path_template, options)
451
+
452
+ promise = promise.then do |result|
453
+ http_response = result.response
454
+ status_code = http_response.status
455
+ response_content = http_response.body
456
+ unless status_code == 200
457
+ error_model = JSON.load(response_content)
458
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
459
+ end
460
+
461
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
462
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
463
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
464
+ # Deserialize Response
465
+ if status_code == 200
466
+ begin
467
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
468
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
469
+ result.body = @client.deserialize(result_mapper, parsed_response)
470
+ rescue Exception => e
471
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
472
+ end
473
+ end
474
+
475
+ result
476
+ end
477
+
478
+ promise.execute
479
+ end
480
+
481
+ #
482
+ # Creates a task for a container registry with the specified parameters.
483
+ #
484
+ # @param resource_group_name [String] The name of the resource group to which
485
+ # the container registry belongs.
486
+ # @param registry_name [String] The name of the container registry.
487
+ # @param task_name [String] The name of the container registry task.
488
+ # @param task_create_parameters [Task] The parameters for creating a task.
489
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
490
+ # will be added to the HTTP request.
491
+ #
492
+ # @return [Task] operation results.
493
+ #
494
+ def begin_create(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
495
+ response = begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
496
+ response.body unless response.nil?
497
+ end
498
+
499
+ #
500
+ # Creates a task for a container registry with the specified parameters.
501
+ #
502
+ # @param resource_group_name [String] The name of the resource group to which
503
+ # the container registry belongs.
504
+ # @param registry_name [String] The name of the container registry.
505
+ # @param task_name [String] The name of the container registry task.
506
+ # @param task_create_parameters [Task] The parameters for creating a task.
507
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
508
+ # will be added to the HTTP request.
509
+ #
510
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
511
+ #
512
+ def begin_create_with_http_info(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
513
+ begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
514
+ end
515
+
516
+ #
517
+ # Creates a task for a container registry with the specified parameters.
518
+ #
519
+ # @param resource_group_name [String] The name of the resource group to which
520
+ # the container registry belongs.
521
+ # @param registry_name [String] The name of the container registry.
522
+ # @param task_name [String] The name of the container registry task.
523
+ # @param task_create_parameters [Task] The parameters for creating a task.
524
+ # @param [Hash{String => String}] A hash of custom headers that will be added
525
+ # to the HTTP request.
526
+ #
527
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
528
+ #
529
+ def begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
530
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
531
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
532
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
533
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
534
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
535
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
536
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
537
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
538
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
539
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MaxLength': '50'" if !task_name.nil? && task_name.length > 50
540
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MinLength': '5'" if !task_name.nil? && task_name.length < 5
541
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-_]*$'" if !task_name.nil? && task_name.match(Regexp.new('^^[a-zA-Z0-9-_]*$$')).nil?
542
+ fail ArgumentError, 'task_create_parameters is nil' if task_create_parameters.nil?
543
+
544
+
545
+ request_headers = {}
546
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
547
+
548
+ # Set Headers
549
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
550
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
551
+
552
+ # Serialize Request
553
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
554
+ request_content = @client.serialize(request_mapper, task_create_parameters)
555
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
556
+
557
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'
558
+
559
+ request_url = @base_url || @client.base_url
560
+
561
+ options = {
562
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
563
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'taskName' => task_name},
564
+ query_params: {'api-version' => @client.api_version},
565
+ body: request_content,
566
+ headers: request_headers.merge(custom_headers || {}),
567
+ base_url: request_url
568
+ }
569
+ promise = @client.make_request_async(:put, path_template, options)
570
+
571
+ promise = promise.then do |result|
572
+ http_response = result.response
573
+ status_code = http_response.status
574
+ response_content = http_response.body
575
+ unless status_code == 200 || status_code == 201
576
+ error_model = JSON.load(response_content)
577
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
578
+ end
579
+
580
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
581
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
582
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
583
+ # Deserialize Response
584
+ if status_code == 200
585
+ begin
586
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
587
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
588
+ result.body = @client.deserialize(result_mapper, parsed_response)
589
+ rescue Exception => e
590
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
591
+ end
592
+ end
593
+ # Deserialize Response
594
+ if status_code == 201
595
+ begin
596
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
597
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
598
+ result.body = @client.deserialize(result_mapper, parsed_response)
599
+ rescue Exception => e
600
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
601
+ end
602
+ end
603
+
604
+ result
605
+ end
606
+
607
+ promise.execute
608
+ end
609
+
610
+ #
611
+ # Deletes a specified task.
612
+ #
613
+ # @param resource_group_name [String] The name of the resource group to which
614
+ # the container registry belongs.
615
+ # @param registry_name [String] The name of the container registry.
616
+ # @param task_name [String] The name of the container registry task.
617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
618
+ # will be added to the HTTP request.
619
+ #
620
+ #
621
+ def begin_delete(resource_group_name, registry_name, task_name, custom_headers:nil)
622
+ response = begin_delete_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
623
+ nil
624
+ end
625
+
626
+ #
627
+ # Deletes a specified task.
628
+ #
629
+ # @param resource_group_name [String] The name of the resource group to which
630
+ # the container registry belongs.
631
+ # @param registry_name [String] The name of the container registry.
632
+ # @param task_name [String] The name of the container registry task.
633
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
634
+ # will be added to the HTTP request.
635
+ #
636
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
637
+ #
638
+ def begin_delete_with_http_info(resource_group_name, registry_name, task_name, custom_headers:nil)
639
+ begin_delete_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
640
+ end
641
+
642
+ #
643
+ # Deletes a specified task.
644
+ #
645
+ # @param resource_group_name [String] The name of the resource group to which
646
+ # the container registry belongs.
647
+ # @param registry_name [String] The name of the container registry.
648
+ # @param task_name [String] The name of the container registry task.
649
+ # @param [Hash{String => String}] A hash of custom headers that will be added
650
+ # to the HTTP request.
651
+ #
652
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
653
+ #
654
+ def begin_delete_async(resource_group_name, registry_name, task_name, custom_headers:nil)
655
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
656
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
657
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
658
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
659
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
660
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
661
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
662
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
663
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
664
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MaxLength': '50'" if !task_name.nil? && task_name.length > 50
665
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MinLength': '5'" if !task_name.nil? && task_name.length < 5
666
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-_]*$'" if !task_name.nil? && task_name.match(Regexp.new('^^[a-zA-Z0-9-_]*$$')).nil?
667
+
668
+
669
+ request_headers = {}
670
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
671
+
672
+ # Set Headers
673
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
674
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
675
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'
676
+
677
+ request_url = @base_url || @client.base_url
678
+
679
+ options = {
680
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
681
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'taskName' => task_name},
682
+ query_params: {'api-version' => @client.api_version},
683
+ headers: request_headers.merge(custom_headers || {}),
684
+ base_url: request_url
685
+ }
686
+ promise = @client.make_request_async(:delete, path_template, options)
687
+
688
+ promise = promise.then do |result|
689
+ http_response = result.response
690
+ status_code = http_response.status
691
+ response_content = http_response.body
692
+ unless status_code == 200 || status_code == 202 || status_code == 204
693
+ error_model = JSON.load(response_content)
694
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
695
+ end
696
+
697
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
698
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
699
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
700
+
701
+ result
702
+ end
703
+
704
+ promise.execute
705
+ end
706
+
707
+ #
708
+ # Updates a task with the specified parameters.
709
+ #
710
+ # @param resource_group_name [String] The name of the resource group to which
711
+ # the container registry belongs.
712
+ # @param registry_name [String] The name of the container registry.
713
+ # @param task_name [String] The name of the container registry task.
714
+ # @param task_update_parameters [TaskUpdateParameters] The parameters for
715
+ # updating a task.
716
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
717
+ # will be added to the HTTP request.
718
+ #
719
+ # @return [Task] operation results.
720
+ #
721
+ def begin_update(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:nil)
722
+ response = begin_update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:custom_headers).value!
723
+ response.body unless response.nil?
724
+ end
725
+
726
+ #
727
+ # Updates a task with the specified parameters.
728
+ #
729
+ # @param resource_group_name [String] The name of the resource group to which
730
+ # the container registry belongs.
731
+ # @param registry_name [String] The name of the container registry.
732
+ # @param task_name [String] The name of the container registry task.
733
+ # @param task_update_parameters [TaskUpdateParameters] The parameters for
734
+ # updating a task.
735
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
736
+ # will be added to the HTTP request.
737
+ #
738
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
739
+ #
740
+ def begin_update_with_http_info(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:nil)
741
+ begin_update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:custom_headers).value!
742
+ end
743
+
744
+ #
745
+ # Updates a task with the specified parameters.
746
+ #
747
+ # @param resource_group_name [String] The name of the resource group to which
748
+ # the container registry belongs.
749
+ # @param registry_name [String] The name of the container registry.
750
+ # @param task_name [String] The name of the container registry task.
751
+ # @param task_update_parameters [TaskUpdateParameters] The parameters for
752
+ # updating a task.
753
+ # @param [Hash{String => String}] A hash of custom headers that will be added
754
+ # to the HTTP request.
755
+ #
756
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
757
+ #
758
+ def begin_update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:nil)
759
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
760
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
761
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
762
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
763
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
764
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
765
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
766
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
767
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
768
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MaxLength': '50'" if !task_name.nil? && task_name.length > 50
769
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'MinLength': '5'" if !task_name.nil? && task_name.length < 5
770
+ fail ArgumentError, "'task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-_]*$'" if !task_name.nil? && task_name.match(Regexp.new('^^[a-zA-Z0-9-_]*$$')).nil?
771
+ fail ArgumentError, 'task_update_parameters is nil' if task_update_parameters.nil?
772
+
773
+
774
+ request_headers = {}
775
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
776
+
777
+ # Set Headers
778
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
779
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
780
+
781
+ # Serialize Request
782
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::TaskUpdateParameters.mapper()
783
+ request_content = @client.serialize(request_mapper, task_update_parameters)
784
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
785
+
786
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'
787
+
788
+ request_url = @base_url || @client.base_url
789
+
790
+ options = {
791
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
792
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'taskName' => task_name},
793
+ query_params: {'api-version' => @client.api_version},
794
+ body: request_content,
795
+ headers: request_headers.merge(custom_headers || {}),
796
+ base_url: request_url
797
+ }
798
+ promise = @client.make_request_async(:patch, path_template, options)
799
+
800
+ promise = promise.then do |result|
801
+ http_response = result.response
802
+ status_code = http_response.status
803
+ response_content = http_response.body
804
+ unless status_code == 200 || status_code == 201
805
+ error_model = JSON.load(response_content)
806
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
807
+ end
808
+
809
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
810
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
811
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
812
+ # Deserialize Response
813
+ if status_code == 200
814
+ begin
815
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
816
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
817
+ result.body = @client.deserialize(result_mapper, parsed_response)
818
+ rescue Exception => e
819
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
820
+ end
821
+ end
822
+ # Deserialize Response
823
+ if status_code == 201
824
+ begin
825
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
826
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::Task.mapper()
827
+ result.body = @client.deserialize(result_mapper, parsed_response)
828
+ rescue Exception => e
829
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
830
+ end
831
+ end
832
+
833
+ result
834
+ end
835
+
836
+ promise.execute
837
+ end
838
+
839
+ #
840
+ # Lists all the tasks for a specified container registry.
841
+ #
842
+ # @param next_page_link [String] The NextLink from the previous successful call
843
+ # to List operation.
844
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
845
+ # will be added to the HTTP request.
846
+ #
847
+ # @return [TaskListResult] operation results.
848
+ #
849
+ def list_next(next_page_link, custom_headers:nil)
850
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
851
+ response.body unless response.nil?
852
+ end
853
+
854
+ #
855
+ # Lists all the tasks for a specified container registry.
856
+ #
857
+ # @param next_page_link [String] The NextLink from the previous successful call
858
+ # to List operation.
859
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
860
+ # will be added to the HTTP request.
861
+ #
862
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
863
+ #
864
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
865
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
866
+ end
867
+
868
+ #
869
+ # Lists all the tasks for a specified container registry.
870
+ #
871
+ # @param next_page_link [String] The NextLink from the previous successful call
872
+ # to List operation.
873
+ # @param [Hash{String => String}] A hash of custom headers that will be added
874
+ # to the HTTP request.
875
+ #
876
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
877
+ #
878
+ def list_next_async(next_page_link, custom_headers:nil)
879
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
880
+
881
+
882
+ request_headers = {}
883
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
884
+
885
+ # Set Headers
886
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
887
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
888
+ path_template = '{nextLink}'
889
+
890
+ request_url = @base_url || @client.base_url
891
+
892
+ options = {
893
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
894
+ skip_encoding_path_params: {'nextLink' => next_page_link},
895
+ headers: request_headers.merge(custom_headers || {}),
896
+ base_url: request_url
897
+ }
898
+ promise = @client.make_request_async(:get, path_template, options)
899
+
900
+ promise = promise.then do |result|
901
+ http_response = result.response
902
+ status_code = http_response.status
903
+ response_content = http_response.body
904
+ unless status_code == 200
905
+ error_model = JSON.load(response_content)
906
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
907
+ end
908
+
909
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
910
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
911
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
912
+ # Deserialize Response
913
+ if status_code == 200
914
+ begin
915
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
916
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::Models::TaskListResult.mapper()
917
+ result.body = @client.deserialize(result_mapper, parsed_response)
918
+ rescue Exception => e
919
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
920
+ end
921
+ end
922
+
923
+ result
924
+ end
925
+
926
+ promise.execute
927
+ end
928
+
929
+ #
930
+ # Lists all the tasks for a specified container registry.
931
+ #
932
+ # @param resource_group_name [String] The name of the resource group to which
933
+ # the container registry belongs.
934
+ # @param registry_name [String] The name of the container registry.
935
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
936
+ # will be added to the HTTP request.
937
+ #
938
+ # @return [TaskListResult] which provide lazy access to pages of the response.
939
+ #
940
+ def list_as_lazy(resource_group_name, registry_name, custom_headers:nil)
941
+ response = list_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
942
+ unless response.nil?
943
+ page = response.body
944
+ page.next_method = Proc.new do |next_page_link|
945
+ list_next_async(next_page_link, custom_headers:custom_headers)
946
+ end
947
+ page
948
+ end
949
+ end
950
+
951
+ end
952
+ end