azure_mgmt_container_service 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-03-30/generated/azure_mgmt_container_service/container_service_client.rb +7 -6
  3. data/lib/2016-09-30/generated/azure_mgmt_container_service/container_service_client.rb +7 -6
  4. data/lib/2016-09-30/generated/azure_mgmt_container_service/container_services.rb +1 -1
  5. data/lib/2017-01-31/generated/azure_mgmt_container_service/container_service_client.rb +7 -6
  6. data/lib/2017-01-31/generated/azure_mgmt_container_service/container_services.rb +1 -1
  7. data/lib/2017-07-01/generated/azure_mgmt_container_service.rb +47 -0
  8. data/lib/2017-07-01/generated/azure_mgmt_container_service/container_service_client.rb +133 -0
  9. data/lib/2017-07-01/generated/azure_mgmt_container_service/container_services.rb +924 -0
  10. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service.rb +213 -0
  11. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_agent_pool_profile.rb +226 -0
  12. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_custom_profile.rb +46 -0
  13. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  14. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  15. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_list_result.rb +100 -0
  16. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  17. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_orchestrator_profile.rb +62 -0
  18. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_orchestrator_types.rb +19 -0
  19. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_service_principal_profile.rb +73 -0
  20. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  21. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  22. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  23. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  24. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  25. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/container_service_windows_profile.rb +63 -0
  26. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/key_vault_secret_ref.rb +68 -0
  27. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  28. data/lib/2017-07-01/generated/azure_mgmt_container_service/models/resource.rb +101 -0
  29. data/lib/2017-07-01/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  30. data/lib/2017-08-31/generated/azure_mgmt_container_service.rb +48 -0
  31. data/lib/2017-08-31/generated/azure_mgmt_container_service/container_service_client.rb +133 -0
  32. data/lib/2017-08-31/generated/azure_mgmt_container_service/managed_clusters.rb +1172 -0
  33. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_agent_pool_profile.rb +226 -0
  34. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  35. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  36. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  37. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_service_principal_profile.rb +73 -0
  38. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  39. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  40. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  41. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  42. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  43. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/container_service_windows_profile.rb +63 -0
  44. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/key_vault_secret_ref.rb +68 -0
  45. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster.rb +183 -0
  46. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb +97 -0
  47. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb +100 -0
  48. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb +91 -0
  49. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb +105 -0
  50. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/orchestrator_profile.rb +57 -0
  51. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  52. data/lib/2017-08-31/generated/azure_mgmt_container_service/models/resource.rb +101 -0
  53. data/lib/2017-08-31/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  54. data/lib/2017-09-30/generated/azure_mgmt_container_service.rb +31 -0
  55. data/lib/2017-09-30/generated/azure_mgmt_container_service/container_service_client.rb +133 -0
  56. data/lib/2017-09-30/generated/azure_mgmt_container_service/container_services.rb +131 -0
  57. data/lib/2017-09-30/generated/azure_mgmt_container_service/models/orchestrator_profile.rb +57 -0
  58. data/lib/2017-09-30/generated/azure_mgmt_container_service/models/orchestrator_version_profile.rb +89 -0
  59. data/lib/2017-09-30/generated/azure_mgmt_container_service/models/orchestrator_version_profile_list_result.rb +92 -0
  60. data/lib/2017-09-30/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  61. data/lib/2018-03-31/generated/azure_mgmt_container_service.rb +57 -0
  62. data/lib/2018-03-31/generated/azure_mgmt_container_service/container_service_client.rb +137 -0
  63. data/lib/2018-03-31/generated/azure_mgmt_container_service/managed_clusters.rb +1227 -0
  64. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  65. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  66. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  67. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_network_profile.rb +128 -0
  68. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_service_principal_profile.rb +73 -0
  69. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  70. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  71. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  72. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  73. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  74. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/container_service_windows_profile.rb +63 -0
  75. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/key_vault_secret_ref.rb +68 -0
  76. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster.rb +255 -0
  77. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb +80 -0
  78. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb +97 -0
  79. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb +66 -0
  80. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb +237 -0
  81. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb +100 -0
  82. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb +91 -0
  83. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb +105 -0
  84. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/network_plugin.rb +16 -0
  85. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/network_policy.rb +15 -0
  86. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/operation_list_result.rb +56 -0
  87. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/operation_value.rb +108 -0
  88. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/orchestrator_profile.rb +57 -0
  89. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  90. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/resource.rb +101 -0
  91. data/lib/2018-03-31/generated/azure_mgmt_container_service/models/tags_object.rb +54 -0
  92. data/lib/2018-03-31/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  93. data/lib/2018-03-31/generated/azure_mgmt_container_service/operations.rb +107 -0
  94. data/lib/azure_mgmt_container_service.rb +5 -1
  95. data/lib/profiles/latest/modules/containerservice_profile_module.rb +149 -49
  96. data/lib/version.rb +1 -1
  97. metadata +91 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d146d6b43e8af8304647e6a2ad9e522bef499972
4
- data.tar.gz: 242078b8032e2c66204306807f22dc6b02ccbd3e
3
+ metadata.gz: 1c5d0476be52083f39f8b2802259446cf3451619
4
+ data.tar.gz: 6051767c8ca856b7b972723834986c46c7dd545e
5
5
  SHA512:
6
- metadata.gz: 22d4fd42cbeb61a467f65705d9b4e639ca800cbf880398115021a397870b24642719e7ed1d135be76d81e1c032247cc9a8c1505f0f27f63411810229823e58af
7
- data.tar.gz: 0c6fdd37052408247c68999086aef0b1adb2c9d7bedf9f0046e560fd07b681bcd5a793051bbb8c37cc1e03b94161a4902bec52c00eff19fb37a13a4822fb6318
6
+ metadata.gz: 253888a051c2e5d000fa3d3370b8224bee41dee09a6ba36dcec23a090d481f0dff3bf0cffc8c04714a92fdc23e98289de7c98c0ec8c03c73374780fd0a161343
7
+ data.tar.gz: 59af4ce3c824f12879281e6917074e797671bad4fea29b7fe3044c6c1820a8ca801306efe050c1fae6de99e9675040aa04cd715a3d5a7bb9dce08c1befa69c37
@@ -25,15 +25,16 @@ module Azure::ContainerService::Mgmt::V2016_03_30
25
25
  # @return [String] Client Api Version.
26
26
  attr_reader :api_version
27
27
 
28
- # @return [String] Gets or sets the preferred language for the response.
28
+ # @return [String] The preferred language for the response.
29
29
  attr_accessor :accept_language
30
30
 
31
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
- # Running Operations. Default value is 30.
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
33
  attr_accessor :long_running_operation_retry_timeout
34
34
 
35
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
36
- # is generated and included in each request. Default is true.
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
37
38
  attr_accessor :generate_client_request_id
38
39
 
39
40
  # @return [ContainerServices] container_services
@@ -125,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2016_03_30
125
126
  #
126
127
  def add_telemetry
127
128
  sdk_information = 'azure_mgmt_container_service'
128
- sdk_information = "#{sdk_information}/0.17.0"
129
+ sdk_information = "#{sdk_information}/0.18.0"
129
130
  add_user_agent_information(sdk_information)
130
131
  end
131
132
  end
@@ -25,15 +25,16 @@ module Azure::ContainerService::Mgmt::V2016_09_30
25
25
  # @return [String] Client Api Version.
26
26
  attr_reader :api_version
27
27
 
28
- # @return [String] Gets or sets the preferred language for the response.
28
+ # @return [String] The preferred language for the response.
29
29
  attr_accessor :accept_language
30
30
 
31
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
- # Running Operations. Default value is 30.
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
33
  attr_accessor :long_running_operation_retry_timeout
34
34
 
35
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
36
- # is generated and included in each request. Default is true.
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
37
38
  attr_accessor :generate_client_request_id
38
39
 
39
40
  # @return [ContainerServices] container_services
@@ -125,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2016_09_30
125
126
  #
126
127
  def add_telemetry
127
128
  sdk_information = 'azure_mgmt_container_service'
128
- sdk_information = "#{sdk_information}/0.17.0"
129
+ sdk_information = "#{sdk_information}/0.18.0"
129
130
  add_user_agent_information(sdk_information)
130
131
  end
131
132
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Azure::ContainerService::Mgmt::V2016_09_30
7
7
  #
8
- # Compute Client
8
+ # The Container Service Client.
9
9
  #
10
10
  class ContainerServices
11
11
  include MsRestAzure
@@ -25,15 +25,16 @@ module Azure::ContainerService::Mgmt::V2017_01_31
25
25
  # @return [String] Client Api Version.
26
26
  attr_reader :api_version
27
27
 
28
- # @return [String] Gets or sets the preferred language for the response.
28
+ # @return [String] The preferred language for the response.
29
29
  attr_accessor :accept_language
30
30
 
31
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
- # Running Operations. Default value is 30.
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
33
  attr_accessor :long_running_operation_retry_timeout
34
34
 
35
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
36
- # is generated and included in each request. Default is true.
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
37
38
  attr_accessor :generate_client_request_id
38
39
 
39
40
  # @return [ContainerServices] container_services
@@ -125,7 +126,7 @@ module Azure::ContainerService::Mgmt::V2017_01_31
125
126
  #
126
127
  def add_telemetry
127
128
  sdk_information = 'azure_mgmt_container_service'
128
- sdk_information = "#{sdk_information}/0.17.0"
129
+ sdk_information = "#{sdk_information}/0.18.0"
129
130
  add_user_agent_information(sdk_information)
130
131
  end
131
132
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Azure::ContainerService::Mgmt::V2017_01_31
7
7
  #
8
- # Compute Client
8
+ # The Container Service Client.
9
9
  #
10
10
  class ContainerServices
11
11
  include MsRestAzure
@@ -0,0 +1,47 @@
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 '2017-07-01/generated/azure_mgmt_container_service/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ContainerService::Mgmt::V2017_07_01
23
+ autoload :ContainerServices, '2017-07-01/generated/azure_mgmt_container_service/container_services.rb'
24
+ autoload :ContainerServiceClient, '2017-07-01/generated/azure_mgmt_container_service/container_service_client.rb'
25
+
26
+ module Models
27
+ autoload :ContainerServiceWindowsProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_windows_profile.rb'
28
+ autoload :ContainerServiceSshPublicKey, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb'
29
+ autoload :ContainerServiceCustomProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_custom_profile.rb'
30
+ autoload :ContainerServiceSshConfiguration, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb'
31
+ autoload :ContainerServiceServicePrincipalProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_service_principal_profile.rb'
32
+ autoload :ContainerServiceLinuxProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb'
33
+ autoload :ContainerServiceMasterProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb'
34
+ autoload :ContainerServiceVMDiagnostics, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb'
35
+ autoload :Resource, '2017-07-01/generated/azure_mgmt_container_service/models/resource.rb'
36
+ autoload :ContainerServiceDiagnosticsProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb'
37
+ autoload :ContainerServiceOrchestratorProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_orchestrator_profile.rb'
38
+ autoload :ContainerServiceAgentPoolProfile, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_agent_pool_profile.rb'
39
+ autoload :KeyVaultSecretRef, '2017-07-01/generated/azure_mgmt_container_service/models/key_vault_secret_ref.rb'
40
+ autoload :ContainerServiceListResult, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_list_result.rb'
41
+ autoload :ContainerService, '2017-07-01/generated/azure_mgmt_container_service/models/container_service.rb'
42
+ autoload :ContainerServiceStorageProfileTypes, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb'
43
+ autoload :ContainerServiceVMSizeTypes, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb'
44
+ autoload :ContainerServiceOrchestratorTypes, '2017-07-01/generated/azure_mgmt_container_service/models/container_service_orchestrator_types.rb'
45
+ autoload :OSType, '2017-07-01/generated/azure_mgmt_container_service/models/ostype.rb'
46
+ end
47
+ end
@@ -0,0 +1,133 @@
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::V2017_07_01
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class ContainerServiceClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Subscription credentials which uniquely identify
21
+ # Microsoft Azure subscription. The subscription ID forms part of the URI
22
+ # for every service call.
23
+ attr_accessor :subscription_id
24
+
25
+ # @return [String] Client Api Version.
26
+ attr_reader :api_version
27
+
28
+ # @return [String] The preferred language for the response.
29
+ attr_accessor :accept_language
30
+
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
+ attr_accessor :long_running_operation_retry_timeout
34
+
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
38
+ attr_accessor :generate_client_request_id
39
+
40
+ # @return [ContainerServices] container_services
41
+ attr_reader :container_services
42
+
43
+ #
44
+ # Creates initializes a new instance of the ContainerServiceClient class.
45
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
46
+ # @param base_url [String] the base URI of the service.
47
+ # @param options [Array] filters to be applied to the HTTP requests.
48
+ #
49
+ def initialize(credentials = nil, base_url = nil, options = nil)
50
+ super(credentials, options)
51
+ @base_url = base_url || 'https://management.azure.com'
52
+
53
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
54
+ @credentials = credentials
55
+
56
+ @container_services = ContainerServices.new(self)
57
+ @api_version = '2017-07-01'
58
+ @accept_language = 'en-US'
59
+ @long_running_operation_retry_timeout = 30
60
+ @generate_client_request_id = true
61
+ add_telemetry
62
+ end
63
+
64
+ #
65
+ # Makes a request and returns the body of the response.
66
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
67
+ # @param path [String] the path, relative to {base_url}.
68
+ # @param options [Hash{String=>String}] specifying any request options like :body.
69
+ # @return [Hash{String=>String}] containing the body of the response.
70
+ # Example:
71
+ #
72
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
73
+ # path = "/path"
74
+ # options = {
75
+ # body: request_content,
76
+ # query_params: {'api-version' => '2016-02-01'}
77
+ # }
78
+ # result = @client.make_request(:put, path, options)
79
+ #
80
+ def make_request(method, path, options = {})
81
+ result = make_request_with_http_info(method, path, options)
82
+ result.body unless result.nil?
83
+ end
84
+
85
+ #
86
+ # Makes a request and returns the operation response.
87
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
88
+ # @param path [String] the path, relative to {base_url}.
89
+ # @param options [Hash{String=>String}] specifying any request options like :body.
90
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
91
+ #
92
+ def make_request_with_http_info(method, path, options = {})
93
+ result = make_request_async(method, path, options).value!
94
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
95
+ result
96
+ end
97
+
98
+ #
99
+ # Makes a request asynchronously.
100
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
101
+ # @param path [String] the path, relative to {base_url}.
102
+ # @param options [Hash{String=>String}] specifying any request options like :body.
103
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
104
+ #
105
+ def make_request_async(method, path, options = {})
106
+ fail ArgumentError, 'method is nil' if method.nil?
107
+ fail ArgumentError, 'path is nil' if path.nil?
108
+
109
+ request_url = options[:base_url] || @base_url
110
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
111
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
112
+ end
113
+
114
+ request_headers = @request_headers
115
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
116
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
117
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
118
+
119
+ super(request_url, method, path, options)
120
+ end
121
+
122
+
123
+ private
124
+ #
125
+ # Adds telemetry information.
126
+ #
127
+ def add_telemetry
128
+ sdk_information = 'azure_mgmt_container_service'
129
+ sdk_information = "#{sdk_information}/0.18.0"
130
+ add_user_agent_information(sdk_information)
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,924 @@
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::V2017_07_01
7
+ #
8
+ # The Container Service Client.
9
+ #
10
+ class ContainerServices
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ContainerServices 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 container services in the specified subscription.
26
+ #
27
+ # Gets a list of container services in the specified subscription. The
28
+ # operation returns properties of each container service including state,
29
+ # orchestrator, number of masters and agents, and FQDNs of masters and agents.
30
+ #
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<ContainerService>] operation results.
35
+ #
36
+ def list(custom_headers:nil)
37
+ first_page = list_as_lazy(custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # Gets a list of container services in the specified subscription.
43
+ #
44
+ # Gets a list of container services in the specified subscription. The
45
+ # operation returns properties of each container service including state,
46
+ # orchestrator, number of masters and agents, and FQDNs of masters and agents.
47
+ #
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_with_http_info(custom_headers:nil)
54
+ list_async(custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets a list of container services in the specified subscription.
59
+ #
60
+ # Gets a list of container services in the specified subscription. The
61
+ # operation returns properties of each container service including state,
62
+ # orchestrator, number of masters and agents, and FQDNs of masters and agents.
63
+ #
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_async(custom_headers:nil)
70
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
72
+
73
+
74
+ request_headers = {}
75
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
76
+
77
+ # Set Headers
78
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
79
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
80
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'
81
+
82
+ request_url = @base_url || @client.base_url
83
+
84
+ options = {
85
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
86
+ path_params: {'subscriptionId' => @client.subscription_id},
87
+ query_params: {'api-version' => @client.api_version},
88
+ headers: request_headers.merge(custom_headers || {}),
89
+ base_url: request_url
90
+ }
91
+ promise = @client.make_request_async(:get, path_template, options)
92
+
93
+ promise = promise.then do |result|
94
+ http_response = result.response
95
+ status_code = http_response.status
96
+ response_content = http_response.body
97
+ unless status_code == 200
98
+ error_model = JSON.load(response_content)
99
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
100
+ end
101
+
102
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
103
+ # Deserialize Response
104
+ if status_code == 200
105
+ begin
106
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
107
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerServiceListResult.mapper()
108
+ result.body = @client.deserialize(result_mapper, parsed_response)
109
+ rescue Exception => e
110
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
111
+ end
112
+ end
113
+
114
+ result
115
+ end
116
+
117
+ promise.execute
118
+ end
119
+
120
+ #
121
+ # Creates or updates a container service.
122
+ #
123
+ # Creates or updates a container service with the specified configuration of
124
+ # orchestrator, masters, and agents.
125
+ #
126
+ # @param resource_group_name [String] The name of the resource group.
127
+ # @param container_service_name [String] The name of the container service in
128
+ # the specified subscription and resource group.
129
+ # @param parameters [ContainerService] Parameters supplied to the Create or
130
+ # Update a Container Service operation.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [ContainerService] operation results.
135
+ #
136
+ def create_or_update(resource_group_name, container_service_name, parameters, custom_headers:nil)
137
+ response = create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
138
+ response.body unless response.nil?
139
+ end
140
+
141
+ #
142
+ # @param resource_group_name [String] The name of the resource group.
143
+ # @param container_service_name [String] The name of the container service in
144
+ # the specified subscription and resource group.
145
+ # @param parameters [ContainerService] Parameters supplied to the Create or
146
+ # Update a Container Service operation.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [Concurrent::Promise] promise which provides async access to http
151
+ # response.
152
+ #
153
+ def create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:nil)
154
+ # Send request
155
+ promise = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers)
156
+
157
+ promise = promise.then do |response|
158
+ # Defining deserialization method.
159
+ deserialize_method = lambda do |parsed_response|
160
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerService.mapper()
161
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
162
+ end
163
+
164
+ # Waiting for response.
165
+ @client.get_long_running_operation_result(response, deserialize_method)
166
+ end
167
+
168
+ promise
169
+ end
170
+
171
+ #
172
+ # Gets the properties of the specified container service.
173
+ #
174
+ # Gets the properties of the specified container service in the specified
175
+ # subscription and resource group. The operation returns the properties
176
+ # including state, orchestrator, number of masters and agents, and FQDNs of
177
+ # masters and agents.
178
+ #
179
+ # @param resource_group_name [String] The name of the resource group.
180
+ # @param container_service_name [String] The name of the container service in
181
+ # the specified subscription and resource group.
182
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
183
+ # will be added to the HTTP request.
184
+ #
185
+ # @return [ContainerService] operation results.
186
+ #
187
+ def get(resource_group_name, container_service_name, custom_headers:nil)
188
+ response = get_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
189
+ response.body unless response.nil?
190
+ end
191
+
192
+ #
193
+ # Gets the properties of the specified container service.
194
+ #
195
+ # Gets the properties of the specified container service in the specified
196
+ # subscription and resource group. The operation returns the properties
197
+ # including state, orchestrator, number of masters and agents, and FQDNs of
198
+ # masters and agents.
199
+ #
200
+ # @param resource_group_name [String] The name of the resource group.
201
+ # @param container_service_name [String] The name of the container service in
202
+ # the specified subscription and resource group.
203
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
204
+ # will be added to the HTTP request.
205
+ #
206
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
207
+ #
208
+ def get_with_http_info(resource_group_name, container_service_name, custom_headers:nil)
209
+ get_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
210
+ end
211
+
212
+ #
213
+ # Gets the properties of the specified container service.
214
+ #
215
+ # Gets the properties of the specified container service in the specified
216
+ # subscription and resource group. The operation returns the properties
217
+ # including state, orchestrator, number of masters and agents, and FQDNs of
218
+ # masters and agents.
219
+ #
220
+ # @param resource_group_name [String] The name of the resource group.
221
+ # @param container_service_name [String] The name of the container service in
222
+ # the specified subscription and resource group.
223
+ # @param [Hash{String => String}] A hash of custom headers that will be added
224
+ # to the HTTP request.
225
+ #
226
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
227
+ #
228
+ def get_async(resource_group_name, container_service_name, custom_headers:nil)
229
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
230
+ fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
231
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
232
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
233
+
234
+
235
+ request_headers = {}
236
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
237
+
238
+ # Set Headers
239
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
240
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
241
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'
242
+
243
+ request_url = @base_url || @client.base_url
244
+
245
+ options = {
246
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
247
+ path_params: {'resourceGroupName' => resource_group_name,'containerServiceName' => container_service_name,'subscriptionId' => @client.subscription_id},
248
+ query_params: {'api-version' => @client.api_version},
249
+ headers: request_headers.merge(custom_headers || {}),
250
+ base_url: request_url
251
+ }
252
+ promise = @client.make_request_async(:get, path_template, options)
253
+
254
+ promise = promise.then do |result|
255
+ http_response = result.response
256
+ status_code = http_response.status
257
+ response_content = http_response.body
258
+ unless status_code == 200
259
+ error_model = JSON.load(response_content)
260
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
261
+ end
262
+
263
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
264
+ # Deserialize Response
265
+ if status_code == 200
266
+ begin
267
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
268
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerService.mapper()
269
+ result.body = @client.deserialize(result_mapper, parsed_response)
270
+ rescue Exception => e
271
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
272
+ end
273
+ end
274
+
275
+ result
276
+ end
277
+
278
+ promise.execute
279
+ end
280
+
281
+ #
282
+ # Deletes the specified container service.
283
+ #
284
+ # Deletes the specified container service in the specified subscription and
285
+ # resource group. The operation does not delete other resources created as part
286
+ # of creating a container service, including storage accounts, VMs, and
287
+ # availability sets. All the other resources created with the container service
288
+ # are part of the same resource group and can be deleted individually.
289
+ #
290
+ # @param resource_group_name [String] The name of the resource group.
291
+ # @param container_service_name [String] The name of the container service in
292
+ # the specified subscription and resource group.
293
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
294
+ # will be added to the HTTP request.
295
+ #
296
+ def delete(resource_group_name, container_service_name, custom_headers:nil)
297
+ response = delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
298
+ nil
299
+ end
300
+
301
+ #
302
+ # @param resource_group_name [String] The name of the resource group.
303
+ # @param container_service_name [String] The name of the container service in
304
+ # the specified subscription and resource group.
305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
+ # will be added to the HTTP request.
307
+ #
308
+ # @return [Concurrent::Promise] promise which provides async access to http
309
+ # response.
310
+ #
311
+ def delete_async(resource_group_name, container_service_name, custom_headers:nil)
312
+ # Send request
313
+ promise = begin_delete_async(resource_group_name, container_service_name, custom_headers:custom_headers)
314
+
315
+ promise = promise.then do |response|
316
+ # Defining deserialization method.
317
+ deserialize_method = lambda do |parsed_response|
318
+ end
319
+
320
+ # Waiting for response.
321
+ @client.get_long_running_operation_result(response, deserialize_method)
322
+ end
323
+
324
+ promise
325
+ end
326
+
327
+ #
328
+ # Gets a list of container services in the specified resource group.
329
+ #
330
+ # Gets a list of container services in the specified subscription and resource
331
+ # group. The operation returns properties of each container service including
332
+ # state, orchestrator, number of masters and agents, and FQDNs of masters and
333
+ # agents.
334
+ #
335
+ # @param resource_group_name [String] The name of the resource group.
336
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
337
+ # will be added to the HTTP request.
338
+ #
339
+ # @return [Array<ContainerService>] operation results.
340
+ #
341
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
342
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
343
+ first_page.get_all_items
344
+ end
345
+
346
+ #
347
+ # Gets a list of container services in the specified resource group.
348
+ #
349
+ # Gets a list of container services in the specified subscription and resource
350
+ # group. The operation returns properties of each container service including
351
+ # state, orchestrator, number of masters and agents, and FQDNs of masters and
352
+ # agents.
353
+ #
354
+ # @param resource_group_name [String] The name of the resource group.
355
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
356
+ # will be added to the HTTP request.
357
+ #
358
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
359
+ #
360
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
361
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
362
+ end
363
+
364
+ #
365
+ # Gets a list of container services in the specified resource group.
366
+ #
367
+ # Gets a list of container services in the specified subscription and resource
368
+ # group. The operation returns properties of each container service including
369
+ # state, orchestrator, number of masters and agents, and FQDNs of masters and
370
+ # agents.
371
+ #
372
+ # @param resource_group_name [String] The name of the resource group.
373
+ # @param [Hash{String => String}] A hash of custom headers that will be added
374
+ # to the HTTP request.
375
+ #
376
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
377
+ #
378
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
379
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
380
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
381
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
382
+
383
+
384
+ request_headers = {}
385
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
386
+
387
+ # Set Headers
388
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
389
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
390
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'
391
+
392
+ request_url = @base_url || @client.base_url
393
+
394
+ options = {
395
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
396
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
397
+ query_params: {'api-version' => @client.api_version},
398
+ headers: request_headers.merge(custom_headers || {}),
399
+ base_url: request_url
400
+ }
401
+ promise = @client.make_request_async(:get, path_template, options)
402
+
403
+ promise = promise.then do |result|
404
+ http_response = result.response
405
+ status_code = http_response.status
406
+ response_content = http_response.body
407
+ unless status_code == 200
408
+ error_model = JSON.load(response_content)
409
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
410
+ end
411
+
412
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
413
+ # Deserialize Response
414
+ if status_code == 200
415
+ begin
416
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
417
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerServiceListResult.mapper()
418
+ result.body = @client.deserialize(result_mapper, parsed_response)
419
+ rescue Exception => e
420
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
421
+ end
422
+ end
423
+
424
+ result
425
+ end
426
+
427
+ promise.execute
428
+ end
429
+
430
+ #
431
+ # Creates or updates a container service.
432
+ #
433
+ # Creates or updates a container service with the specified configuration of
434
+ # orchestrator, masters, and agents.
435
+ #
436
+ # @param resource_group_name [String] The name of the resource group.
437
+ # @param container_service_name [String] The name of the container service in
438
+ # the specified subscription and resource group.
439
+ # @param parameters [ContainerService] Parameters supplied to the Create or
440
+ # Update a Container Service operation.
441
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
442
+ # will be added to the HTTP request.
443
+ #
444
+ # @return [ContainerService] operation results.
445
+ #
446
+ def begin_create_or_update(resource_group_name, container_service_name, parameters, custom_headers:nil)
447
+ response = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
448
+ response.body unless response.nil?
449
+ end
450
+
451
+ #
452
+ # Creates or updates a container service.
453
+ #
454
+ # Creates or updates a container service with the specified configuration of
455
+ # orchestrator, masters, and agents.
456
+ #
457
+ # @param resource_group_name [String] The name of the resource group.
458
+ # @param container_service_name [String] The name of the container service in
459
+ # the specified subscription and resource group.
460
+ # @param parameters [ContainerService] Parameters supplied to the Create or
461
+ # Update a Container Service operation.
462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
463
+ # will be added to the HTTP request.
464
+ #
465
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
466
+ #
467
+ def begin_create_or_update_with_http_info(resource_group_name, container_service_name, parameters, custom_headers:nil)
468
+ begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
469
+ end
470
+
471
+ #
472
+ # Creates or updates a container service.
473
+ #
474
+ # Creates or updates a container service with the specified configuration of
475
+ # orchestrator, masters, and agents.
476
+ #
477
+ # @param resource_group_name [String] The name of the resource group.
478
+ # @param container_service_name [String] The name of the container service in
479
+ # the specified subscription and resource group.
480
+ # @param parameters [ContainerService] Parameters supplied to the Create or
481
+ # Update a Container Service operation.
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 begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:nil)
488
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
489
+ fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
490
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
491
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
492
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
493
+
494
+
495
+ request_headers = {}
496
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
497
+
498
+ # Set Headers
499
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
500
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
501
+
502
+ # Serialize Request
503
+ request_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerService.mapper()
504
+ request_content = @client.serialize(request_mapper, parameters)
505
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
506
+
507
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'
508
+
509
+ request_url = @base_url || @client.base_url
510
+
511
+ options = {
512
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
513
+ path_params: {'resourceGroupName' => resource_group_name,'containerServiceName' => container_service_name,'subscriptionId' => @client.subscription_id},
514
+ query_params: {'api-version' => @client.api_version},
515
+ body: request_content,
516
+ headers: request_headers.merge(custom_headers || {}),
517
+ base_url: request_url
518
+ }
519
+ promise = @client.make_request_async(:put, path_template, options)
520
+
521
+ promise = promise.then do |result|
522
+ http_response = result.response
523
+ status_code = http_response.status
524
+ response_content = http_response.body
525
+ unless status_code == 200 || status_code == 201 || status_code == 202
526
+ error_model = JSON.load(response_content)
527
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
528
+ end
529
+
530
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
531
+ # Deserialize Response
532
+ if status_code == 200
533
+ begin
534
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
535
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerService.mapper()
536
+ result.body = @client.deserialize(result_mapper, parsed_response)
537
+ rescue Exception => e
538
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
539
+ end
540
+ end
541
+ # Deserialize Response
542
+ if status_code == 201
543
+ begin
544
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
545
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerService.mapper()
546
+ result.body = @client.deserialize(result_mapper, parsed_response)
547
+ rescue Exception => e
548
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
549
+ end
550
+ end
551
+ # Deserialize Response
552
+ if status_code == 202
553
+ begin
554
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
555
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerService.mapper()
556
+ result.body = @client.deserialize(result_mapper, parsed_response)
557
+ rescue Exception => e
558
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
559
+ end
560
+ end
561
+
562
+ result
563
+ end
564
+
565
+ promise.execute
566
+ end
567
+
568
+ #
569
+ # Deletes the specified container service.
570
+ #
571
+ # Deletes the specified container service in the specified subscription and
572
+ # resource group. The operation does not delete other resources created as part
573
+ # of creating a container service, including storage accounts, VMs, and
574
+ # availability sets. All the other resources created with the container service
575
+ # are part of the same resource group and can be deleted individually.
576
+ #
577
+ # @param resource_group_name [String] The name of the resource group.
578
+ # @param container_service_name [String] The name of the container service in
579
+ # the specified subscription and resource group.
580
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
581
+ # will be added to the HTTP request.
582
+ #
583
+ #
584
+ def begin_delete(resource_group_name, container_service_name, custom_headers:nil)
585
+ response = begin_delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
586
+ nil
587
+ end
588
+
589
+ #
590
+ # Deletes the specified container service.
591
+ #
592
+ # Deletes the specified container service in the specified subscription and
593
+ # resource group. The operation does not delete other resources created as part
594
+ # of creating a container service, including storage accounts, VMs, and
595
+ # availability sets. All the other resources created with the container service
596
+ # are part of the same resource group and can be deleted individually.
597
+ #
598
+ # @param resource_group_name [String] The name of the resource group.
599
+ # @param container_service_name [String] The name of the container service in
600
+ # the specified subscription and resource group.
601
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
602
+ # will be added to the HTTP request.
603
+ #
604
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
605
+ #
606
+ def begin_delete_with_http_info(resource_group_name, container_service_name, custom_headers:nil)
607
+ begin_delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
608
+ end
609
+
610
+ #
611
+ # Deletes the specified container service.
612
+ #
613
+ # Deletes the specified container service in the specified subscription and
614
+ # resource group. The operation does not delete other resources created as part
615
+ # of creating a container service, including storage accounts, VMs, and
616
+ # availability sets. All the other resources created with the container service
617
+ # are part of the same resource group and can be deleted individually.
618
+ #
619
+ # @param resource_group_name [String] The name of the resource group.
620
+ # @param container_service_name [String] The name of the container service in
621
+ # the specified subscription and resource group.
622
+ # @param [Hash{String => String}] A hash of custom headers that will be added
623
+ # to the HTTP request.
624
+ #
625
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
626
+ #
627
+ def begin_delete_async(resource_group_name, container_service_name, custom_headers:nil)
628
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
629
+ fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
630
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
631
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
632
+
633
+
634
+ request_headers = {}
635
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
636
+
637
+ # Set Headers
638
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
639
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
640
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'
641
+
642
+ request_url = @base_url || @client.base_url
643
+
644
+ options = {
645
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
646
+ path_params: {'resourceGroupName' => resource_group_name,'containerServiceName' => container_service_name,'subscriptionId' => @client.subscription_id},
647
+ query_params: {'api-version' => @client.api_version},
648
+ headers: request_headers.merge(custom_headers || {}),
649
+ base_url: request_url
650
+ }
651
+ promise = @client.make_request_async(:delete, path_template, options)
652
+
653
+ promise = promise.then do |result|
654
+ http_response = result.response
655
+ status_code = http_response.status
656
+ response_content = http_response.body
657
+ unless status_code == 202 || status_code == 204
658
+ error_model = JSON.load(response_content)
659
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
660
+ end
661
+
662
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
663
+
664
+ result
665
+ end
666
+
667
+ promise.execute
668
+ end
669
+
670
+ #
671
+ # Gets a list of container services in the specified subscription.
672
+ #
673
+ # Gets a list of container services in the specified subscription. The
674
+ # operation returns properties of each container service including state,
675
+ # orchestrator, number of masters and agents, and FQDNs of masters and agents.
676
+ #
677
+ # @param next_page_link [String] The NextLink from the previous successful call
678
+ # to List operation.
679
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
680
+ # will be added to the HTTP request.
681
+ #
682
+ # @return [ContainerServiceListResult] operation results.
683
+ #
684
+ def list_next(next_page_link, custom_headers:nil)
685
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
686
+ response.body unless response.nil?
687
+ end
688
+
689
+ #
690
+ # Gets a list of container services in the specified subscription.
691
+ #
692
+ # Gets a list of container services in the specified subscription. The
693
+ # operation returns properties of each container service including state,
694
+ # orchestrator, number of masters and agents, and FQDNs of masters and agents.
695
+ #
696
+ # @param next_page_link [String] The NextLink from the previous successful call
697
+ # to List operation.
698
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
699
+ # will be added to the HTTP request.
700
+ #
701
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
702
+ #
703
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
704
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
705
+ end
706
+
707
+ #
708
+ # Gets a list of container services in the specified subscription.
709
+ #
710
+ # Gets a list of container services in the specified subscription. The
711
+ # operation returns properties of each container service including state,
712
+ # orchestrator, number of masters and agents, and FQDNs of masters and agents.
713
+ #
714
+ # @param next_page_link [String] The NextLink from the previous successful call
715
+ # to List operation.
716
+ # @param [Hash{String => String}] A hash of custom headers that will be added
717
+ # to the HTTP request.
718
+ #
719
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
720
+ #
721
+ def list_next_async(next_page_link, custom_headers:nil)
722
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
723
+
724
+
725
+ request_headers = {}
726
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
727
+
728
+ # Set Headers
729
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
730
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
731
+ path_template = '{nextLink}'
732
+
733
+ request_url = @base_url || @client.base_url
734
+
735
+ options = {
736
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
737
+ skip_encoding_path_params: {'nextLink' => next_page_link},
738
+ headers: request_headers.merge(custom_headers || {}),
739
+ base_url: request_url
740
+ }
741
+ promise = @client.make_request_async(:get, path_template, options)
742
+
743
+ promise = promise.then do |result|
744
+ http_response = result.response
745
+ status_code = http_response.status
746
+ response_content = http_response.body
747
+ unless status_code == 200
748
+ error_model = JSON.load(response_content)
749
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
750
+ end
751
+
752
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
753
+ # Deserialize Response
754
+ if status_code == 200
755
+ begin
756
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
757
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerServiceListResult.mapper()
758
+ result.body = @client.deserialize(result_mapper, parsed_response)
759
+ rescue Exception => e
760
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
761
+ end
762
+ end
763
+
764
+ result
765
+ end
766
+
767
+ promise.execute
768
+ end
769
+
770
+ #
771
+ # Gets a list of container services in the specified resource group.
772
+ #
773
+ # Gets a list of container services in the specified subscription and resource
774
+ # group. The operation returns properties of each container service including
775
+ # state, orchestrator, number of masters and agents, and FQDNs of masters and
776
+ # agents.
777
+ #
778
+ # @param next_page_link [String] The NextLink from the previous successful call
779
+ # to List operation.
780
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
781
+ # will be added to the HTTP request.
782
+ #
783
+ # @return [ContainerServiceListResult] operation results.
784
+ #
785
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
786
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
787
+ response.body unless response.nil?
788
+ end
789
+
790
+ #
791
+ # Gets a list of container services in the specified resource group.
792
+ #
793
+ # Gets a list of container services in the specified subscription and resource
794
+ # group. The operation returns properties of each container service including
795
+ # state, orchestrator, number of masters and agents, and FQDNs of masters and
796
+ # agents.
797
+ #
798
+ # @param next_page_link [String] The NextLink from the previous successful call
799
+ # to List operation.
800
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
801
+ # will be added to the HTTP request.
802
+ #
803
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
804
+ #
805
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
806
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
807
+ end
808
+
809
+ #
810
+ # Gets a list of container services in the specified resource group.
811
+ #
812
+ # Gets a list of container services in the specified subscription and resource
813
+ # group. The operation returns properties of each container service including
814
+ # state, orchestrator, number of masters and agents, and FQDNs of masters and
815
+ # agents.
816
+ #
817
+ # @param next_page_link [String] The NextLink from the previous successful call
818
+ # to List operation.
819
+ # @param [Hash{String => String}] A hash of custom headers that will be added
820
+ # to the HTTP request.
821
+ #
822
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
823
+ #
824
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
825
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
826
+
827
+
828
+ request_headers = {}
829
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
830
+
831
+ # Set Headers
832
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
833
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
834
+ path_template = '{nextLink}'
835
+
836
+ request_url = @base_url || @client.base_url
837
+
838
+ options = {
839
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
840
+ skip_encoding_path_params: {'nextLink' => next_page_link},
841
+ headers: request_headers.merge(custom_headers || {}),
842
+ base_url: request_url
843
+ }
844
+ promise = @client.make_request_async(:get, path_template, options)
845
+
846
+ promise = promise.then do |result|
847
+ http_response = result.response
848
+ status_code = http_response.status
849
+ response_content = http_response.body
850
+ unless status_code == 200
851
+ error_model = JSON.load(response_content)
852
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
853
+ end
854
+
855
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
856
+ # Deserialize Response
857
+ if status_code == 200
858
+ begin
859
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
860
+ result_mapper = Azure::ContainerService::Mgmt::V2017_07_01::Models::ContainerServiceListResult.mapper()
861
+ result.body = @client.deserialize(result_mapper, parsed_response)
862
+ rescue Exception => e
863
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
864
+ end
865
+ end
866
+
867
+ result
868
+ end
869
+
870
+ promise.execute
871
+ end
872
+
873
+ #
874
+ # Gets a list of container services in the specified subscription.
875
+ #
876
+ # Gets a list of container services in the specified subscription. The
877
+ # operation returns properties of each container service including state,
878
+ # orchestrator, number of masters and agents, and FQDNs of masters and agents.
879
+ #
880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
881
+ # will be added to the HTTP request.
882
+ #
883
+ # @return [ContainerServiceListResult] which provide lazy access to pages of
884
+ # the response.
885
+ #
886
+ def list_as_lazy(custom_headers:nil)
887
+ response = list_async(custom_headers:custom_headers).value!
888
+ unless response.nil?
889
+ page = response.body
890
+ page.next_method = Proc.new do |next_page_link|
891
+ list_next_async(next_page_link, custom_headers:custom_headers)
892
+ end
893
+ page
894
+ end
895
+ end
896
+
897
+ #
898
+ # Gets a list of container services in the specified resource group.
899
+ #
900
+ # Gets a list of container services in the specified subscription and resource
901
+ # group. The operation returns properties of each container service including
902
+ # state, orchestrator, number of masters and agents, and FQDNs of masters and
903
+ # agents.
904
+ #
905
+ # @param resource_group_name [String] The name of the resource group.
906
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
907
+ # will be added to the HTTP request.
908
+ #
909
+ # @return [ContainerServiceListResult] which provide lazy access to pages of
910
+ # the response.
911
+ #
912
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
913
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
914
+ unless response.nil?
915
+ page = response.body
916
+ page.next_method = Proc.new do |next_page_link|
917
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
918
+ end
919
+ page
920
+ end
921
+ end
922
+
923
+ end
924
+ end