azure_mgmt_container_service 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-03-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  3. data/lib/2016-09-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  4. data/lib/2017-01-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  5. data/lib/2017-07-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  6. data/lib/2017-08-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  7. data/lib/2017-09-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  8. data/lib/2018-03-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  9. data/lib/2018-08-01-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  10. data/lib/2018-09-30-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  11. data/lib/2019-02-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  12. data/lib/2019-04-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  13. data/lib/2019-04-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  14. data/lib/2019-06-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  15. data/lib/2019-08-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  16. data/lib/2019-09-30-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  17. data/lib/2019-10-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  18. data/lib/2020-02-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  19. data/lib/2020-06-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  20. data/lib/2020-07-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  21. data/lib/2020-09-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  22. data/lib/2020-12-01/generated/azure_mgmt_container_service.rb +126 -0
  23. data/lib/2020-12-01/generated/azure_mgmt_container_service/agent_pools.rb +1054 -0
  24. data/lib/2020-12-01/generated/azure_mgmt_container_service/container_service_client.rb +157 -0
  25. data/lib/2020-12-01/generated/azure_mgmt_container_service/maintenance_configurations.rb +589 -0
  26. data/lib/2020-12-01/generated/azure_mgmt_container_service/managed_clusters.rb +2309 -0
  27. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool.rb +533 -0
  28. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions.rb +93 -0
  29. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions_properties_agent_pool_versions_item.rb +71 -0
  30. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb +99 -0
  31. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_mode.rb +16 -0
  32. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb +16 -0
  33. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile.rb +129 -0
  34. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile_properties_upgrades_item.rb +59 -0
  35. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_settings.rb +47 -0
  36. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/code.rb +16 -0
  37. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/connection_status.rb +18 -0
  38. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  39. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  40. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  41. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb +179 -0
  42. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  43. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  44. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  45. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  46. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  47. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/created_by_type.rb +18 -0
  48. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/credential_result.rb +59 -0
  49. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/credential_results.rb +57 -0
  50. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/expander.rb +18 -0
  51. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/kubelet_config.rb +174 -0
  52. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/kubelet_disk_type.rb +15 -0
  53. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/license_type.rb +16 -0
  54. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/linux_osconfig.rb +81 -0
  55. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb +16 -0
  56. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/maintenance_configuration.rb +115 -0
  57. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/maintenance_configuration_list_result.rb +101 -0
  58. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster.rb +428 -0
  59. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb +123 -0
  60. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb +97 -0
  61. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb +80 -0
  62. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile_identity.rb +59 -0
  63. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb +340 -0
  64. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb +506 -0
  65. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_apiserver_access_profile.rb +77 -0
  66. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_auto_upgrade_profile.rb +47 -0
  67. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb +104 -0
  68. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_identity_user_assigned_identities_value.rb +61 -0
  69. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb +100 -0
  70. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile.rb +132 -0
  71. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_managed_outbound_ips.rb +55 -0
  72. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ipprefixes.rb +57 -0
  73. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ips.rb +56 -0
  74. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity.rb +98 -0
  75. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_exception.rb +77 -0
  76. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_profile.rb +89 -0
  77. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_provisioning_info.rb +49 -0
  78. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pod_identity_provisioning_state.rb +18 -0
  79. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb +92 -0
  80. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb +59 -0
  81. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_auto_scaler_profile.rb +224 -0
  82. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_identity_profile_value.rb +61 -0
  83. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb +59 -0
  84. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_sku.rb +60 -0
  85. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_skuname.rb +15 -0
  86. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_skutier.rb +16 -0
  87. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb +105 -0
  88. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb +84 -0
  89. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/network_mode.rb +16 -0
  90. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/network_plugin.rb +16 -0
  91. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/network_policy.rb +16 -0
  92. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/operation_list_result.rb +56 -0
  93. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/operation_value.rb +108 -0
  94. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/osdisk_type.rb +16 -0
  95. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  96. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/outbound_type.rb +16 -0
  97. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/power_state.rb +47 -0
  98. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint.rb +46 -0
  99. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection.rb +111 -0
  100. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_list_result.rb +55 -0
  101. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_provisioning_state.rb +18 -0
  102. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_link_resource.rb +111 -0
  103. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_link_resources_list_result.rb +55 -0
  104. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/private_link_service_connection_state.rb +59 -0
  105. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/resource.rb +110 -0
  106. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb +17 -0
  107. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/resource_reference.rb +46 -0
  108. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/scale_set_eviction_policy.rb +16 -0
  109. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/scale_set_priority.rb +16 -0
  110. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/sub_resource.rb +72 -0
  111. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/sysctl_config.rb +343 -0
  112. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/system_data.rb +106 -0
  113. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/tags_object.rb +54 -0
  114. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/time_in_week.rb +66 -0
  115. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/time_span.rb +57 -0
  116. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/upgrade_channel.rb +18 -0
  117. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/user_assigned_identity.rb +69 -0
  118. data/lib/2020-12-01/generated/azure_mgmt_container_service/models/week_day.rb +21 -0
  119. data/lib/2020-12-01/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  120. data/lib/2020-12-01/generated/azure_mgmt_container_service/operations.rb +109 -0
  121. data/lib/2020-12-01/generated/azure_mgmt_container_service/private_endpoint_connections.rb +515 -0
  122. data/lib/2020-12-01/generated/azure_mgmt_container_service/private_link_resources.rb +132 -0
  123. data/lib/2020-12-01/generated/azure_mgmt_container_service/resolve_private_link_service_id.rb +143 -0
  124. data/lib/azure_mgmt_container_service.rb +1 -0
  125. data/lib/profiles/latest/modules/containerservice_profile_module.rb +268 -194
  126. data/lib/version.rb +1 -1
  127. metadata +104 -2
@@ -0,0 +1,157 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerService::Mgmt::V2020_12_01
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class ContainerServiceClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Subscription credentials which uniquely identify
21
+ # Microsoft Azure subscription. The subscription ID forms part of the URI
22
+ # for every service call.
23
+ attr_accessor :subscription_id
24
+
25
+ # @return [String] Client Api Version.
26
+ attr_reader :api_version
27
+
28
+ # @return [String] The preferred language for the response.
29
+ attr_accessor :accept_language
30
+
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
+ attr_accessor :long_running_operation_retry_timeout
34
+
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
38
+ attr_accessor :generate_client_request_id
39
+
40
+ # @return [Operations] operations
41
+ attr_reader :operations
42
+
43
+ # @return [ManagedClusters] managed_clusters
44
+ attr_reader :managed_clusters
45
+
46
+ # @return [MaintenanceConfigurations] maintenance_configurations
47
+ attr_reader :maintenance_configurations
48
+
49
+ # @return [AgentPools] agent_pools
50
+ attr_reader :agent_pools
51
+
52
+ # @return [PrivateEndpointConnections] private_endpoint_connections
53
+ attr_reader :private_endpoint_connections
54
+
55
+ # @return [PrivateLinkResources] private_link_resources
56
+ attr_reader :private_link_resources
57
+
58
+ # @return [ResolvePrivateLinkServiceId] resolve_private_link_service_id
59
+ attr_reader :resolve_private_link_service_id
60
+
61
+ #
62
+ # Creates initializes a new instance of the ContainerServiceClient class.
63
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
64
+ # @param base_url [String] the base URI of the service.
65
+ # @param options [Array] filters to be applied to the HTTP requests.
66
+ #
67
+ def initialize(credentials = nil, base_url = nil, options = nil)
68
+ super(credentials, options)
69
+ @base_url = base_url || 'https://management.azure.com'
70
+
71
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
72
+ @credentials = credentials
73
+
74
+ @operations = Operations.new(self)
75
+ @managed_clusters = ManagedClusters.new(self)
76
+ @maintenance_configurations = MaintenanceConfigurations.new(self)
77
+ @agent_pools = AgentPools.new(self)
78
+ @private_endpoint_connections = PrivateEndpointConnections.new(self)
79
+ @private_link_resources = PrivateLinkResources.new(self)
80
+ @resolve_private_link_service_id = ResolvePrivateLinkServiceId.new(self)
81
+ @api_version = '2020-12-01'
82
+ @accept_language = 'en-US'
83
+ @long_running_operation_retry_timeout = 30
84
+ @generate_client_request_id = true
85
+ add_telemetry
86
+ end
87
+
88
+ #
89
+ # Makes a request and returns the body of the response.
90
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
91
+ # @param path [String] the path, relative to {base_url}.
92
+ # @param options [Hash{String=>String}] specifying any request options like :body.
93
+ # @return [Hash{String=>String}] containing the body of the response.
94
+ # Example:
95
+ #
96
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
97
+ # path = "/path"
98
+ # options = {
99
+ # body: request_content,
100
+ # query_params: {'api-version' => '2016-02-01'}
101
+ # }
102
+ # result = @client.make_request(:put, path, options)
103
+ #
104
+ def make_request(method, path, options = {})
105
+ result = make_request_with_http_info(method, path, options)
106
+ result.body unless result.nil?
107
+ end
108
+
109
+ #
110
+ # Makes a request and returns the operation response.
111
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
112
+ # @param path [String] the path, relative to {base_url}.
113
+ # @param options [Hash{String=>String}] specifying any request options like :body.
114
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
115
+ #
116
+ def make_request_with_http_info(method, path, options = {})
117
+ result = make_request_async(method, path, options).value!
118
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
119
+ result
120
+ end
121
+
122
+ #
123
+ # Makes a request asynchronously.
124
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
125
+ # @param path [String] the path, relative to {base_url}.
126
+ # @param options [Hash{String=>String}] specifying any request options like :body.
127
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
128
+ #
129
+ def make_request_async(method, path, options = {})
130
+ fail ArgumentError, 'method is nil' if method.nil?
131
+ fail ArgumentError, 'path is nil' if path.nil?
132
+
133
+ request_url = options[:base_url] || @base_url
134
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
135
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
136
+ end
137
+
138
+ request_headers = @request_headers
139
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
140
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
141
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
142
+
143
+ super(request_url, method, path, options)
144
+ end
145
+
146
+
147
+ private
148
+ #
149
+ # Adds telemetry information.
150
+ #
151
+ def add_telemetry
152
+ sdk_information = 'azure_mgmt_container_service'
153
+ sdk_information = "#{sdk_information}/0.22.0"
154
+ add_user_agent_information(sdk_information)
155
+ end
156
+ end
157
+ end
@@ -0,0 +1,589 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerService::Mgmt::V2020_12_01
7
+ #
8
+ # The Container Service Client.
9
+ #
10
+ class MaintenanceConfigurations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the MaintenanceConfigurations 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 maintenance configurations in the specified managed cluster.
26
+ #
27
+ # Gets a list of maintenance configurations in the specified managed cluster.
28
+ # The operation returns properties of each maintenance configuration.
29
+ #
30
+ # @param resource_group_name [String] The name of the resource group.
31
+ # @param resource_name [String] The name of the managed cluster resource.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<MaintenanceConfiguration>] operation results.
36
+ #
37
+ def list_by_managed_cluster(resource_group_name, resource_name, custom_headers:nil)
38
+ first_page = list_by_managed_cluster_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Gets a list of maintenance configurations in the specified managed cluster.
44
+ #
45
+ # Gets a list of maintenance configurations in the specified managed cluster.
46
+ # The operation returns properties of each maintenance configuration.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group.
49
+ # @param resource_name [String] The name of the managed cluster resource.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_by_managed_cluster_with_http_info(resource_group_name, resource_name, custom_headers:nil)
56
+ list_by_managed_cluster_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Gets a list of maintenance configurations in the specified managed cluster.
61
+ #
62
+ # Gets a list of maintenance configurations in the specified managed cluster.
63
+ # The operation returns properties of each maintenance configuration.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group.
66
+ # @param resource_name [String] The name of the managed cluster resource.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_by_managed_cluster_async(resource_group_name, resource_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
76
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
77
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
78
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
79
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
80
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
81
+
82
+
83
+ request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
+
86
+ # Set Headers
87
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'
90
+
91
+ request_url = @base_url || @client.base_url
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
96
+ query_params: {'api-version' => @client.api_version},
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:get, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 200
107
+ error_model = JSON.load(response_content)
108
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 200
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::MaintenanceConfigurationListResult.mapper()
119
+ result.body = @client.deserialize(result_mapper, parsed_response)
120
+ rescue Exception => e
121
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
122
+ end
123
+ end
124
+
125
+ result
126
+ end
127
+
128
+ promise.execute
129
+ end
130
+
131
+ #
132
+ # Gets the maintenance configuration.
133
+ #
134
+ # Gets the details of maintenance configurations by managed cluster and
135
+ # resource group.
136
+ #
137
+ # @param resource_group_name [String] The name of the resource group.
138
+ # @param resource_name [String] The name of the managed cluster resource.
139
+ # @param config_name [String] The name of the maintenance configuration.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [MaintenanceConfiguration] operation results.
144
+ #
145
+ def get(resource_group_name, resource_name, config_name, custom_headers:nil)
146
+ response = get_async(resource_group_name, resource_name, config_name, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # Gets the maintenance configuration.
152
+ #
153
+ # Gets the details of maintenance configurations by managed cluster and
154
+ # resource group.
155
+ #
156
+ # @param resource_group_name [String] The name of the resource group.
157
+ # @param resource_name [String] The name of the managed cluster resource.
158
+ # @param config_name [String] The name of the maintenance configuration.
159
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
160
+ # will be added to the HTTP request.
161
+ #
162
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
163
+ #
164
+ def get_with_http_info(resource_group_name, resource_name, config_name, custom_headers:nil)
165
+ get_async(resource_group_name, resource_name, config_name, custom_headers:custom_headers).value!
166
+ end
167
+
168
+ #
169
+ # Gets the maintenance configuration.
170
+ #
171
+ # Gets the details of maintenance configurations by managed cluster and
172
+ # resource group.
173
+ #
174
+ # @param resource_group_name [String] The name of the resource group.
175
+ # @param resource_name [String] The name of the managed cluster resource.
176
+ # @param config_name [String] The name of the maintenance configuration.
177
+ # @param [Hash{String => String}] A hash of custom headers that will be added
178
+ # to the HTTP request.
179
+ #
180
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
181
+ #
182
+ def get_async(resource_group_name, resource_name, config_name, custom_headers:nil)
183
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
184
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
185
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
186
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
187
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
188
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
189
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
190
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
191
+ fail ArgumentError, 'config_name is nil' if config_name.nil?
192
+
193
+
194
+ request_headers = {}
195
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
196
+
197
+ # Set Headers
198
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
199
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
200
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'
201
+
202
+ request_url = @base_url || @client.base_url
203
+
204
+ options = {
205
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
206
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'configName' => config_name},
207
+ query_params: {'api-version' => @client.api_version},
208
+ headers: request_headers.merge(custom_headers || {}),
209
+ base_url: request_url
210
+ }
211
+ promise = @client.make_request_async(:get, path_template, options)
212
+
213
+ promise = promise.then do |result|
214
+ http_response = result.response
215
+ status_code = http_response.status
216
+ response_content = http_response.body
217
+ unless status_code == 200
218
+ error_model = JSON.load(response_content)
219
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
220
+ end
221
+
222
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
223
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
224
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
225
+ # Deserialize Response
226
+ if status_code == 200
227
+ begin
228
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
229
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::MaintenanceConfiguration.mapper()
230
+ result.body = @client.deserialize(result_mapper, parsed_response)
231
+ rescue Exception => e
232
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
233
+ end
234
+ end
235
+
236
+ result
237
+ end
238
+
239
+ promise.execute
240
+ end
241
+
242
+ #
243
+ # Creates or updates a maintenance configurations.
244
+ #
245
+ # Creates or updates a maintenance configuration in the specified managed
246
+ # cluster.
247
+ #
248
+ # @param resource_group_name [String] The name of the resource group.
249
+ # @param resource_name [String] The name of the managed cluster resource.
250
+ # @param config_name [String] The name of the maintenance configuration.
251
+ # @param parameters [MaintenanceConfiguration] Parameters supplied to the
252
+ # Create or Update a default maintenance configuration.
253
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
254
+ # will be added to the HTTP request.
255
+ #
256
+ # @return [MaintenanceConfiguration] operation results.
257
+ #
258
+ def create_or_update(resource_group_name, resource_name, config_name, parameters, custom_headers:nil)
259
+ response = create_or_update_async(resource_group_name, resource_name, config_name, parameters, custom_headers:custom_headers).value!
260
+ response.body unless response.nil?
261
+ end
262
+
263
+ #
264
+ # Creates or updates a maintenance configurations.
265
+ #
266
+ # Creates or updates a maintenance configuration in the specified managed
267
+ # cluster.
268
+ #
269
+ # @param resource_group_name [String] The name of the resource group.
270
+ # @param resource_name [String] The name of the managed cluster resource.
271
+ # @param config_name [String] The name of the maintenance configuration.
272
+ # @param parameters [MaintenanceConfiguration] Parameters supplied to the
273
+ # Create or Update a default maintenance configuration.
274
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
275
+ # will be added to the HTTP request.
276
+ #
277
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
278
+ #
279
+ def create_or_update_with_http_info(resource_group_name, resource_name, config_name, parameters, custom_headers:nil)
280
+ create_or_update_async(resource_group_name, resource_name, config_name, parameters, custom_headers:custom_headers).value!
281
+ end
282
+
283
+ #
284
+ # Creates or updates a maintenance configurations.
285
+ #
286
+ # Creates or updates a maintenance configuration in the specified managed
287
+ # cluster.
288
+ #
289
+ # @param resource_group_name [String] The name of the resource group.
290
+ # @param resource_name [String] The name of the managed cluster resource.
291
+ # @param config_name [String] The name of the maintenance configuration.
292
+ # @param parameters [MaintenanceConfiguration] Parameters supplied to the
293
+ # Create or Update a default maintenance configuration.
294
+ # @param [Hash{String => String}] A hash of custom headers that will be added
295
+ # to the HTTP request.
296
+ #
297
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
298
+ #
299
+ def create_or_update_async(resource_group_name, resource_name, config_name, parameters, custom_headers:nil)
300
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
301
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
302
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
303
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
304
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
305
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
306
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
307
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
308
+ fail ArgumentError, 'config_name is nil' if config_name.nil?
309
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
310
+
311
+
312
+ request_headers = {}
313
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
314
+
315
+ # Set Headers
316
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
317
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
318
+
319
+ # Serialize Request
320
+ request_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::MaintenanceConfiguration.mapper()
321
+ request_content = @client.serialize(request_mapper, parameters)
322
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
323
+
324
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'
325
+
326
+ request_url = @base_url || @client.base_url
327
+
328
+ options = {
329
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
330
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'configName' => config_name},
331
+ query_params: {'api-version' => @client.api_version},
332
+ body: request_content,
333
+ headers: request_headers.merge(custom_headers || {}),
334
+ base_url: request_url
335
+ }
336
+ promise = @client.make_request_async(:put, path_template, options)
337
+
338
+ promise = promise.then do |result|
339
+ http_response = result.response
340
+ status_code = http_response.status
341
+ response_content = http_response.body
342
+ unless status_code == 200
343
+ error_model = JSON.load(response_content)
344
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
345
+ end
346
+
347
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
348
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
349
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
350
+ # Deserialize Response
351
+ if status_code == 200
352
+ begin
353
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
354
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::MaintenanceConfiguration.mapper()
355
+ result.body = @client.deserialize(result_mapper, parsed_response)
356
+ rescue Exception => e
357
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
358
+ end
359
+ end
360
+
361
+ result
362
+ end
363
+
364
+ promise.execute
365
+ end
366
+
367
+ #
368
+ # Deletes a maintenance configuration.
369
+ #
370
+ # Deletes the maintenance configuration in the specified managed cluster.
371
+ #
372
+ # @param resource_group_name [String] The name of the resource group.
373
+ # @param resource_name [String] The name of the managed cluster resource.
374
+ # @param config_name [String] The name of the maintenance configuration.
375
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
376
+ # will be added to the HTTP request.
377
+ #
378
+ #
379
+ def delete(resource_group_name, resource_name, config_name, custom_headers:nil)
380
+ response = delete_async(resource_group_name, resource_name, config_name, custom_headers:custom_headers).value!
381
+ nil
382
+ end
383
+
384
+ #
385
+ # Deletes a maintenance configuration.
386
+ #
387
+ # Deletes the maintenance configuration in the specified managed cluster.
388
+ #
389
+ # @param resource_group_name [String] The name of the resource group.
390
+ # @param resource_name [String] The name of the managed cluster resource.
391
+ # @param config_name [String] The name of the maintenance configuration.
392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
+ # will be added to the HTTP request.
394
+ #
395
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
396
+ #
397
+ def delete_with_http_info(resource_group_name, resource_name, config_name, custom_headers:nil)
398
+ delete_async(resource_group_name, resource_name, config_name, custom_headers:custom_headers).value!
399
+ end
400
+
401
+ #
402
+ # Deletes a maintenance configuration.
403
+ #
404
+ # Deletes the maintenance configuration in the specified managed cluster.
405
+ #
406
+ # @param resource_group_name [String] The name of the resource group.
407
+ # @param resource_name [String] The name of the managed cluster resource.
408
+ # @param config_name [String] The name of the maintenance configuration.
409
+ # @param [Hash{String => String}] A hash of custom headers that will be added
410
+ # to the HTTP request.
411
+ #
412
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
413
+ #
414
+ def delete_async(resource_group_name, resource_name, config_name, custom_headers:nil)
415
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
416
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
417
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
418
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
419
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
420
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
421
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
422
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
423
+ fail ArgumentError, 'config_name is nil' if config_name.nil?
424
+
425
+
426
+ request_headers = {}
427
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
428
+
429
+ # Set Headers
430
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
431
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
432
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'
433
+
434
+ request_url = @base_url || @client.base_url
435
+
436
+ options = {
437
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
438
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'configName' => config_name},
439
+ query_params: {'api-version' => @client.api_version},
440
+ headers: request_headers.merge(custom_headers || {}),
441
+ base_url: request_url
442
+ }
443
+ promise = @client.make_request_async(:delete, path_template, options)
444
+
445
+ promise = promise.then do |result|
446
+ http_response = result.response
447
+ status_code = http_response.status
448
+ response_content = http_response.body
449
+ unless status_code == 200 || status_code == 204
450
+ error_model = JSON.load(response_content)
451
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
452
+ end
453
+
454
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
455
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
456
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
457
+
458
+ result
459
+ end
460
+
461
+ promise.execute
462
+ end
463
+
464
+ #
465
+ # Gets a list of maintenance configurations in the specified managed cluster.
466
+ #
467
+ # Gets a list of maintenance configurations in the specified managed cluster.
468
+ # The operation returns properties of each maintenance configuration.
469
+ #
470
+ # @param next_page_link [String] The NextLink from the previous successful call
471
+ # to List operation.
472
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
473
+ # will be added to the HTTP request.
474
+ #
475
+ # @return [MaintenanceConfigurationListResult] operation results.
476
+ #
477
+ def list_by_managed_cluster_next(next_page_link, custom_headers:nil)
478
+ response = list_by_managed_cluster_next_async(next_page_link, custom_headers:custom_headers).value!
479
+ response.body unless response.nil?
480
+ end
481
+
482
+ #
483
+ # Gets a list of maintenance configurations in the specified managed cluster.
484
+ #
485
+ # Gets a list of maintenance configurations in the specified managed cluster.
486
+ # The operation returns properties of each maintenance configuration.
487
+ #
488
+ # @param next_page_link [String] The NextLink from the previous successful call
489
+ # to List operation.
490
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
491
+ # will be added to the HTTP request.
492
+ #
493
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
494
+ #
495
+ def list_by_managed_cluster_next_with_http_info(next_page_link, custom_headers:nil)
496
+ list_by_managed_cluster_next_async(next_page_link, custom_headers:custom_headers).value!
497
+ end
498
+
499
+ #
500
+ # Gets a list of maintenance configurations in the specified managed cluster.
501
+ #
502
+ # Gets a list of maintenance configurations in the specified managed cluster.
503
+ # The operation returns properties of each maintenance configuration.
504
+ #
505
+ # @param next_page_link [String] The NextLink from the previous successful call
506
+ # to List operation.
507
+ # @param [Hash{String => String}] A hash of custom headers that will be added
508
+ # to the HTTP request.
509
+ #
510
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
511
+ #
512
+ def list_by_managed_cluster_next_async(next_page_link, custom_headers:nil)
513
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
514
+
515
+
516
+ request_headers = {}
517
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
518
+
519
+ # Set Headers
520
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
521
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
522
+ path_template = '{nextLink}'
523
+
524
+ request_url = @base_url || @client.base_url
525
+
526
+ options = {
527
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
528
+ skip_encoding_path_params: {'nextLink' => next_page_link},
529
+ headers: request_headers.merge(custom_headers || {}),
530
+ base_url: request_url
531
+ }
532
+ promise = @client.make_request_async(:get, path_template, options)
533
+
534
+ promise = promise.then do |result|
535
+ http_response = result.response
536
+ status_code = http_response.status
537
+ response_content = http_response.body
538
+ unless status_code == 200
539
+ error_model = JSON.load(response_content)
540
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
541
+ end
542
+
543
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
544
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
545
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
546
+ # Deserialize Response
547
+ if status_code == 200
548
+ begin
549
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
550
+ result_mapper = Azure::ContainerService::Mgmt::V2020_12_01::Models::MaintenanceConfigurationListResult.mapper()
551
+ result.body = @client.deserialize(result_mapper, parsed_response)
552
+ rescue Exception => e
553
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
554
+ end
555
+ end
556
+
557
+ result
558
+ end
559
+
560
+ promise.execute
561
+ end
562
+
563
+ #
564
+ # Gets a list of maintenance configurations in the specified managed cluster.
565
+ #
566
+ # Gets a list of maintenance configurations in the specified managed cluster.
567
+ # The operation returns properties of each maintenance configuration.
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 custom_headers [Hash{String => String}] A hash of custom headers that
572
+ # will be added to the HTTP request.
573
+ #
574
+ # @return [MaintenanceConfigurationListResult] which provide lazy access to
575
+ # pages of the response.
576
+ #
577
+ def list_by_managed_cluster_as_lazy(resource_group_name, resource_name, custom_headers:nil)
578
+ response = list_by_managed_cluster_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
579
+ unless response.nil?
580
+ page = response.body
581
+ page.next_method = Proc.new do |next_page_link|
582
+ list_by_managed_cluster_next_async(next_page_link, custom_headers:custom_headers)
583
+ end
584
+ page
585
+ end
586
+ end
587
+
588
+ end
589
+ end