azure_mgmt_batch 0.15.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-12-01/generated/azure_mgmt_batch/application_operations.rb +39 -37
- data/lib/2015-12-01/generated/azure_mgmt_batch/application_package_operations.rb +24 -22
- data/lib/2015-12-01/generated/azure_mgmt_batch/batch_account_operations.rb +80 -75
- data/lib/2015-12-01/generated/azure_mgmt_batch/batch_management_client.rb +4 -1
- data/lib/2015-12-01/generated/azure_mgmt_batch/location.rb +6 -5
- data/lib/2017-01-01/generated/azure_mgmt_batch.rb +52 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/application_operations.rb +657 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/application_package_operations.rb +445 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/batch_account_operations.rb +1281 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/batch_management_client.rb +143 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/location.rb +116 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/account_key_type.rb +16 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb +47 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/add_application_parameters.rb +58 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/application.rb +103 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/application_package.rb +125 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb +47 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/auto_storage_properties.rb +60 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_account.rb +196 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +110 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_account_keys.rb +59 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +99 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb +48 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb +68 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_location_quota.rb +48 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/key_vault_reference.rb +59 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/list_applications_result.rb +98 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/package_state.rb +17 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/pool_allocation_mode.rb +16 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/provisioning_state.rb +20 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/resource.rb +103 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/models/update_application_parameters.rb +70 -0
- data/lib/2017-01-01/generated/azure_mgmt_batch/module_definition.rb +9 -0
- data/lib/2017-05-01/generated/azure_mgmt_batch/application_operations.rb +39 -37
- data/lib/2017-05-01/generated/azure_mgmt_batch/application_package_operations.rb +24 -22
- data/lib/2017-05-01/generated/azure_mgmt_batch/batch_account_operations.rb +80 -75
- data/lib/2017-05-01/generated/azure_mgmt_batch/batch_management_client.rb +4 -1
- data/lib/2017-05-01/generated/azure_mgmt_batch/location.rb +12 -12
- data/lib/2017-05-01/generated/azure_mgmt_batch/operations.rb +15 -13
- data/lib/2017-09-01/generated/azure_mgmt_batch.rb +113 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/application_operations.rb +655 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/application_package_operations.rb +441 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/batch_account_operations.rb +1273 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/batch_management_client.rb +155 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb +1009 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/location.rb +221 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/account_key_type.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb +46 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/allocation_state.rb +17 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/application.rb +103 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/application_create_parameters.rb +58 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/application_package.rb +125 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/application_package_reference.rb +64 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/application_update_parameters.rb +70 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/auto_scale_run.rb +74 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/auto_scale_run_error.rb +80 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/auto_scale_settings.rb +61 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb +47 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/auto_storage_properties.rb +56 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/auto_user_scope.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/auto_user_specification.rb +69 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_account.rb +208 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +110 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_account_keys.rb +71 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +99 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb +48 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb +68 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_location_quota.rb +48 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/caching_type.rb +17 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate.rb +205 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate_base_properties.rb +75 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate_create_or_update_parameters.rb +135 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate_format.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate_provisioning_state.rb +17 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate_reference.rb +120 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate_store_location.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/certificate_visibility.rb +17 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb +61 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/check_name_availability_result.rb +78 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/cloud_service_configuration.rb +83 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/compute_node_deallocation_option.rb +18 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/compute_node_fill_type.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/data_disk.rb +101 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/delete_certificate_error.rb +92 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/deployment_configuration.rb +66 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/elevation_level.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/environment_setting.rb +58 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/fixed_scale_settings.rb +93 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/image_reference.rb +108 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/inbound_endpoint_protocol.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/inbound_nat_pool.rb +141 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/inter_node_communication_state.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/key_vault_reference.rb +59 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/linux_user_configuration.rb +81 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/list_applications_result.rb +98 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/list_certificates_result.rb +98 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/list_pools_result.rb +98 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/metadata_item.rb +60 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/name_availability_reason.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/network_configuration.rb +86 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/network_security_group_rule.rb +82 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/network_security_group_rule_access.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/operation.rb +82 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/operation_display.rb +81 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/operation_list_result.rb +98 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/osdisk.rb +52 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/package_state.rb +17 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/pool.rb +474 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/pool_allocation_mode.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/pool_endpoint_configuration.rb +60 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/pool_provisioning_state.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/provisioning_state.rb +20 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/proxy_resource.rb +84 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/resize_error.rb +80 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/resize_operation_status.rb +127 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/resource.rb +103 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/resource_file.rb +79 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/scale_settings.rb +69 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/start_task.rb +151 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/storage_account_type.rb +16 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/task_scheduling_policy.rb +49 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/user_account.rb +89 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/user_identity.rb +64 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/virtual_machine_configuration.rb +138 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/models/windows_configuration.rb +48 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/module_definition.rb +9 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/operations.rb +215 -0
- data/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb +1132 -0
- data/lib/azure_mgmt_batch.rb +2 -0
- data/lib/profiles/latest/batch_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/batch_module_definition.rb +0 -1
- data/lib/profiles/latest/modules/batch_profile_module.rb +357 -126
- data/lib/version.rb +1 -1
- metadata +119 -2
@@ -121,6 +121,9 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
121
121
|
fail ArgumentError, 'path is nil' if path.nil?
|
122
122
|
|
123
123
|
request_url = options[:base_url] || @base_url
|
124
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
125
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
126
|
+
end
|
124
127
|
|
125
128
|
request_headers = @request_headers
|
126
129
|
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
@@ -137,7 +140,7 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
137
140
|
#
|
138
141
|
def add_telemetry
|
139
142
|
sdk_information = 'azure_mgmt_batch'
|
140
|
-
sdk_information = "#{sdk_information}/0.
|
143
|
+
sdk_information = "#{sdk_information}/0.16.0"
|
141
144
|
add_user_agent_information(sdk_information)
|
142
145
|
end
|
143
146
|
end
|
@@ -32,8 +32,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
32
32
|
#
|
33
33
|
# @return [BatchLocationQuota] operation results.
|
34
34
|
#
|
35
|
-
def get_quotas(location_name, custom_headers
|
36
|
-
response = get_quotas_async(location_name, custom_headers).value!
|
35
|
+
def get_quotas(location_name, custom_headers:nil)
|
36
|
+
response = get_quotas_async(location_name, custom_headers:custom_headers).value!
|
37
37
|
response.body unless response.nil?
|
38
38
|
end
|
39
39
|
|
@@ -48,8 +48,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
48
48
|
#
|
49
49
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
50
|
#
|
51
|
-
def get_quotas_with_http_info(location_name, custom_headers
|
52
|
-
get_quotas_async(location_name, custom_headers).value!
|
51
|
+
def get_quotas_with_http_info(location_name, custom_headers:nil)
|
52
|
+
get_quotas_async(location_name, custom_headers:custom_headers).value!
|
53
53
|
end
|
54
54
|
|
55
55
|
#
|
@@ -63,13 +63,14 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
63
63
|
#
|
64
64
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
65
|
#
|
66
|
-
def get_quotas_async(location_name, custom_headers
|
66
|
+
def get_quotas_async(location_name, custom_headers:nil)
|
67
67
|
fail ArgumentError, 'location_name is nil' if location_name.nil?
|
68
68
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
69
69
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
70
70
|
|
71
71
|
|
72
72
|
request_headers = {}
|
73
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
73
74
|
|
74
75
|
# Set Headers
|
75
76
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -125,8 +126,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
125
126
|
#
|
126
127
|
# @return [CheckNameAvailabilityResult] operation results.
|
127
128
|
#
|
128
|
-
def check_name_availability(location_name, parameters, custom_headers
|
129
|
-
response = check_name_availability_async(location_name, parameters, custom_headers).value!
|
129
|
+
def check_name_availability(location_name, parameters, custom_headers:nil)
|
130
|
+
response = check_name_availability_async(location_name, parameters, custom_headers:custom_headers).value!
|
130
131
|
response.body unless response.nil?
|
131
132
|
end
|
132
133
|
|
@@ -141,8 +142,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
141
142
|
#
|
142
143
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
143
144
|
#
|
144
|
-
def check_name_availability_with_http_info(location_name, parameters, custom_headers
|
145
|
-
check_name_availability_async(location_name, parameters, custom_headers).value!
|
145
|
+
def check_name_availability_with_http_info(location_name, parameters, custom_headers:nil)
|
146
|
+
check_name_availability_async(location_name, parameters, custom_headers:custom_headers).value!
|
146
147
|
end
|
147
148
|
|
148
149
|
#
|
@@ -156,7 +157,7 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
156
157
|
#
|
157
158
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
158
159
|
#
|
159
|
-
def check_name_availability_async(location_name, parameters, custom_headers
|
160
|
+
def check_name_availability_async(location_name, parameters, custom_headers:nil)
|
160
161
|
fail ArgumentError, 'location_name is nil' if location_name.nil?
|
161
162
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
162
163
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
@@ -164,13 +165,12 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
164
165
|
|
165
166
|
|
166
167
|
request_headers = {}
|
168
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
167
169
|
|
168
170
|
# Set Headers
|
169
171
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
170
172
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
171
173
|
|
172
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
173
|
-
|
174
174
|
# Serialize Request
|
175
175
|
request_mapper = Azure::Batch::Mgmt::V2017_05_01::Models::CheckNameAvailabilityParameters.mapper()
|
176
176
|
request_content = @client.serialize(request_mapper, parameters)
|
@@ -29,8 +29,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
29
29
|
#
|
30
30
|
# @return [Array<Operation>] operation results.
|
31
31
|
#
|
32
|
-
def list(custom_headers
|
33
|
-
first_page = list_as_lazy(custom_headers)
|
32
|
+
def list(custom_headers:nil)
|
33
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
34
34
|
first_page.get_all_items
|
35
35
|
end
|
36
36
|
|
@@ -42,8 +42,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
42
42
|
#
|
43
43
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
44
|
#
|
45
|
-
def list_with_http_info(custom_headers
|
46
|
-
list_async(custom_headers).value!
|
45
|
+
def list_with_http_info(custom_headers:nil)
|
46
|
+
list_async(custom_headers:custom_headers).value!
|
47
47
|
end
|
48
48
|
|
49
49
|
#
|
@@ -54,11 +54,12 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
54
54
|
#
|
55
55
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
56
|
#
|
57
|
-
def list_async(custom_headers
|
57
|
+
def list_async(custom_headers:nil)
|
58
58
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
59
59
|
|
60
60
|
|
61
61
|
request_headers = {}
|
62
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
62
63
|
|
63
64
|
# Set Headers
|
64
65
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -112,8 +113,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
112
113
|
#
|
113
114
|
# @return [OperationListResult] operation results.
|
114
115
|
#
|
115
|
-
def list_next(next_page_link, custom_headers
|
116
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
116
|
+
def list_next(next_page_link, custom_headers:nil)
|
117
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
117
118
|
response.body unless response.nil?
|
118
119
|
end
|
119
120
|
|
@@ -127,8 +128,8 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
127
128
|
#
|
128
129
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
129
130
|
#
|
130
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
131
|
-
list_next_async(next_page_link, custom_headers).value!
|
131
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
132
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
132
133
|
end
|
133
134
|
|
134
135
|
#
|
@@ -141,11 +142,12 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
141
142
|
#
|
142
143
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
143
144
|
#
|
144
|
-
def list_next_async(next_page_link, custom_headers
|
145
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
145
146
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
146
147
|
|
147
148
|
|
148
149
|
request_headers = {}
|
150
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
149
151
|
|
150
152
|
# Set Headers
|
151
153
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -198,12 +200,12 @@ module Azure::Batch::Mgmt::V2017_05_01
|
|
198
200
|
# @return [OperationListResult] which provide lazy access to pages of the
|
199
201
|
# response.
|
200
202
|
#
|
201
|
-
def list_as_lazy(custom_headers
|
202
|
-
response = list_async(custom_headers).value!
|
203
|
+
def list_as_lazy(custom_headers:nil)
|
204
|
+
response = list_async(custom_headers:custom_headers).value!
|
203
205
|
unless response.nil?
|
204
206
|
page = response.body
|
205
207
|
page.next_method = Proc.new do |next_page_link|
|
206
|
-
list_next_async(next_page_link, custom_headers)
|
208
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
207
209
|
end
|
208
210
|
page
|
209
211
|
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2017-09-01/generated/azure_mgmt_batch/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Batch::Mgmt::V2017_09_01
|
23
|
+
autoload :BatchAccountOperations, '2017-09-01/generated/azure_mgmt_batch/batch_account_operations.rb'
|
24
|
+
autoload :ApplicationPackageOperations, '2017-09-01/generated/azure_mgmt_batch/application_package_operations.rb'
|
25
|
+
autoload :ApplicationOperations, '2017-09-01/generated/azure_mgmt_batch/application_operations.rb'
|
26
|
+
autoload :Location, '2017-09-01/generated/azure_mgmt_batch/location.rb'
|
27
|
+
autoload :Operations, '2017-09-01/generated/azure_mgmt_batch/operations.rb'
|
28
|
+
autoload :CertificateOperations, '2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb'
|
29
|
+
autoload :PoolOperations, '2017-09-01/generated/azure_mgmt_batch/pool_operations.rb'
|
30
|
+
autoload :BatchManagementClient, '2017-09-01/generated/azure_mgmt_batch/batch_management_client.rb'
|
31
|
+
|
32
|
+
module Models
|
33
|
+
autoload :FixedScaleSettings, '2017-09-01/generated/azure_mgmt_batch/models/fixed_scale_settings.rb'
|
34
|
+
autoload :AutoStorageBaseProperties, '2017-09-01/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb'
|
35
|
+
autoload :AutoScaleSettings, '2017-09-01/generated/azure_mgmt_batch/models/auto_scale_settings.rb'
|
36
|
+
autoload :BatchAccountCreateParameters, '2017-09-01/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb'
|
37
|
+
autoload :ScaleSettings, '2017-09-01/generated/azure_mgmt_batch/models/scale_settings.rb'
|
38
|
+
autoload :KeyVaultReference, '2017-09-01/generated/azure_mgmt_batch/models/key_vault_reference.rb'
|
39
|
+
autoload :BatchAccountUpdateParameters, '2017-09-01/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb'
|
40
|
+
autoload :OperationDisplay, '2017-09-01/generated/azure_mgmt_batch/models/operation_display.rb'
|
41
|
+
autoload :BatchAccountRegenerateKeyParameters, '2017-09-01/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb'
|
42
|
+
autoload :OperationListResult, '2017-09-01/generated/azure_mgmt_batch/models/operation_list_result.rb'
|
43
|
+
autoload :ActivateApplicationPackageParameters, '2017-09-01/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb'
|
44
|
+
autoload :AutoScaleRunError, '2017-09-01/generated/azure_mgmt_batch/models/auto_scale_run_error.rb'
|
45
|
+
autoload :ApplicationPackage, '2017-09-01/generated/azure_mgmt_batch/models/application_package.rb'
|
46
|
+
autoload :AutoScaleRun, '2017-09-01/generated/azure_mgmt_batch/models/auto_scale_run.rb'
|
47
|
+
autoload :ListApplicationsResult, '2017-09-01/generated/azure_mgmt_batch/models/list_applications_result.rb'
|
48
|
+
autoload :NetworkSecurityGroupRule, '2017-09-01/generated/azure_mgmt_batch/models/network_security_group_rule.rb'
|
49
|
+
autoload :BatchLocationQuota, '2017-09-01/generated/azure_mgmt_batch/models/batch_location_quota.rb'
|
50
|
+
autoload :InboundNatPool, '2017-09-01/generated/azure_mgmt_batch/models/inbound_nat_pool.rb'
|
51
|
+
autoload :ProxyResource, '2017-09-01/generated/azure_mgmt_batch/models/proxy_resource.rb'
|
52
|
+
autoload :PoolEndpointConfiguration, '2017-09-01/generated/azure_mgmt_batch/models/pool_endpoint_configuration.rb'
|
53
|
+
autoload :DeleteCertificateError, '2017-09-01/generated/azure_mgmt_batch/models/delete_certificate_error.rb'
|
54
|
+
autoload :NetworkConfiguration, '2017-09-01/generated/azure_mgmt_batch/models/network_configuration.rb'
|
55
|
+
autoload :CheckNameAvailabilityParameters, '2017-09-01/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb'
|
56
|
+
autoload :TaskSchedulingPolicy, '2017-09-01/generated/azure_mgmt_batch/models/task_scheduling_policy.rb'
|
57
|
+
autoload :CloudServiceConfiguration, '2017-09-01/generated/azure_mgmt_batch/models/cloud_service_configuration.rb'
|
58
|
+
autoload :LinuxUserConfiguration, '2017-09-01/generated/azure_mgmt_batch/models/linux_user_configuration.rb'
|
59
|
+
autoload :OSDisk, '2017-09-01/generated/azure_mgmt_batch/models/osdisk.rb'
|
60
|
+
autoload :UserAccount, '2017-09-01/generated/azure_mgmt_batch/models/user_account.rb'
|
61
|
+
autoload :DataDisk, '2017-09-01/generated/azure_mgmt_batch/models/data_disk.rb'
|
62
|
+
autoload :MetadataItem, '2017-09-01/generated/azure_mgmt_batch/models/metadata_item.rb'
|
63
|
+
autoload :DeploymentConfiguration, '2017-09-01/generated/azure_mgmt_batch/models/deployment_configuration.rb'
|
64
|
+
autoload :ResourceFile, '2017-09-01/generated/azure_mgmt_batch/models/resource_file.rb'
|
65
|
+
autoload :BatchAccountKeys, '2017-09-01/generated/azure_mgmt_batch/models/batch_account_keys.rb'
|
66
|
+
autoload :EnvironmentSetting, '2017-09-01/generated/azure_mgmt_batch/models/environment_setting.rb'
|
67
|
+
autoload :Application, '2017-09-01/generated/azure_mgmt_batch/models/application.rb'
|
68
|
+
autoload :AutoUserSpecification, '2017-09-01/generated/azure_mgmt_batch/models/auto_user_specification.rb'
|
69
|
+
autoload :Resource, '2017-09-01/generated/azure_mgmt_batch/models/resource.rb'
|
70
|
+
autoload :UserIdentity, '2017-09-01/generated/azure_mgmt_batch/models/user_identity.rb'
|
71
|
+
autoload :CheckNameAvailabilityResult, '2017-09-01/generated/azure_mgmt_batch/models/check_name_availability_result.rb'
|
72
|
+
autoload :StartTask, '2017-09-01/generated/azure_mgmt_batch/models/start_task.rb'
|
73
|
+
autoload :ImageReference, '2017-09-01/generated/azure_mgmt_batch/models/image_reference.rb'
|
74
|
+
autoload :CertificateReference, '2017-09-01/generated/azure_mgmt_batch/models/certificate_reference.rb'
|
75
|
+
autoload :VirtualMachineConfiguration, '2017-09-01/generated/azure_mgmt_batch/models/virtual_machine_configuration.rb'
|
76
|
+
autoload :ApplicationPackageReference, '2017-09-01/generated/azure_mgmt_batch/models/application_package_reference.rb'
|
77
|
+
autoload :ApplicationCreateParameters, '2017-09-01/generated/azure_mgmt_batch/models/application_create_parameters.rb'
|
78
|
+
autoload :ResizeError, '2017-09-01/generated/azure_mgmt_batch/models/resize_error.rb'
|
79
|
+
autoload :CertificateBaseProperties, '2017-09-01/generated/azure_mgmt_batch/models/certificate_base_properties.rb'
|
80
|
+
autoload :ResizeOperationStatus, '2017-09-01/generated/azure_mgmt_batch/models/resize_operation_status.rb'
|
81
|
+
autoload :WindowsConfiguration, '2017-09-01/generated/azure_mgmt_batch/models/windows_configuration.rb'
|
82
|
+
autoload :Operation, '2017-09-01/generated/azure_mgmt_batch/models/operation.rb'
|
83
|
+
autoload :ApplicationUpdateParameters, '2017-09-01/generated/azure_mgmt_batch/models/application_update_parameters.rb'
|
84
|
+
autoload :ListPoolsResult, '2017-09-01/generated/azure_mgmt_batch/models/list_pools_result.rb'
|
85
|
+
autoload :BatchAccountListResult, '2017-09-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb'
|
86
|
+
autoload :ListCertificatesResult, '2017-09-01/generated/azure_mgmt_batch/models/list_certificates_result.rb'
|
87
|
+
autoload :AutoStorageProperties, '2017-09-01/generated/azure_mgmt_batch/models/auto_storage_properties.rb'
|
88
|
+
autoload :BatchAccount, '2017-09-01/generated/azure_mgmt_batch/models/batch_account.rb'
|
89
|
+
autoload :Certificate, '2017-09-01/generated/azure_mgmt_batch/models/certificate.rb'
|
90
|
+
autoload :CertificateCreateOrUpdateParameters, '2017-09-01/generated/azure_mgmt_batch/models/certificate_create_or_update_parameters.rb'
|
91
|
+
autoload :Pool, '2017-09-01/generated/azure_mgmt_batch/models/pool.rb'
|
92
|
+
autoload :PoolAllocationMode, '2017-09-01/generated/azure_mgmt_batch/models/pool_allocation_mode.rb'
|
93
|
+
autoload :ProvisioningState, '2017-09-01/generated/azure_mgmt_batch/models/provisioning_state.rb'
|
94
|
+
autoload :AccountKeyType, '2017-09-01/generated/azure_mgmt_batch/models/account_key_type.rb'
|
95
|
+
autoload :PackageState, '2017-09-01/generated/azure_mgmt_batch/models/package_state.rb'
|
96
|
+
autoload :CertificateFormat, '2017-09-01/generated/azure_mgmt_batch/models/certificate_format.rb'
|
97
|
+
autoload :CertificateProvisioningState, '2017-09-01/generated/azure_mgmt_batch/models/certificate_provisioning_state.rb'
|
98
|
+
autoload :PoolProvisioningState, '2017-09-01/generated/azure_mgmt_batch/models/pool_provisioning_state.rb'
|
99
|
+
autoload :AllocationState, '2017-09-01/generated/azure_mgmt_batch/models/allocation_state.rb'
|
100
|
+
autoload :CachingType, '2017-09-01/generated/azure_mgmt_batch/models/caching_type.rb'
|
101
|
+
autoload :StorageAccountType, '2017-09-01/generated/azure_mgmt_batch/models/storage_account_type.rb'
|
102
|
+
autoload :ComputeNodeDeallocationOption, '2017-09-01/generated/azure_mgmt_batch/models/compute_node_deallocation_option.rb'
|
103
|
+
autoload :InterNodeCommunicationState, '2017-09-01/generated/azure_mgmt_batch/models/inter_node_communication_state.rb'
|
104
|
+
autoload :InboundEndpointProtocol, '2017-09-01/generated/azure_mgmt_batch/models/inbound_endpoint_protocol.rb'
|
105
|
+
autoload :NetworkSecurityGroupRuleAccess, '2017-09-01/generated/azure_mgmt_batch/models/network_security_group_rule_access.rb'
|
106
|
+
autoload :ComputeNodeFillType, '2017-09-01/generated/azure_mgmt_batch/models/compute_node_fill_type.rb'
|
107
|
+
autoload :ElevationLevel, '2017-09-01/generated/azure_mgmt_batch/models/elevation_level.rb'
|
108
|
+
autoload :AutoUserScope, '2017-09-01/generated/azure_mgmt_batch/models/auto_user_scope.rb'
|
109
|
+
autoload :CertificateStoreLocation, '2017-09-01/generated/azure_mgmt_batch/models/certificate_store_location.rb'
|
110
|
+
autoload :CertificateVisibility, '2017-09-01/generated/azure_mgmt_batch/models/certificate_visibility.rb'
|
111
|
+
autoload :NameAvailabilityReason, '2017-09-01/generated/azure_mgmt_batch/models/name_availability_reason.rb'
|
112
|
+
end
|
113
|
+
end
|
@@ -0,0 +1,655 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Batch::Mgmt::V2017_09_01
|
7
|
+
#
|
8
|
+
# ApplicationOperations
|
9
|
+
#
|
10
|
+
class ApplicationOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the ApplicationOperations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [BatchManagementClient] reference to the BatchManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Adds an application to the specified Batch account.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group that
|
28
|
+
# contains the Batch account.
|
29
|
+
# @param account_name [String] The name of the Batch account.
|
30
|
+
# @param application_id [String] The ID of the application.
|
31
|
+
# @param parameters [ApplicationCreateParameters] The parameters for the
|
32
|
+
# request.
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [Application] operation results.
|
37
|
+
#
|
38
|
+
def create(resource_group_name, account_name, application_id, parameters:nil, custom_headers:nil)
|
39
|
+
response = create_async(resource_group_name, account_name, application_id, parameters:parameters, custom_headers:custom_headers).value!
|
40
|
+
response.body unless response.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Adds an application to the specified Batch account.
|
45
|
+
#
|
46
|
+
# @param resource_group_name [String] The name of the resource group that
|
47
|
+
# contains the Batch account.
|
48
|
+
# @param account_name [String] The name of the Batch account.
|
49
|
+
# @param application_id [String] The ID of the application.
|
50
|
+
# @param parameters [ApplicationCreateParameters] The parameters for the
|
51
|
+
# request.
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def create_with_http_info(resource_group_name, account_name, application_id, parameters:nil, custom_headers:nil)
|
58
|
+
create_async(resource_group_name, account_name, application_id, parameters:parameters, custom_headers:custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Adds an application to the specified Batch account.
|
63
|
+
#
|
64
|
+
# @param resource_group_name [String] The name of the resource group that
|
65
|
+
# contains the Batch account.
|
66
|
+
# @param account_name [String] The name of the Batch account.
|
67
|
+
# @param application_id [String] The ID of the application.
|
68
|
+
# @param parameters [ApplicationCreateParameters] The parameters for the
|
69
|
+
# request.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def create_async(resource_group_name, account_name, application_id, parameters:nil, custom_headers:nil)
|
76
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
77
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
78
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
79
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
80
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
81
|
+
fail ArgumentError, 'application_id is nil' if application_id.nil?
|
82
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
83
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
84
|
+
|
85
|
+
|
86
|
+
request_headers = {}
|
87
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
88
|
+
|
89
|
+
# Set Headers
|
90
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
91
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
92
|
+
|
93
|
+
# Serialize Request
|
94
|
+
request_mapper = Azure::Batch::Mgmt::V2017_09_01::Models::ApplicationCreateParameters.mapper()
|
95
|
+
request_content = @client.serialize(request_mapper, parameters)
|
96
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
97
|
+
|
98
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'
|
99
|
+
|
100
|
+
request_url = @base_url || @client.base_url
|
101
|
+
|
102
|
+
options = {
|
103
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
104
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationId' => application_id,'subscriptionId' => @client.subscription_id},
|
105
|
+
query_params: {'api-version' => @client.api_version},
|
106
|
+
body: request_content,
|
107
|
+
headers: request_headers.merge(custom_headers || {}),
|
108
|
+
base_url: request_url
|
109
|
+
}
|
110
|
+
promise = @client.make_request_async(:put, path_template, options)
|
111
|
+
|
112
|
+
promise = promise.then do |result|
|
113
|
+
http_response = result.response
|
114
|
+
status_code = http_response.status
|
115
|
+
response_content = http_response.body
|
116
|
+
unless status_code == 201
|
117
|
+
error_model = JSON.load(response_content)
|
118
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
119
|
+
end
|
120
|
+
|
121
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
122
|
+
# Deserialize Response
|
123
|
+
if status_code == 201
|
124
|
+
begin
|
125
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
126
|
+
result_mapper = Azure::Batch::Mgmt::V2017_09_01::Models::Application.mapper()
|
127
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
128
|
+
rescue Exception => e
|
129
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
result
|
134
|
+
end
|
135
|
+
|
136
|
+
promise.execute
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# Deletes an application.
|
141
|
+
#
|
142
|
+
# @param resource_group_name [String] The name of the resource group that
|
143
|
+
# contains the Batch account.
|
144
|
+
# @param account_name [String] The name of the Batch account.
|
145
|
+
# @param application_id [String] The ID of the application.
|
146
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
147
|
+
# will be added to the HTTP request.
|
148
|
+
#
|
149
|
+
#
|
150
|
+
def delete(resource_group_name, account_name, application_id, custom_headers:nil)
|
151
|
+
response = delete_async(resource_group_name, account_name, application_id, custom_headers:custom_headers).value!
|
152
|
+
nil
|
153
|
+
end
|
154
|
+
|
155
|
+
#
|
156
|
+
# Deletes an application.
|
157
|
+
#
|
158
|
+
# @param resource_group_name [String] The name of the resource group that
|
159
|
+
# contains the Batch account.
|
160
|
+
# @param account_name [String] The name of the Batch account.
|
161
|
+
# @param application_id [String] The ID of the application.
|
162
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
163
|
+
# will be added to the HTTP request.
|
164
|
+
#
|
165
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
166
|
+
#
|
167
|
+
def delete_with_http_info(resource_group_name, account_name, application_id, custom_headers:nil)
|
168
|
+
delete_async(resource_group_name, account_name, application_id, custom_headers:custom_headers).value!
|
169
|
+
end
|
170
|
+
|
171
|
+
#
|
172
|
+
# Deletes an application.
|
173
|
+
#
|
174
|
+
# @param resource_group_name [String] The name of the resource group that
|
175
|
+
# contains the Batch account.
|
176
|
+
# @param account_name [String] The name of the Batch account.
|
177
|
+
# @param application_id [String] The ID of the application.
|
178
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
179
|
+
# to the HTTP request.
|
180
|
+
#
|
181
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
182
|
+
#
|
183
|
+
def delete_async(resource_group_name, account_name, application_id, custom_headers:nil)
|
184
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
185
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
186
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
187
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
188
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
189
|
+
fail ArgumentError, 'application_id is nil' if application_id.nil?
|
190
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
191
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
192
|
+
|
193
|
+
|
194
|
+
request_headers = {}
|
195
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
196
|
+
|
197
|
+
# Set Headers
|
198
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
199
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
200
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'
|
201
|
+
|
202
|
+
request_url = @base_url || @client.base_url
|
203
|
+
|
204
|
+
options = {
|
205
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
206
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationId' => application_id,'subscriptionId' => @client.subscription_id},
|
207
|
+
query_params: {'api-version' => @client.api_version},
|
208
|
+
headers: request_headers.merge(custom_headers || {}),
|
209
|
+
base_url: request_url
|
210
|
+
}
|
211
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
212
|
+
|
213
|
+
promise = promise.then do |result|
|
214
|
+
http_response = result.response
|
215
|
+
status_code = http_response.status
|
216
|
+
response_content = http_response.body
|
217
|
+
unless status_code == 204
|
218
|
+
error_model = JSON.load(response_content)
|
219
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
220
|
+
end
|
221
|
+
|
222
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
223
|
+
|
224
|
+
result
|
225
|
+
end
|
226
|
+
|
227
|
+
promise.execute
|
228
|
+
end
|
229
|
+
|
230
|
+
#
|
231
|
+
# Gets information about the specified application.
|
232
|
+
#
|
233
|
+
# @param resource_group_name [String] The name of the resource group that
|
234
|
+
# contains the Batch account.
|
235
|
+
# @param account_name [String] The name of the Batch account.
|
236
|
+
# @param application_id [String] The ID of the application.
|
237
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
238
|
+
# will be added to the HTTP request.
|
239
|
+
#
|
240
|
+
# @return [Application] operation results.
|
241
|
+
#
|
242
|
+
def get(resource_group_name, account_name, application_id, custom_headers:nil)
|
243
|
+
response = get_async(resource_group_name, account_name, application_id, custom_headers:custom_headers).value!
|
244
|
+
response.body unless response.nil?
|
245
|
+
end
|
246
|
+
|
247
|
+
#
|
248
|
+
# Gets information about the specified application.
|
249
|
+
#
|
250
|
+
# @param resource_group_name [String] The name of the resource group that
|
251
|
+
# contains the Batch account.
|
252
|
+
# @param account_name [String] The name of the Batch account.
|
253
|
+
# @param application_id [String] The ID of the application.
|
254
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
255
|
+
# will be added to the HTTP request.
|
256
|
+
#
|
257
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
258
|
+
#
|
259
|
+
def get_with_http_info(resource_group_name, account_name, application_id, custom_headers:nil)
|
260
|
+
get_async(resource_group_name, account_name, application_id, custom_headers:custom_headers).value!
|
261
|
+
end
|
262
|
+
|
263
|
+
#
|
264
|
+
# Gets information about the specified application.
|
265
|
+
#
|
266
|
+
# @param resource_group_name [String] The name of the resource group that
|
267
|
+
# contains the Batch account.
|
268
|
+
# @param account_name [String] The name of the Batch account.
|
269
|
+
# @param application_id [String] The ID of the application.
|
270
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
271
|
+
# to the HTTP request.
|
272
|
+
#
|
273
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
274
|
+
#
|
275
|
+
def get_async(resource_group_name, account_name, application_id, custom_headers:nil)
|
276
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
277
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
278
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
279
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
280
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
281
|
+
fail ArgumentError, 'application_id is nil' if application_id.nil?
|
282
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
283
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
284
|
+
|
285
|
+
|
286
|
+
request_headers = {}
|
287
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
288
|
+
|
289
|
+
# Set Headers
|
290
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
291
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
292
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'
|
293
|
+
|
294
|
+
request_url = @base_url || @client.base_url
|
295
|
+
|
296
|
+
options = {
|
297
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
298
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationId' => application_id,'subscriptionId' => @client.subscription_id},
|
299
|
+
query_params: {'api-version' => @client.api_version},
|
300
|
+
headers: request_headers.merge(custom_headers || {}),
|
301
|
+
base_url: request_url
|
302
|
+
}
|
303
|
+
promise = @client.make_request_async(:get, path_template, options)
|
304
|
+
|
305
|
+
promise = promise.then do |result|
|
306
|
+
http_response = result.response
|
307
|
+
status_code = http_response.status
|
308
|
+
response_content = http_response.body
|
309
|
+
unless status_code == 200
|
310
|
+
error_model = JSON.load(response_content)
|
311
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
312
|
+
end
|
313
|
+
|
314
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
315
|
+
# Deserialize Response
|
316
|
+
if status_code == 200
|
317
|
+
begin
|
318
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
319
|
+
result_mapper = Azure::Batch::Mgmt::V2017_09_01::Models::Application.mapper()
|
320
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
321
|
+
rescue Exception => e
|
322
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
323
|
+
end
|
324
|
+
end
|
325
|
+
|
326
|
+
result
|
327
|
+
end
|
328
|
+
|
329
|
+
promise.execute
|
330
|
+
end
|
331
|
+
|
332
|
+
#
|
333
|
+
# Updates settings for the specified application.
|
334
|
+
#
|
335
|
+
# @param resource_group_name [String] The name of the resource group that
|
336
|
+
# contains the Batch account.
|
337
|
+
# @param account_name [String] The name of the Batch account.
|
338
|
+
# @param application_id [String] The ID of the application.
|
339
|
+
# @param parameters [ApplicationUpdateParameters] The parameters for the
|
340
|
+
# request.
|
341
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
342
|
+
# will be added to the HTTP request.
|
343
|
+
#
|
344
|
+
#
|
345
|
+
def update(resource_group_name, account_name, application_id, parameters, custom_headers:nil)
|
346
|
+
response = update_async(resource_group_name, account_name, application_id, parameters, custom_headers:custom_headers).value!
|
347
|
+
nil
|
348
|
+
end
|
349
|
+
|
350
|
+
#
|
351
|
+
# Updates settings for the specified application.
|
352
|
+
#
|
353
|
+
# @param resource_group_name [String] The name of the resource group that
|
354
|
+
# contains the Batch account.
|
355
|
+
# @param account_name [String] The name of the Batch account.
|
356
|
+
# @param application_id [String] The ID of the application.
|
357
|
+
# @param parameters [ApplicationUpdateParameters] The parameters for the
|
358
|
+
# request.
|
359
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
360
|
+
# will be added to the HTTP request.
|
361
|
+
#
|
362
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
363
|
+
#
|
364
|
+
def update_with_http_info(resource_group_name, account_name, application_id, parameters, custom_headers:nil)
|
365
|
+
update_async(resource_group_name, account_name, application_id, parameters, custom_headers:custom_headers).value!
|
366
|
+
end
|
367
|
+
|
368
|
+
#
|
369
|
+
# Updates settings for the specified application.
|
370
|
+
#
|
371
|
+
# @param resource_group_name [String] The name of the resource group that
|
372
|
+
# contains the Batch account.
|
373
|
+
# @param account_name [String] The name of the Batch account.
|
374
|
+
# @param application_id [String] The ID of the application.
|
375
|
+
# @param parameters [ApplicationUpdateParameters] The parameters for the
|
376
|
+
# request.
|
377
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
378
|
+
# to the HTTP request.
|
379
|
+
#
|
380
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
381
|
+
#
|
382
|
+
def update_async(resource_group_name, account_name, application_id, parameters, custom_headers:nil)
|
383
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
384
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
385
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
386
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
387
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
388
|
+
fail ArgumentError, 'application_id is nil' if application_id.nil?
|
389
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
390
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
391
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
392
|
+
|
393
|
+
|
394
|
+
request_headers = {}
|
395
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
396
|
+
|
397
|
+
# Set Headers
|
398
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
399
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
400
|
+
|
401
|
+
# Serialize Request
|
402
|
+
request_mapper = Azure::Batch::Mgmt::V2017_09_01::Models::ApplicationUpdateParameters.mapper()
|
403
|
+
request_content = @client.serialize(request_mapper, parameters)
|
404
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
405
|
+
|
406
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'
|
407
|
+
|
408
|
+
request_url = @base_url || @client.base_url
|
409
|
+
|
410
|
+
options = {
|
411
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
412
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationId' => application_id,'subscriptionId' => @client.subscription_id},
|
413
|
+
query_params: {'api-version' => @client.api_version},
|
414
|
+
body: request_content,
|
415
|
+
headers: request_headers.merge(custom_headers || {}),
|
416
|
+
base_url: request_url
|
417
|
+
}
|
418
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
419
|
+
|
420
|
+
promise = promise.then do |result|
|
421
|
+
http_response = result.response
|
422
|
+
status_code = http_response.status
|
423
|
+
response_content = http_response.body
|
424
|
+
unless status_code == 204
|
425
|
+
error_model = JSON.load(response_content)
|
426
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
427
|
+
end
|
428
|
+
|
429
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
430
|
+
|
431
|
+
result
|
432
|
+
end
|
433
|
+
|
434
|
+
promise.execute
|
435
|
+
end
|
436
|
+
|
437
|
+
#
|
438
|
+
# Lists all of the applications in the specified account.
|
439
|
+
#
|
440
|
+
# @param resource_group_name [String] The name of the resource group that
|
441
|
+
# contains the Batch account.
|
442
|
+
# @param account_name [String] The name of the Batch account.
|
443
|
+
# @param maxresults [Integer] The maximum number of items to return in the
|
444
|
+
# response.
|
445
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
446
|
+
# will be added to the HTTP request.
|
447
|
+
#
|
448
|
+
# @return [Array<Application>] operation results.
|
449
|
+
#
|
450
|
+
def list(resource_group_name, account_name, maxresults:nil, custom_headers:nil)
|
451
|
+
first_page = list_as_lazy(resource_group_name, account_name, maxresults:maxresults, custom_headers:custom_headers)
|
452
|
+
first_page.get_all_items
|
453
|
+
end
|
454
|
+
|
455
|
+
#
|
456
|
+
# Lists all of the applications in the specified account.
|
457
|
+
#
|
458
|
+
# @param resource_group_name [String] The name of the resource group that
|
459
|
+
# contains the Batch account.
|
460
|
+
# @param account_name [String] The name of the Batch account.
|
461
|
+
# @param maxresults [Integer] The maximum number of items to return in the
|
462
|
+
# response.
|
463
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
464
|
+
# will be added to the HTTP request.
|
465
|
+
#
|
466
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
467
|
+
#
|
468
|
+
def list_with_http_info(resource_group_name, account_name, maxresults:nil, custom_headers:nil)
|
469
|
+
list_async(resource_group_name, account_name, maxresults:maxresults, custom_headers:custom_headers).value!
|
470
|
+
end
|
471
|
+
|
472
|
+
#
|
473
|
+
# Lists all of the applications in the specified account.
|
474
|
+
#
|
475
|
+
# @param resource_group_name [String] The name of the resource group that
|
476
|
+
# contains the Batch account.
|
477
|
+
# @param account_name [String] The name of the Batch account.
|
478
|
+
# @param maxresults [Integer] The maximum number of items to return in the
|
479
|
+
# response.
|
480
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
481
|
+
# to the HTTP request.
|
482
|
+
#
|
483
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
484
|
+
#
|
485
|
+
def list_async(resource_group_name, account_name, maxresults:nil, custom_headers:nil)
|
486
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
487
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
488
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
489
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
490
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
491
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
492
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
493
|
+
|
494
|
+
|
495
|
+
request_headers = {}
|
496
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
497
|
+
|
498
|
+
# Set Headers
|
499
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
500
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
501
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications'
|
502
|
+
|
503
|
+
request_url = @base_url || @client.base_url
|
504
|
+
|
505
|
+
options = {
|
506
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
507
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
508
|
+
query_params: {'maxresults' => maxresults,'api-version' => @client.api_version},
|
509
|
+
headers: request_headers.merge(custom_headers || {}),
|
510
|
+
base_url: request_url
|
511
|
+
}
|
512
|
+
promise = @client.make_request_async(:get, path_template, options)
|
513
|
+
|
514
|
+
promise = promise.then do |result|
|
515
|
+
http_response = result.response
|
516
|
+
status_code = http_response.status
|
517
|
+
response_content = http_response.body
|
518
|
+
unless status_code == 200
|
519
|
+
error_model = JSON.load(response_content)
|
520
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
521
|
+
end
|
522
|
+
|
523
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
524
|
+
# Deserialize Response
|
525
|
+
if status_code == 200
|
526
|
+
begin
|
527
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
528
|
+
result_mapper = Azure::Batch::Mgmt::V2017_09_01::Models::ListApplicationsResult.mapper()
|
529
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
530
|
+
rescue Exception => e
|
531
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
532
|
+
end
|
533
|
+
end
|
534
|
+
|
535
|
+
result
|
536
|
+
end
|
537
|
+
|
538
|
+
promise.execute
|
539
|
+
end
|
540
|
+
|
541
|
+
#
|
542
|
+
# Lists all of the applications in the specified account.
|
543
|
+
#
|
544
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
545
|
+
# to List operation.
|
546
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
547
|
+
# will be added to the HTTP request.
|
548
|
+
#
|
549
|
+
# @return [ListApplicationsResult] operation results.
|
550
|
+
#
|
551
|
+
def list_next(next_page_link, custom_headers:nil)
|
552
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
553
|
+
response.body unless response.nil?
|
554
|
+
end
|
555
|
+
|
556
|
+
#
|
557
|
+
# Lists all of the applications in the specified account.
|
558
|
+
#
|
559
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
560
|
+
# to List operation.
|
561
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
562
|
+
# will be added to the HTTP request.
|
563
|
+
#
|
564
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
565
|
+
#
|
566
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
567
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
568
|
+
end
|
569
|
+
|
570
|
+
#
|
571
|
+
# Lists all of the applications in the specified account.
|
572
|
+
#
|
573
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
574
|
+
# to List operation.
|
575
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
576
|
+
# to the HTTP request.
|
577
|
+
#
|
578
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
579
|
+
#
|
580
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
581
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
582
|
+
|
583
|
+
|
584
|
+
request_headers = {}
|
585
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
586
|
+
|
587
|
+
# Set Headers
|
588
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
589
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
590
|
+
path_template = '{nextLink}'
|
591
|
+
|
592
|
+
request_url = @base_url || @client.base_url
|
593
|
+
|
594
|
+
options = {
|
595
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
596
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
597
|
+
headers: request_headers.merge(custom_headers || {}),
|
598
|
+
base_url: request_url
|
599
|
+
}
|
600
|
+
promise = @client.make_request_async(:get, path_template, options)
|
601
|
+
|
602
|
+
promise = promise.then do |result|
|
603
|
+
http_response = result.response
|
604
|
+
status_code = http_response.status
|
605
|
+
response_content = http_response.body
|
606
|
+
unless status_code == 200
|
607
|
+
error_model = JSON.load(response_content)
|
608
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
609
|
+
end
|
610
|
+
|
611
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
612
|
+
# Deserialize Response
|
613
|
+
if status_code == 200
|
614
|
+
begin
|
615
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
616
|
+
result_mapper = Azure::Batch::Mgmt::V2017_09_01::Models::ListApplicationsResult.mapper()
|
617
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
618
|
+
rescue Exception => e
|
619
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
620
|
+
end
|
621
|
+
end
|
622
|
+
|
623
|
+
result
|
624
|
+
end
|
625
|
+
|
626
|
+
promise.execute
|
627
|
+
end
|
628
|
+
|
629
|
+
#
|
630
|
+
# Lists all of the applications in the specified account.
|
631
|
+
#
|
632
|
+
# @param resource_group_name [String] The name of the resource group that
|
633
|
+
# contains the Batch account.
|
634
|
+
# @param account_name [String] The name of the Batch account.
|
635
|
+
# @param maxresults [Integer] The maximum number of items to return in the
|
636
|
+
# response.
|
637
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
638
|
+
# will be added to the HTTP request.
|
639
|
+
#
|
640
|
+
# @return [ListApplicationsResult] which provide lazy access to pages of the
|
641
|
+
# response.
|
642
|
+
#
|
643
|
+
def list_as_lazy(resource_group_name, account_name, maxresults:nil, custom_headers:nil)
|
644
|
+
response = list_async(resource_group_name, account_name, maxresults:maxresults, custom_headers:custom_headers).value!
|
645
|
+
unless response.nil?
|
646
|
+
page = response.body
|
647
|
+
page.next_method = Proc.new do |next_page_link|
|
648
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
649
|
+
end
|
650
|
+
page
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
654
|
+
end
|
655
|
+
end
|