azure_mgmt_container_service 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-03-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  3. data/lib/2016-09-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  4. data/lib/2017-01-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  5. data/lib/2017-07-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  6. data/lib/2017-08-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  7. data/lib/2017-09-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  8. data/lib/2018-03-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  9. data/lib/2018-08-01-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  10. data/lib/2018-09-30-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  11. data/lib/2019-02-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  12. data/lib/2019-04-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  13. data/lib/2019-04-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  14. data/lib/2019-06-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  15. data/lib/2019-08-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  16. data/lib/2019-09-30-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  17. data/lib/2019-10-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  18. data/lib/2020-02-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  19. data/lib/2020-06-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  20. data/lib/2020-07-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  21. data/lib/2020-09-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  22. data/lib/2020-12-01/generated/azure_mgmt_container_service.rb +126 -0
  23. data/lib/2020-12-01/generated/azure_mgmt_container_service/agent_pools.rb +1054 -0
  24. data/lib/2020-12-01/generated/azure_mgmt_container_service/container_service_client.rb +157 -0
  25. data/lib/2020-12-01/generated/azure_mgmt_container_service/maintenance_configurations.rb +589 -0
  26. data/lib/2020-12-01/generated/azure_mgmt_container_service/managed_clusters.rb +2309 -0
  27. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool.rb +533 -0
  28. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions.rb +93 -0
  29. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions_properties_agent_pool_versions_item.rb +71 -0
  30. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb +99 -0
  31. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_mode.rb +16 -0
  32. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb +16 -0
  33. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile.rb +129 -0
  34. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile_properties_upgrades_item.rb +59 -0
  35. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_settings.rb +47 -0
  36. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/code.rb +16 -0
  37. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/connection_status.rb +18 -0
  38. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  39. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  40. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  41. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb +179 -0
  42. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  43. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  44. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  45. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  46. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  47. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/created_by_type.rb +18 -0
  48. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/credential_result.rb +59 -0
  49. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/credential_results.rb +57 -0
  50. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/expander.rb +18 -0
  51. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/kubelet_config.rb +174 -0
  52. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/kubelet_disk_type.rb +15 -0
  53. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/license_type.rb +16 -0
  54. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/linux_osconfig.rb +81 -0
  55. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb +16 -0
  56. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/maintenance_configuration.rb +115 -0
  57. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/maintenance_configuration_list_result.rb +101 -0
  58. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster.rb +428 -0
  59. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb +123 -0
  60. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb +97 -0
  61. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb +80 -0
  62. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile_identity.rb +59 -0
  63. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb +340 -0
  64. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb +506 -0
  65. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_apiserver_access_profile.rb +77 -0
  66. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_auto_upgrade_profile.rb +47 -0
  67. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb +104 -0
  68. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_identity_user_assigned_identities_value.rb +61 -0
  69. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb +100 -0
  70. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile.rb +132 -0
  71. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_managed_outbound_ips.rb +55 -0
  72. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ipprefixes.rb +57 -0
  73. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ips.rb +56 -0
  74. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity.rb +98 -0
  75. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_exception.rb +77 -0
  76. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_profile.rb +89 -0
  77. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_provisioning_info.rb +49 -0
  78. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_provisioning_state.rb +18 -0
  79. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb +92 -0
  80. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb +59 -0
  81. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_auto_scaler_profile.rb +224 -0
  82. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_identity_profile_value.rb +61 -0
  83. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb +59 -0
  84. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_sku.rb +60 -0
  85. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_skuname.rb +15 -0
  86. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_skutier.rb +16 -0
  87. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb +105 -0
  88. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb +84 -0
  89. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/network_mode.rb +16 -0
  90. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/network_plugin.rb +16 -0
  91. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/network_policy.rb +16 -0
  92. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/operation_list_result.rb +56 -0
  93. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/operation_value.rb +108 -0
  94. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/osdisk_type.rb +16 -0
  95. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  96. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/outbound_type.rb +16 -0
  97. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/power_state.rb +47 -0
  98. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint.rb +46 -0
  99. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection.rb +111 -0
  100. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_list_result.rb +55 -0
  101. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_provisioning_state.rb +18 -0
  102. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_link_resource.rb +111 -0
  103. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_link_resources_list_result.rb +55 -0
  104. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_link_service_connection_state.rb +59 -0
  105. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/resource.rb +110 -0
  106. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb +17 -0
  107. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/resource_reference.rb +46 -0
  108. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/scale_set_eviction_policy.rb +16 -0
  109. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/scale_set_priority.rb +16 -0
  110. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/sub_resource.rb +72 -0
  111. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/sysctl_config.rb +343 -0
  112. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/system_data.rb +106 -0
  113. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/tags_object.rb +54 -0
  114. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/time_in_week.rb +66 -0
  115. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/time_span.rb +57 -0
  116. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/upgrade_channel.rb +18 -0
  117. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/user_assigned_identity.rb +69 -0
  118. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/week_day.rb +21 -0
  119. data/lib/2020-12-01/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  120. data/lib/2020-12-01/generated/azure_mgmt_container_service/operations.rb +109 -0
  121. data/lib/2020-12-01/generated/azure_mgmt_container_service/private_endpoint_connections.rb +515 -0
  122. data/lib/2020-12-01/generated/azure_mgmt_container_service/private_link_resources.rb +132 -0
  123. data/lib/2020-12-01/generated/azure_mgmt_container_service/resolve_private_link_service_id.rb +143 -0
  124. data/lib/azure_mgmt_container_service.rb +1 -0
  125. data/lib/profiles/latest/modules/containerservice_profile_module.rb +268 -194
  126. data/lib/version.rb +1 -1
  127. metadata +104 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af188f11cd3353f0d43af70e0fe48430ea435ae2c795bff4f41345fc6c03ea5f
4
- data.tar.gz: e0e716d83330a9f2c6dc779487afe763d86fe6a39a61b9e09ee53e2491fe7cc2
3
+ metadata.gz: 84cf7be8e0ac768e865f2d69c554c760b6923a705130d456f39c4e198c7d1e93
4
+ data.tar.gz: 6d3684ca748c669c7e7dcc94a74420cff6081f0a13d6892068980c1b0f3162b5
5
5
  SHA512:
6
- metadata.gz: 872b6663ed5bad2603da075cb172d44525c9e4b5f8a882e0bdc5976881c92c249baf5bbbf389cb12df89df662fae33872be75d5583e7ecca78dcfa963e0eb946
7
- data.tar.gz: f99422f5b0c9fa897aebcc1100fda8171377eb32b157d4554a14ba2c0d1e69a29832195e4b5c3acef025b50b0553b1731a7053bab8aac9dbca2ea750b59e8a63
6
+ metadata.gz: d5b75f8fb2721d3dffe1c49f86f55c4fe4ec51e672dfa8c0270ffb8b45f0fbb3eae3fb7b5964a2b020307c6426ea4d7d25a02187b0de4b6be8d028985c52e387
7
+ data.tar.gz: b284771a2651e7abd21989fed5b4fa42416bd29b1b40da2aef4644c8691c830676a817eebd9ac3a3d18279f8bb48ff28753c39805c87b0f2ef1691696360c1ae
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2016_03_30
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2016_09_30
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2017_01_31
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2017_07_01
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2017_08_31
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2017_09_30
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -130,7 +130,7 @@ module Azure::ContainerService::Mgmt::V2018_03_31
130
130
  #
131
131
  def add_telemetry
132
132
  sdk_information = 'azure_mgmt_container_service'
133
- sdk_information = "#{sdk_information}/0.21.0"
133
+ sdk_information = "#{sdk_information}/0.22.0"
134
134
  add_user_agent_information(sdk_information)
135
135
  end
136
136
  end
@@ -130,7 +130,7 @@ module Azure::ContainerService::Mgmt::V2018_08_01_preview
130
130
  #
131
131
  def add_telemetry
132
132
  sdk_information = 'azure_mgmt_container_service'
133
- sdk_information = "#{sdk_information}/0.21.0"
133
+ sdk_information = "#{sdk_information}/0.22.0"
134
134
  add_user_agent_information(sdk_information)
135
135
  end
136
136
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2018_09_30_preview
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -134,7 +134,7 @@ module Azure::ContainerService::Mgmt::V2019_02_01
134
134
  #
135
135
  def add_telemetry
136
136
  sdk_information = 'azure_mgmt_container_service'
137
- sdk_information = "#{sdk_information}/0.21.0"
137
+ sdk_information = "#{sdk_information}/0.22.0"
138
138
  add_user_agent_information(sdk_information)
139
139
  end
140
140
  end
@@ -138,7 +138,7 @@ module Azure::ContainerService::Mgmt::V2019_04_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_container_service'
141
- sdk_information = "#{sdk_information}/0.21.0"
141
+ sdk_information = "#{sdk_information}/0.22.0"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2019_04_30
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -138,7 +138,7 @@ module Azure::ContainerService::Mgmt::V2019_06_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_container_service'
141
- sdk_information = "#{sdk_information}/0.21.0"
141
+ sdk_information = "#{sdk_information}/0.22.0"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -138,7 +138,7 @@ module Azure::ContainerService::Mgmt::V2019_08_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_container_service'
141
- sdk_information = "#{sdk_information}/0.21.0"
141
+ sdk_information = "#{sdk_information}/0.22.0"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -126,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2019_09_30_preview
126
126
  #
127
127
  def add_telemetry
128
128
  sdk_information = 'azure_mgmt_container_service'
129
- sdk_information = "#{sdk_information}/0.21.0"
129
+ sdk_information = "#{sdk_information}/0.22.0"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -134,7 +134,7 @@ module Azure::ContainerService::Mgmt::V2019_10_01
134
134
  #
135
135
  def add_telemetry
136
136
  sdk_information = 'azure_mgmt_container_service'
137
- sdk_information = "#{sdk_information}/0.21.0"
137
+ sdk_information = "#{sdk_information}/0.22.0"
138
138
  add_user_agent_information(sdk_information)
139
139
  end
140
140
  end
@@ -134,7 +134,7 @@ module Azure::ContainerService::Mgmt::V2020_02_01
134
134
  #
135
135
  def add_telemetry
136
136
  sdk_information = 'azure_mgmt_container_service'
137
- sdk_information = "#{sdk_information}/0.21.0"
137
+ sdk_information = "#{sdk_information}/0.22.0"
138
138
  add_user_agent_information(sdk_information)
139
139
  end
140
140
  end
@@ -138,7 +138,7 @@ module Azure::ContainerService::Mgmt::V2020_06_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_container_service'
141
- sdk_information = "#{sdk_information}/0.21.0"
141
+ sdk_information = "#{sdk_information}/0.22.0"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -138,7 +138,7 @@ module Azure::ContainerService::Mgmt::V2020_07_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_container_service'
141
- sdk_information = "#{sdk_information}/0.21.0"
141
+ sdk_information = "#{sdk_information}/0.22.0"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -146,7 +146,7 @@ module Azure::ContainerService::Mgmt::V2020_09_01
146
146
  #
147
147
  def add_telemetry
148
148
  sdk_information = 'azure_mgmt_container_service'
149
- sdk_information = "#{sdk_information}/0.21.0"
149
+ sdk_information = "#{sdk_information}/0.22.0"
150
150
  add_user_agent_information(sdk_information)
151
151
  end
152
152
  end
@@ -0,0 +1,126 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2020-12-01/generated/azure_mgmt_container_service/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ContainerService::Mgmt::V2020_12_01
23
+ autoload :Operations, '2020-12-01/generated/azure_mgmt_container_service/operations.rb'
24
+ autoload :ManagedClusters, '2020-12-01/generated/azure_mgmt_container_service/managed_clusters.rb'
25
+ autoload :MaintenanceConfigurations, '2020-12-01/generated/azure_mgmt_container_service/maintenance_configurations.rb'
26
+ autoload :AgentPools, '2020-12-01/generated/azure_mgmt_container_service/agent_pools.rb'
27
+ autoload :PrivateEndpointConnections, '2020-12-01/generated/azure_mgmt_container_service/private_endpoint_connections.rb'
28
+ autoload :PrivateLinkResources, '2020-12-01/generated/azure_mgmt_container_service/private_link_resources.rb'
29
+ autoload :ResolvePrivateLinkServiceId, '2020-12-01/generated/azure_mgmt_container_service/resolve_private_link_service_id.rb'
30
+ autoload :ContainerServiceClient, '2020-12-01/generated/azure_mgmt_container_service/container_service_client.rb'
31
+
32
+ module Models
33
+ autoload :ContainerServiceVMDiagnostics, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb'
34
+ autoload :ContainerServiceDiagnosticsProfile, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb'
35
+ autoload :OperationListResult, '2020-12-01/generated/azure_mgmt_container_service/models/operation_list_result.rb'
36
+ autoload :PrivateLinkResourcesListResult, '2020-12-01/generated/azure_mgmt_container_service/models/private_link_resources_list_result.rb'
37
+ autoload :SubResource, '2020-12-01/generated/azure_mgmt_container_service/models/sub_resource.rb'
38
+ autoload :ManagedClusterAddonProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb'
39
+ autoload :ManagedClusterServicePrincipalProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb'
40
+ autoload :UserAssignedIdentity, '2020-12-01/generated/azure_mgmt_container_service/models/user_assigned_identity.rb'
41
+ autoload :AgentPoolUpgradeSettings, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_settings.rb'
42
+ autoload :KubeletConfig, '2020-12-01/generated/azure_mgmt_container_service/models/kubelet_config.rb'
43
+ autoload :LinuxOSConfig, '2020-12-01/generated/azure_mgmt_container_service/models/linux_osconfig.rb'
44
+ autoload :ManagedClusterPodIdentityProvisioningInfo, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_provisioning_info.rb'
45
+ autoload :ManagedClusterAgentPoolProfileProperties, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb'
46
+ autoload :PrivateLinkServiceConnectionState, '2020-12-01/generated/azure_mgmt_container_service/models/private_link_service_connection_state.rb'
47
+ autoload :CredentialResults, '2020-12-01/generated/azure_mgmt_container_service/models/credential_results.rb'
48
+ autoload :ManagedClusterWindowsProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb'
49
+ autoload :ManagedClusterPodIdentity, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity.rb'
50
+ autoload :ContainerServiceSshConfiguration, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb'
51
+ autoload :ManagedClusterPodIdentityException, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_exception.rb'
52
+ autoload :ManagedClusterLoadBalancerProfileManagedOutboundIPs, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_managed_outbound_ips.rb'
53
+ autoload :ManagedClusterPodIdentityProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_profile.rb'
54
+ autoload :ManagedClusterLoadBalancerProfileOutboundIPPrefixes, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ipprefixes.rb'
55
+ autoload :ManagedClusterAADProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb'
56
+ autoload :ManagedClusterLoadBalancerProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile.rb'
57
+ autoload :ManagedClusterAutoUpgradeProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_auto_upgrade_profile.rb'
58
+ autoload :SystemData, '2020-12-01/generated/azure_mgmt_container_service/models/system_data.rb'
59
+ autoload :ManagedClusterPropertiesAutoScalerProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_auto_scaler_profile.rb'
60
+ autoload :TimeSpan, '2020-12-01/generated/azure_mgmt_container_service/models/time_span.rb'
61
+ autoload :ManagedClusterAPIServerAccessProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_apiserver_access_profile.rb'
62
+ autoload :MaintenanceConfigurationListResult, '2020-12-01/generated/azure_mgmt_container_service/models/maintenance_configuration_list_result.rb'
63
+ autoload :PrivateLinkResource, '2020-12-01/generated/azure_mgmt_container_service/models/private_link_resource.rb'
64
+ autoload :Resource, '2020-12-01/generated/azure_mgmt_container_service/models/resource.rb'
65
+ autoload :ManagedClusterIdentityUserAssignedIdentitiesValue, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_identity_user_assigned_identities_value.rb'
66
+ autoload :ContainerServiceMasterProfile, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb'
67
+ autoload :ManagedClusterIdentity, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb'
68
+ autoload :SysctlConfig, '2020-12-01/generated/azure_mgmt_container_service/models/sysctl_config.rb'
69
+ autoload :ManagedClusterSKU, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_sku.rb'
70
+ autoload :ContainerServiceSshPublicKey, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb'
71
+ autoload :PrivateEndpointConnectionListResult, '2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_list_result.rb'
72
+ autoload :ResourceReference, '2020-12-01/generated/azure_mgmt_container_service/models/resource_reference.rb'
73
+ autoload :ManagedClusterListResult, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb'
74
+ autoload :ContainerServiceNetworkProfile, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb'
75
+ autoload :PrivateEndpointConnection, '2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection.rb'
76
+ autoload :PrivateEndpoint, '2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint.rb'
77
+ autoload :ManagedClusterPoolUpgradeProfileUpgradesItem, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb'
78
+ autoload :TagsObject, '2020-12-01/generated/azure_mgmt_container_service/models/tags_object.rb'
79
+ autoload :ManagedClusterPoolUpgradeProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb'
80
+ autoload :AgentPoolListResult, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb'
81
+ autoload :ManagedClusterUpgradeProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb'
82
+ autoload :ManagedClusterLoadBalancerProfileOutboundIPs, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ips.rb'
83
+ autoload :AgentPoolUpgradeProfilePropertiesUpgradesItem, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile_properties_upgrades_item.rb'
84
+ autoload :OperationValue, '2020-12-01/generated/azure_mgmt_container_service/models/operation_value.rb'
85
+ autoload :AgentPoolUpgradeProfile, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile.rb'
86
+ autoload :ContainerServiceLinuxProfile, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb'
87
+ autoload :AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions_properties_agent_pool_versions_item.rb'
88
+ autoload :PowerState, '2020-12-01/generated/azure_mgmt_container_service/models/power_state.rb'
89
+ autoload :AgentPoolAvailableVersions, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions.rb'
90
+ autoload :TimeInWeek, '2020-12-01/generated/azure_mgmt_container_service/models/time_in_week.rb'
91
+ autoload :CredentialResult, '2020-12-01/generated/azure_mgmt_container_service/models/credential_result.rb'
92
+ autoload :ManagedClusterAgentPoolProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb'
93
+ autoload :AgentPool, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool.rb'
94
+ autoload :MaintenanceConfiguration, '2020-12-01/generated/azure_mgmt_container_service/models/maintenance_configuration.rb'
95
+ autoload :ManagedClusterAddonProfileIdentity, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile_identity.rb'
96
+ autoload :ManagedClusterPropertiesIdentityProfileValue, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_identity_profile_value.rb'
97
+ autoload :ManagedCluster, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster.rb'
98
+ autoload :ManagedClusterAccessProfile, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb'
99
+ autoload :ContainerServiceStorageProfileTypes, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb'
100
+ autoload :ContainerServiceVMSizeTypes, '2020-12-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb'
101
+ autoload :OSDiskType, '2020-12-01/generated/azure_mgmt_container_service/models/osdisk_type.rb'
102
+ autoload :KubeletDiskType, '2020-12-01/generated/azure_mgmt_container_service/models/kubelet_disk_type.rb'
103
+ autoload :OSType, '2020-12-01/generated/azure_mgmt_container_service/models/ostype.rb'
104
+ autoload :AgentPoolType, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb'
105
+ autoload :AgentPoolMode, '2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_mode.rb'
106
+ autoload :Code, '2020-12-01/generated/azure_mgmt_container_service/models/code.rb'
107
+ autoload :ScaleSetPriority, '2020-12-01/generated/azure_mgmt_container_service/models/scale_set_priority.rb'
108
+ autoload :ScaleSetEvictionPolicy, '2020-12-01/generated/azure_mgmt_container_service/models/scale_set_eviction_policy.rb'
109
+ autoload :LicenseType, '2020-12-01/generated/azure_mgmt_container_service/models/license_type.rb'
110
+ autoload :NetworkPlugin, '2020-12-01/generated/azure_mgmt_container_service/models/network_plugin.rb'
111
+ autoload :NetworkPolicy, '2020-12-01/generated/azure_mgmt_container_service/models/network_policy.rb'
112
+ autoload :NetworkMode, '2020-12-01/generated/azure_mgmt_container_service/models/network_mode.rb'
113
+ autoload :OutboundType, '2020-12-01/generated/azure_mgmt_container_service/models/outbound_type.rb'
114
+ autoload :LoadBalancerSku, '2020-12-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb'
115
+ autoload :CreatedByType, '2020-12-01/generated/azure_mgmt_container_service/models/created_by_type.rb'
116
+ autoload :WeekDay, '2020-12-01/generated/azure_mgmt_container_service/models/week_day.rb'
117
+ autoload :ManagedClusterPodIdentityProvisioningState, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_provisioning_state.rb'
118
+ autoload :UpgradeChannel, '2020-12-01/generated/azure_mgmt_container_service/models/upgrade_channel.rb'
119
+ autoload :Expander, '2020-12-01/generated/azure_mgmt_container_service/models/expander.rb'
120
+ autoload :ResourceIdentityType, '2020-12-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb'
121
+ autoload :ManagedClusterSKUName, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_skuname.rb'
122
+ autoload :ManagedClusterSKUTier, '2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_skutier.rb'
123
+ autoload :PrivateEndpointConnectionProvisioningState, '2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_provisioning_state.rb'
124
+ autoload :ConnectionStatus, '2020-12-01/generated/azure_mgmt_container_service/models/connection_status.rb'
125
+ end
126
+ end
@@ -0,0 +1,1054 @@
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::ContainerService::Mgmt::V2020_12_01
7
+ #
8
+ # The Container Service Client.
9
+ #
10
+ class AgentPools
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the AgentPools class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerServiceClient] reference to the ContainerServiceClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of agent pools in the specified managed cluster.
26
+ #
27
+ # Gets a list of agent pools in the specified managed cluster. The operation
28
+ # returns properties of each agent pool.
29
+ #
30
+ # @param resource_group_name [String] The name of the resource group.
31
+ # @param resource_name [String] The name of the managed cluster resource.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<AgentPool>] operation results.
36
+ #
37
+ def list(resource_group_name, resource_name, custom_headers:nil)
38
+ first_page = list_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Gets a list of agent pools in the specified managed cluster.
44
+ #
45
+ # Gets a list of agent pools in the specified managed cluster. The operation
46
+ # returns properties of each agent pool.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group.
49
+ # @param resource_name [String] The name of the managed cluster resource.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(resource_group_name, resource_name, custom_headers:nil)
56
+ list_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Gets a list of agent pools in the specified managed cluster.
61
+ #
62
+ # Gets a list of agent pools in the specified managed cluster. The operation
63
+ # returns properties of each agent pool.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group.
66
+ # @param resource_name [String] The name of the managed cluster resource.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(resource_group_name, resource_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
76
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
77
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
78
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
79
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
80
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
81
+
82
+
83
+ request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
+
86
+ # Set Headers
87
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'
90
+
91
+ request_url = @base_url || @client.base_url
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
96
+ query_params: {'api-version' => @client.api_version},
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:get, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 200
107
+ error_model = JSON.load(response_content)
108
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 200
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPoolListResult.mapper()
119
+ result.body = @client.deserialize(result_mapper, parsed_response)
120
+ rescue Exception => e
121
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
122
+ end
123
+ end
124
+
125
+ result
126
+ end
127
+
128
+ promise.execute
129
+ end
130
+
131
+ #
132
+ # Gets the agent pool.
133
+ #
134
+ # Gets the details of the agent pool by managed cluster and resource group.
135
+ #
136
+ # @param resource_group_name [String] The name of the resource group.
137
+ # @param resource_name [String] The name of the managed cluster resource.
138
+ # @param agent_pool_name [String] The name of the agent pool.
139
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
140
+ # will be added to the HTTP request.
141
+ #
142
+ # @return [AgentPool] operation results.
143
+ #
144
+ def get(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
145
+ response = get_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
146
+ response.body unless response.nil?
147
+ end
148
+
149
+ #
150
+ # Gets the agent pool.
151
+ #
152
+ # Gets the details of the agent pool by managed cluster and resource group.
153
+ #
154
+ # @param resource_group_name [String] The name of the resource group.
155
+ # @param resource_name [String] The name of the managed cluster resource.
156
+ # @param agent_pool_name [String] The name of the agent pool.
157
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
158
+ # will be added to the HTTP request.
159
+ #
160
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
161
+ #
162
+ def get_with_http_info(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
163
+ get_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
164
+ end
165
+
166
+ #
167
+ # Gets the agent pool.
168
+ #
169
+ # Gets the details of the agent pool by managed cluster and resource group.
170
+ #
171
+ # @param resource_group_name [String] The name of the resource group.
172
+ # @param resource_name [String] The name of the managed cluster resource.
173
+ # @param agent_pool_name [String] The name of the agent pool.
174
+ # @param [Hash{String => String}] A hash of custom headers that will be added
175
+ # to the HTTP request.
176
+ #
177
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
178
+ #
179
+ def get_async(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
180
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
181
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
182
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
183
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
184
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
185
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
186
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
187
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
188
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
189
+
190
+
191
+ request_headers = {}
192
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
193
+
194
+ # Set Headers
195
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
196
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
197
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'
198
+
199
+ request_url = @base_url || @client.base_url
200
+
201
+ options = {
202
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
203
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'agentPoolName' => agent_pool_name},
204
+ query_params: {'api-version' => @client.api_version},
205
+ headers: request_headers.merge(custom_headers || {}),
206
+ base_url: request_url
207
+ }
208
+ promise = @client.make_request_async(:get, path_template, options)
209
+
210
+ promise = promise.then do |result|
211
+ http_response = result.response
212
+ status_code = http_response.status
213
+ response_content = http_response.body
214
+ unless status_code == 200
215
+ error_model = JSON.load(response_content)
216
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
217
+ end
218
+
219
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
220
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
221
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
222
+ # Deserialize Response
223
+ if status_code == 200
224
+ begin
225
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
226
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPool.mapper()
227
+ result.body = @client.deserialize(result_mapper, parsed_response)
228
+ rescue Exception => e
229
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
230
+ end
231
+ end
232
+
233
+ result
234
+ end
235
+
236
+ promise.execute
237
+ end
238
+
239
+ #
240
+ # Creates or updates an agent pool.
241
+ #
242
+ # Creates or updates an agent pool in the specified managed cluster.
243
+ #
244
+ # @param resource_group_name [String] The name of the resource group.
245
+ # @param resource_name [String] The name of the managed cluster resource.
246
+ # @param agent_pool_name [String] The name of the agent pool.
247
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
248
+ # agent pool operation.
249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
250
+ # will be added to the HTTP request.
251
+ #
252
+ # @return [AgentPool] operation results.
253
+ #
254
+ def create_or_update(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
255
+ response = create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
256
+ response.body unless response.nil?
257
+ end
258
+
259
+ #
260
+ # @param resource_group_name [String] The name of the resource group.
261
+ # @param resource_name [String] The name of the managed cluster resource.
262
+ # @param agent_pool_name [String] The name of the agent pool.
263
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
264
+ # agent pool operation.
265
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
266
+ # will be added to the HTTP request.
267
+ #
268
+ # @return [Concurrent::Promise] promise which provides async access to http
269
+ # response.
270
+ #
271
+ def create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
272
+ # Send request
273
+ promise = begin_create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:custom_headers)
274
+
275
+ promise = promise.then do |response|
276
+ # Defining deserialization method.
277
+ deserialize_method = lambda do |parsed_response|
278
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPool.mapper()
279
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
280
+ end
281
+
282
+ # Waiting for response.
283
+ @client.get_long_running_operation_result(response, deserialize_method)
284
+ end
285
+
286
+ promise
287
+ end
288
+
289
+ #
290
+ # Deletes an agent pool.
291
+ #
292
+ # Deletes the agent pool in the specified managed cluster.
293
+ #
294
+ # @param resource_group_name [String] The name of the resource group.
295
+ # @param resource_name [String] The name of the managed cluster resource.
296
+ # @param agent_pool_name [String] The name of the agent pool.
297
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
298
+ # will be added to the HTTP request.
299
+ #
300
+ def delete(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
301
+ response = delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
302
+ nil
303
+ end
304
+
305
+ #
306
+ # @param resource_group_name [String] The name of the resource group.
307
+ # @param resource_name [String] The name of the managed cluster resource.
308
+ # @param agent_pool_name [String] The name of the agent pool.
309
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
310
+ # will be added to the HTTP request.
311
+ #
312
+ # @return [Concurrent::Promise] promise which provides async access to http
313
+ # response.
314
+ #
315
+ def delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
316
+ # Send request
317
+ promise = begin_delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers)
318
+
319
+ promise = promise.then do |response|
320
+ # Defining deserialization method.
321
+ deserialize_method = lambda do |parsed_response|
322
+ end
323
+
324
+ # Waiting for response.
325
+ @client.get_long_running_operation_result(response, deserialize_method)
326
+ end
327
+
328
+ promise
329
+ end
330
+
331
+ #
332
+ # Gets upgrade profile for an agent pool.
333
+ #
334
+ # Gets the details of the upgrade profile for an agent pool with a specified
335
+ # resource group and managed cluster name.
336
+ #
337
+ # @param resource_group_name [String] The name of the resource group.
338
+ # @param resource_name [String] The name of the managed cluster resource.
339
+ # @param agent_pool_name [String] The name of the agent pool.
340
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
341
+ # will be added to the HTTP request.
342
+ #
343
+ # @return [AgentPoolUpgradeProfile] operation results.
344
+ #
345
+ def get_upgrade_profile(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
346
+ response = get_upgrade_profile_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
347
+ response.body unless response.nil?
348
+ end
349
+
350
+ #
351
+ # Gets upgrade profile for an agent pool.
352
+ #
353
+ # Gets the details of the upgrade profile for an agent pool with a specified
354
+ # resource group and managed cluster name.
355
+ #
356
+ # @param resource_group_name [String] The name of the resource group.
357
+ # @param resource_name [String] The name of the managed cluster resource.
358
+ # @param agent_pool_name [String] The name of the agent pool.
359
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
360
+ # will be added to the HTTP request.
361
+ #
362
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
363
+ #
364
+ def get_upgrade_profile_with_http_info(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
365
+ get_upgrade_profile_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
366
+ end
367
+
368
+ #
369
+ # Gets upgrade profile for an agent pool.
370
+ #
371
+ # Gets the details of the upgrade profile for an agent pool with a specified
372
+ # resource group and managed cluster name.
373
+ #
374
+ # @param resource_group_name [String] The name of the resource group.
375
+ # @param resource_name [String] The name of the managed cluster resource.
376
+ # @param agent_pool_name [String] The name of the agent pool.
377
+ # @param [Hash{String => String}] A hash of custom headers that will be added
378
+ # to the HTTP request.
379
+ #
380
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
381
+ #
382
+ def get_upgrade_profile_async(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
383
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
384
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
385
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
386
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
387
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
388
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
389
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
390
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
391
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
392
+
393
+
394
+ request_headers = {}
395
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
396
+
397
+ # Set Headers
398
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
399
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
400
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'
401
+
402
+ request_url = @base_url || @client.base_url
403
+
404
+ options = {
405
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
406
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'agentPoolName' => agent_pool_name},
407
+ query_params: {'api-version' => @client.api_version},
408
+ headers: request_headers.merge(custom_headers || {}),
409
+ base_url: request_url
410
+ }
411
+ promise = @client.make_request_async(:get, path_template, options)
412
+
413
+ promise = promise.then do |result|
414
+ http_response = result.response
415
+ status_code = http_response.status
416
+ response_content = http_response.body
417
+ unless status_code == 200
418
+ error_model = JSON.load(response_content)
419
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
420
+ end
421
+
422
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
423
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
424
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
425
+ # Deserialize Response
426
+ if status_code == 200
427
+ begin
428
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
429
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPoolUpgradeProfile.mapper()
430
+ result.body = @client.deserialize(result_mapper, parsed_response)
431
+ rescue Exception => e
432
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
433
+ end
434
+ end
435
+
436
+ result
437
+ end
438
+
439
+ promise.execute
440
+ end
441
+
442
+ #
443
+ # Gets a list of supported versions for the specified agent pool.
444
+ #
445
+ # Gets a list of supported versions for the specified agent pool.
446
+ #
447
+ # @param resource_group_name [String] The name of the resource group.
448
+ # @param resource_name [String] The name of the managed cluster resource.
449
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
450
+ # will be added to the HTTP request.
451
+ #
452
+ # @return [AgentPoolAvailableVersions] operation results.
453
+ #
454
+ def get_available_agent_pool_versions(resource_group_name, resource_name, custom_headers:nil)
455
+ response = get_available_agent_pool_versions_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
456
+ response.body unless response.nil?
457
+ end
458
+
459
+ #
460
+ # Gets a list of supported versions for the specified agent pool.
461
+ #
462
+ # Gets a list of supported versions for the specified agent pool.
463
+ #
464
+ # @param resource_group_name [String] The name of the resource group.
465
+ # @param resource_name [String] The name of the managed cluster resource.
466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
467
+ # will be added to the HTTP request.
468
+ #
469
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
470
+ #
471
+ def get_available_agent_pool_versions_with_http_info(resource_group_name, resource_name, custom_headers:nil)
472
+ get_available_agent_pool_versions_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
473
+ end
474
+
475
+ #
476
+ # Gets a list of supported versions for the specified agent pool.
477
+ #
478
+ # Gets a list of supported versions for the specified agent pool.
479
+ #
480
+ # @param resource_group_name [String] The name of the resource group.
481
+ # @param resource_name [String] The name of the managed cluster resource.
482
+ # @param [Hash{String => String}] A hash of custom headers that will be added
483
+ # to the HTTP request.
484
+ #
485
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
486
+ #
487
+ def get_available_agent_pool_versions_async(resource_group_name, resource_name, custom_headers:nil)
488
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
489
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
490
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
491
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
492
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
493
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
494
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
495
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
496
+
497
+
498
+ request_headers = {}
499
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
500
+
501
+ # Set Headers
502
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
503
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
504
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'
505
+
506
+ request_url = @base_url || @client.base_url
507
+
508
+ options = {
509
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
510
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
511
+ query_params: {'api-version' => @client.api_version},
512
+ headers: request_headers.merge(custom_headers || {}),
513
+ base_url: request_url
514
+ }
515
+ promise = @client.make_request_async(:get, path_template, options)
516
+
517
+ promise = promise.then do |result|
518
+ http_response = result.response
519
+ status_code = http_response.status
520
+ response_content = http_response.body
521
+ unless status_code == 200
522
+ error_model = JSON.load(response_content)
523
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
524
+ end
525
+
526
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
527
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
528
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
529
+ # Deserialize Response
530
+ if status_code == 200
531
+ begin
532
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
533
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPoolAvailableVersions.mapper()
534
+ result.body = @client.deserialize(result_mapper, parsed_response)
535
+ rescue Exception => e
536
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
537
+ end
538
+ end
539
+
540
+ result
541
+ end
542
+
543
+ promise.execute
544
+ end
545
+
546
+ #
547
+ # Upgrade node image version of an agent pool to the latest.
548
+ #
549
+ # Upgrade node image version of an agent pool to the latest.
550
+ #
551
+ # @param resource_group_name [String] The name of the resource group.
552
+ # @param resource_name [String] The name of the managed cluster resource.
553
+ # @param agent_pool_name [String] The name of the agent pool.
554
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
555
+ # will be added to the HTTP request.
556
+ #
557
+ # @return [AgentPool] operation results.
558
+ #
559
+ def upgrade_node_image_version(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
560
+ response = upgrade_node_image_version_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
561
+ response.body unless response.nil?
562
+ end
563
+
564
+ #
565
+ # @param resource_group_name [String] The name of the resource group.
566
+ # @param resource_name [String] The name of the managed cluster resource.
567
+ # @param agent_pool_name [String] The name of the agent pool.
568
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
569
+ # will be added to the HTTP request.
570
+ #
571
+ # @return [Concurrent::Promise] promise which provides async access to http
572
+ # response.
573
+ #
574
+ def upgrade_node_image_version_async(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
575
+ # Send request
576
+ promise = begin_upgrade_node_image_version_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers)
577
+
578
+ promise = promise.then do |response|
579
+ # Defining deserialization method.
580
+ deserialize_method = lambda do |parsed_response|
581
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPool.mapper()
582
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
583
+ end
584
+
585
+ # Waiting for response.
586
+ @client.get_long_running_operation_result(response, deserialize_method)
587
+ end
588
+
589
+ promise
590
+ end
591
+
592
+ #
593
+ # Creates or updates an agent pool.
594
+ #
595
+ # Creates or updates an agent pool in the specified managed cluster.
596
+ #
597
+ # @param resource_group_name [String] The name of the resource group.
598
+ # @param resource_name [String] The name of the managed cluster resource.
599
+ # @param agent_pool_name [String] The name of the agent pool.
600
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
601
+ # agent pool operation.
602
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
603
+ # will be added to the HTTP request.
604
+ #
605
+ # @return [AgentPool] operation results.
606
+ #
607
+ def begin_create_or_update(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
608
+ response = begin_create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
609
+ response.body unless response.nil?
610
+ end
611
+
612
+ #
613
+ # Creates or updates an agent pool.
614
+ #
615
+ # Creates or updates an agent pool in the specified managed cluster.
616
+ #
617
+ # @param resource_group_name [String] The name of the resource group.
618
+ # @param resource_name [String] The name of the managed cluster resource.
619
+ # @param agent_pool_name [String] The name of the agent pool.
620
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
621
+ # agent pool operation.
622
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
623
+ # will be added to the HTTP request.
624
+ #
625
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
626
+ #
627
+ def begin_create_or_update_with_http_info(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
628
+ begin_create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
629
+ end
630
+
631
+ #
632
+ # Creates or updates an agent pool.
633
+ #
634
+ # Creates or updates an agent pool in the specified managed cluster.
635
+ #
636
+ # @param resource_group_name [String] The name of the resource group.
637
+ # @param resource_name [String] The name of the managed cluster resource.
638
+ # @param agent_pool_name [String] The name of the agent pool.
639
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
640
+ # agent pool operation.
641
+ # @param [Hash{String => String}] A hash of custom headers that will be added
642
+ # to the HTTP request.
643
+ #
644
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
645
+ #
646
+ def begin_create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
647
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
648
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
649
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
650
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
651
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
652
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
653
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
654
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
655
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
656
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
657
+
658
+
659
+ request_headers = {}
660
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
661
+
662
+ # Set Headers
663
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
664
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
665
+
666
+ # Serialize Request
667
+ request_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPool.mapper()
668
+ request_content = @client.serialize(request_mapper, parameters)
669
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
670
+
671
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'
672
+
673
+ request_url = @base_url || @client.base_url
674
+
675
+ options = {
676
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
677
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'agentPoolName' => agent_pool_name},
678
+ query_params: {'api-version' => @client.api_version},
679
+ body: request_content,
680
+ headers: request_headers.merge(custom_headers || {}),
681
+ base_url: request_url
682
+ }
683
+ promise = @client.make_request_async(:put, path_template, options)
684
+
685
+ promise = promise.then do |result|
686
+ http_response = result.response
687
+ status_code = http_response.status
688
+ response_content = http_response.body
689
+ unless status_code == 200 || status_code == 201
690
+ error_model = JSON.load(response_content)
691
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
692
+ end
693
+
694
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
695
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
696
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
697
+ # Deserialize Response
698
+ if status_code == 200
699
+ begin
700
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
701
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPool.mapper()
702
+ result.body = @client.deserialize(result_mapper, parsed_response)
703
+ rescue Exception => e
704
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
705
+ end
706
+ end
707
+ # Deserialize Response
708
+ if status_code == 201
709
+ begin
710
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
711
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPool.mapper()
712
+ result.body = @client.deserialize(result_mapper, parsed_response)
713
+ rescue Exception => e
714
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
715
+ end
716
+ end
717
+
718
+ result
719
+ end
720
+
721
+ promise.execute
722
+ end
723
+
724
+ #
725
+ # Deletes an agent pool.
726
+ #
727
+ # Deletes the agent pool in the specified managed cluster.
728
+ #
729
+ # @param resource_group_name [String] The name of the resource group.
730
+ # @param resource_name [String] The name of the managed cluster resource.
731
+ # @param agent_pool_name [String] The name of the agent pool.
732
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
733
+ # will be added to the HTTP request.
734
+ #
735
+ #
736
+ def begin_delete(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
737
+ response = begin_delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
738
+ nil
739
+ end
740
+
741
+ #
742
+ # Deletes an agent pool.
743
+ #
744
+ # Deletes the agent pool in the specified managed cluster.
745
+ #
746
+ # @param resource_group_name [String] The name of the resource group.
747
+ # @param resource_name [String] The name of the managed cluster resource.
748
+ # @param agent_pool_name [String] The name of the agent pool.
749
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
750
+ # will be added to the HTTP request.
751
+ #
752
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
753
+ #
754
+ def begin_delete_with_http_info(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
755
+ begin_delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
756
+ end
757
+
758
+ #
759
+ # Deletes an agent pool.
760
+ #
761
+ # Deletes the agent pool in the specified managed cluster.
762
+ #
763
+ # @param resource_group_name [String] The name of the resource group.
764
+ # @param resource_name [String] The name of the managed cluster resource.
765
+ # @param agent_pool_name [String] The name of the agent pool.
766
+ # @param [Hash{String => String}] A hash of custom headers that will be added
767
+ # to the HTTP request.
768
+ #
769
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
770
+ #
771
+ def begin_delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
772
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
773
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
774
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
775
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
776
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
777
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
778
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
779
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
780
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
781
+
782
+
783
+ request_headers = {}
784
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
785
+
786
+ # Set Headers
787
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
788
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
789
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'
790
+
791
+ request_url = @base_url || @client.base_url
792
+
793
+ options = {
794
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
795
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'agentPoolName' => agent_pool_name},
796
+ query_params: {'api-version' => @client.api_version},
797
+ headers: request_headers.merge(custom_headers || {}),
798
+ base_url: request_url
799
+ }
800
+ promise = @client.make_request_async(:delete, path_template, options)
801
+
802
+ promise = promise.then do |result|
803
+ http_response = result.response
804
+ status_code = http_response.status
805
+ response_content = http_response.body
806
+ unless status_code == 202 || status_code == 204
807
+ error_model = JSON.load(response_content)
808
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
809
+ end
810
+
811
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
812
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
813
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
814
+
815
+ result
816
+ end
817
+
818
+ promise.execute
819
+ end
820
+
821
+ #
822
+ # Upgrade node image version of an agent pool to the latest.
823
+ #
824
+ # Upgrade node image version of an agent pool to the latest.
825
+ #
826
+ # @param resource_group_name [String] The name of the resource group.
827
+ # @param resource_name [String] The name of the managed cluster resource.
828
+ # @param agent_pool_name [String] The name of the agent pool.
829
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
830
+ # will be added to the HTTP request.
831
+ #
832
+ # @return [AgentPool] operation results.
833
+ #
834
+ def begin_upgrade_node_image_version(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
835
+ response = begin_upgrade_node_image_version_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
836
+ response.body unless response.nil?
837
+ end
838
+
839
+ #
840
+ # Upgrade node image version of an agent pool to the latest.
841
+ #
842
+ # Upgrade node image version of an agent pool to the latest.
843
+ #
844
+ # @param resource_group_name [String] The name of the resource group.
845
+ # @param resource_name [String] The name of the managed cluster resource.
846
+ # @param agent_pool_name [String] The name of the agent pool.
847
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
848
+ # will be added to the HTTP request.
849
+ #
850
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
851
+ #
852
+ def begin_upgrade_node_image_version_with_http_info(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
853
+ begin_upgrade_node_image_version_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
854
+ end
855
+
856
+ #
857
+ # Upgrade node image version of an agent pool to the latest.
858
+ #
859
+ # Upgrade node image version of an agent pool to the latest.
860
+ #
861
+ # @param resource_group_name [String] The name of the resource group.
862
+ # @param resource_name [String] The name of the managed cluster resource.
863
+ # @param agent_pool_name [String] The name of the agent pool.
864
+ # @param [Hash{String => String}] A hash of custom headers that will be added
865
+ # to the HTTP request.
866
+ #
867
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
868
+ #
869
+ def begin_upgrade_node_image_version_async(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
870
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
871
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
872
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
873
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
874
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
875
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
876
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
877
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
878
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
879
+
880
+
881
+ request_headers = {}
882
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
883
+
884
+ # Set Headers
885
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
886
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
887
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'
888
+
889
+ request_url = @base_url || @client.base_url
890
+
891
+ options = {
892
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
893
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'agentPoolName' => agent_pool_name},
894
+ query_params: {'api-version' => @client.api_version},
895
+ headers: request_headers.merge(custom_headers || {}),
896
+ base_url: request_url
897
+ }
898
+ promise = @client.make_request_async(:post, 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 || status_code == 202
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 == 202
914
+ begin
915
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
916
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPool.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
+ # Gets a list of agent pools in the specified managed cluster.
931
+ #
932
+ # Gets a list of agent pools in the specified managed cluster. The operation
933
+ # returns properties of each agent pool.
934
+ #
935
+ # @param next_page_link [String] The NextLink from the previous successful call
936
+ # to List operation.
937
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
938
+ # will be added to the HTTP request.
939
+ #
940
+ # @return [AgentPoolListResult] operation results.
941
+ #
942
+ def list_next(next_page_link, custom_headers:nil)
943
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
944
+ response.body unless response.nil?
945
+ end
946
+
947
+ #
948
+ # Gets a list of agent pools in the specified managed cluster.
949
+ #
950
+ # Gets a list of agent pools in the specified managed cluster. The operation
951
+ # returns properties of each agent pool.
952
+ #
953
+ # @param next_page_link [String] The NextLink from the previous successful call
954
+ # to List operation.
955
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
956
+ # will be added to the HTTP request.
957
+ #
958
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
959
+ #
960
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
961
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
962
+ end
963
+
964
+ #
965
+ # Gets a list of agent pools in the specified managed cluster.
966
+ #
967
+ # Gets a list of agent pools in the specified managed cluster. The operation
968
+ # returns properties of each agent pool.
969
+ #
970
+ # @param next_page_link [String] The NextLink from the previous successful call
971
+ # to List operation.
972
+ # @param [Hash{String => String}] A hash of custom headers that will be added
973
+ # to the HTTP request.
974
+ #
975
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
976
+ #
977
+ def list_next_async(next_page_link, custom_headers:nil)
978
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
979
+
980
+
981
+ request_headers = {}
982
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
983
+
984
+ # Set Headers
985
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
986
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
987
+ path_template = '{nextLink}'
988
+
989
+ request_url = @base_url || @client.base_url
990
+
991
+ options = {
992
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
993
+ skip_encoding_path_params: {'nextLink' => next_page_link},
994
+ headers: request_headers.merge(custom_headers || {}),
995
+ base_url: request_url
996
+ }
997
+ promise = @client.make_request_async(:get, path_template, options)
998
+
999
+ promise = promise.then do |result|
1000
+ http_response = result.response
1001
+ status_code = http_response.status
1002
+ response_content = http_response.body
1003
+ unless status_code == 200
1004
+ error_model = JSON.load(response_content)
1005
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1006
+ end
1007
+
1008
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1009
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1010
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1011
+ # Deserialize Response
1012
+ if status_code == 200
1013
+ begin
1014
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1015
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::AgentPoolListResult.mapper()
1016
+ result.body = @client.deserialize(result_mapper, parsed_response)
1017
+ rescue Exception => e
1018
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1019
+ end
1020
+ end
1021
+
1022
+ result
1023
+ end
1024
+
1025
+ promise.execute
1026
+ end
1027
+
1028
+ #
1029
+ # Gets a list of agent pools in the specified managed cluster.
1030
+ #
1031
+ # Gets a list of agent pools in the specified managed cluster. The operation
1032
+ # returns properties of each agent pool.
1033
+ #
1034
+ # @param resource_group_name [String] The name of the resource group.
1035
+ # @param resource_name [String] The name of the managed cluster resource.
1036
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1037
+ # will be added to the HTTP request.
1038
+ #
1039
+ # @return [AgentPoolListResult] which provide lazy access to pages of the
1040
+ # response.
1041
+ #
1042
+ def list_as_lazy(resource_group_name, resource_name, custom_headers:nil)
1043
+ response = list_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
1044
+ unless response.nil?
1045
+ page = response.body
1046
+ page.next_method = Proc.new do |next_page_link|
1047
+ list_next_async(next_page_link, custom_headers:custom_headers)
1048
+ end
1049
+ page
1050
+ end
1051
+ end
1052
+
1053
+ end
1054
+ end