azure_mgmt_container_service 0.18.3 → 0.18.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +5 -5
  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/2018-09-30-preview/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_aadidentity_provider.rb +11 -0
  12. data/lib/2019-02-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  13. data/lib/2019-04-01/generated/azure_mgmt_container_service.rb +71 -0
  14. data/lib/2019-04-01/generated/azure_mgmt_container_service/agent_pools.rb +680 -0
  15. data/lib/2019-04-01/generated/azure_mgmt_container_service/container_service_client.rb +145 -0
  16. data/lib/2019-04-01/generated/azure_mgmt_container_service/container_services.rb +131 -0
  17. data/lib/2019-04-01/generated/azure_mgmt_container_service/managed_clusters.rb +1730 -0
  18. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/agent_pool.rb +284 -0
  19. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb +99 -0
  20. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb +16 -0
  21. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  22. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  23. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  24. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb +140 -0
  25. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  26. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  27. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  28. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  29. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  30. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/credential_result.rb +59 -0
  31. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/credential_results.rb +57 -0
  32. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb +16 -0
  33. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster.rb +325 -0
  34. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb +80 -0
  35. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb +97 -0
  36. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb +66 -0
  37. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb +169 -0
  38. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb +257 -0
  39. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb +78 -0
  40. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb +100 -0
  41. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb +92 -0
  42. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb +59 -0
  43. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb +59 -0
  44. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb +105 -0
  45. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb +63 -0
  46. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/network_plugin.rb +16 -0
  47. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/network_policy.rb +16 -0
  48. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/operation_list_result.rb +56 -0
  49. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/operation_value.rb +108 -0
  50. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/orchestrator_profile.rb +68 -0
  51. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/orchestrator_version_profile.rb +100 -0
  52. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/orchestrator_version_profile_list_result.rb +92 -0
  53. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  54. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/resource.rb +110 -0
  55. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb +16 -0
  56. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/sub_resource.rb +72 -0
  57. data/lib/2019-04-01/generated/azure_mgmt_container_service/models/tags_object.rb +54 -0
  58. data/lib/2019-04-01/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  59. data/lib/2019-04-01/generated/azure_mgmt_container_service/operations.rb +107 -0
  60. data/lib/2019-04-30/generated/azure_mgmt_container_service.rb +44 -0
  61. data/lib/2019-04-30/generated/azure_mgmt_container_service/container_service_client.rb +133 -0
  62. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/network_profile.rb +70 -0
  63. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_agent_pool_profile_role.rb +16 -0
  64. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_container_service_vmsize.rb +47 -0
  65. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster.rb +242 -0
  66. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_aadidentity_provider.rb +95 -0
  67. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_agent_pool_profile.rb +119 -0
  68. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_auth_profile.rb +56 -0
  69. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_base_identity_provider.rb +47 -0
  70. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_identity_provider.rb +62 -0
  71. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_list_result.rb +101 -0
  72. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_managed_cluster_master_pool_profile.rb +107 -0
  73. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/open_shift_router_profile.rb +70 -0
  74. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  75. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/purchase_plan.rb +82 -0
  76. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/resource.rb +110 -0
  77. data/lib/2019-04-30/generated/azure_mgmt_container_service/models/tags_object.rb +54 -0
  78. data/lib/2019-04-30/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  79. data/lib/2019-04-30/generated/azure_mgmt_container_service/open_shift_managed_clusters.rb +1052 -0
  80. data/lib/azure_mgmt_container_service.rb +2 -0
  81. data/lib/profiles/latest/modules/containerservice_profile_module.rb +177 -165
  82. data/lib/version.rb +1 -1
  83. metadata +70 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 64caf926b5fa1d76b1fbf76f933a87e218e10a09982b8764db68fc320cf48e5b
4
- data.tar.gz: 46f1451fbd284adbf3956057f7444b0c8594236c2eb023984078de94043ec1a4
2
+ SHA1:
3
+ metadata.gz: 5e1820a5cc3faa3efe5e039e397e1bc9ee08a0c0
4
+ data.tar.gz: 4919a9ed20019537c7ec8d80943316baf3dde867
5
5
  SHA512:
6
- metadata.gz: 636faae2ff4a0071717f202c136afc3a7d431fd5dafcff9a9ada32517b2a07ceb2a4e01927d89f94b12430c756a4c5ddf798584741250c4544b8d864e86b9522
7
- data.tar.gz: 433fc5b9f2b483a1915f4f4a258f01609e1ab032da409cca3fefce3b9ea7408ca91315d4cc31ea7342c5dee3671657526cf878d425a8ea3155891d75f73c4bb4
6
+ metadata.gz: a696c4aab96e4f46f3a96f5692c437175d8c6f18f7204e203436859db8242ce9a8e697d6e1242a1bf6077e77e5bbb79d13b853fb90cf7f49a889140d422ea3fa
7
+ data.tar.gz: 9eb905e3edc5354facd569615df5fa9b826995fe0e0b9c1287385a57d2978642529f9d9a63fd5d085af41c835d151bbb8edb9fd0a1a104a5e242e77afa3ab8c6
@@ -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.18.3"
129
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
129
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
129
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
129
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
129
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
129
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
133
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
133
+ sdk_information = "#{sdk_information}/0.18.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.18.3"
129
+ sdk_information = "#{sdk_information}/0.18.4"
130
130
  add_user_agent_information(sdk_information)
131
131
  end
132
132
  end
@@ -28,6 +28,9 @@ module Azure::ContainerService::Mgmt::V2018_09_30_preview
28
28
  # @return [String] The tenantId associated with the provider.
29
29
  attr_accessor :tenant_id
30
30
 
31
+ # @return [String] The groupId to be granted cluster admin role.
32
+ attr_accessor :customer_admin_group_id
33
+
31
34
 
32
35
  #
33
36
  # Mapper for OpenShiftManagedClusterAADIdentityProvider class as Ruby
@@ -74,6 +77,14 @@ module Azure::ContainerService::Mgmt::V2018_09_30_preview
74
77
  type: {
75
78
  name: 'String'
76
79
  }
80
+ },
81
+ customer_admin_group_id: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ serialized_name: 'customerAdminGroupId',
85
+ type: {
86
+ name: 'String'
87
+ }
77
88
  }
78
89
  }
79
90
  }
@@ -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.18.3"
137
+ sdk_information = "#{sdk_information}/0.18.4"
138
138
  add_user_agent_information(sdk_information)
139
139
  end
140
140
  end
@@ -0,0 +1,71 @@
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 '2019-04-01/generated/azure_mgmt_container_service/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ContainerService::Mgmt::V2019_04_01
23
+ autoload :ContainerServices, '2019-04-01/generated/azure_mgmt_container_service/container_services.rb'
24
+ autoload :Operations, '2019-04-01/generated/azure_mgmt_container_service/operations.rb'
25
+ autoload :ManagedClusters, '2019-04-01/generated/azure_mgmt_container_service/managed_clusters.rb'
26
+ autoload :AgentPools, '2019-04-01/generated/azure_mgmt_container_service/agent_pools.rb'
27
+ autoload :ContainerServiceClient, '2019-04-01/generated/azure_mgmt_container_service/container_service_client.rb'
28
+
29
+ module Models
30
+ autoload :ContainerServiceSshConfiguration, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb'
31
+ autoload :ContainerServiceLinuxProfile, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb'
32
+ autoload :OrchestratorVersionProfile, '2019-04-01/generated/azure_mgmt_container_service/models/orchestrator_version_profile.rb'
33
+ autoload :ContainerServiceNetworkProfile, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb'
34
+ autoload :OperationValue, '2019-04-01/generated/azure_mgmt_container_service/models/operation_value.rb'
35
+ autoload :ContainerServiceVMDiagnostics, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb'
36
+ autoload :Resource, '2019-04-01/generated/azure_mgmt_container_service/models/resource.rb'
37
+ autoload :ContainerServiceDiagnosticsProfile, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb'
38
+ autoload :TagsObject, '2019-04-01/generated/azure_mgmt_container_service/models/tags_object.rb'
39
+ autoload :ManagedClusterAddonProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb'
40
+ autoload :ContainerServiceMasterProfile, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb'
41
+ autoload :ManagedClusterAADProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb'
42
+ autoload :ManagedClusterServicePrincipalProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb'
43
+ autoload :ManagedClusterAgentPoolProfileProperties, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb'
44
+ autoload :AgentPoolListResult, '2019-04-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb'
45
+ autoload :ContainerServiceSshPublicKey, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb'
46
+ autoload :ManagedClusterIdentity, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb'
47
+ autoload :OrchestratorVersionProfileListResult, '2019-04-01/generated/azure_mgmt_container_service/models/orchestrator_version_profile_list_result.rb'
48
+ autoload :CredentialResults, '2019-04-01/generated/azure_mgmt_container_service/models/credential_results.rb'
49
+ autoload :SubResource, '2019-04-01/generated/azure_mgmt_container_service/models/sub_resource.rb'
50
+ autoload :ManagedClusterListResult, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb'
51
+ autoload :ManagedClusterWindowsProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb'
52
+ autoload :CredentialResult, '2019-04-01/generated/azure_mgmt_container_service/models/credential_result.rb'
53
+ autoload :OperationListResult, '2019-04-01/generated/azure_mgmt_container_service/models/operation_list_result.rb'
54
+ autoload :ManagedClusterPoolUpgradeProfileUpgradesItem, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb'
55
+ autoload :OrchestratorProfile, '2019-04-01/generated/azure_mgmt_container_service/models/orchestrator_profile.rb'
56
+ autoload :ManagedClusterPoolUpgradeProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb'
57
+ autoload :ManagedClusterUpgradeProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb'
58
+ autoload :ManagedClusterAgentPoolProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb'
59
+ autoload :AgentPool, '2019-04-01/generated/azure_mgmt_container_service/models/agent_pool.rb'
60
+ autoload :ManagedCluster, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster.rb'
61
+ autoload :ManagedClusterAccessProfile, '2019-04-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb'
62
+ autoload :ContainerServiceStorageProfileTypes, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb'
63
+ autoload :ContainerServiceVMSizeTypes, '2019-04-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb'
64
+ autoload :OSType, '2019-04-01/generated/azure_mgmt_container_service/models/ostype.rb'
65
+ autoload :AgentPoolType, '2019-04-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb'
66
+ autoload :NetworkPlugin, '2019-04-01/generated/azure_mgmt_container_service/models/network_plugin.rb'
67
+ autoload :NetworkPolicy, '2019-04-01/generated/azure_mgmt_container_service/models/network_policy.rb'
68
+ autoload :LoadBalancerSku, '2019-04-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb'
69
+ autoload :ResourceIdentityType, '2019-04-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb'
70
+ end
71
+ end
@@ -0,0 +1,680 @@
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::V2019_04_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 managed_cluster_name [String] The name of the managed cluster
32
+ # resource.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [Array<AgentPool>] operation results.
37
+ #
38
+ def list(resource_group_name, managed_cluster_name, custom_headers:nil)
39
+ first_page = list_as_lazy(resource_group_name, managed_cluster_name, custom_headers:custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Gets a list of agent pools in the specified managed cluster.
45
+ #
46
+ # Gets a list of agent pools in the specified managed cluster. The operation
47
+ # returns properties of each agent pool.
48
+ #
49
+ # @param resource_group_name [String] The name of the resource group.
50
+ # @param managed_cluster_name [String] The name of the managed cluster
51
+ # resource.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_with_http_info(resource_group_name, managed_cluster_name, custom_headers:nil)
58
+ list_async(resource_group_name, managed_cluster_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Gets a list of agent pools in the specified managed cluster.
63
+ #
64
+ # Gets a list of agent pools in the specified managed cluster. The operation
65
+ # returns properties of each agent pool.
66
+ #
67
+ # @param resource_group_name [String] The name of the resource group.
68
+ # @param managed_cluster_name [String] The name of the managed cluster
69
+ # resource.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_async(resource_group_name, managed_cluster_name, custom_headers:nil)
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
78
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
80
+ fail ArgumentError, 'managed_cluster_name is nil' if managed_cluster_name.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/{managedClusterName}/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,'managedClusterName' => managed_cluster_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
+ # Deserialize Response
113
+ if status_code == 200
114
+ begin
115
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
116
+ result_mapper = Azure::ContainerService::Mgmt::V2019_04_01::Models::AgentPoolListResult.mapper()
117
+ result.body = @client.deserialize(result_mapper, parsed_response)
118
+ rescue Exception => e
119
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
120
+ end
121
+ end
122
+
123
+ result
124
+ end
125
+
126
+ promise.execute
127
+ end
128
+
129
+ #
130
+ # Gets the agent pool.
131
+ #
132
+ # Gets the details of the agent pool by managed cluster and resource group.
133
+ #
134
+ # @param resource_group_name [String] The name of the resource group.
135
+ # @param managed_cluster_name [String] The name of the managed cluster
136
+ # resource.
137
+ # @param agent_pool_name [String] The name of the agent pool.
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [AgentPool] operation results.
142
+ #
143
+ def get(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
144
+ response = get_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
145
+ response.body unless response.nil?
146
+ end
147
+
148
+ #
149
+ # Gets the agent pool.
150
+ #
151
+ # Gets the details of the agent pool by managed cluster and resource group.
152
+ #
153
+ # @param resource_group_name [String] The name of the resource group.
154
+ # @param managed_cluster_name [String] The name of the managed cluster
155
+ # 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, managed_cluster_name, agent_pool_name, custom_headers:nil)
163
+ get_async(resource_group_name, managed_cluster_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 managed_cluster_name [String] The name of the managed cluster
173
+ # resource.
174
+ # @param agent_pool_name [String] The name of the agent pool.
175
+ # @param [Hash{String => String}] A hash of custom headers that will be added
176
+ # to the HTTP request.
177
+ #
178
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
179
+ #
180
+ def get_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
181
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
182
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
183
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
184
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
185
+ fail ArgumentError, 'managed_cluster_name is nil' if managed_cluster_name.nil?
186
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
187
+
188
+
189
+ request_headers = {}
190
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
191
+
192
+ # Set Headers
193
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
194
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
195
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'
196
+
197
+ request_url = @base_url || @client.base_url
198
+
199
+ options = {
200
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
201
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managedClusterName' => managed_cluster_name,'agentPoolName' => agent_pool_name},
202
+ query_params: {'api-version' => @client.api_version},
203
+ headers: request_headers.merge(custom_headers || {}),
204
+ base_url: request_url
205
+ }
206
+ promise = @client.make_request_async(:get, path_template, options)
207
+
208
+ promise = promise.then do |result|
209
+ http_response = result.response
210
+ status_code = http_response.status
211
+ response_content = http_response.body
212
+ unless status_code == 200
213
+ error_model = JSON.load(response_content)
214
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
215
+ end
216
+
217
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
218
+ # Deserialize Response
219
+ if status_code == 200
220
+ begin
221
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
222
+ result_mapper = Azure::ContainerService::Mgmt::V2019_04_01::Models::AgentPool.mapper()
223
+ result.body = @client.deserialize(result_mapper, parsed_response)
224
+ rescue Exception => e
225
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
226
+ end
227
+ end
228
+
229
+ result
230
+ end
231
+
232
+ promise.execute
233
+ end
234
+
235
+ #
236
+ # Creates or updates an agent pool.
237
+ #
238
+ # Creates or updates an agent pool in the specified managed cluster.
239
+ #
240
+ # @param resource_group_name [String] The name of the resource group.
241
+ # @param managed_cluster_name [String] The name of the managed cluster
242
+ # resource.
243
+ # @param agent_pool_name [String] The name of the agent pool.
244
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
245
+ # agent pool operation.
246
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
247
+ # will be added to the HTTP request.
248
+ #
249
+ # @return [AgentPool] operation results.
250
+ #
251
+ def create_or_update(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:nil)
252
+ response = create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
253
+ response.body unless response.nil?
254
+ end
255
+
256
+ #
257
+ # @param resource_group_name [String] The name of the resource group.
258
+ # @param managed_cluster_name [String] The name of the managed cluster
259
+ # resource.
260
+ # @param agent_pool_name [String] The name of the agent pool.
261
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
262
+ # agent pool operation.
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ # @return [Concurrent::Promise] promise which provides async access to http
267
+ # response.
268
+ #
269
+ def create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:nil)
270
+ # Send request
271
+ promise = begin_create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:custom_headers)
272
+
273
+ promise = promise.then do |response|
274
+ # Defining deserialization method.
275
+ deserialize_method = lambda do |parsed_response|
276
+ result_mapper = Azure::ContainerService::Mgmt::V2019_04_01::Models::AgentPool.mapper()
277
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
278
+ end
279
+
280
+ # Waiting for response.
281
+ @client.get_long_running_operation_result(response, deserialize_method)
282
+ end
283
+
284
+ promise
285
+ end
286
+
287
+ #
288
+ # Deletes an agent pool.
289
+ #
290
+ # Deletes the agent pool in the specified managed cluster.
291
+ #
292
+ # @param resource_group_name [String] The name of the resource group.
293
+ # @param managed_cluster_name [String] The name of the managed cluster
294
+ # resource.
295
+ # @param agent_pool_name [String] The name of the agent pool.
296
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
+ # will be added to the HTTP request.
298
+ #
299
+ def delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
300
+ response = delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
301
+ nil
302
+ end
303
+
304
+ #
305
+ # @param resource_group_name [String] The name of the resource group.
306
+ # @param managed_cluster_name [String] The name of the managed cluster
307
+ # 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, managed_cluster_name, agent_pool_name, custom_headers:nil)
316
+ # Send request
317
+ promise = begin_delete_async(resource_group_name, managed_cluster_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
+ # Creates or updates an agent pool.
333
+ #
334
+ # Creates or updates an agent pool in the specified managed cluster.
335
+ #
336
+ # @param resource_group_name [String] The name of the resource group.
337
+ # @param managed_cluster_name [String] The name of the managed cluster
338
+ # resource.
339
+ # @param agent_pool_name [String] The name of the agent pool.
340
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
341
+ # agent pool operation.
342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
343
+ # will be added to the HTTP request.
344
+ #
345
+ # @return [AgentPool] operation results.
346
+ #
347
+ def begin_create_or_update(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:nil)
348
+ response = begin_create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
349
+ response.body unless response.nil?
350
+ end
351
+
352
+ #
353
+ # Creates or updates an agent pool.
354
+ #
355
+ # Creates or updates an agent pool in the specified managed cluster.
356
+ #
357
+ # @param resource_group_name [String] The name of the resource group.
358
+ # @param managed_cluster_name [String] The name of the managed cluster
359
+ # resource.
360
+ # @param agent_pool_name [String] The name of the agent pool.
361
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
362
+ # agent pool operation.
363
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
364
+ # will be added to the HTTP request.
365
+ #
366
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
367
+ #
368
+ def begin_create_or_update_with_http_info(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:nil)
369
+ begin_create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:custom_headers).value!
370
+ end
371
+
372
+ #
373
+ # Creates or updates an agent pool.
374
+ #
375
+ # Creates or updates an agent pool in the specified managed cluster.
376
+ #
377
+ # @param resource_group_name [String] The name of the resource group.
378
+ # @param managed_cluster_name [String] The name of the managed cluster
379
+ # resource.
380
+ # @param agent_pool_name [String] The name of the agent pool.
381
+ # @param parameters [AgentPool] Parameters supplied to the Create or Update an
382
+ # agent pool operation.
383
+ # @param [Hash{String => String}] A hash of custom headers that will be added
384
+ # to the HTTP request.
385
+ #
386
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
387
+ #
388
+ def begin_create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:nil)
389
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
390
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
391
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
392
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
393
+ fail ArgumentError, 'managed_cluster_name is nil' if managed_cluster_name.nil?
394
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
395
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
396
+
397
+
398
+ request_headers = {}
399
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
400
+
401
+ # Set Headers
402
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
403
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
404
+
405
+ # Serialize Request
406
+ request_mapper = Azure::ContainerService::Mgmt::V2019_04_01::Models::AgentPool.mapper()
407
+ request_content = @client.serialize(request_mapper, parameters)
408
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
409
+
410
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'
411
+
412
+ request_url = @base_url || @client.base_url
413
+
414
+ options = {
415
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
416
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managedClusterName' => managed_cluster_name,'agentPoolName' => agent_pool_name},
417
+ query_params: {'api-version' => @client.api_version},
418
+ body: request_content,
419
+ headers: request_headers.merge(custom_headers || {}),
420
+ base_url: request_url
421
+ }
422
+ promise = @client.make_request_async(:put, path_template, options)
423
+
424
+ promise = promise.then do |result|
425
+ http_response = result.response
426
+ status_code = http_response.status
427
+ response_content = http_response.body
428
+ unless status_code == 200 || status_code == 201
429
+ error_model = JSON.load(response_content)
430
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
431
+ end
432
+
433
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
434
+ # Deserialize Response
435
+ if status_code == 200
436
+ begin
437
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
438
+ result_mapper = Azure::ContainerService::Mgmt::V2019_04_01::Models::AgentPool.mapper()
439
+ result.body = @client.deserialize(result_mapper, parsed_response)
440
+ rescue Exception => e
441
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
442
+ end
443
+ end
444
+ # Deserialize Response
445
+ if status_code == 201
446
+ begin
447
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
448
+ result_mapper = Azure::ContainerService::Mgmt::V2019_04_01::Models::AgentPool.mapper()
449
+ result.body = @client.deserialize(result_mapper, parsed_response)
450
+ rescue Exception => e
451
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
452
+ end
453
+ end
454
+
455
+ result
456
+ end
457
+
458
+ promise.execute
459
+ end
460
+
461
+ #
462
+ # Deletes an agent pool.
463
+ #
464
+ # Deletes the agent pool in the specified managed cluster.
465
+ #
466
+ # @param resource_group_name [String] The name of the resource group.
467
+ # @param managed_cluster_name [String] The name of the managed cluster
468
+ # resource.
469
+ # @param agent_pool_name [String] The name of the agent pool.
470
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
471
+ # will be added to the HTTP request.
472
+ #
473
+ #
474
+ def begin_delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
475
+ response = begin_delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
476
+ nil
477
+ end
478
+
479
+ #
480
+ # Deletes an agent pool.
481
+ #
482
+ # Deletes the agent pool in the specified managed cluster.
483
+ #
484
+ # @param resource_group_name [String] The name of the resource group.
485
+ # @param managed_cluster_name [String] The name of the managed cluster
486
+ # resource.
487
+ # @param agent_pool_name [String] The name of the agent pool.
488
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
489
+ # will be added to the HTTP request.
490
+ #
491
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
492
+ #
493
+ def begin_delete_with_http_info(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
494
+ begin_delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
495
+ end
496
+
497
+ #
498
+ # Deletes an agent pool.
499
+ #
500
+ # Deletes the agent pool in the specified managed cluster.
501
+ #
502
+ # @param resource_group_name [String] The name of the resource group.
503
+ # @param managed_cluster_name [String] The name of the managed cluster
504
+ # resource.
505
+ # @param agent_pool_name [String] The name of the agent pool.
506
+ # @param [Hash{String => String}] A hash of custom headers that will be added
507
+ # to the HTTP request.
508
+ #
509
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
510
+ #
511
+ def begin_delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
512
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
513
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
514
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
515
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
516
+ fail ArgumentError, 'managed_cluster_name is nil' if managed_cluster_name.nil?
517
+ fail ArgumentError, 'agent_pool_name is nil' if agent_pool_name.nil?
518
+
519
+
520
+ request_headers = {}
521
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
522
+
523
+ # Set Headers
524
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
525
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
526
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'
527
+
528
+ request_url = @base_url || @client.base_url
529
+
530
+ options = {
531
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
532
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managedClusterName' => managed_cluster_name,'agentPoolName' => agent_pool_name},
533
+ query_params: {'api-version' => @client.api_version},
534
+ headers: request_headers.merge(custom_headers || {}),
535
+ base_url: request_url
536
+ }
537
+ promise = @client.make_request_async(:delete, path_template, options)
538
+
539
+ promise = promise.then do |result|
540
+ http_response = result.response
541
+ status_code = http_response.status
542
+ response_content = http_response.body
543
+ unless status_code == 202 || status_code == 204
544
+ error_model = JSON.load(response_content)
545
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
546
+ end
547
+
548
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
549
+
550
+ result
551
+ end
552
+
553
+ promise.execute
554
+ end
555
+
556
+ #
557
+ # Gets a list of agent pools in the specified managed cluster.
558
+ #
559
+ # Gets a list of agent pools in the specified managed cluster. The operation
560
+ # returns properties of each agent pool.
561
+ #
562
+ # @param next_page_link [String] The NextLink from the previous successful call
563
+ # to List operation.
564
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
565
+ # will be added to the HTTP request.
566
+ #
567
+ # @return [AgentPoolListResult] operation results.
568
+ #
569
+ def list_next(next_page_link, custom_headers:nil)
570
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
571
+ response.body unless response.nil?
572
+ end
573
+
574
+ #
575
+ # Gets a list of agent pools in the specified managed cluster.
576
+ #
577
+ # Gets a list of agent pools in the specified managed cluster. The operation
578
+ # returns properties of each agent pool.
579
+ #
580
+ # @param next_page_link [String] The NextLink from the previous successful call
581
+ # to List operation.
582
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
583
+ # will be added to the HTTP request.
584
+ #
585
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
586
+ #
587
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
588
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
589
+ end
590
+
591
+ #
592
+ # Gets a list of agent pools in the specified managed cluster.
593
+ #
594
+ # Gets a list of agent pools in the specified managed cluster. The operation
595
+ # returns properties of each agent pool.
596
+ #
597
+ # @param next_page_link [String] The NextLink from the previous successful call
598
+ # to List operation.
599
+ # @param [Hash{String => String}] A hash of custom headers that will be added
600
+ # to the HTTP request.
601
+ #
602
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
603
+ #
604
+ def list_next_async(next_page_link, custom_headers:nil)
605
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
606
+
607
+
608
+ request_headers = {}
609
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
610
+
611
+ # Set Headers
612
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
613
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
614
+ path_template = '{nextLink}'
615
+
616
+ request_url = @base_url || @client.base_url
617
+
618
+ options = {
619
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
620
+ skip_encoding_path_params: {'nextLink' => next_page_link},
621
+ headers: request_headers.merge(custom_headers || {}),
622
+ base_url: request_url
623
+ }
624
+ promise = @client.make_request_async(:get, path_template, options)
625
+
626
+ promise = promise.then do |result|
627
+ http_response = result.response
628
+ status_code = http_response.status
629
+ response_content = http_response.body
630
+ unless status_code == 200
631
+ error_model = JSON.load(response_content)
632
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
633
+ end
634
+
635
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
636
+ # Deserialize Response
637
+ if status_code == 200
638
+ begin
639
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
640
+ result_mapper = Azure::ContainerService::Mgmt::V2019_04_01::Models::AgentPoolListResult.mapper()
641
+ result.body = @client.deserialize(result_mapper, parsed_response)
642
+ rescue Exception => e
643
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
644
+ end
645
+ end
646
+
647
+ result
648
+ end
649
+
650
+ promise.execute
651
+ end
652
+
653
+ #
654
+ # Gets a list of agent pools in the specified managed cluster.
655
+ #
656
+ # Gets a list of agent pools in the specified managed cluster. The operation
657
+ # returns properties of each agent pool.
658
+ #
659
+ # @param resource_group_name [String] The name of the resource group.
660
+ # @param managed_cluster_name [String] The name of the managed cluster
661
+ # resource.
662
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
663
+ # will be added to the HTTP request.
664
+ #
665
+ # @return [AgentPoolListResult] which provide lazy access to pages of the
666
+ # response.
667
+ #
668
+ def list_as_lazy(resource_group_name, managed_cluster_name, custom_headers:nil)
669
+ response = list_async(resource_group_name, managed_cluster_name, custom_headers:custom_headers).value!
670
+ unless response.nil?
671
+ page = response.body
672
+ page.next_method = Proc.new do |next_page_link|
673
+ list_next_async(next_page_link, custom_headers:custom_headers)
674
+ end
675
+ page
676
+ end
677
+ end
678
+
679
+ end
680
+ end