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,844 @@
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_05_01_preview
7
+ #
8
+ # Tokens
9
+ #
10
+ class Tokens
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Tokens 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
+ # Gets the properties of the specified token.
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 token_name [String] The name of the token.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Token] operation results.
35
+ #
36
+ def get(resource_group_name, registry_name, token_name, custom_headers:nil)
37
+ response = get_async(resource_group_name, registry_name, token_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Gets the properties of the specified token.
43
+ #
44
+ # @param resource_group_name [String] The name of the resource group to which
45
+ # the container registry belongs.
46
+ # @param registry_name [String] The name of the container registry.
47
+ # @param token_name [String] The name of the token.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def get_with_http_info(resource_group_name, registry_name, token_name, custom_headers:nil)
54
+ get_async(resource_group_name, registry_name, token_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets the properties of the specified token.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group to which
61
+ # the container registry belongs.
62
+ # @param registry_name [String] The name of the container registry.
63
+ # @param token_name [String] The name of the token.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def get_async(resource_group_name, registry_name, token_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
72
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
74
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
75
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
76
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
77
+ 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?
78
+ fail ArgumentError, 'token_name is nil' if token_name.nil?
79
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MaxLength': '50'" if !token_name.nil? && token_name.length > 50
80
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MinLength': '5'" if !token_name.nil? && token_name.length < 5
81
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !token_name.nil? && token_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'tokenName' => token_name},
97
+ query_params: {'api-version' => @client.api_version},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200
108
+ error_model = JSON.load(response_content)
109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
114
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # Creates a token for a container registry with the specified parameters.
134
+ #
135
+ # @param resource_group_name [String] The name of the resource group to which
136
+ # the container registry belongs.
137
+ # @param registry_name [String] The name of the container registry.
138
+ # @param token_name [String] The name of the token.
139
+ # @param token_create_parameters [Token] The parameters for creating a token.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [Token] operation results.
144
+ #
145
+ def create(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:nil)
146
+ response = create_async(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # @param resource_group_name [String] The name of the resource group to which
152
+ # the container registry belongs.
153
+ # @param registry_name [String] The name of the container registry.
154
+ # @param token_name [String] The name of the token.
155
+ # @param token_create_parameters [Token] The parameters for creating a token.
156
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
157
+ # will be added to the HTTP request.
158
+ #
159
+ # @return [Concurrent::Promise] promise which provides async access to http
160
+ # response.
161
+ #
162
+ def create_async(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:nil)
163
+ # Send request
164
+ promise = begin_create_async(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:custom_headers)
165
+
166
+ promise = promise.then do |response|
167
+ # Defining deserialization method.
168
+ deserialize_method = lambda do |parsed_response|
169
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
170
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
171
+ end
172
+
173
+ # Waiting for response.
174
+ @client.get_long_running_operation_result(response, deserialize_method)
175
+ end
176
+
177
+ promise
178
+ end
179
+
180
+ #
181
+ # Deletes a token from a container registry.
182
+ #
183
+ # @param resource_group_name [String] The name of the resource group to which
184
+ # the container registry belongs.
185
+ # @param registry_name [String] The name of the container registry.
186
+ # @param token_name [String] The name of the token.
187
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
188
+ # will be added to the HTTP request.
189
+ #
190
+ def delete(resource_group_name, registry_name, token_name, custom_headers:nil)
191
+ response = delete_async(resource_group_name, registry_name, token_name, custom_headers:custom_headers).value!
192
+ nil
193
+ end
194
+
195
+ #
196
+ # @param resource_group_name [String] The name of the resource group to which
197
+ # the container registry belongs.
198
+ # @param registry_name [String] The name of the container registry.
199
+ # @param token_name [String] The name of the token.
200
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
201
+ # will be added to the HTTP request.
202
+ #
203
+ # @return [Concurrent::Promise] promise which provides async access to http
204
+ # response.
205
+ #
206
+ def delete_async(resource_group_name, registry_name, token_name, custom_headers:nil)
207
+ # Send request
208
+ promise = begin_delete_async(resource_group_name, registry_name, token_name, custom_headers:custom_headers)
209
+
210
+ promise = promise.then do |response|
211
+ # Defining deserialization method.
212
+ deserialize_method = lambda do |parsed_response|
213
+ end
214
+
215
+ # Waiting for response.
216
+ @client.get_long_running_operation_result(response, deserialize_method)
217
+ end
218
+
219
+ promise
220
+ end
221
+
222
+ #
223
+ # Updates a token with the specified parameters.
224
+ #
225
+ # @param resource_group_name [String] The name of the resource group to which
226
+ # the container registry belongs.
227
+ # @param registry_name [String] The name of the container registry.
228
+ # @param token_name [String] The name of the token.
229
+ # @param token_update_parameters [TokenUpdateParameters] The parameters for
230
+ # updating a token.
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ # @return [Token] operation results.
235
+ #
236
+ def update(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:nil)
237
+ response = update_async(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:custom_headers).value!
238
+ response.body unless response.nil?
239
+ end
240
+
241
+ #
242
+ # @param resource_group_name [String] The name of the resource group to which
243
+ # the container registry belongs.
244
+ # @param registry_name [String] The name of the container registry.
245
+ # @param token_name [String] The name of the token.
246
+ # @param token_update_parameters [TokenUpdateParameters] The parameters for
247
+ # updating a token.
248
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
249
+ # will be added to the HTTP request.
250
+ #
251
+ # @return [Concurrent::Promise] promise which provides async access to http
252
+ # response.
253
+ #
254
+ def update_async(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:nil)
255
+ # Send request
256
+ promise = begin_update_async(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:custom_headers)
257
+
258
+ promise = promise.then do |response|
259
+ # Defining deserialization method.
260
+ deserialize_method = lambda do |parsed_response|
261
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
262
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
263
+ end
264
+
265
+ # Waiting for response.
266
+ @client.get_long_running_operation_result(response, deserialize_method)
267
+ end
268
+
269
+ promise
270
+ end
271
+
272
+ #
273
+ # Lists all the tokens for the specified container registry.
274
+ #
275
+ # @param resource_group_name [String] The name of the resource group to which
276
+ # the container registry belongs.
277
+ # @param registry_name [String] The name of the container registry.
278
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
279
+ # will be added to the HTTP request.
280
+ #
281
+ # @return [Array<Token>] operation results.
282
+ #
283
+ def list(resource_group_name, registry_name, custom_headers:nil)
284
+ first_page = list_as_lazy(resource_group_name, registry_name, custom_headers:custom_headers)
285
+ first_page.get_all_items
286
+ end
287
+
288
+ #
289
+ # Lists all the tokens for the specified container registry.
290
+ #
291
+ # @param resource_group_name [String] The name of the resource group to which
292
+ # the container registry belongs.
293
+ # @param registry_name [String] The name of the container registry.
294
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
295
+ # will be added to the HTTP request.
296
+ #
297
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
298
+ #
299
+ def list_with_http_info(resource_group_name, registry_name, custom_headers:nil)
300
+ list_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
301
+ end
302
+
303
+ #
304
+ # Lists all the tokens for the specified container registry.
305
+ #
306
+ # @param resource_group_name [String] The name of the resource group to which
307
+ # the container registry belongs.
308
+ # @param registry_name [String] The name of the container registry.
309
+ # @param [Hash{String => String}] A hash of custom headers that will be added
310
+ # to the HTTP request.
311
+ #
312
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
313
+ #
314
+ def list_async(resource_group_name, registry_name, custom_headers:nil)
315
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
316
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
317
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
318
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
319
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
320
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
321
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
322
+ 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?
323
+
324
+
325
+ request_headers = {}
326
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
327
+
328
+ # Set Headers
329
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
330
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
331
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens'
332
+
333
+ request_url = @base_url || @client.base_url
334
+
335
+ options = {
336
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
337
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
338
+ query_params: {'api-version' => @client.api_version},
339
+ headers: request_headers.merge(custom_headers || {}),
340
+ base_url: request_url
341
+ }
342
+ promise = @client.make_request_async(:get, path_template, options)
343
+
344
+ promise = promise.then do |result|
345
+ http_response = result.response
346
+ status_code = http_response.status
347
+ response_content = http_response.body
348
+ unless status_code == 200
349
+ error_model = JSON.load(response_content)
350
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
351
+ end
352
+
353
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
354
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
355
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
356
+ # Deserialize Response
357
+ if status_code == 200
358
+ begin
359
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
360
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::TokenListResult.mapper()
361
+ result.body = @client.deserialize(result_mapper, parsed_response)
362
+ rescue Exception => e
363
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
364
+ end
365
+ end
366
+
367
+ result
368
+ end
369
+
370
+ promise.execute
371
+ end
372
+
373
+ #
374
+ # Creates a token for a container registry with the specified parameters.
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 token_name [String] The name of the token.
380
+ # @param token_create_parameters [Token] The parameters for creating a token.
381
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
382
+ # will be added to the HTTP request.
383
+ #
384
+ # @return [Token] operation results.
385
+ #
386
+ def begin_create(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:nil)
387
+ response = begin_create_async(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:custom_headers).value!
388
+ response.body unless response.nil?
389
+ end
390
+
391
+ #
392
+ # Creates a token for a container registry with the specified parameters.
393
+ #
394
+ # @param resource_group_name [String] The name of the resource group to which
395
+ # the container registry belongs.
396
+ # @param registry_name [String] The name of the container registry.
397
+ # @param token_name [String] The name of the token.
398
+ # @param token_create_parameters [Token] The parameters for creating a token.
399
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
400
+ # will be added to the HTTP request.
401
+ #
402
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
403
+ #
404
+ def begin_create_with_http_info(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:nil)
405
+ begin_create_async(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:custom_headers).value!
406
+ end
407
+
408
+ #
409
+ # Creates a token for a container registry with the specified parameters.
410
+ #
411
+ # @param resource_group_name [String] The name of the resource group to which
412
+ # the container registry belongs.
413
+ # @param registry_name [String] The name of the container registry.
414
+ # @param token_name [String] The name of the token.
415
+ # @param token_create_parameters [Token] The parameters for creating a token.
416
+ # @param [Hash{String => String}] A hash of custom headers that will be added
417
+ # to the HTTP request.
418
+ #
419
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
420
+ #
421
+ def begin_create_async(resource_group_name, registry_name, token_name, token_create_parameters, custom_headers:nil)
422
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
423
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
424
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
425
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
426
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
427
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
428
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
429
+ 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?
430
+ fail ArgumentError, 'token_name is nil' if token_name.nil?
431
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MaxLength': '50'" if !token_name.nil? && token_name.length > 50
432
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MinLength': '5'" if !token_name.nil? && token_name.length < 5
433
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !token_name.nil? && token_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
434
+ fail ArgumentError, 'token_create_parameters is nil' if token_create_parameters.nil?
435
+
436
+
437
+ request_headers = {}
438
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
439
+
440
+ # Set Headers
441
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
442
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
443
+
444
+ # Serialize Request
445
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
446
+ request_content = @client.serialize(request_mapper, token_create_parameters)
447
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
448
+
449
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'
450
+
451
+ request_url = @base_url || @client.base_url
452
+
453
+ options = {
454
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
455
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'tokenName' => token_name},
456
+ query_params: {'api-version' => @client.api_version},
457
+ body: request_content,
458
+ headers: request_headers.merge(custom_headers || {}),
459
+ base_url: request_url
460
+ }
461
+ promise = @client.make_request_async(:put, path_template, options)
462
+
463
+ promise = promise.then do |result|
464
+ http_response = result.response
465
+ status_code = http_response.status
466
+ response_content = http_response.body
467
+ unless status_code == 200 || status_code == 201
468
+ error_model = JSON.load(response_content)
469
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
470
+ end
471
+
472
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
473
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
474
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
475
+ # Deserialize Response
476
+ if status_code == 200
477
+ begin
478
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
479
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
480
+ result.body = @client.deserialize(result_mapper, parsed_response)
481
+ rescue Exception => e
482
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
483
+ end
484
+ end
485
+ # Deserialize Response
486
+ if status_code == 201
487
+ begin
488
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
489
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
490
+ result.body = @client.deserialize(result_mapper, parsed_response)
491
+ rescue Exception => e
492
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
493
+ end
494
+ end
495
+
496
+ result
497
+ end
498
+
499
+ promise.execute
500
+ end
501
+
502
+ #
503
+ # Deletes a token from a container registry.
504
+ #
505
+ # @param resource_group_name [String] The name of the resource group to which
506
+ # the container registry belongs.
507
+ # @param registry_name [String] The name of the container registry.
508
+ # @param token_name [String] The name of the token.
509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
510
+ # will be added to the HTTP request.
511
+ #
512
+ #
513
+ def begin_delete(resource_group_name, registry_name, token_name, custom_headers:nil)
514
+ response = begin_delete_async(resource_group_name, registry_name, token_name, custom_headers:custom_headers).value!
515
+ nil
516
+ end
517
+
518
+ #
519
+ # Deletes a token from a container registry.
520
+ #
521
+ # @param resource_group_name [String] The name of the resource group to which
522
+ # the container registry belongs.
523
+ # @param registry_name [String] The name of the container registry.
524
+ # @param token_name [String] The name of the token.
525
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
526
+ # will be added to the HTTP request.
527
+ #
528
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
529
+ #
530
+ def begin_delete_with_http_info(resource_group_name, registry_name, token_name, custom_headers:nil)
531
+ begin_delete_async(resource_group_name, registry_name, token_name, custom_headers:custom_headers).value!
532
+ end
533
+
534
+ #
535
+ # Deletes a token from a container registry.
536
+ #
537
+ # @param resource_group_name [String] The name of the resource group to which
538
+ # the container registry belongs.
539
+ # @param registry_name [String] The name of the container registry.
540
+ # @param token_name [String] The name of the token.
541
+ # @param [Hash{String => String}] A hash of custom headers that will be added
542
+ # to the HTTP request.
543
+ #
544
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
545
+ #
546
+ def begin_delete_async(resource_group_name, registry_name, token_name, custom_headers:nil)
547
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
548
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
549
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
550
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
551
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
552
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
553
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
554
+ 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?
555
+ fail ArgumentError, 'token_name is nil' if token_name.nil?
556
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MaxLength': '50'" if !token_name.nil? && token_name.length > 50
557
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MinLength': '5'" if !token_name.nil? && token_name.length < 5
558
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !token_name.nil? && token_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
559
+
560
+
561
+ request_headers = {}
562
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
563
+
564
+ # Set Headers
565
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
566
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
567
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'
568
+
569
+ request_url = @base_url || @client.base_url
570
+
571
+ options = {
572
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
573
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'tokenName' => token_name},
574
+ query_params: {'api-version' => @client.api_version},
575
+ headers: request_headers.merge(custom_headers || {}),
576
+ base_url: request_url
577
+ }
578
+ promise = @client.make_request_async(:delete, path_template, options)
579
+
580
+ promise = promise.then do |result|
581
+ http_response = result.response
582
+ status_code = http_response.status
583
+ response_content = http_response.body
584
+ unless status_code == 200 || status_code == 202 || status_code == 204
585
+ error_model = JSON.load(response_content)
586
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
587
+ end
588
+
589
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
590
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
591
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
592
+
593
+ result
594
+ end
595
+
596
+ promise.execute
597
+ end
598
+
599
+ #
600
+ # Updates a token with the specified parameters.
601
+ #
602
+ # @param resource_group_name [String] The name of the resource group to which
603
+ # the container registry belongs.
604
+ # @param registry_name [String] The name of the container registry.
605
+ # @param token_name [String] The name of the token.
606
+ # @param token_update_parameters [TokenUpdateParameters] The parameters for
607
+ # updating a token.
608
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
609
+ # will be added to the HTTP request.
610
+ #
611
+ # @return [Token] operation results.
612
+ #
613
+ def begin_update(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:nil)
614
+ response = begin_update_async(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:custom_headers).value!
615
+ response.body unless response.nil?
616
+ end
617
+
618
+ #
619
+ # Updates a token with the specified parameters.
620
+ #
621
+ # @param resource_group_name [String] The name of the resource group to which
622
+ # the container registry belongs.
623
+ # @param registry_name [String] The name of the container registry.
624
+ # @param token_name [String] The name of the token.
625
+ # @param token_update_parameters [TokenUpdateParameters] The parameters for
626
+ # updating a token.
627
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
628
+ # will be added to the HTTP request.
629
+ #
630
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
631
+ #
632
+ def begin_update_with_http_info(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:nil)
633
+ begin_update_async(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:custom_headers).value!
634
+ end
635
+
636
+ #
637
+ # Updates a token with the specified parameters.
638
+ #
639
+ # @param resource_group_name [String] The name of the resource group to which
640
+ # the container registry belongs.
641
+ # @param registry_name [String] The name of the container registry.
642
+ # @param token_name [String] The name of the token.
643
+ # @param token_update_parameters [TokenUpdateParameters] The parameters for
644
+ # updating a token.
645
+ # @param [Hash{String => String}] A hash of custom headers that will be added
646
+ # to the HTTP request.
647
+ #
648
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
649
+ #
650
+ def begin_update_async(resource_group_name, registry_name, token_name, token_update_parameters, custom_headers:nil)
651
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
652
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
653
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
654
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
655
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
656
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
657
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
658
+ 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?
659
+ fail ArgumentError, 'token_name is nil' if token_name.nil?
660
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MaxLength': '50'" if !token_name.nil? && token_name.length > 50
661
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'MinLength': '5'" if !token_name.nil? && token_name.length < 5
662
+ fail ArgumentError, "'token_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !token_name.nil? && token_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
663
+ fail ArgumentError, 'token_update_parameters is nil' if token_update_parameters.nil?
664
+
665
+
666
+ request_headers = {}
667
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
668
+
669
+ # Set Headers
670
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
671
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
672
+
673
+ # Serialize Request
674
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::TokenUpdateParameters.mapper()
675
+ request_content = @client.serialize(request_mapper, token_update_parameters)
676
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
677
+
678
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'
679
+
680
+ request_url = @base_url || @client.base_url
681
+
682
+ options = {
683
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
684
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'tokenName' => token_name},
685
+ query_params: {'api-version' => @client.api_version},
686
+ body: request_content,
687
+ headers: request_headers.merge(custom_headers || {}),
688
+ base_url: request_url
689
+ }
690
+ promise = @client.make_request_async(:patch, path_template, options)
691
+
692
+ promise = promise.then do |result|
693
+ http_response = result.response
694
+ status_code = http_response.status
695
+ response_content = http_response.body
696
+ unless status_code == 200 || status_code == 201
697
+ error_model = JSON.load(response_content)
698
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
699
+ end
700
+
701
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
702
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
703
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
704
+ # Deserialize Response
705
+ if status_code == 200
706
+ begin
707
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
708
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
709
+ result.body = @client.deserialize(result_mapper, parsed_response)
710
+ rescue Exception => e
711
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
712
+ end
713
+ end
714
+ # Deserialize Response
715
+ if status_code == 201
716
+ begin
717
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
718
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::Token.mapper()
719
+ result.body = @client.deserialize(result_mapper, parsed_response)
720
+ rescue Exception => e
721
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
722
+ end
723
+ end
724
+
725
+ result
726
+ end
727
+
728
+ promise.execute
729
+ end
730
+
731
+ #
732
+ # Lists all the tokens for the specified container registry.
733
+ #
734
+ # @param next_page_link [String] The NextLink from the previous successful call
735
+ # to List operation.
736
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
737
+ # will be added to the HTTP request.
738
+ #
739
+ # @return [TokenListResult] operation results.
740
+ #
741
+ def list_next(next_page_link, custom_headers:nil)
742
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
743
+ response.body unless response.nil?
744
+ end
745
+
746
+ #
747
+ # Lists all the tokens for the specified container registry.
748
+ #
749
+ # @param next_page_link [String] The NextLink from the previous successful call
750
+ # to List operation.
751
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
752
+ # will be added to the HTTP request.
753
+ #
754
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
755
+ #
756
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
757
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
758
+ end
759
+
760
+ #
761
+ # Lists all the tokens for the specified container registry.
762
+ #
763
+ # @param next_page_link [String] The NextLink from the previous successful call
764
+ # to List operation.
765
+ # @param [Hash{String => String}] A hash of custom headers that will be added
766
+ # to the HTTP request.
767
+ #
768
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
769
+ #
770
+ def list_next_async(next_page_link, custom_headers:nil)
771
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.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
+ path_template = '{nextLink}'
781
+
782
+ request_url = @base_url || @client.base_url
783
+
784
+ options = {
785
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
786
+ skip_encoding_path_params: {'nextLink' => next_page_link},
787
+ headers: request_headers.merge(custom_headers || {}),
788
+ base_url: request_url
789
+ }
790
+ promise = @client.make_request_async(:get, path_template, options)
791
+
792
+ promise = promise.then do |result|
793
+ http_response = result.response
794
+ status_code = http_response.status
795
+ response_content = http_response.body
796
+ unless status_code == 200
797
+ error_model = JSON.load(response_content)
798
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
799
+ end
800
+
801
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
802
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
803
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
804
+ # Deserialize Response
805
+ if status_code == 200
806
+ begin
807
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
808
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::TokenListResult.mapper()
809
+ result.body = @client.deserialize(result_mapper, parsed_response)
810
+ rescue Exception => e
811
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
812
+ end
813
+ end
814
+
815
+ result
816
+ end
817
+
818
+ promise.execute
819
+ end
820
+
821
+ #
822
+ # Lists all the tokens for the specified container registry.
823
+ #
824
+ # @param resource_group_name [String] The name of the resource group to which
825
+ # the container registry belongs.
826
+ # @param registry_name [String] The name of the container registry.
827
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
828
+ # will be added to the HTTP request.
829
+ #
830
+ # @return [TokenListResult] which provide lazy access to pages of the response.
831
+ #
832
+ def list_as_lazy(resource_group_name, registry_name, custom_headers:nil)
833
+ response = list_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
834
+ unless response.nil?
835
+ page = response.body
836
+ page.next_method = Proc.new do |next_page_link|
837
+ list_next_async(next_page_link, custom_headers:custom_headers)
838
+ end
839
+ page
840
+ end
841
+ end
842
+
843
+ end
844
+ end