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,131 @@
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_09_30
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 supported orchestrators in the specified subscription.
26
+ #
27
+ # Gets a list of supported orchestrators in the specified subscription. The
28
+ # operation returns properties of each orchestrator including verison and
29
+ # available upgrades.
30
+ #
31
+ # @param location [String] The name of a supported Azure region.
32
+ # @param resource_type [String] resource type for which the list of
33
+ # orchestrators needs to be returned
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [OrchestratorVersionProfileListResult] operation results.
38
+ #
39
+ def list_orchestrators(location, resource_type:nil, custom_headers:nil)
40
+ response = list_orchestrators_async(location, resource_type:resource_type, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Gets a list of supported orchestrators in the specified subscription.
46
+ #
47
+ # Gets a list of supported orchestrators in the specified subscription. The
48
+ # operation returns properties of each orchestrator including verison and
49
+ # available upgrades.
50
+ #
51
+ # @param location [String] The name of a supported Azure region.
52
+ # @param resource_type [String] resource type for which the list of
53
+ # orchestrators needs to be returned
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
58
+ #
59
+ def list_orchestrators_with_http_info(location, resource_type:nil, custom_headers:nil)
60
+ list_orchestrators_async(location, resource_type:resource_type, custom_headers:custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Gets a list of supported orchestrators in the specified subscription.
65
+ #
66
+ # Gets a list of supported orchestrators in the specified subscription. The
67
+ # operation returns properties of each orchestrator including verison and
68
+ # available upgrades.
69
+ #
70
+ # @param location [String] The name of a supported Azure region.
71
+ # @param resource_type [String] resource type for which the list of
72
+ # orchestrators needs to be returned
73
+ # @param [Hash{String => String}] A hash of custom headers that will be added
74
+ # to the HTTP request.
75
+ #
76
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
77
+ #
78
+ def list_orchestrators_async(location, resource_type:nil, custom_headers:nil)
79
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
80
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
81
+ fail ArgumentError, 'location is nil' if location.nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
97
+ query_params: {'api-version' => @client.api_version,'resource-type' => resource_type},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200
108
+ error_model = JSON.load(response_content)
109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ # Deserialize Response
114
+ if status_code == 200
115
+ begin
116
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
117
+ result_mapper = Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorVersionProfileListResult.mapper()
118
+ result.body = @client.deserialize(result_mapper, parsed_response)
119
+ rescue Exception => e
120
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
121
+ end
122
+ end
123
+
124
+ result
125
+ end
126
+
127
+ promise.execute
128
+ end
129
+
130
+ end
131
+ end
@@ -0,0 +1,57 @@
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_09_30
7
+ module Models
8
+ #
9
+ # Contains information about orchestrator.
10
+ #
11
+ class OrchestratorProfile
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Orchestrator type.
16
+ attr_accessor :orchestrator_type
17
+
18
+ # @return [String] Orchestrator version (major, minor, patch).
19
+ attr_accessor :orchestrator_version
20
+
21
+
22
+ #
23
+ # Mapper for OrchestratorProfile 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: 'OrchestratorProfile',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'OrchestratorProfile',
34
+ model_properties: {
35
+ orchestrator_type: {
36
+ client_side_validation: true,
37
+ required: true,
38
+ serialized_name: 'orchestratorType',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ orchestrator_version: {
44
+ client_side_validation: true,
45
+ required: true,
46
+ serialized_name: 'orchestratorVersion',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,89 @@
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_09_30
7
+ module Models
8
+ #
9
+ # The profile of an orchestrator and its available versions.
10
+ #
11
+ class OrchestratorVersionProfile
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Orchestrator type.
16
+ attr_accessor :orchestrator_type
17
+
18
+ # @return [String] Orchestrator version (major, minor, patch).
19
+ attr_accessor :orchestrator_version
20
+
21
+ # @return [Boolean] Installed by default if version is not specified.
22
+ attr_accessor :default
23
+
24
+ # @return [Array<OrchestratorProfile>] The list of available upgrade
25
+ # versions.
26
+ attr_accessor :upgrades
27
+
28
+
29
+ #
30
+ # Mapper for OrchestratorVersionProfile class as Ruby Hash.
31
+ # This will be used for serialization/deserialization.
32
+ #
33
+ def self.mapper()
34
+ {
35
+ client_side_validation: true,
36
+ required: false,
37
+ serialized_name: 'OrchestratorVersionProfile',
38
+ type: {
39
+ name: 'Composite',
40
+ class_name: 'OrchestratorVersionProfile',
41
+ model_properties: {
42
+ orchestrator_type: {
43
+ client_side_validation: true,
44
+ required: true,
45
+ serialized_name: 'orchestratorType',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ orchestrator_version: {
51
+ client_side_validation: true,
52
+ required: true,
53
+ serialized_name: 'orchestratorVersion',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ },
58
+ default: {
59
+ client_side_validation: true,
60
+ required: true,
61
+ serialized_name: 'default',
62
+ type: {
63
+ name: 'Boolean'
64
+ }
65
+ },
66
+ upgrades: {
67
+ client_side_validation: true,
68
+ required: true,
69
+ serialized_name: 'upgrades',
70
+ type: {
71
+ name: 'Sequence',
72
+ element: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ serialized_name: 'OrchestratorProfileElementType',
76
+ type: {
77
+ name: 'Composite',
78
+ class_name: 'OrchestratorProfile'
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,92 @@
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_09_30
7
+ module Models
8
+ #
9
+ # The list of versions for supported orchestrators.
10
+ #
11
+ class OrchestratorVersionProfileListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Id of the orchestrator version profile list result.
16
+ attr_accessor :id
17
+
18
+ # @return [String] Name of the orchestrator version profile list result.
19
+ attr_accessor :name
20
+
21
+ # @return [String] Type of the orchestrator version profile list result.
22
+ attr_accessor :type
23
+
24
+ # @return [Array<OrchestratorVersionProfile>] List of orchestrator
25
+ # version profiles.
26
+ attr_accessor :orchestrators
27
+
28
+
29
+ #
30
+ # Mapper for OrchestratorVersionProfileListResult class as Ruby Hash.
31
+ # This will be used for serialization/deserialization.
32
+ #
33
+ def self.mapper()
34
+ {
35
+ client_side_validation: true,
36
+ required: false,
37
+ serialized_name: 'OrchestratorVersionProfileListResult',
38
+ type: {
39
+ name: 'Composite',
40
+ class_name: 'OrchestratorVersionProfileListResult',
41
+ model_properties: {
42
+ id: {
43
+ client_side_validation: true,
44
+ required: false,
45
+ read_only: true,
46
+ serialized_name: 'id',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ name: {
52
+ client_side_validation: true,
53
+ required: false,
54
+ read_only: true,
55
+ serialized_name: 'name',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ type: {
61
+ client_side_validation: true,
62
+ required: false,
63
+ read_only: true,
64
+ serialized_name: 'type',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ },
69
+ orchestrators: {
70
+ client_side_validation: true,
71
+ required: true,
72
+ serialized_name: 'properties.orchestrators',
73
+ type: {
74
+ name: 'Sequence',
75
+ element: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ serialized_name: 'OrchestratorVersionProfileElementType',
79
+ type: {
80
+ name: 'Composite',
81
+ class_name: 'OrchestratorVersionProfile'
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ end
90
+ end
91
+ end
92
+ 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_09_30 end
@@ -0,0 +1,57 @@
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 '2018-03-31/generated/azure_mgmt_container_service/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ContainerService::Mgmt::V2018_03_31
23
+ autoload :Operations, '2018-03-31/generated/azure_mgmt_container_service/operations.rb'
24
+ autoload :ManagedClusters, '2018-03-31/generated/azure_mgmt_container_service/managed_clusters.rb'
25
+ autoload :ContainerServiceClient, '2018-03-31/generated/azure_mgmt_container_service/container_service_client.rb'
26
+
27
+ module Models
28
+ autoload :ContainerServiceLinuxProfile, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb'
29
+ autoload :ContainerServiceNetworkProfile, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_network_profile.rb'
30
+ autoload :OperationListResult, '2018-03-31/generated/azure_mgmt_container_service/models/operation_list_result.rb'
31
+ autoload :ContainerServiceVMDiagnostics, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb'
32
+ autoload :TagsObject, '2018-03-31/generated/azure_mgmt_container_service/models/tags_object.rb'
33
+ autoload :ContainerServiceDiagnosticsProfile, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb'
34
+ autoload :ContainerServiceServicePrincipalProfile, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_service_principal_profile.rb'
35
+ autoload :ManagedClusterAddonProfile, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb'
36
+ autoload :ManagedClusterAgentPoolProfile, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb'
37
+ autoload :ManagedClusterAADProfile, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb'
38
+ autoload :ContainerServiceSshPublicKey, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb'
39
+ autoload :ContainerServiceSshConfiguration, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb'
40
+ autoload :OperationValue, '2018-03-31/generated/azure_mgmt_container_service/models/operation_value.rb'
41
+ autoload :KeyVaultSecretRef, '2018-03-31/generated/azure_mgmt_container_service/models/key_vault_secret_ref.rb'
42
+ autoload :ManagedClusterListResult, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb'
43
+ autoload :ContainerServiceWindowsProfile, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_windows_profile.rb'
44
+ autoload :OrchestratorProfile, '2018-03-31/generated/azure_mgmt_container_service/models/orchestrator_profile.rb'
45
+ autoload :ContainerServiceMasterProfile, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_master_profile.rb'
46
+ autoload :ManagedClusterUpgradeProfile, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb'
47
+ autoload :Resource, '2018-03-31/generated/azure_mgmt_container_service/models/resource.rb'
48
+ autoload :ManagedClusterPoolUpgradeProfile, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb'
49
+ autoload :ManagedCluster, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster.rb'
50
+ autoload :ManagedClusterAccessProfile, '2018-03-31/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb'
51
+ autoload :ContainerServiceStorageProfileTypes, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb'
52
+ autoload :ContainerServiceVMSizeTypes, '2018-03-31/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb'
53
+ autoload :OSType, '2018-03-31/generated/azure_mgmt_container_service/models/ostype.rb'
54
+ autoload :NetworkPlugin, '2018-03-31/generated/azure_mgmt_container_service/models/network_plugin.rb'
55
+ autoload :NetworkPolicy, '2018-03-31/generated/azure_mgmt_container_service/models/network_policy.rb'
56
+ end
57
+ end
@@ -0,0 +1,137 @@
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::V2018_03_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 [Operations] operations
41
+ attr_reader :operations
42
+
43
+ # @return [ManagedClusters] managed_clusters
44
+ attr_reader :managed_clusters
45
+
46
+ #
47
+ # Creates initializes a new instance of the ContainerServiceClient class.
48
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
49
+ # @param base_url [String] the base URI of the service.
50
+ # @param options [Array] filters to be applied to the HTTP requests.
51
+ #
52
+ def initialize(credentials = nil, base_url = nil, options = nil)
53
+ super(credentials, options)
54
+ @base_url = base_url || 'https://management.azure.com'
55
+
56
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
57
+ @credentials = credentials
58
+
59
+ @operations = Operations.new(self)
60
+ @managed_clusters = ManagedClusters.new(self)
61
+ @api_version = '2018-03-31'
62
+ @accept_language = 'en-US'
63
+ @long_running_operation_retry_timeout = 30
64
+ @generate_client_request_id = true
65
+ add_telemetry
66
+ end
67
+
68
+ #
69
+ # Makes a request and returns the body of the response.
70
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
71
+ # @param path [String] the path, relative to {base_url}.
72
+ # @param options [Hash{String=>String}] specifying any request options like :body.
73
+ # @return [Hash{String=>String}] containing the body of the response.
74
+ # Example:
75
+ #
76
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
77
+ # path = "/path"
78
+ # options = {
79
+ # body: request_content,
80
+ # query_params: {'api-version' => '2016-02-01'}
81
+ # }
82
+ # result = @client.make_request(:put, path, options)
83
+ #
84
+ def make_request(method, path, options = {})
85
+ result = make_request_with_http_info(method, path, options)
86
+ result.body unless result.nil?
87
+ end
88
+
89
+ #
90
+ # Makes a request and returns the operation response.
91
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
92
+ # @param path [String] the path, relative to {base_url}.
93
+ # @param options [Hash{String=>String}] specifying any request options like :body.
94
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
95
+ #
96
+ def make_request_with_http_info(method, path, options = {})
97
+ result = make_request_async(method, path, options).value!
98
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
99
+ result
100
+ end
101
+
102
+ #
103
+ # Makes a request asynchronously.
104
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
105
+ # @param path [String] the path, relative to {base_url}.
106
+ # @param options [Hash{String=>String}] specifying any request options like :body.
107
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
108
+ #
109
+ def make_request_async(method, path, options = {})
110
+ fail ArgumentError, 'method is nil' if method.nil?
111
+ fail ArgumentError, 'path is nil' if path.nil?
112
+
113
+ request_url = options[:base_url] || @base_url
114
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
115
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
116
+ end
117
+
118
+ request_headers = @request_headers
119
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
120
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
121
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
122
+
123
+ super(request_url, method, path, options)
124
+ end
125
+
126
+
127
+ private
128
+ #
129
+ # Adds telemetry information.
130
+ #
131
+ def add_telemetry
132
+ sdk_information = 'azure_mgmt_container_service'
133
+ sdk_information = "#{sdk_information}/0.18.0"
134
+ add_user_agent_information(sdk_information)
135
+ end
136
+ end
137
+ end