Class: Azure::ManagedApplications::Mgmt::V2017_09_01::Applications
- Inherits:
-
Object
- Object
- Azure::ManagedApplications::Mgmt::V2017_09_01::Applications
- Includes:
- MsRestAzure
- Defined in:
- lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb
Overview
ARM applications
Instance Attribute Summary collapse
-
#client ⇒ ApplicationClient
readonly
Reference to the ApplicationClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
-
#begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new managed application.
-
#begin_create_or_update_by_id(application_id, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
-
#begin_create_or_update_by_id_async(application_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new managed application.
-
#begin_create_or_update_by_id_with_http_info(application_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new managed application.
-
#begin_create_or_update_with_http_info(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new managed application.
-
#begin_delete(resource_group_name, application_name, custom_headers: nil) ⇒ Object
Deletes the managed application.
-
#begin_delete_async(resource_group_name, application_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the managed application.
-
#begin_delete_by_id(application_id, custom_headers: nil) ⇒ Object
Deletes the managed application.
-
#begin_delete_by_id_async(application_id, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the managed application.
-
#begin_delete_by_id_with_http_info(application_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the managed application.
-
#begin_delete_with_http_info(resource_group_name, application_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the managed application.
-
#create_or_update(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
-
#create_or_update_async(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
is case insensitive.
-
#create_or_update_by_id(application_id, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
-
#create_or_update_by_id_async(application_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
application, including the managed application name and the managed application resource type.
-
#delete(resource_group_name, application_name, custom_headers: nil) ⇒ Object
Deletes the managed application.
-
#delete_async(resource_group_name, application_name, custom_headers: nil) ⇒ Concurrent::Promise
is case insensitive.
-
#delete_by_id(application_id, custom_headers: nil) ⇒ Object
Deletes the managed application.
-
#delete_by_id_async(application_id, custom_headers: nil) ⇒ Concurrent::Promise
application, including the managed application name and the managed application resource type.
-
#get(resource_group_name, application_name, custom_headers: nil) ⇒ Application
Gets the managed application.
-
#get_async(resource_group_name, application_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the managed application.
-
#get_by_id(application_id, custom_headers: nil) ⇒ Application
Gets the managed application.
-
#get_by_id_async(application_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets the managed application.
-
#get_by_id_with_http_info(application_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the managed application.
-
#get_with_http_info(resource_group_name, application_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the managed application.
-
#initialize(client) ⇒ Applications
constructor
Creates and initializes a new instance of the Applications class.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<Application>
Gets all the applications within a resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a resource group.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a resource group.
-
#list_by_subscription(custom_headers: nil) ⇒ Array<Application>
Gets all the applications within a subscription.
-
#list_by_subscription_as_lazy(custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a subscription.
-
#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a subscription.
-
#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a subscription.
-
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a subscription.
-
#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a subscription.
-
#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a subscription.
-
#update(resource_group_name, application_name, parameters: nil, custom_headers: nil) ⇒ Application
Updates an existing managed application.
-
#update_async(resource_group_name, application_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Updates an existing managed application.
-
#update_by_id(application_id, parameters: nil, custom_headers: nil) ⇒ Application
Updates an existing managed application.
-
#update_by_id_async(application_id, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Updates an existing managed application.
-
#update_by_id_with_http_info(application_id, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates an existing managed application.
-
#update_with_http_info(resource_group_name, application_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates an existing managed application.
Constructor Details
#initialize(client) ⇒ Applications
Creates and initializes a new instance of the Applications class.
17 18 19 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ApplicationClient (readonly)
Returns reference to the ApplicationClient.
22 23 24 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 22 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
is case insensitive. managed application. will be added to the HTTP request.
908 909 910 911 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 908 def begin_create_or_update(resource_group_name, application_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new managed application.
is case insensitive. managed application. to the HTTP request.
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 943 def begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'application_name is nil' if application_name.nil? fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64 fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '3'" if !application_name.nil? && application_name.length < 3 fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.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? # Serialize Request request_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'applicationName' => application_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, 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 || status_code == 201 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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 # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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 |
#begin_create_or_update_by_id(application_id, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. will be added to the HTTP request.
1118 1119 1120 1121 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1118 def begin_create_or_update_by_id(application_id, parameters, custom_headers:nil) response = begin_create_or_update_by_id_async(application_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_by_id_async(application_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. to the HTTP request.
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1155 def begin_create_or_update_by_id_async(application_id, parameters, custom_headers:nil) fail ArgumentError, 'application_id is nil' if application_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_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? # Serialize Request request_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{applicationId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'applicationId' => application_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, 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 || status_code == 201 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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 # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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 |
#begin_create_or_update_by_id_with_http_info(application_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. will be added to the HTTP request.
1137 1138 1139 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1137 def begin_create_or_update_by_id_with_http_info(application_id, parameters, custom_headers:nil) begin_create_or_update_by_id_async(application_id, parameters, custom_headers:custom_headers).value! end |
#begin_create_or_update_with_http_info(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new managed application.
is case insensitive. managed application. will be added to the HTTP request.
926 927 928 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 926 def begin_create_or_update_with_http_info(resource_group_name, application_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, application_name, custom_headers: nil) ⇒ Object
Deletes the managed application.
is case insensitive. will be added to the HTTP request.
816 817 818 819 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 816 def begin_delete(resource_group_name, application_name, custom_headers:nil) response = begin_delete_async(resource_group_name, application_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, application_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the managed application.
is case insensitive. to the HTTP request.
847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 847 def begin_delete_async(resource_group_name, application_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'application_name is nil' if application_name.nil? fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64 fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '3'" if !application_name.nil? && application_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'applicationName' => application_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.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? result end promise.execute end |
#begin_delete_by_id(application_id, custom_headers: nil) ⇒ Object
Deletes the managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name will be added to the HTTP request.
1030 1031 1032 1033 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1030 def begin_delete_by_id(application_id, custom_headers:nil) response = begin_delete_by_id_async(application_id, custom_headers:custom_headers).value! nil end |
#begin_delete_by_id_async(application_id, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name to the HTTP request.
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1063 def begin_delete_by_id_async(application_id, custom_headers:nil) fail ArgumentError, 'application_id is nil' if application_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_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 = '{applicationId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'applicationId' => application_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.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? result end promise.execute end |
#begin_delete_by_id_with_http_info(application_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name will be added to the HTTP request.
1047 1048 1049 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1047 def begin_delete_by_id_with_http_info(application_id, custom_headers:nil) begin_delete_by_id_async(application_id, custom_headers:custom_headers).value! end |
#begin_delete_with_http_info(resource_group_name, application_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the managed application.
is case insensitive. will be added to the HTTP request.
832 833 834 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 832 def begin_delete_with_http_info(resource_group_name, application_name, custom_headers:nil) begin_delete_async(resource_group_name, application_name, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
is case insensitive. managed application. will be added to the HTTP request.
177 178 179 180 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 177 def create_or_update(resource_group_name, application_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, application_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, application_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
is case insensitive. managed application. will be added to the HTTP request.
response.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 194 def create_or_update_async(resource_group_name, application_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#create_or_update_by_id(application_id, parameters, custom_headers: nil) ⇒ Application
Creates a new managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. will be added to the HTTP request.
658 659 660 661 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 658 def create_or_update_by_id(application_id, parameters, custom_headers:nil) response = create_or_update_by_id_async(application_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_by_id_async(application_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. will be added to the HTTP request.
response.
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 676 def create_or_update_by_id_async(application_id, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_by_id_async(application_id, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, application_name, custom_headers: nil) ⇒ Object
Deletes the managed application.
is case insensitive. will be added to the HTTP request.
133 134 135 136 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 133 def delete(resource_group_name, application_name, custom_headers:nil) response = delete_async(resource_group_name, application_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, application_name, custom_headers: nil) ⇒ Concurrent::Promise
is case insensitive. will be added to the HTTP request.
response.
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 148 def delete_async(resource_group_name, application_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, application_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete_by_id(application_id, custom_headers: nil) ⇒ Object
Deletes the managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name will be added to the HTTP request.
612 613 614 615 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 612 def delete_by_id(application_id, custom_headers:nil) response = delete_by_id_async(application_id, custom_headers:custom_headers).value! nil end |
#delete_by_id_async(application_id, custom_headers: nil) ⇒ Concurrent::Promise
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name will be added to the HTTP request.
response.
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 628 def delete_by_id_async(application_id, custom_headers:nil) # Send request promise = begin_delete_by_id_async(application_id, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, application_name, custom_headers: nil) ⇒ Application
Gets the managed application.
is case insensitive. will be added to the HTTP request.
35 36 37 38 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 35 def get(resource_group_name, application_name, custom_headers:nil) response = get_async(resource_group_name, application_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, application_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the managed application.
is case insensitive. to the HTTP request.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 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 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 66 def get_async(resource_group_name, application_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'application_name is nil' if application_name.nil? fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64 fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '3'" if !application_name.nil? && application_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'applicationName' => application_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.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 || status_code == 404 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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_id(application_id, custom_headers: nil) ⇒ Application
Gets the managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name will be added to the HTTP request.
518 519 520 521 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 518 def get_by_id(application_id, custom_headers:nil) response = get_by_id_async(application_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_by_id_async(application_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets the managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name to the HTTP request.
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 551 def get_by_id_async(application_id, custom_headers:nil) fail ArgumentError, 'application_id is nil' if application_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_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 = '{applicationId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'applicationId' => application_id}, query_params: {'api-version' => @client.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 || status_code == 404 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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_id_with_http_info(application_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the managed application.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name will be added to the HTTP request.
535 536 537 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 535 def get_by_id_with_http_info(application_id, custom_headers:nil) get_by_id_async(application_id, custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, application_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the managed application.
is case insensitive. will be added to the HTTP request.
51 52 53 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 51 def get_with_http_info(resource_group_name, application_name, custom_headers:nil) get_async(resource_group_name, application_name, custom_headers:custom_headers).value! end |
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<Application>
Gets all the applications within a resource group.
is case insensitive. will be added to the HTTP request.
338 339 340 341 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 338 def list_by_resource_group(resource_group_name, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a resource group.
is case insensitive. will be added to the HTTP request.
response.
1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1411 def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a resource group.
is case insensitive. to the HTTP request.
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 367 def list_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.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 MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::ApplicationListResult.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_resource_group_next(next_page_link, custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a resource group.
to List operation. will be added to the HTTP request.
1234 1235 1236 1237 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1234 def list_by_resource_group_next(next_page_link, custom_headers:nil) response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a resource group.
to List operation. to the HTTP request.
1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1263 def list_by_resource_group_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, 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 MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::ApplicationListResult.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_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a resource group.
to List operation. will be added to the HTTP request.
1249 1250 1251 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1249 def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a resource group.
is case insensitive. will be added to the HTTP request.
353 354 355 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 353 def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! end |
#list_by_subscription(custom_headers: nil) ⇒ Array<Application>
Gets all the applications within a subscription.
will be added to the HTTP request.
430 431 432 433 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 430 def list_by_subscription(custom_headers:nil) first_page = list_by_subscription_as_lazy(custom_headers:custom_headers) first_page.get_all_items end |
#list_by_subscription_as_lazy(custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a subscription.
will be added to the HTTP request.
response.
1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1431 def list_by_subscription_as_lazy(custom_headers:nil) response = list_by_subscription_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_subscription_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a subscription.
to the HTTP request.
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 455 def list_by_subscription_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.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.Solutions/applications' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.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 MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::ApplicationListResult.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_subscription_next(next_page_link, custom_headers: nil) ⇒ ApplicationListResult
Gets all the applications within a subscription.
to List operation. will be added to the HTTP request.
1322 1323 1324 1325 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1322 def list_by_subscription_next(next_page_link, custom_headers:nil) response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the applications within a subscription.
to List operation. to the HTTP request.
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1351 def list_by_subscription_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, 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 MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::ApplicationListResult.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_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a subscription.
to List operation. will be added to the HTTP request.
1337 1338 1339 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 1337 def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the applications within a subscription.
will be added to the HTTP request.
443 444 445 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 443 def list_by_subscription_with_http_info(custom_headers:nil) list_by_subscription_async(custom_headers:custom_headers).value! end |
#update(resource_group_name, application_name, parameters: nil, custom_headers: nil) ⇒ Application
Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.
is case insensitive. managed application. will be added to the HTTP request.
226 227 228 229 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 226 def update(resource_group_name, application_name, parameters:nil, custom_headers:nil) response = update_async(resource_group_name, application_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, application_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.
is case insensitive. managed application. to the HTTP request.
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 263 def update_async(resource_group_name, application_name, parameters:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'application_name is nil' if application_name.nil? fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64 fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '3'" if !application_name.nil? && application_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.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? # Serialize Request request_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'applicationName' => application_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, 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 MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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 |
#update_by_id(application_id, parameters: nil, custom_headers: nil) ⇒ Application
Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. will be added to the HTTP request.
709 710 711 712 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 709 def update_by_id(application_id, parameters:nil, custom_headers:nil) response = update_by_id_async(application_id, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_by_id_async(application_id, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. to the HTTP request.
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 748 def update_by_id_async(application_id, parameters:nil, custom_headers:nil) fail ArgumentError, 'application_id is nil' if application_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_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? # Serialize Request request_mapper = Azure::ManagedApplications::Mgmt::V2017_09_01::Models::Application.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{applicationId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'applicationId' => application_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, 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 MsRest::HttpOperationError.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::ManagedApplications::Mgmt::V2017_09_01::Models::Application.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 |
#update_by_id_with_http_info(application_id, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.
application, including the managed application name and the managed application resource type. Use the format, /subscriptions/guid/resourceGroups/resource-group-name/Microsoft.Solutions/applications/application-name managed application. will be added to the HTTP request.
729 730 731 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 729 def update_by_id_with_http_info(application_id, parameters:nil, custom_headers:nil) update_by_id_async(application_id, parameters:parameters, custom_headers:custom_headers).value! end |
#update_with_http_info(resource_group_name, application_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.
is case insensitive. managed application. will be added to the HTTP request.
245 246 247 |
# File 'lib/2017-09-01/generated/azure_mgmt_managed_applications/applications.rb', line 245 def update_with_http_info(resource_group_name, application_name, parameters:nil, custom_headers:nil) update_async(resource_group_name, application_name, parameters:parameters, custom_headers:custom_headers).value! end |