Class: Azure::ServiceFabric::Mgmt::V2017_07_01_preview::ClusterVersions
- Inherits:
-
Object
- Object
- Azure::ServiceFabric::Mgmt::V2017_07_01_preview::ClusterVersions
- Includes:
- MsRestAzure
- Defined in:
- lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb
Overview
Service Fabric Management Client
Instance Attribute Summary collapse
-
#client ⇒ ServiceFabricManagementClient
readonly
Reference to the ServiceFabricManagementClient.
Instance Method Summary collapse
-
#get(location, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
Get cluster code versions.
-
#get_async(location, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ Concurrent::Promise
Get cluster code versions.
-
#get_by_environment(location, environment, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
Get cluster code versions by environment.
-
#get_by_environment_async(location, environment, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ Concurrent::Promise
Get cluster code versions by environment.
-
#get_by_environment_with_http_info(location, environment, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get cluster code versions by environment.
-
#get_with_http_info(location, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get cluster code versions.
-
#initialize(client) ⇒ ClusterVersions
constructor
Creates and initializes a new instance of the ClusterVersions class.
-
#list(location, api_version, subscription_id, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
List cluster code versions by location.
-
#list_async(location, api_version, subscription_id, custom_headers: nil) ⇒ Concurrent::Promise
List cluster code versions by location.
-
#list_by_environment(location, environment, api_version, subscription_id, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
List cluster code versions by environment.
-
#list_by_environment_async(location, environment, api_version, subscription_id, custom_headers: nil) ⇒ Concurrent::Promise
List cluster code versions by environment.
-
#list_by_environment_with_http_info(location, environment, api_version, subscription_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List cluster code versions by environment.
-
#list_with_http_info(location, api_version, subscription_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List cluster code versions by location.
Constructor Details
#initialize(client) ⇒ ClusterVersions
Creates and initializes a new instance of the ClusterVersions class.
17 18 19 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ServiceFabricManagementClient (readonly)
Returns reference to the ServiceFabricManagementClient.
22 23 24 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 22 def client @client end |
Instance Method Details
#get(location, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
Get cluster code versions
Get cluster code versions by location
different from cluster location will be added to the HTTP request.
40 41 42 43 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 40 def get(location, api_version, subscription_id, cluster_version, custom_headers:nil) response = get_async(location, api_version, subscription_id, cluster_version, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(location, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ Concurrent::Promise
Get cluster code versions
Get cluster code versions by location
different from cluster location to the HTTP request.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 81 def get_async(location, api_version, subscription_id, cluster_version, custom_headers:nil) fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'api_version is nil' if api_version.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'cluster_version is nil' if cluster_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions/{clusterVersion}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'location' => location,'subscriptionId' => subscription_id,'clusterVersion' => cluster_version}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ClusterCodeVersionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_by_environment(location, environment, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
Get cluster code versions by environment
Get cluster code versions by environment
different from cluster location Possible values include: ‘Windows’, ‘Linux’ will be added to the HTTP request.
152 153 154 155 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 152 def get_by_environment(location, environment, api_version, subscription_id, cluster_version, custom_headers:nil) response = get_by_environment_async(location, environment, api_version, subscription_id, cluster_version, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_by_environment_async(location, environment, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ Concurrent::Promise
Get cluster code versions by environment
Get cluster code versions by environment
different from cluster location Possible values include: ‘Windows’, ‘Linux’ to the HTTP request.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 197 def get_by_environment_async(location, environment, api_version, subscription_id, cluster_version, custom_headers:nil) fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'environment is nil' if environment.nil? fail ArgumentError, 'api_version is nil' if api_version.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'cluster_version is nil' if cluster_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions/{clusterVersion}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'location' => location,'environment' => environment,'subscriptionId' => subscription_id,'clusterVersion' => cluster_version}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ClusterCodeVersionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_by_environment_with_http_info(location, environment, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get cluster code versions by environment
Get cluster code versions by environment
different from cluster location Possible values include: ‘Windows’, ‘Linux’ will be added to the HTTP request.
175 176 177 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 175 def get_by_environment_with_http_info(location, environment, api_version, subscription_id, cluster_version, custom_headers:nil) get_by_environment_async(location, environment, api_version, subscription_id, cluster_version, custom_headers:custom_headers).value! end |
#get_with_http_info(location, api_version, subscription_id, cluster_version, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get cluster code versions
Get cluster code versions by location
different from cluster location will be added to the HTTP request.
61 62 63 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 61 def get_with_http_info(location, api_version, subscription_id, cluster_version, custom_headers:nil) get_async(location, api_version, subscription_id, cluster_version, custom_headers:custom_headers).value! end |
#list(location, api_version, subscription_id, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
List cluster code versions by location
List cluster code versions by location
different from cluster location will be added to the HTTP request.
266 267 268 269 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 266 def list(location, api_version, subscription_id, custom_headers:nil) response = list_async(location, api_version, subscription_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_async(location, api_version, subscription_id, custom_headers: nil) ⇒ Concurrent::Promise
List cluster code versions by location
List cluster code versions by location
different from cluster location to the HTTP request.
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 305 def list_async(location, api_version, subscription_id, custom_headers:nil) fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'api_version is nil' if api_version.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'location' => location,'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ClusterCodeVersionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_environment(location, environment, api_version, subscription_id, custom_headers: nil) ⇒ ClusterCodeVersionsListResult
List cluster code versions by environment
List cluster code versions by environment
different from cluster location Possible values include: ‘Windows’, ‘Linux’ will be added to the HTTP request.
374 375 376 377 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 374 def list_by_environment(location, environment, api_version, subscription_id, custom_headers:nil) response = list_by_environment_async(location, environment, api_version, subscription_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_environment_async(location, environment, api_version, subscription_id, custom_headers: nil) ⇒ Concurrent::Promise
List cluster code versions by environment
List cluster code versions by environment
different from cluster location Possible values include: ‘Windows’, ‘Linux’ to the HTTP request.
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 417 def list_by_environment_async(location, environment, api_version, subscription_id, custom_headers:nil) fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'environment is nil' if environment.nil? fail ArgumentError, 'api_version is nil' if api_version.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'location' => location,'environment' => environment,'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ClusterCodeVersionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_environment_with_http_info(location, environment, api_version, subscription_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List cluster code versions by environment
List cluster code versions by environment
different from cluster location Possible values include: ‘Windows’, ‘Linux’ will be added to the HTTP request.
396 397 398 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 396 def list_by_environment_with_http_info(location, environment, api_version, subscription_id, custom_headers:nil) list_by_environment_async(location, environment, api_version, subscription_id, custom_headers:custom_headers).value! end |
#list_with_http_info(location, api_version, subscription_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List cluster code versions by location
List cluster code versions by location
different from cluster location will be added to the HTTP request.
286 287 288 |
# File 'lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb', line 286 def list_with_http_info(location, api_version, subscription_id, custom_headers:nil) list_async(location, api_version, subscription_id, custom_headers:custom_headers).value! end |