azure_mgmt_service_fabric 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2016-09-01/generated/azure_mgmt_service_fabric/cluster_versions.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_service_fabric/clusters.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_service_fabric/operations.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb +7 -6
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/application.rb +1 -1
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/application_type.rb +1 -1
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb +1 -1
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/clusters.rb +1 -1
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/operations.rb +1 -1
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/service.rb +1 -1
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb +7 -6
- data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/version.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric.rb +61 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/cluster_versions.rb +456 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/clusters.rb +753 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/application_delta_health_policy.rb +73 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/application_health_policy.rb +71 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/available_operation_display.rb +79 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/azure_active_directory.rb +68 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/certificate_description.rb +70 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb +70 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.rb +59 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster.rb +476 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.rb +66 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.rb +102 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_health_policy.rb +121 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_list_result.rb +66 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_update_parameters.rb +276 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.rb +125 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb +156 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_version_details.rb +69 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb +91 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/endpoint_range_description.rb +57 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/error_model.rb +47 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/error_model_error.rb +57 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/node_type_description.rb +198 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/operation_list_result.rb +101 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/operation_result.rb +81 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/provisioning_state.rb +18 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/resource.rb +101 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/server_certificate_common_name.rb +57 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/server_certificate_common_names.rb +71 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/service_type_delta_health_policy.rb +60 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/service_type_health_policy.rb +55 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/settings_parameter_description.rb +57 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/models/settings_section_description.rb +67 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/module_definition.rb +9 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/operations.rb +237 -0
- data/lib/2018-02-01/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb +141 -0
- data/lib/azure_mgmt_service_fabric.rb +2 -1
- data/lib/profiles/latest/modules/servicefabric_profile_module.rb +136 -112
- data/lib/version.rb +1 -1
- metadata +42 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d04edc3c99a73df399673a53ad552bc53933f0f9
|
4
|
+
data.tar.gz: 0b9ee9528c40b8b47d3c094318d6ea06d10f6302
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10bb9a2081ee83e3c401a8ed015a7ceeb29d9240f1149bb46da2c984a1115fe286aadc9098cd03400ae76d31bc04c01c1805a81c60ad1e2a2c370f3bfa08453
|
7
|
+
data.tar.gz: a9370a48560c483b53fb415c0af5accfe71551a785885b642b4c8df9a1ca66e1267d781a751a64f004f1689fc7245d441635b508109cecb5347886eaaef67783
|
@@ -23,15 +23,16 @@ module Azure::ServiceFabric::Mgmt::V2016_09_01
|
|
23
23
|
# @return [String] The version of the ServiceFabric resouce provider api
|
24
24
|
attr_reader :api_version
|
25
25
|
|
26
|
-
# @return [String]
|
26
|
+
# @return [String] The preferred language for the response.
|
27
27
|
attr_accessor :accept_language
|
28
28
|
|
29
|
-
# @return [Integer]
|
30
|
-
#
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
31
|
attr_accessor :long_running_operation_retry_timeout
|
32
32
|
|
33
|
-
# @return [Boolean]
|
34
|
-
#
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
35
|
+
# generated and included in each request. Default is true.
|
35
36
|
attr_accessor :generate_client_request_id
|
36
37
|
|
37
38
|
# @return [Clusters] clusters
|
@@ -131,7 +132,7 @@ module Azure::ServiceFabric::Mgmt::V2016_09_01
|
|
131
132
|
#
|
132
133
|
def add_telemetry
|
133
134
|
sdk_information = 'azure_mgmt_service_fabric'
|
134
|
-
sdk_information = "#{sdk_information}/0.
|
135
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
135
136
|
add_user_agent_information(sdk_information)
|
136
137
|
end
|
137
138
|
end
|
data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb
CHANGED
@@ -17,15 +17,16 @@ module Azure::ServiceFabric::Mgmt::V2017_07_01_preview
|
|
17
17
|
# @return Credentials needed for the client to connect to Azure.
|
18
18
|
attr_reader :credentials
|
19
19
|
|
20
|
-
# @return [String]
|
20
|
+
# @return [String] The preferred language for the response.
|
21
21
|
attr_accessor :accept_language
|
22
22
|
|
23
|
-
# @return [Integer]
|
24
|
-
#
|
23
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
24
|
+
# Operations. Default value is 30.
|
25
25
|
attr_accessor :long_running_operation_retry_timeout
|
26
26
|
|
27
|
-
# @return [Boolean]
|
28
|
-
#
|
27
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
28
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
29
|
+
# generated and included in each request. Default is true.
|
29
30
|
attr_accessor :generate_client_request_id
|
30
31
|
|
31
32
|
# @return [Clusters] clusters
|
@@ -140,7 +141,7 @@ module Azure::ServiceFabric::Mgmt::V2017_07_01_preview
|
|
140
141
|
#
|
141
142
|
def add_telemetry
|
142
143
|
sdk_information = 'azure_mgmt_service_fabric'
|
143
|
-
sdk_information = "#{sdk_information}/0.
|
144
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
144
145
|
add_user_agent_information(sdk_information)
|
145
146
|
end
|
146
147
|
end
|
@@ -0,0 +1,61 @@
|
|
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-02-01/generated/azure_mgmt_service_fabric/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ServiceFabric::Mgmt::V2018_02_01
|
23
|
+
autoload :Clusters, '2018-02-01/generated/azure_mgmt_service_fabric/clusters.rb'
|
24
|
+
autoload :ClusterVersions, '2018-02-01/generated/azure_mgmt_service_fabric/cluster_versions.rb'
|
25
|
+
autoload :Operations, '2018-02-01/generated/azure_mgmt_service_fabric/operations.rb'
|
26
|
+
autoload :ServiceFabricManagementClient, '2018-02-01/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :EndpointRangeDescription, '2018-02-01/generated/azure_mgmt_service_fabric/models/endpoint_range_description.rb'
|
30
|
+
autoload :ServiceTypeDeltaHealthPolicy, '2018-02-01/generated/azure_mgmt_service_fabric/models/service_type_delta_health_policy.rb'
|
31
|
+
autoload :NodeTypeDescription, '2018-02-01/generated/azure_mgmt_service_fabric/models/node_type_description.rb'
|
32
|
+
autoload :ServiceTypeHealthPolicy, '2018-02-01/generated/azure_mgmt_service_fabric/models/service_type_health_policy.rb'
|
33
|
+
autoload :ClusterHealthPolicy, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_health_policy.rb'
|
34
|
+
autoload :AvailableOperationDisplay, '2018-02-01/generated/azure_mgmt_service_fabric/models/available_operation_display.rb'
|
35
|
+
autoload :ClusterUpgradeDeltaHealthPolicy, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.rb'
|
36
|
+
autoload :CertificateDescription, '2018-02-01/generated/azure_mgmt_service_fabric/models/certificate_description.rb'
|
37
|
+
autoload :ClusterUpgradePolicy, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb'
|
38
|
+
autoload :ClientCertificateThumbprint, '2018-02-01/generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.rb'
|
39
|
+
autoload :ClusterVersionDetails, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_version_details.rb'
|
40
|
+
autoload :ServerCertificateCommonNames, '2018-02-01/generated/azure_mgmt_service_fabric/models/server_certificate_common_names.rb'
|
41
|
+
autoload :ClusterCodeVersionsResult, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.rb'
|
42
|
+
autoload :SettingsParameterDescription, '2018-02-01/generated/azure_mgmt_service_fabric/models/settings_parameter_description.rb'
|
43
|
+
autoload :ClusterCodeVersionsListResult, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.rb'
|
44
|
+
autoload :ApplicationDeltaHealthPolicy, '2018-02-01/generated/azure_mgmt_service_fabric/models/application_delta_health_policy.rb'
|
45
|
+
autoload :ClusterListResult, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_list_result.rb'
|
46
|
+
autoload :AzureActiveDirectory, '2018-02-01/generated/azure_mgmt_service_fabric/models/azure_active_directory.rb'
|
47
|
+
autoload :ClusterUpdateParameters, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster_update_parameters.rb'
|
48
|
+
autoload :ServerCertificateCommonName, '2018-02-01/generated/azure_mgmt_service_fabric/models/server_certificate_common_name.rb'
|
49
|
+
autoload :OperationResult, '2018-02-01/generated/azure_mgmt_service_fabric/models/operation_result.rb'
|
50
|
+
autoload :SettingsSectionDescription, '2018-02-01/generated/azure_mgmt_service_fabric/models/settings_section_description.rb'
|
51
|
+
autoload :OperationListResult, '2018-02-01/generated/azure_mgmt_service_fabric/models/operation_list_result.rb'
|
52
|
+
autoload :ClientCertificateCommonName, '2018-02-01/generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb'
|
53
|
+
autoload :Resource, '2018-02-01/generated/azure_mgmt_service_fabric/models/resource.rb'
|
54
|
+
autoload :ApplicationHealthPolicy, '2018-02-01/generated/azure_mgmt_service_fabric/models/application_health_policy.rb'
|
55
|
+
autoload :ErrorModelError, '2018-02-01/generated/azure_mgmt_service_fabric/models/error_model_error.rb'
|
56
|
+
autoload :DiagnosticsStorageAccountConfig, '2018-02-01/generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb'
|
57
|
+
autoload :ErrorModel, '2018-02-01/generated/azure_mgmt_service_fabric/models/error_model.rb'
|
58
|
+
autoload :Cluster, '2018-02-01/generated/azure_mgmt_service_fabric/models/cluster.rb'
|
59
|
+
autoload :ProvisioningState, '2018-02-01/generated/azure_mgmt_service_fabric/models/provisioning_state.rb'
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,456 @@
|
|
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::ServiceFabric::Mgmt::V2018_02_01
|
7
|
+
#
|
8
|
+
# Azure Service Fabric Resource Provider API Client
|
9
|
+
#
|
10
|
+
class ClusterVersions
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the ClusterVersions class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ServiceFabricManagementClient] reference to the ServiceFabricManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets information about a Service Fabric cluster code version available in the
|
26
|
+
# specified location.
|
27
|
+
#
|
28
|
+
# Gets information about an available Service Fabric cluster code version.
|
29
|
+
#
|
30
|
+
# @param location [String] The location for the cluster code versions. This is
|
31
|
+
# different from cluster location.
|
32
|
+
# @param cluster_version [String] The cluster code version.
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [ClusterCodeVersionsListResult] operation results.
|
37
|
+
#
|
38
|
+
def get(location, cluster_version, custom_headers:nil)
|
39
|
+
response = get_async(location, cluster_version, custom_headers:custom_headers).value!
|
40
|
+
response.body unless response.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Gets information about a Service Fabric cluster code version available in the
|
45
|
+
# specified location.
|
46
|
+
#
|
47
|
+
# Gets information about an available Service Fabric cluster code version.
|
48
|
+
#
|
49
|
+
# @param location [String] The location for the cluster code versions. This is
|
50
|
+
# different from cluster location.
|
51
|
+
# @param cluster_version [String] The cluster code version.
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def get_with_http_info(location, cluster_version, custom_headers:nil)
|
58
|
+
get_async(location, cluster_version, custom_headers:custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Gets information about a Service Fabric cluster code version available in the
|
63
|
+
# specified location.
|
64
|
+
#
|
65
|
+
# Gets information about an available Service Fabric cluster code version.
|
66
|
+
#
|
67
|
+
# @param location [String] The location for the cluster code versions. This is
|
68
|
+
# different from cluster location.
|
69
|
+
# @param cluster_version [String] The cluster code version.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def get_async(location, cluster_version, custom_headers:nil)
|
76
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
77
|
+
@client.api_version = '2018-02-01'
|
78
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
79
|
+
fail ArgumentError, 'cluster_version is nil' if cluster_version.nil?
|
80
|
+
|
81
|
+
|
82
|
+
request_headers = {}
|
83
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
84
|
+
|
85
|
+
# Set Headers
|
86
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
87
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
88
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions/{clusterVersion}'
|
89
|
+
|
90
|
+
request_url = @base_url || @client.base_url
|
91
|
+
|
92
|
+
options = {
|
93
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
94
|
+
path_params: {'location' => location,'subscriptionId' => @client.subscription_id,'clusterVersion' => cluster_version},
|
95
|
+
query_params: {'api-version' => @client.api_version},
|
96
|
+
headers: request_headers.merge(custom_headers || {}),
|
97
|
+
base_url: request_url
|
98
|
+
}
|
99
|
+
promise = @client.make_request_async(:get, path_template, options)
|
100
|
+
|
101
|
+
promise = promise.then do |result|
|
102
|
+
http_response = result.response
|
103
|
+
status_code = http_response.status
|
104
|
+
response_content = http_response.body
|
105
|
+
unless status_code == 200
|
106
|
+
error_model = JSON.load(response_content)
|
107
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
108
|
+
end
|
109
|
+
|
110
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
111
|
+
# Deserialize Response
|
112
|
+
if status_code == 200
|
113
|
+
begin
|
114
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
115
|
+
result_mapper = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ClusterCodeVersionsListResult.mapper()
|
116
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
117
|
+
rescue Exception => e
|
118
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
result
|
123
|
+
end
|
124
|
+
|
125
|
+
promise.execute
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Gets information about a Service Fabric cluster code version available for
|
130
|
+
# the specified environment.
|
131
|
+
#
|
132
|
+
# Gets information about an available Service Fabric cluster code version by
|
133
|
+
# environment.
|
134
|
+
#
|
135
|
+
# @param location [String] The location for the cluster code versions. This is
|
136
|
+
# different from cluster location.
|
137
|
+
# @param environment [Enum] The operating system of the cluster. The default
|
138
|
+
# means all. Possible values include: 'Windows', 'Linux'
|
139
|
+
# @param cluster_version [String] The cluster code version.
|
140
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
141
|
+
# will be added to the HTTP request.
|
142
|
+
#
|
143
|
+
# @return [ClusterCodeVersionsListResult] operation results.
|
144
|
+
#
|
145
|
+
def get_by_environment(location, environment, cluster_version, custom_headers:nil)
|
146
|
+
response = get_by_environment_async(location, environment, cluster_version, custom_headers:custom_headers).value!
|
147
|
+
response.body unless response.nil?
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# Gets information about a Service Fabric cluster code version available for
|
152
|
+
# the specified environment.
|
153
|
+
#
|
154
|
+
# Gets information about an available Service Fabric cluster code version by
|
155
|
+
# environment.
|
156
|
+
#
|
157
|
+
# @param location [String] The location for the cluster code versions. This is
|
158
|
+
# different from cluster location.
|
159
|
+
# @param environment [Enum] The operating system of the cluster. The default
|
160
|
+
# means all. Possible values include: 'Windows', 'Linux'
|
161
|
+
# @param cluster_version [String] The cluster code version.
|
162
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
163
|
+
# will be added to the HTTP request.
|
164
|
+
#
|
165
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
166
|
+
#
|
167
|
+
def get_by_environment_with_http_info(location, environment, cluster_version, custom_headers:nil)
|
168
|
+
get_by_environment_async(location, environment, cluster_version, custom_headers:custom_headers).value!
|
169
|
+
end
|
170
|
+
|
171
|
+
#
|
172
|
+
# Gets information about a Service Fabric cluster code version available for
|
173
|
+
# the specified environment.
|
174
|
+
#
|
175
|
+
# Gets information about an available Service Fabric cluster code version by
|
176
|
+
# environment.
|
177
|
+
#
|
178
|
+
# @param location [String] The location for the cluster code versions. This is
|
179
|
+
# different from cluster location.
|
180
|
+
# @param environment [Enum] The operating system of the cluster. The default
|
181
|
+
# means all. Possible values include: 'Windows', 'Linux'
|
182
|
+
# @param cluster_version [String] The cluster code version.
|
183
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
184
|
+
# to the HTTP request.
|
185
|
+
#
|
186
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
187
|
+
#
|
188
|
+
def get_by_environment_async(location, environment, cluster_version, custom_headers:nil)
|
189
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
190
|
+
fail ArgumentError, 'environment is nil' if environment.nil?
|
191
|
+
@client.api_version = '2018-02-01'
|
192
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
193
|
+
fail ArgumentError, 'cluster_version is nil' if cluster_version.nil?
|
194
|
+
|
195
|
+
|
196
|
+
request_headers = {}
|
197
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
198
|
+
|
199
|
+
# Set Headers
|
200
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
201
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
202
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions/{clusterVersion}'
|
203
|
+
|
204
|
+
request_url = @base_url || @client.base_url
|
205
|
+
|
206
|
+
options = {
|
207
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
208
|
+
path_params: {'location' => location,'environment' => environment,'subscriptionId' => @client.subscription_id,'clusterVersion' => cluster_version},
|
209
|
+
query_params: {'api-version' => @client.api_version},
|
210
|
+
headers: request_headers.merge(custom_headers || {}),
|
211
|
+
base_url: request_url
|
212
|
+
}
|
213
|
+
promise = @client.make_request_async(:get, path_template, options)
|
214
|
+
|
215
|
+
promise = promise.then do |result|
|
216
|
+
http_response = result.response
|
217
|
+
status_code = http_response.status
|
218
|
+
response_content = http_response.body
|
219
|
+
unless status_code == 200
|
220
|
+
error_model = JSON.load(response_content)
|
221
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
222
|
+
end
|
223
|
+
|
224
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-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::ServiceFabric::Mgmt::V2018_02_01::Models::ClusterCodeVersionsListResult.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
|
+
# Gets the list of Service Fabric cluster code versions available for the
|
244
|
+
# specified location.
|
245
|
+
#
|
246
|
+
# Gets all available code versions for Service Fabric cluster resources by
|
247
|
+
# location.
|
248
|
+
#
|
249
|
+
# @param location [String] The location for the cluster code versions. This is
|
250
|
+
# different from cluster location.
|
251
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
252
|
+
# will be added to the HTTP request.
|
253
|
+
#
|
254
|
+
# @return [ClusterCodeVersionsListResult] operation results.
|
255
|
+
#
|
256
|
+
def list(location, custom_headers:nil)
|
257
|
+
response = list_async(location, custom_headers:custom_headers).value!
|
258
|
+
response.body unless response.nil?
|
259
|
+
end
|
260
|
+
|
261
|
+
#
|
262
|
+
# Gets the list of Service Fabric cluster code versions available for the
|
263
|
+
# specified location.
|
264
|
+
#
|
265
|
+
# Gets all available code versions for Service Fabric cluster resources by
|
266
|
+
# location.
|
267
|
+
#
|
268
|
+
# @param location [String] The location for the cluster code versions. This is
|
269
|
+
# different from cluster location.
|
270
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
271
|
+
# will be added to the HTTP request.
|
272
|
+
#
|
273
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
274
|
+
#
|
275
|
+
def list_with_http_info(location, custom_headers:nil)
|
276
|
+
list_async(location, custom_headers:custom_headers).value!
|
277
|
+
end
|
278
|
+
|
279
|
+
#
|
280
|
+
# Gets the list of Service Fabric cluster code versions available for the
|
281
|
+
# specified location.
|
282
|
+
#
|
283
|
+
# Gets all available code versions for Service Fabric cluster resources by
|
284
|
+
# location.
|
285
|
+
#
|
286
|
+
# @param location [String] The location for the cluster code versions. This is
|
287
|
+
# different from cluster location.
|
288
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
289
|
+
# to the HTTP request.
|
290
|
+
#
|
291
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
292
|
+
#
|
293
|
+
def list_async(location, custom_headers:nil)
|
294
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
295
|
+
@client.api_version = '2018-02-01'
|
296
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
297
|
+
|
298
|
+
|
299
|
+
request_headers = {}
|
300
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
301
|
+
|
302
|
+
# Set Headers
|
303
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
304
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
305
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions'
|
306
|
+
|
307
|
+
request_url = @base_url || @client.base_url
|
308
|
+
|
309
|
+
options = {
|
310
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
311
|
+
path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
|
312
|
+
query_params: {'api-version' => @client.api_version},
|
313
|
+
headers: request_headers.merge(custom_headers || {}),
|
314
|
+
base_url: request_url
|
315
|
+
}
|
316
|
+
promise = @client.make_request_async(:get, path_template, options)
|
317
|
+
|
318
|
+
promise = promise.then do |result|
|
319
|
+
http_response = result.response
|
320
|
+
status_code = http_response.status
|
321
|
+
response_content = http_response.body
|
322
|
+
unless status_code == 200
|
323
|
+
error_model = JSON.load(response_content)
|
324
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
325
|
+
end
|
326
|
+
|
327
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
328
|
+
# Deserialize Response
|
329
|
+
if status_code == 200
|
330
|
+
begin
|
331
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
332
|
+
result_mapper = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ClusterCodeVersionsListResult.mapper()
|
333
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
334
|
+
rescue Exception => e
|
335
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
result
|
340
|
+
end
|
341
|
+
|
342
|
+
promise.execute
|
343
|
+
end
|
344
|
+
|
345
|
+
#
|
346
|
+
# Gets the list of Service Fabric cluster code versions available for the
|
347
|
+
# specified environment.
|
348
|
+
#
|
349
|
+
# Gets all available code versions for Service Fabric cluster resources by
|
350
|
+
# environment.
|
351
|
+
#
|
352
|
+
# @param location [String] The location for the cluster code versions. This is
|
353
|
+
# different from cluster location.
|
354
|
+
# @param environment [Enum] The operating system of the cluster. The default
|
355
|
+
# means all. Possible values include: 'Windows', 'Linux'
|
356
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
357
|
+
# will be added to the HTTP request.
|
358
|
+
#
|
359
|
+
# @return [ClusterCodeVersionsListResult] operation results.
|
360
|
+
#
|
361
|
+
def list_by_environment(location, environment, custom_headers:nil)
|
362
|
+
response = list_by_environment_async(location, environment, custom_headers:custom_headers).value!
|
363
|
+
response.body unless response.nil?
|
364
|
+
end
|
365
|
+
|
366
|
+
#
|
367
|
+
# Gets the list of Service Fabric cluster code versions available for the
|
368
|
+
# specified environment.
|
369
|
+
#
|
370
|
+
# Gets all available code versions for Service Fabric cluster resources by
|
371
|
+
# environment.
|
372
|
+
#
|
373
|
+
# @param location [String] The location for the cluster code versions. This is
|
374
|
+
# different from cluster location.
|
375
|
+
# @param environment [Enum] The operating system of the cluster. The default
|
376
|
+
# means all. Possible values include: 'Windows', 'Linux'
|
377
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
378
|
+
# will be added to the HTTP request.
|
379
|
+
#
|
380
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
381
|
+
#
|
382
|
+
def list_by_environment_with_http_info(location, environment, custom_headers:nil)
|
383
|
+
list_by_environment_async(location, environment, custom_headers:custom_headers).value!
|
384
|
+
end
|
385
|
+
|
386
|
+
#
|
387
|
+
# Gets the list of Service Fabric cluster code versions available for the
|
388
|
+
# specified environment.
|
389
|
+
#
|
390
|
+
# Gets all available code versions for Service Fabric cluster resources by
|
391
|
+
# environment.
|
392
|
+
#
|
393
|
+
# @param location [String] The location for the cluster code versions. This is
|
394
|
+
# different from cluster location.
|
395
|
+
# @param environment [Enum] The operating system of the cluster. The default
|
396
|
+
# means all. Possible values include: 'Windows', 'Linux'
|
397
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
398
|
+
# to the HTTP request.
|
399
|
+
#
|
400
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
401
|
+
#
|
402
|
+
def list_by_environment_async(location, environment, custom_headers:nil)
|
403
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
404
|
+
fail ArgumentError, 'environment is nil' if environment.nil?
|
405
|
+
@client.api_version = '2018-02-01'
|
406
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
407
|
+
|
408
|
+
|
409
|
+
request_headers = {}
|
410
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
411
|
+
|
412
|
+
# Set Headers
|
413
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
414
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
415
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions'
|
416
|
+
|
417
|
+
request_url = @base_url || @client.base_url
|
418
|
+
|
419
|
+
options = {
|
420
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
421
|
+
path_params: {'location' => location,'environment' => environment,'subscriptionId' => @client.subscription_id},
|
422
|
+
query_params: {'api-version' => @client.api_version},
|
423
|
+
headers: request_headers.merge(custom_headers || {}),
|
424
|
+
base_url: request_url
|
425
|
+
}
|
426
|
+
promise = @client.make_request_async(:get, path_template, options)
|
427
|
+
|
428
|
+
promise = promise.then do |result|
|
429
|
+
http_response = result.response
|
430
|
+
status_code = http_response.status
|
431
|
+
response_content = http_response.body
|
432
|
+
unless status_code == 200
|
433
|
+
error_model = JSON.load(response_content)
|
434
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
435
|
+
end
|
436
|
+
|
437
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
438
|
+
# Deserialize Response
|
439
|
+
if status_code == 200
|
440
|
+
begin
|
441
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
442
|
+
result_mapper = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ClusterCodeVersionsListResult.mapper()
|
443
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
444
|
+
rescue Exception => e
|
445
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
result
|
450
|
+
end
|
451
|
+
|
452
|
+
promise.execute
|
453
|
+
end
|
454
|
+
|
455
|
+
end
|
456
|
+
end
|