azure_mgmt_container_service 0.20.3 → 0.20.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) 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.rb +99 -0
  21. data/lib/2020-07-01/generated/azure_mgmt_container_service/agent_pools.rb +900 -0
  22. data/lib/2020-07-01/generated/azure_mgmt_container_service/container_service_client.rb +145 -0
  23. data/lib/2020-07-01/generated/azure_mgmt_container_service/managed_clusters.rb +2197 -0
  24. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool.rb +441 -0
  25. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions.rb +93 -0
  26. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions_properties_agent_pool_versions_item.rb +71 -0
  27. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb +99 -0
  28. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_mode.rb +16 -0
  29. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb +16 -0
  30. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile.rb +129 -0
  31. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile_properties_upgrades_item.rb +59 -0
  32. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_settings.rb +47 -0
  33. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/connection_status.rb +18 -0
  34. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  35. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  36. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  37. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb +179 -0
  38. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  39. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  40. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  41. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  42. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  43. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/credential_result.rb +59 -0
  44. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/credential_results.rb +57 -0
  45. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/license_type.rb +16 -0
  46. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb +16 -0
  47. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster.rb +389 -0
  48. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb +123 -0
  49. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb +97 -0
  50. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb +80 -0
  51. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile_identity.rb +59 -0
  52. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb +280 -0
  53. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb +414 -0
  54. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_apiserver_access_profile.rb +66 -0
  55. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb +104 -0
  56. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_identity_user_assigned_identities_value.rb +61 -0
  57. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb +100 -0
  58. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile.rb +132 -0
  59. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_managed_outbound_ips.rb +55 -0
  60. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ipprefixes.rb +57 -0
  61. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ips.rb +56 -0
  62. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb +92 -0
  63. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb +59 -0
  64. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_auto_scaler_profile.rb +135 -0
  65. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_identity_profile_value.rb +61 -0
  66. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb +59 -0
  67. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_sku.rb +60 -0
  68. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_skuname.rb +15 -0
  69. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_skutier.rb +16 -0
  70. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb +105 -0
  71. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb +76 -0
  72. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/network_mode.rb +16 -0
  73. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/network_plugin.rb +16 -0
  74. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/network_policy.rb +16 -0
  75. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/operation_list_result.rb +56 -0
  76. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/operation_value.rb +108 -0
  77. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  78. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/outbound_type.rb +16 -0
  79. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint.rb +46 -0
  80. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint_connection.rb +111 -0
  81. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_list_result.rb +55 -0
  82. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_provisioning_state.rb +18 -0
  83. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/private_link_service_connection_state.rb +59 -0
  84. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/resource.rb +110 -0
  85. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb +17 -0
  86. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/resource_reference.rb +46 -0
  87. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/scale_set_eviction_policy.rb +16 -0
  88. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/scale_set_priority.rb +16 -0
  89. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/sub_resource.rb +72 -0
  90. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/tags_object.rb +54 -0
  91. data/lib/2020-07-01/generated/azure_mgmt_container_service/models/user_assigned_identity.rb +69 -0
  92. data/lib/2020-07-01/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  93. data/lib/2020-07-01/generated/azure_mgmt_container_service/operations.rb +109 -0
  94. data/lib/2020-07-01/generated/azure_mgmt_container_service/private_endpoint_connections.rb +515 -0
  95. data/lib/azure_mgmt_container_service.rb +1 -0
  96. data/lib/profiles/latest/modules/containerservice_profile_module.rb +143 -139
  97. data/lib/version.rb +1 -1
  98. metadata +77 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce8d7fd88104aa3878153a2035a8457763a4774c43dda1256bda6f38cf97314e
4
- data.tar.gz: ef5bf523dad3e4f579c181edc8a0973e7debf96e0d331b0812dfe1cfff19d524
3
+ metadata.gz: d40fec29b4fb188e1a864dae9699a724adb9a9978d1fc3058ee7ffe9034843ec
4
+ data.tar.gz: 9a6897bb415e2446ecfa0ab3896382630a696127743241302f10d9715a9631f9
5
5
  SHA512:
6
- metadata.gz: a966277eda834076705565230bfd1ece9eaefec75084cf216136f3136592fb52e771b1776a52e9fd38215b73d689f0ca057408498746ee395d15079ecab84ae3
7
- data.tar.gz: 949fbed9f7a8b9e61c337fac86b0fc5a61e1159830d55e64906253f0cae9bc727437c13c1e15207b37421a22979fb1ab053d2a28a7f585653424d788d4c05855
6
+ metadata.gz: b625a9b27958d7cd7a0113ade7e4dc64f4f88a16b3eba4aaaf7575f6473141fbb0958ee802510e81314a5ad875a2a9f0cc42a773703201565c9e3397c2a8fc9d
7
+ data.tar.gz: 35eea8a11779c58ae301926e5adab981643ee915660c8c2e994385d148b715154e593233e45044f50d47294a05477408e721678554dc0f2aa41ba45f960f571a
@@ -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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
133
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
133
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
137
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
141
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
141
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
141
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
129
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
137
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
137
+ sdk_information = "#{sdk_information}/0.20.4"
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.20.3"
141
+ sdk_information = "#{sdk_information}/0.20.4"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -0,0 +1,99 @@
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-07-01/generated/azure_mgmt_container_service/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ContainerService::Mgmt::V2020_07_01
23
+ autoload :Operations, '2020-07-01/generated/azure_mgmt_container_service/operations.rb'
24
+ autoload :ManagedClusters, '2020-07-01/generated/azure_mgmt_container_service/managed_clusters.rb'
25
+ autoload :AgentPools, '2020-07-01/generated/azure_mgmt_container_service/agent_pools.rb'
26
+ autoload :PrivateEndpointConnections, '2020-07-01/generated/azure_mgmt_container_service/private_endpoint_connections.rb'
27
+ autoload :ContainerServiceClient, '2020-07-01/generated/azure_mgmt_container_service/container_service_client.rb'
28
+
29
+ module Models
30
+ autoload :ManagedClusterAddonProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb'
31
+ autoload :ManagedClusterAADProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb'
32
+ autoload :OperationListResult, '2020-07-01/generated/azure_mgmt_container_service/models/operation_list_result.rb'
33
+ autoload :ManagedClusterPropertiesAutoScalerProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_auto_scaler_profile.rb'
34
+ autoload :SubResource, '2020-07-01/generated/azure_mgmt_container_service/models/sub_resource.rb'
35
+ autoload :ManagedClusterAPIServerAccessProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_apiserver_access_profile.rb'
36
+ autoload :ManagedClusterServicePrincipalProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb'
37
+ autoload :TagsObject, '2020-07-01/generated/azure_mgmt_container_service/models/tags_object.rb'
38
+ autoload :ContainerServiceMasterProfile, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb'
39
+ autoload :ManagedClusterAgentPoolProfileProperties, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb'
40
+ autoload :PrivateEndpointConnectionListResult, '2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_list_result.rb'
41
+ autoload :AgentPoolListResult, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb'
42
+ autoload :ContainerServiceSshPublicKey, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb'
43
+ autoload :ManagedClusterIdentityUserAssignedIdentitiesValue, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_identity_user_assigned_identities_value.rb'
44
+ autoload :ContainerServiceLinuxProfile, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb'
45
+ autoload :ManagedClusterIdentity, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb'
46
+ autoload :ResourceReference, '2020-07-01/generated/azure_mgmt_container_service/models/resource_reference.rb'
47
+ autoload :ManagedClusterSKU, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_sku.rb'
48
+ autoload :ManagedClusterLoadBalancerProfileOutboundIPs, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ips.rb'
49
+ autoload :PrivateEndpointConnection, '2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint_connection.rb'
50
+ autoload :ContainerServiceNetworkProfile, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb'
51
+ autoload :ManagedClusterListResult, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb'
52
+ autoload :ContainerServiceDiagnosticsProfile, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb'
53
+ autoload :UserAssignedIdentity, '2020-07-01/generated/azure_mgmt_container_service/models/user_assigned_identity.rb'
54
+ autoload :OperationValue, '2020-07-01/generated/azure_mgmt_container_service/models/operation_value.rb'
55
+ autoload :PrivateLinkServiceConnectionState, '2020-07-01/generated/azure_mgmt_container_service/models/private_link_service_connection_state.rb'
56
+ autoload :AgentPoolUpgradeSettings, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_settings.rb'
57
+ autoload :ManagedClusterPoolUpgradeProfileUpgradesItem, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb'
58
+ autoload :ContainerServiceSshConfiguration, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb'
59
+ autoload :ManagedClusterPoolUpgradeProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb'
60
+ autoload :ManagedClusterLoadBalancerProfileOutboundIPPrefixes, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ipprefixes.rb'
61
+ autoload :ManagedClusterUpgradeProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb'
62
+ autoload :ContainerServiceVMDiagnostics, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb'
63
+ autoload :AgentPoolUpgradeProfilePropertiesUpgradesItem, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile_properties_upgrades_item.rb'
64
+ autoload :Resource, '2020-07-01/generated/azure_mgmt_container_service/models/resource.rb'
65
+ autoload :AgentPoolUpgradeProfile, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile.rb'
66
+ autoload :ManagedClusterLoadBalancerProfileManagedOutboundIPs, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_managed_outbound_ips.rb'
67
+ autoload :AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions_properties_agent_pool_versions_item.rb'
68
+ autoload :PrivateEndpoint, '2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint.rb'
69
+ autoload :AgentPoolAvailableVersions, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions.rb'
70
+ autoload :ManagedClusterLoadBalancerProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile.rb'
71
+ autoload :CredentialResult, '2020-07-01/generated/azure_mgmt_container_service/models/credential_result.rb'
72
+ autoload :ManagedClusterWindowsProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb'
73
+ autoload :CredentialResults, '2020-07-01/generated/azure_mgmt_container_service/models/credential_results.rb'
74
+ autoload :ManagedClusterAgentPoolProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb'
75
+ autoload :AgentPool, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool.rb'
76
+ autoload :ManagedClusterAddonProfileIdentity, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile_identity.rb'
77
+ autoload :ManagedClusterPropertiesIdentityProfileValue, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_identity_profile_value.rb'
78
+ autoload :ManagedCluster, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster.rb'
79
+ autoload :ManagedClusterAccessProfile, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb'
80
+ autoload :ContainerServiceStorageProfileTypes, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb'
81
+ autoload :ContainerServiceVMSizeTypes, '2020-07-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb'
82
+ autoload :OSType, '2020-07-01/generated/azure_mgmt_container_service/models/ostype.rb'
83
+ autoload :AgentPoolType, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb'
84
+ autoload :AgentPoolMode, '2020-07-01/generated/azure_mgmt_container_service/models/agent_pool_mode.rb'
85
+ autoload :ScaleSetPriority, '2020-07-01/generated/azure_mgmt_container_service/models/scale_set_priority.rb'
86
+ autoload :ScaleSetEvictionPolicy, '2020-07-01/generated/azure_mgmt_container_service/models/scale_set_eviction_policy.rb'
87
+ autoload :LicenseType, '2020-07-01/generated/azure_mgmt_container_service/models/license_type.rb'
88
+ autoload :NetworkPlugin, '2020-07-01/generated/azure_mgmt_container_service/models/network_plugin.rb'
89
+ autoload :NetworkPolicy, '2020-07-01/generated/azure_mgmt_container_service/models/network_policy.rb'
90
+ autoload :NetworkMode, '2020-07-01/generated/azure_mgmt_container_service/models/network_mode.rb'
91
+ autoload :OutboundType, '2020-07-01/generated/azure_mgmt_container_service/models/outbound_type.rb'
92
+ autoload :LoadBalancerSku, '2020-07-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb'
93
+ autoload :ResourceIdentityType, '2020-07-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb'
94
+ autoload :ManagedClusterSKUName, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_skuname.rb'
95
+ autoload :ManagedClusterSKUTier, '2020-07-01/generated/azure_mgmt_container_service/models/managed_cluster_skutier.rb'
96
+ autoload :PrivateEndpointConnectionProvisioningState, '2020-07-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_provisioning_state.rb'
97
+ autoload :ConnectionStatus, '2020-07-01/generated/azure_mgmt_container_service/models/connection_status.rb'
98
+ end
99
+ end
@@ -0,0 +1,900 @@
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_07_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_07_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_07_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_07_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_07_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_07_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
+ # Creates or updates an agent pool.
548
+ #
549
+ # Creates or updates an agent pool in the specified managed cluster.
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 parameters [AgentPool] Parameters supplied to the Create or Update an
555
+ # agent pool operation.
556
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
557
+ # will be added to the HTTP request.
558
+ #
559
+ # @return [AgentPool] operation results.
560
+ #
561
+ def begin_create_or_update(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
562
+ response = begin_create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
563
+ response.body unless response.nil?
564
+ end
565
+
566
+ #
567
+ # Creates or updates an agent pool.
568
+ #
569
+ # Creates or updates an agent pool in the specified managed cluster.
570
+ #
571
+ # @param resource_group_name [String] The name of the resource group.
572
+ # @param resource_name [String] The name of the managed cluster resource.
573
+ # @param agent_pool_name [String] The name of the agent pool.
574
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
575
+ # agent pool operation.
576
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
577
+ # will be added to the HTTP request.
578
+ #
579
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
580
+ #
581
+ def begin_create_or_update_with_http_info(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
582
+ begin_create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
583
+ end
584
+
585
+ #
586
+ # Creates or updates an agent pool.
587
+ #
588
+ # Creates or updates an agent pool in the specified managed cluster.
589
+ #
590
+ # @param resource_group_name [String] The name of the resource group.
591
+ # @param resource_name [String] The name of the managed cluster resource.
592
+ # @param agent_pool_name [String] The name of the agent pool.
593
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
594
+ # agent pool operation.
595
+ # @param [Hash{String => String}] A hash of custom headers that will be added
596
+ # to the HTTP request.
597
+ #
598
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
599
+ #
600
+ def begin_create_or_update_async(resource_group_name, resource_name, agent_pool_name, parameters, custom_headers:nil)
601
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
602
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
603
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
604
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
605
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
606
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
607
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
608
+ 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?
609
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
610
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
611
+
612
+
613
+ request_headers = {}
614
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
615
+
616
+ # Set Headers
617
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
618
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
619
+
620
+ # Serialize Request
621
+ request_mapper = Azure::ContainerService::Mgmt::V2020_07_01::Models::AgentPool.mapper()
622
+ request_content = @client.serialize(request_mapper, parameters)
623
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
624
+
625
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'
626
+
627
+ request_url = @base_url || @client.base_url
628
+
629
+ options = {
630
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
631
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'agentPoolName' => agent_pool_name},
632
+ query_params: {'api-version' => @client.api_version},
633
+ body: request_content,
634
+ headers: request_headers.merge(custom_headers || {}),
635
+ base_url: request_url
636
+ }
637
+ promise = @client.make_request_async(:put, path_template, options)
638
+
639
+ promise = promise.then do |result|
640
+ http_response = result.response
641
+ status_code = http_response.status
642
+ response_content = http_response.body
643
+ unless status_code == 200 || status_code == 201
644
+ error_model = JSON.load(response_content)
645
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
646
+ end
647
+
648
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
649
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
650
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
651
+ # Deserialize Response
652
+ if status_code == 200
653
+ begin
654
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
655
+ result_mapper = Azure::ContainerService::Mgmt::V2020_07_01::Models::AgentPool.mapper()
656
+ result.body = @client.deserialize(result_mapper, parsed_response)
657
+ rescue Exception => e
658
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
659
+ end
660
+ end
661
+ # Deserialize Response
662
+ if status_code == 201
663
+ begin
664
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
665
+ result_mapper = Azure::ContainerService::Mgmt::V2020_07_01::Models::AgentPool.mapper()
666
+ result.body = @client.deserialize(result_mapper, parsed_response)
667
+ rescue Exception => e
668
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
669
+ end
670
+ end
671
+
672
+ result
673
+ end
674
+
675
+ promise.execute
676
+ end
677
+
678
+ #
679
+ # Deletes an agent pool.
680
+ #
681
+ # Deletes the agent pool in the specified managed cluster.
682
+ #
683
+ # @param resource_group_name [String] The name of the resource group.
684
+ # @param resource_name [String] The name of the managed cluster resource.
685
+ # @param agent_pool_name [String] The name of the agent pool.
686
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
687
+ # will be added to the HTTP request.
688
+ #
689
+ #
690
+ def begin_delete(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
691
+ response = begin_delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
692
+ nil
693
+ end
694
+
695
+ #
696
+ # Deletes an agent pool.
697
+ #
698
+ # Deletes the agent pool in the specified managed cluster.
699
+ #
700
+ # @param resource_group_name [String] The name of the resource group.
701
+ # @param resource_name [String] The name of the managed cluster resource.
702
+ # @param agent_pool_name [String] The name of the agent pool.
703
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
704
+ # will be added to the HTTP request.
705
+ #
706
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
707
+ #
708
+ def begin_delete_with_http_info(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
709
+ begin_delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:custom_headers).value!
710
+ end
711
+
712
+ #
713
+ # Deletes an agent pool.
714
+ #
715
+ # Deletes the agent pool in the specified managed cluster.
716
+ #
717
+ # @param resource_group_name [String] The name of the resource group.
718
+ # @param resource_name [String] The name of the managed cluster resource.
719
+ # @param agent_pool_name [String] The name of the agent pool.
720
+ # @param [Hash{String => String}] A hash of custom headers that will be added
721
+ # to the HTTP request.
722
+ #
723
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
724
+ #
725
+ def begin_delete_async(resource_group_name, resource_name, agent_pool_name, custom_headers:nil)
726
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
727
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
728
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
729
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
730
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
731
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
732
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
733
+ 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?
734
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
735
+
736
+
737
+ request_headers = {}
738
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
739
+
740
+ # Set Headers
741
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
742
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
743
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'
744
+
745
+ request_url = @base_url || @client.base_url
746
+
747
+ options = {
748
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
749
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'agentPoolName' => agent_pool_name},
750
+ query_params: {'api-version' => @client.api_version},
751
+ headers: request_headers.merge(custom_headers || {}),
752
+ base_url: request_url
753
+ }
754
+ promise = @client.make_request_async(:delete, path_template, options)
755
+
756
+ promise = promise.then do |result|
757
+ http_response = result.response
758
+ status_code = http_response.status
759
+ response_content = http_response.body
760
+ unless status_code == 202 || status_code == 204
761
+ error_model = JSON.load(response_content)
762
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
763
+ end
764
+
765
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
766
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
767
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
768
+
769
+ result
770
+ end
771
+
772
+ promise.execute
773
+ end
774
+
775
+ #
776
+ # Gets a list of agent pools in the specified managed cluster.
777
+ #
778
+ # Gets a list of agent pools in the specified managed cluster. The operation
779
+ # returns properties of each agent pool.
780
+ #
781
+ # @param next_page_link [String] The NextLink from the previous successful call
782
+ # to List operation.
783
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
784
+ # will be added to the HTTP request.
785
+ #
786
+ # @return [AgentPoolListResult] operation results.
787
+ #
788
+ def list_next(next_page_link, custom_headers:nil)
789
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
790
+ response.body unless response.nil?
791
+ end
792
+
793
+ #
794
+ # Gets a list of agent pools in the specified managed cluster.
795
+ #
796
+ # Gets a list of agent pools in the specified managed cluster. The operation
797
+ # returns properties of each agent pool.
798
+ #
799
+ # @param next_page_link [String] The NextLink from the previous successful call
800
+ # to List operation.
801
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
802
+ # will be added to the HTTP request.
803
+ #
804
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
805
+ #
806
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
807
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
808
+ end
809
+
810
+ #
811
+ # Gets a list of agent pools in the specified managed cluster.
812
+ #
813
+ # Gets a list of agent pools in the specified managed cluster. The operation
814
+ # returns properties of each agent pool.
815
+ #
816
+ # @param next_page_link [String] The NextLink from the previous successful call
817
+ # to List operation.
818
+ # @param [Hash{String => String}] A hash of custom headers that will be added
819
+ # to the HTTP request.
820
+ #
821
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
822
+ #
823
+ def list_next_async(next_page_link, custom_headers:nil)
824
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
825
+
826
+
827
+ request_headers = {}
828
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
829
+
830
+ # Set Headers
831
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
832
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
833
+ path_template = '{nextLink}'
834
+
835
+ request_url = @base_url || @client.base_url
836
+
837
+ options = {
838
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
839
+ skip_encoding_path_params: {'nextLink' => next_page_link},
840
+ headers: request_headers.merge(custom_headers || {}),
841
+ base_url: request_url
842
+ }
843
+ promise = @client.make_request_async(:get, path_template, options)
844
+
845
+ promise = promise.then do |result|
846
+ http_response = result.response
847
+ status_code = http_response.status
848
+ response_content = http_response.body
849
+ unless status_code == 200
850
+ error_model = JSON.load(response_content)
851
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
852
+ end
853
+
854
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
855
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
856
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
857
+ # Deserialize Response
858
+ if status_code == 200
859
+ begin
860
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
861
+ result_mapper = Azure::ContainerService::Mgmt::V2020_07_01::Models::AgentPoolListResult.mapper()
862
+ result.body = @client.deserialize(result_mapper, parsed_response)
863
+ rescue Exception => e
864
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
865
+ end
866
+ end
867
+
868
+ result
869
+ end
870
+
871
+ promise.execute
872
+ end
873
+
874
+ #
875
+ # Gets a list of agent pools in the specified managed cluster.
876
+ #
877
+ # Gets a list of agent pools in the specified managed cluster. The operation
878
+ # returns properties of each agent pool.
879
+ #
880
+ # @param resource_group_name [String] The name of the resource group.
881
+ # @param resource_name [String] The name of the managed cluster resource.
882
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
883
+ # will be added to the HTTP request.
884
+ #
885
+ # @return [AgentPoolListResult] which provide lazy access to pages of the
886
+ # response.
887
+ #
888
+ def list_as_lazy(resource_group_name, resource_name, custom_headers:nil)
889
+ response = list_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
890
+ unless response.nil?
891
+ page = response.body
892
+ page.next_method = Proc.new do |next_page_link|
893
+ list_next_async(next_page_link, custom_headers:custom_headers)
894
+ end
895
+ page
896
+ end
897
+ end
898
+
899
+ end
900
+ end