Class: Azure::Resources::Mgmt::V2018_06_01::Applications
- Inherits:
-
Object
- Object
- Azure::Resources::Mgmt::V2018_06_01::Applications
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-06-01/generated/azure_mgmt_resources/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/2018-06-01/generated/azure_mgmt_resources/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/2018-06-01/generated/azure_mgmt_resources/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.
922 923 924 925 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 922 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.
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 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 957 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::Resources::Mgmt::V2018_06_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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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::Resources::Mgmt::V2018_06_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.
1136 1137 1138 1139 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1136 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.
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 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1173 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::Resources::Mgmt::V2018_06_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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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::Resources::Mgmt::V2018_06_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.
1155 1156 1157 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1155 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.
940 941 942 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 940 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.
828 829 830 831 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 828 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.
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 894 895 896 897 898 899 900 901 902 903 904 905 906 907 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 859 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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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.
1046 1047 1048 1049 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1046 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.
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1079 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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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.
1063 1064 1065 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1063 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.
844 845 846 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 844 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.
179 180 181 182 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 179 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.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 196 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::Resources::Mgmt::V2018_06_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.
668 669 670 671 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 668 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.
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 686 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::Resources::Mgmt::V2018_06_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.
135 136 137 138 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 135 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.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 150 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.
622 623 624 625 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 622 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.
638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 638 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/2018-06-01/generated/azure_mgmt_resources/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 123 124 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
526 527 528 529 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 526 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.
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 601 602 603 604 605 606 607 608 609 610 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 559 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
543 544 545 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 543 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/2018-06-01/generated/azure_mgmt_resources/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.
342 343 344 345 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 342 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.
1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1435 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.
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 421 422 423 424 425 426 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 371 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
1254 1255 1256 1257 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1254 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.
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 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1283 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
1269 1270 1271 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1269 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.
357 358 359 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 357 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.
436 437 438 439 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 436 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.
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1455 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.
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 505 506 507 508 509 510 511 512 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 461 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
1344 1345 1346 1347 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1344 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.
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 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1373 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
1359 1360 1361 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 1359 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.
449 450 451 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 449 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.
228 229 230 231 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 228 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.
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 327 328 329 330 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 265 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::Resources::Mgmt::V2018_06_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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
719 720 721 722 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 719 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.
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 805 806 807 808 809 810 811 812 813 814 815 816 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 758 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::Resources::Mgmt::V2018_06_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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::Resources::Mgmt::V2018_06_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.
739 740 741 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 739 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.
247 248 249 |
# File 'lib/2018-06-01/generated/azure_mgmt_resources/applications.rb', line 247 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 |