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
@@ -0,0 +1,63 @@
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
+ module Models
8
+ #
9
+ # Profile for Windows VMs in the container service cluster.
10
+ #
11
+ class ContainerServiceWindowsProfile
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The administrator username to use for Windows VMs.
16
+ attr_accessor :admin_username
17
+
18
+ # @return [String] The administrator password to use for Windows VMs.
19
+ attr_accessor :admin_password
20
+
21
+
22
+ #
23
+ # Mapper for ContainerServiceWindowsProfile class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'ContainerServiceWindowsProfile',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'ContainerServiceWindowsProfile',
34
+ model_properties: {
35
+ admin_username: {
36
+ client_side_validation: true,
37
+ required: true,
38
+ serialized_name: 'adminUsername',
39
+ constraints: {
40
+ Pattern: '^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'
41
+ },
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ admin_password: {
47
+ client_side_validation: true,
48
+ required: true,
49
+ serialized_name: 'adminPassword',
50
+ constraints: {
51
+ Pattern: '^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'
52
+ },
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,68 @@
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
+ module Models
8
+ #
9
+ # Reference to a secret stored in Azure Key Vault.
10
+ #
11
+ class KeyVaultSecretRef
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Key vault identifier.
16
+ attr_accessor :vault_id
17
+
18
+ # @return [String] The secret name.
19
+ attr_accessor :secret_name
20
+
21
+ # @return [String] The secret version.
22
+ attr_accessor :version
23
+
24
+
25
+ #
26
+ # Mapper for KeyVaultSecretRef class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'KeyVaultSecretRef',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'KeyVaultSecretRef',
37
+ model_properties: {
38
+ vault_id: {
39
+ client_side_validation: true,
40
+ required: true,
41
+ serialized_name: 'vaultID',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ secret_name: {
47
+ client_side_validation: true,
48
+ required: true,
49
+ serialized_name: 'secretName',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ version: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ serialized_name: 'version',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,16 @@
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
+ module Models
8
+ #
9
+ # Defines values for OSType
10
+ #
11
+ module OSType
12
+ Linux = "Linux"
13
+ Windows = "Windows"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,101 @@
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
+ module Models
8
+ #
9
+ # The Resource model definition.
10
+ #
11
+ class Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Resource Id
16
+ attr_accessor :id
17
+
18
+ # @return [String] Resource name
19
+ attr_accessor :name
20
+
21
+ # @return [String] Resource type
22
+ attr_accessor :type
23
+
24
+ # @return [String] Resource location
25
+ attr_accessor :location
26
+
27
+ # @return [Hash{String => String}] Resource tags
28
+ attr_accessor :tags
29
+
30
+
31
+ #
32
+ # Mapper for Resource class as Ruby Hash.
33
+ # This will be used for serialization/deserialization.
34
+ #
35
+ def self.mapper()
36
+ {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'Resource',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'Resource',
43
+ model_properties: {
44
+ id: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'id',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ name: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ read_only: true,
57
+ serialized_name: 'name',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ type: {
63
+ client_side_validation: true,
64
+ required: false,
65
+ read_only: true,
66
+ serialized_name: 'type',
67
+ type: {
68
+ name: 'String'
69
+ }
70
+ },
71
+ location: {
72
+ client_side_validation: true,
73
+ required: true,
74
+ serialized_name: 'location',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ },
79
+ tags: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ serialized_name: 'tags',
83
+ type: {
84
+ name: 'Dictionary',
85
+ value: {
86
+ client_side_validation: true,
87
+ required: false,
88
+ serialized_name: 'StringElementType',
89
+ type: {
90
+ name: 'String'
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::ContainerService end
8
+ module Azure::ContainerService::Mgmt end
9
+ module Azure::ContainerService::Mgmt::V2017_07_01 end
@@ -0,0 +1,48 @@
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-08-31/generated/azure_mgmt_container_service/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ContainerService::Mgmt::V2017_08_31
23
+ autoload :ManagedClusters, '2017-08-31/generated/azure_mgmt_container_service/managed_clusters.rb'
24
+ autoload :ContainerServiceClient, '2017-08-31/generated/azure_mgmt_container_service/container_service_client.rb'
25
+
26
+ module Models
27
+ autoload :ContainerServiceLinuxProfile, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb'
28
+ autoload :ContainerServiceVMDiagnostics, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb'
29
+ autoload :KeyVaultSecretRef, '2017-08-31/generated/azure_mgmt_container_service/models/key_vault_secret_ref.rb'
30
+ autoload :ContainerServiceDiagnosticsProfile, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb'
31
+ autoload :ContainerServiceMasterProfile, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_master_profile.rb'
32
+ autoload :ContainerServiceAgentPoolProfile, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_agent_pool_profile.rb'
33
+ autoload :ContainerServiceWindowsProfile, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_windows_profile.rb'
34
+ autoload :ContainerServiceSshConfiguration, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb'
35
+ autoload :ManagedClusterListResult, '2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb'
36
+ autoload :ContainerServiceServicePrincipalProfile, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_service_principal_profile.rb'
37
+ autoload :OrchestratorProfile, '2017-08-31/generated/azure_mgmt_container_service/models/orchestrator_profile.rb'
38
+ autoload :Resource, '2017-08-31/generated/azure_mgmt_container_service/models/resource.rb'
39
+ autoload :ManagedClusterUpgradeProfile, '2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb'
40
+ autoload :ContainerServiceSshPublicKey, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb'
41
+ autoload :ManagedClusterPoolUpgradeProfile, '2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb'
42
+ autoload :ManagedCluster, '2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster.rb'
43
+ autoload :ManagedClusterAccessProfile, '2017-08-31/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb'
44
+ autoload :ContainerServiceStorageProfileTypes, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb'
45
+ autoload :ContainerServiceVMSizeTypes, '2017-08-31/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb'
46
+ autoload :OSType, '2017-08-31/generated/azure_mgmt_container_service/models/ostype.rb'
47
+ end
48
+ 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_08_31
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 [ManagedClusters] managed_clusters
41
+ attr_reader :managed_clusters
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
+ @managed_clusters = ManagedClusters.new(self)
57
+ @api_version = '2017-08-31'
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,1172 @@
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_08_31
7
+ #
8
+ # The Container Service Client.
9
+ #
10
+ class ManagedClusters
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ManagedClusters 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 managed clusters in the specified subscription.
26
+ #
27
+ # Gets a list of managed clusters in the specified subscription. The operation
28
+ # returns properties of each managed cluster.
29
+ #
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<ManagedCluster>] operation results.
34
+ #
35
+ def list(custom_headers:nil)
36
+ first_page = list_as_lazy(custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # Gets a list of managed clusters in the specified subscription.
42
+ #
43
+ # Gets a list of managed clusters in the specified subscription. The operation
44
+ # returns properties of each managed cluster.
45
+ #
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_with_http_info(custom_headers:nil)
52
+ list_async(custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Gets a list of managed clusters in the specified subscription.
57
+ #
58
+ # Gets a list of managed clusters in the specified subscription. The operation
59
+ # returns properties of each managed cluster.
60
+ #
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_async(custom_headers:nil)
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+
70
+
71
+ request_headers = {}
72
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
73
+
74
+ # Set Headers
75
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
76
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
77
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'
78
+
79
+ request_url = @base_url || @client.base_url
80
+
81
+ options = {
82
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
83
+ path_params: {'subscriptionId' => @client.subscription_id},
84
+ query_params: {'api-version' => @client.api_version},
85
+ headers: request_headers.merge(custom_headers || {}),
86
+ base_url: request_url
87
+ }
88
+ promise = @client.make_request_async(:get, path_template, options)
89
+
90
+ promise = promise.then do |result|
91
+ http_response = result.response
92
+ status_code = http_response.status
93
+ response_content = http_response.body
94
+ unless status_code == 200
95
+ error_model = JSON.load(response_content)
96
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
97
+ end
98
+
99
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
100
+ # Deserialize Response
101
+ if status_code == 200
102
+ begin
103
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
104
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedClusterListResult.mapper()
105
+ result.body = @client.deserialize(result_mapper, parsed_response)
106
+ rescue Exception => e
107
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
108
+ end
109
+ end
110
+
111
+ result
112
+ end
113
+
114
+ promise.execute
115
+ end
116
+
117
+ #
118
+ # Lists managed clusters in the specified subscription and resource group.
119
+ #
120
+ # Lists managed clusters in the specified subscription and resource group. The
121
+ # operation returns properties of each managed cluster.
122
+ #
123
+ # @param resource_group_name [String] The name of the resource group.
124
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
125
+ # will be added to the HTTP request.
126
+ #
127
+ # @return [Array<ManagedCluster>] operation results.
128
+ #
129
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
130
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
131
+ first_page.get_all_items
132
+ end
133
+
134
+ #
135
+ # Lists managed clusters in the specified subscription and resource group.
136
+ #
137
+ # Lists managed clusters in the specified subscription and resource group. The
138
+ # operation returns properties of each managed cluster.
139
+ #
140
+ # @param resource_group_name [String] The name of the resource group.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
145
+ #
146
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
147
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
148
+ end
149
+
150
+ #
151
+ # Lists managed clusters in the specified subscription and resource group.
152
+ #
153
+ # Lists managed clusters in the specified subscription and resource group. The
154
+ # operation returns properties of each managed cluster.
155
+ #
156
+ # @param resource_group_name [String] The name of the resource group.
157
+ # @param [Hash{String => String}] A hash of custom headers that will be added
158
+ # to the HTTP request.
159
+ #
160
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
161
+ #
162
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
163
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
164
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
165
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
166
+
167
+
168
+ request_headers = {}
169
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
170
+
171
+ # Set Headers
172
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
173
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
174
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'
175
+
176
+ request_url = @base_url || @client.base_url
177
+
178
+ options = {
179
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
180
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
181
+ query_params: {'api-version' => @client.api_version},
182
+ headers: request_headers.merge(custom_headers || {}),
183
+ base_url: request_url
184
+ }
185
+ promise = @client.make_request_async(:get, path_template, options)
186
+
187
+ promise = promise.then do |result|
188
+ http_response = result.response
189
+ status_code = http_response.status
190
+ response_content = http_response.body
191
+ unless status_code == 200
192
+ error_model = JSON.load(response_content)
193
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
194
+ end
195
+
196
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
197
+ # Deserialize Response
198
+ if status_code == 200
199
+ begin
200
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
201
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedClusterListResult.mapper()
202
+ result.body = @client.deserialize(result_mapper, parsed_response)
203
+ rescue Exception => e
204
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
205
+ end
206
+ end
207
+
208
+ result
209
+ end
210
+
211
+ promise.execute
212
+ end
213
+
214
+ #
215
+ # Gets upgrade profile for a managed cluster.
216
+ #
217
+ # Gets the details of the upgrade profile for a managed cluster with a
218
+ # specified resource group and name.
219
+ #
220
+ # @param resource_group_name [String] The name of the resource group.
221
+ # @param resource_name [String] The name of the managed cluster resource.
222
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
223
+ # will be added to the HTTP request.
224
+ #
225
+ # @return [ManagedClusterUpgradeProfile] operation results.
226
+ #
227
+ def get_upgrade_profile(resource_group_name, resource_name, custom_headers:nil)
228
+ response = get_upgrade_profile_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
229
+ response.body unless response.nil?
230
+ end
231
+
232
+ #
233
+ # Gets upgrade profile for a managed cluster.
234
+ #
235
+ # Gets the details of the upgrade profile for a managed cluster with a
236
+ # specified resource group and name.
237
+ #
238
+ # @param resource_group_name [String] The name of the resource group.
239
+ # @param resource_name [String] The name of the managed cluster resource.
240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
+ # will be added to the HTTP request.
242
+ #
243
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
244
+ #
245
+ def get_upgrade_profile_with_http_info(resource_group_name, resource_name, custom_headers:nil)
246
+ get_upgrade_profile_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
247
+ end
248
+
249
+ #
250
+ # Gets upgrade profile for a managed cluster.
251
+ #
252
+ # Gets the details of the upgrade profile for a managed cluster with a
253
+ # specified resource group and name.
254
+ #
255
+ # @param resource_group_name [String] The name of the resource group.
256
+ # @param resource_name [String] The name of the managed cluster resource.
257
+ # @param [Hash{String => String}] A hash of custom headers that will be added
258
+ # to the HTTP request.
259
+ #
260
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
261
+ #
262
+ def get_upgrade_profile_async(resource_group_name, resource_name, custom_headers:nil)
263
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
264
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
265
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
266
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
267
+
268
+
269
+ request_headers = {}
270
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
271
+
272
+ # Set Headers
273
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
274
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
275
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'
276
+
277
+ request_url = @base_url || @client.base_url
278
+
279
+ options = {
280
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
281
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
282
+ query_params: {'api-version' => @client.api_version},
283
+ headers: request_headers.merge(custom_headers || {}),
284
+ base_url: request_url
285
+ }
286
+ promise = @client.make_request_async(:get, path_template, options)
287
+
288
+ promise = promise.then do |result|
289
+ http_response = result.response
290
+ status_code = http_response.status
291
+ response_content = http_response.body
292
+ unless status_code == 200
293
+ error_model = JSON.load(response_content)
294
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
295
+ end
296
+
297
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
298
+ # Deserialize Response
299
+ if status_code == 200
300
+ begin
301
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
302
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedClusterUpgradeProfile.mapper()
303
+ result.body = @client.deserialize(result_mapper, parsed_response)
304
+ rescue Exception => e
305
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
306
+ end
307
+ end
308
+
309
+ result
310
+ end
311
+
312
+ promise.execute
313
+ end
314
+
315
+ #
316
+ # Gets an access profile of a managed cluster.
317
+ #
318
+ # Gets the accessProfile for the specified role name of the managed cluster
319
+ # with a specified resource group and name.
320
+ #
321
+ # @param resource_group_name [String] The name of the resource group.
322
+ # @param resource_name [String] The name of the managed cluster resource.
323
+ # @param role_name [String] The name of the role for managed cluster
324
+ # accessProfile resource.
325
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
326
+ # will be added to the HTTP request.
327
+ #
328
+ # @return [ManagedClusterAccessProfile] operation results.
329
+ #
330
+ def get_access_profile(resource_group_name, resource_name, role_name, custom_headers:nil)
331
+ response = get_access_profile_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value!
332
+ response.body unless response.nil?
333
+ end
334
+
335
+ #
336
+ # Gets an access profile of a managed cluster.
337
+ #
338
+ # Gets the accessProfile for the specified role name of the managed cluster
339
+ # with a specified resource group and name.
340
+ #
341
+ # @param resource_group_name [String] The name of the resource group.
342
+ # @param resource_name [String] The name of the managed cluster resource.
343
+ # @param role_name [String] The name of the role for managed cluster
344
+ # accessProfile resource.
345
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
346
+ # will be added to the HTTP request.
347
+ #
348
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
349
+ #
350
+ def get_access_profile_with_http_info(resource_group_name, resource_name, role_name, custom_headers:nil)
351
+ get_access_profile_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value!
352
+ end
353
+
354
+ #
355
+ # Gets an access profile of a managed cluster.
356
+ #
357
+ # Gets the accessProfile for the specified role name of the managed cluster
358
+ # with a specified resource group and name.
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group.
361
+ # @param resource_name [String] The name of the managed cluster resource.
362
+ # @param role_name [String] The name of the role for managed cluster
363
+ # accessProfile resource.
364
+ # @param [Hash{String => String}] A hash of custom headers that will be added
365
+ # to the HTTP request.
366
+ #
367
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
368
+ #
369
+ def get_access_profile_async(resource_group_name, resource_name, role_name, custom_headers:nil)
370
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
371
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
372
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
373
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
374
+ fail ArgumentError, 'role_name is nil' if role_name.nil?
375
+
376
+
377
+ request_headers = {}
378
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
379
+
380
+ # Set Headers
381
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
382
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
383
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'
384
+
385
+ request_url = @base_url || @client.base_url
386
+
387
+ options = {
388
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
389
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'roleName' => role_name},
390
+ query_params: {'api-version' => @client.api_version},
391
+ headers: request_headers.merge(custom_headers || {}),
392
+ base_url: request_url
393
+ }
394
+ promise = @client.make_request_async(:post, path_template, options)
395
+
396
+ promise = promise.then do |result|
397
+ http_response = result.response
398
+ status_code = http_response.status
399
+ response_content = http_response.body
400
+ unless status_code == 200
401
+ error_model = JSON.load(response_content)
402
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
403
+ end
404
+
405
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
406
+ # Deserialize Response
407
+ if status_code == 200
408
+ begin
409
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
410
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedClusterAccessProfile.mapper()
411
+ result.body = @client.deserialize(result_mapper, parsed_response)
412
+ rescue Exception => e
413
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
414
+ end
415
+ end
416
+
417
+ result
418
+ end
419
+
420
+ promise.execute
421
+ end
422
+
423
+ #
424
+ # Gets access profile of a managed cluster.
425
+ #
426
+ # Use ManagedClusters_GetAccessProfile instead.
427
+ #
428
+ # @param resource_group_name [String] The name of the resource group.
429
+ # @param resource_name [String] The name of the managed cluster resource.
430
+ # @param role_name [String] The name of the role for managed cluster
431
+ # accessProfile resource.
432
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
433
+ # will be added to the HTTP request.
434
+ #
435
+ # @return [ManagedClusterAccessProfile] operation results.
436
+ #
437
+ def get_access_profiles(resource_group_name, resource_name, role_name, custom_headers:nil)
438
+ response = get_access_profiles_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value!
439
+ response.body unless response.nil?
440
+ end
441
+
442
+ #
443
+ # Gets access profile of a managed cluster.
444
+ #
445
+ # Use ManagedClusters_GetAccessProfile instead.
446
+ #
447
+ # @param resource_group_name [String] The name of the resource group.
448
+ # @param resource_name [String] The name of the managed cluster resource.
449
+ # @param role_name [String] The name of the role for managed cluster
450
+ # accessProfile resource.
451
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
452
+ # will be added to the HTTP request.
453
+ #
454
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
455
+ #
456
+ def get_access_profiles_with_http_info(resource_group_name, resource_name, role_name, custom_headers:nil)
457
+ get_access_profiles_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value!
458
+ end
459
+
460
+ #
461
+ # Gets access profile of a managed cluster.
462
+ #
463
+ # Use ManagedClusters_GetAccessProfile instead.
464
+ #
465
+ # @param resource_group_name [String] The name of the resource group.
466
+ # @param resource_name [String] The name of the managed cluster resource.
467
+ # @param role_name [String] The name of the role for managed cluster
468
+ # accessProfile resource.
469
+ # @param [Hash{String => String}] A hash of custom headers that will be added
470
+ # to the HTTP request.
471
+ #
472
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
473
+ #
474
+ def get_access_profiles_async(resource_group_name, resource_name, role_name, custom_headers:nil)
475
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
476
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
477
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
478
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
479
+ fail ArgumentError, 'role_name is nil' if role_name.nil?
480
+
481
+
482
+ request_headers = {}
483
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
484
+
485
+ # Set Headers
486
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
487
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
488
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}'
489
+
490
+ request_url = @base_url || @client.base_url
491
+
492
+ options = {
493
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
494
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'roleName' => role_name},
495
+ query_params: {'api-version' => @client.api_version},
496
+ headers: request_headers.merge(custom_headers || {}),
497
+ base_url: request_url
498
+ }
499
+ promise = @client.make_request_async(:get, path_template, options)
500
+
501
+ promise = promise.then do |result|
502
+ http_response = result.response
503
+ status_code = http_response.status
504
+ response_content = http_response.body
505
+ unless status_code == 200
506
+ error_model = JSON.load(response_content)
507
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
508
+ end
509
+
510
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
511
+ # Deserialize Response
512
+ if status_code == 200
513
+ begin
514
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
515
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedClusterAccessProfile.mapper()
516
+ result.body = @client.deserialize(result_mapper, parsed_response)
517
+ rescue Exception => e
518
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
519
+ end
520
+ end
521
+
522
+ result
523
+ end
524
+
525
+ promise.execute
526
+ end
527
+
528
+ #
529
+ # Gets a managed cluster.
530
+ #
531
+ # Gets the details of the managed cluster with a specified resource group and
532
+ # name.
533
+ #
534
+ # @param resource_group_name [String] The name of the resource group.
535
+ # @param resource_name [String] The name of the managed cluster resource.
536
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
537
+ # will be added to the HTTP request.
538
+ #
539
+ # @return [ManagedCluster] operation results.
540
+ #
541
+ def get(resource_group_name, resource_name, custom_headers:nil)
542
+ response = get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
543
+ response.body unless response.nil?
544
+ end
545
+
546
+ #
547
+ # Gets a managed cluster.
548
+ #
549
+ # Gets the details of the managed cluster with a specified resource group and
550
+ # name.
551
+ #
552
+ # @param resource_group_name [String] The name of the resource group.
553
+ # @param resource_name [String] The name of the managed cluster resource.
554
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
555
+ # will be added to the HTTP request.
556
+ #
557
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
558
+ #
559
+ def get_with_http_info(resource_group_name, resource_name, custom_headers:nil)
560
+ get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
561
+ end
562
+
563
+ #
564
+ # Gets a managed cluster.
565
+ #
566
+ # Gets the details of the managed cluster with a specified resource group and
567
+ # name.
568
+ #
569
+ # @param resource_group_name [String] The name of the resource group.
570
+ # @param resource_name [String] The name of the managed cluster resource.
571
+ # @param [Hash{String => String}] A hash of custom headers that will be added
572
+ # to the HTTP request.
573
+ #
574
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
575
+ #
576
+ def get_async(resource_group_name, resource_name, custom_headers:nil)
577
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
578
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
579
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
580
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
581
+
582
+
583
+ request_headers = {}
584
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
585
+
586
+ # Set Headers
587
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
588
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
589
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'
590
+
591
+ request_url = @base_url || @client.base_url
592
+
593
+ options = {
594
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
595
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
596
+ query_params: {'api-version' => @client.api_version},
597
+ headers: request_headers.merge(custom_headers || {}),
598
+ base_url: request_url
599
+ }
600
+ promise = @client.make_request_async(:get, path_template, options)
601
+
602
+ promise = promise.then do |result|
603
+ http_response = result.response
604
+ status_code = http_response.status
605
+ response_content = http_response.body
606
+ unless status_code == 200
607
+ error_model = JSON.load(response_content)
608
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
609
+ end
610
+
611
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
612
+ # Deserialize Response
613
+ if status_code == 200
614
+ begin
615
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
616
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedCluster.mapper()
617
+ result.body = @client.deserialize(result_mapper, parsed_response)
618
+ rescue Exception => e
619
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
620
+ end
621
+ end
622
+
623
+ result
624
+ end
625
+
626
+ promise.execute
627
+ end
628
+
629
+ #
630
+ # Creates or updates a managed cluster.
631
+ #
632
+ # Creates or updates a managed cluster with the specified configuration for
633
+ # agents and Kubernetes version.
634
+ #
635
+ # @param resource_group_name [String] The name of the resource group.
636
+ # @param resource_name [String] The name of the managed cluster resource.
637
+ # @param parameters [ManagedCluster] Parameters supplied to the Create or
638
+ # Update a Managed Cluster operation.
639
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
640
+ # will be added to the HTTP request.
641
+ #
642
+ # @return [ManagedCluster] operation results.
643
+ #
644
+ def create_or_update(resource_group_name, resource_name, parameters, custom_headers:nil)
645
+ response = create_or_update_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers).value!
646
+ response.body unless response.nil?
647
+ end
648
+
649
+ #
650
+ # @param resource_group_name [String] The name of the resource group.
651
+ # @param resource_name [String] The name of the managed cluster resource.
652
+ # @param parameters [ManagedCluster] Parameters supplied to the Create or
653
+ # Update a Managed Cluster operation.
654
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
655
+ # will be added to the HTTP request.
656
+ #
657
+ # @return [Concurrent::Promise] promise which provides async access to http
658
+ # response.
659
+ #
660
+ def create_or_update_async(resource_group_name, resource_name, parameters, custom_headers:nil)
661
+ # Send request
662
+ promise = begin_create_or_update_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers)
663
+
664
+ promise = promise.then do |response|
665
+ # Defining deserialization method.
666
+ deserialize_method = lambda do |parsed_response|
667
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedCluster.mapper()
668
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
669
+ end
670
+
671
+ # Waiting for response.
672
+ @client.get_long_running_operation_result(response, deserialize_method)
673
+ end
674
+
675
+ promise
676
+ end
677
+
678
+ #
679
+ # Deletes a managed cluster.
680
+ #
681
+ # Deletes the managed cluster with a specified resource group and name.
682
+ #
683
+ # @param resource_group_name [String] The name of the resource group.
684
+ # @param resource_name [String] The name of the managed cluster resource.
685
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
686
+ # will be added to the HTTP request.
687
+ #
688
+ def delete(resource_group_name, resource_name, custom_headers:nil)
689
+ response = delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
690
+ nil
691
+ end
692
+
693
+ #
694
+ # @param resource_group_name [String] The name of the resource group.
695
+ # @param resource_name [String] The name of the managed cluster resource.
696
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
697
+ # will be added to the HTTP request.
698
+ #
699
+ # @return [Concurrent::Promise] promise which provides async access to http
700
+ # response.
701
+ #
702
+ def delete_async(resource_group_name, resource_name, custom_headers:nil)
703
+ # Send request
704
+ promise = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers)
705
+
706
+ promise = promise.then do |response|
707
+ # Defining deserialization method.
708
+ deserialize_method = lambda do |parsed_response|
709
+ end
710
+
711
+ # Waiting for response.
712
+ @client.get_long_running_operation_result(response, deserialize_method)
713
+ end
714
+
715
+ promise
716
+ end
717
+
718
+ #
719
+ # Creates or updates a managed cluster.
720
+ #
721
+ # Creates or updates a managed cluster with the specified configuration for
722
+ # agents and Kubernetes version.
723
+ #
724
+ # @param resource_group_name [String] The name of the resource group.
725
+ # @param resource_name [String] The name of the managed cluster resource.
726
+ # @param parameters [ManagedCluster] Parameters supplied to the Create or
727
+ # Update a Managed Cluster operation.
728
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
729
+ # will be added to the HTTP request.
730
+ #
731
+ # @return [ManagedCluster] operation results.
732
+ #
733
+ def begin_create_or_update(resource_group_name, resource_name, parameters, custom_headers:nil)
734
+ response = begin_create_or_update_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers).value!
735
+ response.body unless response.nil?
736
+ end
737
+
738
+ #
739
+ # Creates or updates a managed cluster.
740
+ #
741
+ # Creates or updates a managed cluster with the specified configuration for
742
+ # agents and Kubernetes version.
743
+ #
744
+ # @param resource_group_name [String] The name of the resource group.
745
+ # @param resource_name [String] The name of the managed cluster resource.
746
+ # @param parameters [ManagedCluster] Parameters supplied to the Create or
747
+ # Update a Managed Cluster operation.
748
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
749
+ # will be added to the HTTP request.
750
+ #
751
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
752
+ #
753
+ def begin_create_or_update_with_http_info(resource_group_name, resource_name, parameters, custom_headers:nil)
754
+ begin_create_or_update_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers).value!
755
+ end
756
+
757
+ #
758
+ # Creates or updates a managed cluster.
759
+ #
760
+ # Creates or updates a managed cluster with the specified configuration for
761
+ # agents and Kubernetes version.
762
+ #
763
+ # @param resource_group_name [String] The name of the resource group.
764
+ # @param resource_name [String] The name of the managed cluster resource.
765
+ # @param parameters [ManagedCluster] Parameters supplied to the Create or
766
+ # Update a Managed Cluster operation.
767
+ # @param [Hash{String => String}] A hash of custom headers that will be added
768
+ # to the HTTP request.
769
+ #
770
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
771
+ #
772
+ def begin_create_or_update_async(resource_group_name, resource_name, parameters, custom_headers:nil)
773
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
774
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
775
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
776
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
777
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
778
+
779
+
780
+ request_headers = {}
781
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
782
+
783
+ # Set Headers
784
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
785
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
786
+
787
+ # Serialize Request
788
+ request_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedCluster.mapper()
789
+ request_content = @client.serialize(request_mapper, parameters)
790
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
791
+
792
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'
793
+
794
+ request_url = @base_url || @client.base_url
795
+
796
+ options = {
797
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
798
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
799
+ query_params: {'api-version' => @client.api_version},
800
+ body: request_content,
801
+ headers: request_headers.merge(custom_headers || {}),
802
+ base_url: request_url
803
+ }
804
+ promise = @client.make_request_async(:put, path_template, options)
805
+
806
+ promise = promise.then do |result|
807
+ http_response = result.response
808
+ status_code = http_response.status
809
+ response_content = http_response.body
810
+ unless status_code == 200 || status_code == 201
811
+ error_model = JSON.load(response_content)
812
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
813
+ end
814
+
815
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
816
+ # Deserialize Response
817
+ if status_code == 200
818
+ begin
819
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
820
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedCluster.mapper()
821
+ result.body = @client.deserialize(result_mapper, parsed_response)
822
+ rescue Exception => e
823
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
824
+ end
825
+ end
826
+ # Deserialize Response
827
+ if status_code == 201
828
+ begin
829
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
830
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedCluster.mapper()
831
+ result.body = @client.deserialize(result_mapper, parsed_response)
832
+ rescue Exception => e
833
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
834
+ end
835
+ end
836
+
837
+ result
838
+ end
839
+
840
+ promise.execute
841
+ end
842
+
843
+ #
844
+ # Deletes a managed cluster.
845
+ #
846
+ # Deletes the managed cluster with a specified resource group and name.
847
+ #
848
+ # @param resource_group_name [String] The name of the resource group.
849
+ # @param resource_name [String] The name of the managed cluster resource.
850
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
851
+ # will be added to the HTTP request.
852
+ #
853
+ #
854
+ def begin_delete(resource_group_name, resource_name, custom_headers:nil)
855
+ response = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
856
+ nil
857
+ end
858
+
859
+ #
860
+ # Deletes a managed cluster.
861
+ #
862
+ # Deletes the managed cluster with a specified resource group and name.
863
+ #
864
+ # @param resource_group_name [String] The name of the resource group.
865
+ # @param resource_name [String] The name of the managed cluster resource.
866
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
867
+ # will be added to the HTTP request.
868
+ #
869
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
870
+ #
871
+ def begin_delete_with_http_info(resource_group_name, resource_name, custom_headers:nil)
872
+ begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
873
+ end
874
+
875
+ #
876
+ # Deletes a managed cluster.
877
+ #
878
+ # Deletes the managed cluster with a specified resource group and name.
879
+ #
880
+ # @param resource_group_name [String] The name of the resource group.
881
+ # @param resource_name [String] The name of the managed cluster resource.
882
+ # @param [Hash{String => String}] A hash of custom headers that will be added
883
+ # to the HTTP request.
884
+ #
885
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
886
+ #
887
+ def begin_delete_async(resource_group_name, resource_name, custom_headers:nil)
888
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
889
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
890
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
891
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
892
+
893
+
894
+ request_headers = {}
895
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
896
+
897
+ # Set Headers
898
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
899
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
900
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'
901
+
902
+ request_url = @base_url || @client.base_url
903
+
904
+ options = {
905
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
906
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
907
+ query_params: {'api-version' => @client.api_version},
908
+ headers: request_headers.merge(custom_headers || {}),
909
+ base_url: request_url
910
+ }
911
+ promise = @client.make_request_async(:delete, path_template, options)
912
+
913
+ promise = promise.then do |result|
914
+ http_response = result.response
915
+ status_code = http_response.status
916
+ response_content = http_response.body
917
+ unless status_code == 202 || status_code == 204
918
+ error_model = JSON.load(response_content)
919
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
920
+ end
921
+
922
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
923
+
924
+ result
925
+ end
926
+
927
+ promise.execute
928
+ end
929
+
930
+ #
931
+ # Gets a list of managed clusters in the specified subscription.
932
+ #
933
+ # Gets a list of managed clusters in the specified subscription. The operation
934
+ # returns properties of each managed cluster.
935
+ #
936
+ # @param next_page_link [String] The NextLink from the previous successful call
937
+ # to List operation.
938
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
939
+ # will be added to the HTTP request.
940
+ #
941
+ # @return [ManagedClusterListResult] operation results.
942
+ #
943
+ def list_next(next_page_link, custom_headers:nil)
944
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
945
+ response.body unless response.nil?
946
+ end
947
+
948
+ #
949
+ # Gets a list of managed clusters in the specified subscription.
950
+ #
951
+ # Gets a list of managed clusters in the specified subscription. The operation
952
+ # returns properties of each managed cluster.
953
+ #
954
+ # @param next_page_link [String] The NextLink from the previous successful call
955
+ # to List operation.
956
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
957
+ # will be added to the HTTP request.
958
+ #
959
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
960
+ #
961
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
962
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
963
+ end
964
+
965
+ #
966
+ # Gets a list of managed clusters in the specified subscription.
967
+ #
968
+ # Gets a list of managed clusters in the specified subscription. The operation
969
+ # returns properties of each managed cluster.
970
+ #
971
+ # @param next_page_link [String] The NextLink from the previous successful call
972
+ # to List operation.
973
+ # @param [Hash{String => String}] A hash of custom headers that will be added
974
+ # to the HTTP request.
975
+ #
976
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
977
+ #
978
+ def list_next_async(next_page_link, custom_headers:nil)
979
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
980
+
981
+
982
+ request_headers = {}
983
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
984
+
985
+ # Set Headers
986
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
987
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
988
+ path_template = '{nextLink}'
989
+
990
+ request_url = @base_url || @client.base_url
991
+
992
+ options = {
993
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
994
+ skip_encoding_path_params: {'nextLink' => next_page_link},
995
+ headers: request_headers.merge(custom_headers || {}),
996
+ base_url: request_url
997
+ }
998
+ promise = @client.make_request_async(:get, path_template, options)
999
+
1000
+ promise = promise.then do |result|
1001
+ http_response = result.response
1002
+ status_code = http_response.status
1003
+ response_content = http_response.body
1004
+ unless status_code == 200
1005
+ error_model = JSON.load(response_content)
1006
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1007
+ end
1008
+
1009
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1010
+ # Deserialize Response
1011
+ if status_code == 200
1012
+ begin
1013
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1014
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedClusterListResult.mapper()
1015
+ result.body = @client.deserialize(result_mapper, parsed_response)
1016
+ rescue Exception => e
1017
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1018
+ end
1019
+ end
1020
+
1021
+ result
1022
+ end
1023
+
1024
+ promise.execute
1025
+ end
1026
+
1027
+ #
1028
+ # Lists managed clusters in the specified subscription and resource group.
1029
+ #
1030
+ # Lists managed clusters in the specified subscription and resource group. The
1031
+ # operation returns properties of each managed cluster.
1032
+ #
1033
+ # @param next_page_link [String] The NextLink from the previous successful call
1034
+ # to List operation.
1035
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1036
+ # will be added to the HTTP request.
1037
+ #
1038
+ # @return [ManagedClusterListResult] operation results.
1039
+ #
1040
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1041
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1042
+ response.body unless response.nil?
1043
+ end
1044
+
1045
+ #
1046
+ # Lists managed clusters in the specified subscription and resource group.
1047
+ #
1048
+ # Lists managed clusters in the specified subscription and resource group. The
1049
+ # operation returns properties of each managed cluster.
1050
+ #
1051
+ # @param next_page_link [String] The NextLink from the previous successful call
1052
+ # to List operation.
1053
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1054
+ # will be added to the HTTP request.
1055
+ #
1056
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1057
+ #
1058
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1059
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1060
+ end
1061
+
1062
+ #
1063
+ # Lists managed clusters in the specified subscription and resource group.
1064
+ #
1065
+ # Lists managed clusters in the specified subscription and resource group. The
1066
+ # operation returns properties of each managed cluster.
1067
+ #
1068
+ # @param next_page_link [String] The NextLink from the previous successful call
1069
+ # to List operation.
1070
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1071
+ # to the HTTP request.
1072
+ #
1073
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1074
+ #
1075
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1076
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1077
+
1078
+
1079
+ request_headers = {}
1080
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1081
+
1082
+ # Set Headers
1083
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1084
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1085
+ path_template = '{nextLink}'
1086
+
1087
+ request_url = @base_url || @client.base_url
1088
+
1089
+ options = {
1090
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1091
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1092
+ headers: request_headers.merge(custom_headers || {}),
1093
+ base_url: request_url
1094
+ }
1095
+ promise = @client.make_request_async(:get, path_template, options)
1096
+
1097
+ promise = promise.then do |result|
1098
+ http_response = result.response
1099
+ status_code = http_response.status
1100
+ response_content = http_response.body
1101
+ unless status_code == 200
1102
+ error_model = JSON.load(response_content)
1103
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1104
+ end
1105
+
1106
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1107
+ # Deserialize Response
1108
+ if status_code == 200
1109
+ begin
1110
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1111
+ result_mapper = Azure::ContainerService::Mgmt::V2017_08_31::Models::ManagedClusterListResult.mapper()
1112
+ result.body = @client.deserialize(result_mapper, parsed_response)
1113
+ rescue Exception => e
1114
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1115
+ end
1116
+ end
1117
+
1118
+ result
1119
+ end
1120
+
1121
+ promise.execute
1122
+ end
1123
+
1124
+ #
1125
+ # Gets a list of managed clusters in the specified subscription.
1126
+ #
1127
+ # Gets a list of managed clusters in the specified subscription. The operation
1128
+ # returns properties of each managed cluster.
1129
+ #
1130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1131
+ # will be added to the HTTP request.
1132
+ #
1133
+ # @return [ManagedClusterListResult] which provide lazy access to pages of the
1134
+ # response.
1135
+ #
1136
+ def list_as_lazy(custom_headers:nil)
1137
+ response = list_async(custom_headers:custom_headers).value!
1138
+ unless response.nil?
1139
+ page = response.body
1140
+ page.next_method = Proc.new do |next_page_link|
1141
+ list_next_async(next_page_link, custom_headers:custom_headers)
1142
+ end
1143
+ page
1144
+ end
1145
+ end
1146
+
1147
+ #
1148
+ # Lists managed clusters in the specified subscription and resource group.
1149
+ #
1150
+ # Lists managed clusters in the specified subscription and resource group. The
1151
+ # operation returns properties of each managed cluster.
1152
+ #
1153
+ # @param resource_group_name [String] The name of the resource group.
1154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1155
+ # will be added to the HTTP request.
1156
+ #
1157
+ # @return [ManagedClusterListResult] which provide lazy access to pages of the
1158
+ # response.
1159
+ #
1160
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1161
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1162
+ unless response.nil?
1163
+ page = response.body
1164
+ page.next_method = Proc.new do |next_page_link|
1165
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1166
+ end
1167
+ page
1168
+ end
1169
+ end
1170
+
1171
+ end
1172
+ end