Class: Azure::EdgeGateway::Mgmt::V2019_03_01::Devices
- Inherits:
-
Object
- Object
- Azure::EdgeGateway::Mgmt::V2019_03_01::Devices
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb
Overview
Devices
Instance Attribute Summary collapse
-
#client ⇒ DataBoxEdgeManagementClient
readonly
Reference to the DataBoxEdgeManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Creates or updates a Data Box Edge/Gateway resource.
-
#begin_create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a Data Box Edge/Gateway resource.
-
#begin_create_or_update_security_settings(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Object
Updates the security settings on a data box edge/gateway device.
-
#begin_create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Updates the security settings on a data box edge/gateway device.
-
#begin_create_or_update_security_settings_with_http_info(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates the security settings on a data box edge/gateway device.
-
#begin_create_or_update_with_http_info(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a Data Box Edge/Gateway resource.
-
#begin_delete(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Deletes the data box edge/gateway device.
-
#begin_delete_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the data box edge/gateway device.
-
#begin_delete_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the data box edge/gateway device.
-
#begin_download_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Downloads the updates on a data box edge/gateway device.
-
#begin_download_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Downloads the updates on a data box edge/gateway device.
-
#begin_download_updates_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Downloads the updates on a data box edge/gateway device.
-
#begin_install_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Installs the updates on the data box edge/gateway device.
-
#begin_install_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Installs the updates on the data box edge/gateway device.
-
#begin_install_updates_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Installs the updates on the data box edge/gateway device.
-
#begin_scan_for_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Scans for updates on a data box edge/gateway device.
-
#begin_scan_for_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Scans for updates on a data box edge/gateway device.
-
#begin_scan_for_updates_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Scans for updates on a data box edge/gateway device.
-
#create_or_update(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Creates or updates a Data Box Edge/Gateway resource.
-
#create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#create_or_update_security_settings(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Object
Updates the security settings on a data box edge/gateway device.
-
#create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#delete(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Deletes the data box edge/gateway device.
-
#delete_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#download_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Downloads the updates on a data box edge/gateway device.
-
#download_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#get(device_name, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Gets the properties of the data box edge/gateway device.
-
#get_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the properties of the data box edge/gateway device.
-
#get_extended_information(device_name, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDeviceExtendedInfo
Gets additional information for the specified data box edge/gateway device.
-
#get_extended_information_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets additional information for the specified data box edge/gateway device.
-
#get_extended_information_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets additional information for the specified data box edge/gateway device.
-
#get_network_settings(device_name, resource_group_name, custom_headers: nil) ⇒ NetworkSettings
Gets the network settings of the specified data box edge/gateway device.
-
#get_network_settings_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the network settings of the specified data box edge/gateway device.
-
#get_network_settings_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the network settings of the specified data box edge/gateway device.
-
#get_update_summary(device_name, resource_group_name, custom_headers: nil) ⇒ UpdateSummary
Gets information about the availability of updates based on the last scan of the device.
-
#get_update_summary_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the availability of updates based on the last scan of the device.
-
#get_update_summary_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the availability of updates based on the last scan of the device.
-
#get_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the properties of the data box edge/gateway device.
-
#initialize(client) ⇒ Devices
constructor
Creates and initializes a new instance of the Devices class.
-
#install_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Installs the updates on the data box edge/gateway device.
-
#install_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#list_by_resource_group(resource_group_name, expand: nil, custom_headers: nil) ⇒ Array<DataBoxEdgeDevice>
Gets all the data box edge/gateway devices in a resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, expand: nil, custom_headers: nil) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a resource group.
-
#list_by_resource_group_async(resource_group_name, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the data box edge/gateway devices in a resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the data box edge/gateway devices in a resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the data box edge/gateway devices in a resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the data box edge/gateway devices in a resource group.
-
#list_by_subscription(expand: nil, custom_headers: nil) ⇒ Array<DataBoxEdgeDevice>
Gets all the data box edge/gateway devices in a subscription.
-
#list_by_subscription_as_lazy(expand: nil, custom_headers: nil) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a subscription.
-
#list_by_subscription_async(expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the data box edge/gateway devices in a subscription.
-
#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a subscription.
-
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the data box edge/gateway devices in a subscription.
-
#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the data box edge/gateway devices in a subscription.
-
#list_by_subscription_with_http_info(expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the data box edge/gateway devices in a subscription.
-
#scan_for_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Scans for updates on a data box edge/gateway device.
-
#scan_for_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#update(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Modifies a Data Box Edge/Gateway resource.
-
#update_async(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Modifies a Data Box Edge/Gateway resource.
-
#update_with_http_info(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Modifies a Data Box Edge/Gateway resource.
-
#upload_certificate(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ UploadCertificateResponse
Uploads registration certificate for the device.
-
#upload_certificate_async(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Uploads registration certificate for the device.
-
#upload_certificate_with_http_info(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Uploads registration certificate for the device.
Constructor Details
#initialize(client) ⇒ Devices
Creates and initializes a new instance of the Devices class.
17 18 19 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ DataBoxEdgeManagementClient (readonly)
Returns reference to the DataBoxEdgeManagementClient.
22 23 24 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 22 def client @client end |
Instance Method Details
#begin_create_or_update(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Creates or updates a Data Box Edge/Gateway resource.
will be added to the HTTP request.
1041 1042 1043 1044 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1041 def begin_create_or_update(device_name, data_box_edge_device, resource_group_name, custom_headers:nil) response = begin_create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a Data Box Edge/Gateway resource.
to the HTTP request.
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1072 def begin_create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, 'data_box_edge_device is nil' if data_box_edge_device.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDevice.mapper() request_content = @client.serialize(request_mapper, data_box_edge_device) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDevice.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_security_settings(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Object
Updates the security settings on a data box edge/gateway device.
will be added to the HTTP request.
1467 1468 1469 1470 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1467 def begin_create_or_update_security_settings(device_name, security_settings, resource_group_name, custom_headers:nil) response = begin_create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers:custom_headers).value! nil end |
#begin_create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Updates the security settings on a data box edge/gateway device.
to the HTTP request.
1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1498 def begin_create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, 'security_settings is nil' if security_settings.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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::EdgeGateway::Mgmt::V2019_03_01::Models::SecuritySettings.mapper() request_content = @client.serialize(request_mapper, security_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#begin_create_or_update_security_settings_with_http_info(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates the security settings on a data box edge/gateway device.
will be added to the HTTP request.
1483 1484 1485 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1483 def begin_create_or_update_security_settings_with_http_info(device_name, security_settings, resource_group_name, custom_headers:nil) begin_create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers:custom_headers).value! end |
#begin_create_or_update_with_http_info(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a Data Box Edge/Gateway resource.
will be added to the HTTP request.
1057 1058 1059 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1057 def begin_create_or_update_with_http_info(device_name, data_box_edge_device, resource_group_name, custom_headers:nil) begin_create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers:custom_headers).value! end |
#begin_delete(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Deletes the data box edge/gateway device.
will be added to the HTTP request.
1142 1143 1144 1145 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1142 def begin_delete(device_name, resource_group_name, custom_headers:nil) response = begin_delete_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the data box edge/gateway device.
to the HTTP request.
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1171 def begin_delete_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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 == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the data box edge/gateway device.
will be added to the HTTP request.
1157 1158 1159 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1157 def begin_delete_with_http_info(device_name, resource_group_name, custom_headers:nil) begin_delete_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#begin_download_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Downloads the updates on a data box edge/gateway device.
will be added to the HTTP request.
1223 1224 1225 1226 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1223 def begin_download_updates(device_name, resource_group_name, custom_headers:nil) response = begin_download_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#begin_download_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Downloads the updates on a data box edge/gateway device.
to the HTTP request.
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1252 def begin_download_updates_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, 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 == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#begin_download_updates_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Downloads the updates on a data box edge/gateway device.
will be added to the HTTP request.
1238 1239 1240 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1238 def begin_download_updates_with_http_info(device_name, resource_group_name, custom_headers:nil) begin_download_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#begin_install_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Installs the updates on the data box edge/gateway device.
will be added to the HTTP request.
1304 1305 1306 1307 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1304 def begin_install_updates(device_name, resource_group_name, custom_headers:nil) response = begin_install_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#begin_install_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Installs the updates on the data box edge/gateway device.
to the HTTP request.
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1333 def begin_install_updates_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, 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 == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#begin_install_updates_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Installs the updates on the data box edge/gateway device.
will be added to the HTTP request.
1319 1320 1321 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1319 def begin_install_updates_with_http_info(device_name, resource_group_name, custom_headers:nil) begin_install_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#begin_scan_for_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Scans for updates on a data box edge/gateway device.
will be added to the HTTP request.
1385 1386 1387 1388 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1385 def begin_scan_for_updates(device_name, resource_group_name, custom_headers:nil) response = begin_scan_for_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#begin_scan_for_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Scans for updates on a data box edge/gateway device.
to the HTTP request.
1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1414 def begin_scan_for_updates_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, 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 == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#begin_scan_for_updates_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Scans for updates on a data box edge/gateway device.
will be added to the HTTP request.
1400 1401 1402 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1400 def begin_scan_for_updates_with_http_info(device_name, resource_group_name, custom_headers:nil) begin_scan_for_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#create_or_update(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Creates or updates a Data Box Edge/Gateway resource.
will be added to the HTTP request.
317 318 319 320 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 317 def create_or_update(device_name, data_box_edge_device, resource_group_name, custom_headers:nil) response = create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 332 def create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers:nil) # Send request promise = begin_create_or_update_async(device_name, data_box_edge_device, resource_group_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDevice.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_security_settings(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Object
Updates the security settings on a data box edge/gateway device.
will be added to the HTTP request.
798 799 800 801 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 798 def create_or_update_security_settings(device_name, security_settings, resource_group_name, custom_headers:nil) response = create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers:custom_headers).value! nil end |
#create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 813 def create_or_update_security_settings_async(device_name, security_settings, resource_group_name, custom_headers:nil) # Send request promise = begin_create_or_update_security_settings_async(device_name, security_settings, resource_group_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(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Deletes the data box edge/gateway device.
will be added to the HTTP request.
358 359 360 361 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 358 def delete(device_name, resource_group_name, custom_headers:nil) response = delete_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#delete_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 372 def delete_async(device_name, resource_group_name, custom_headers:nil) # Send request promise = begin_delete_async(device_name, resource_group_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 |
#download_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Downloads the updates on a data box edge/gateway device.
will be added to the HTTP request.
499 500 501 502 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 499 def download_updates(device_name, resource_group_name, custom_headers:nil) response = download_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#download_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 513 def download_updates_async(device_name, resource_group_name, custom_headers:nil) # Send request promise = begin_download_updates_async(device_name, resource_group_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 |
#get(device_name, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Gets the properties of the data box edge/gateway device.
will be added to the HTTP request.
224 225 226 227 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 224 def get(device_name, resource_group_name, custom_headers:nil) response = get_async(device_name, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the properties of the data box edge/gateway device.
to the HTTP request.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 253 def get_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDevice.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_extended_information(device_name, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDeviceExtendedInfo
Gets additional information for the specified data box edge/gateway device.
will be added to the HTTP request.
539 540 541 542 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 539 def get_extended_information(device_name, resource_group_name, custom_headers:nil) response = get_extended_information_async(device_name, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_extended_information_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets additional information for the specified data box edge/gateway device.
to the HTTP request.
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 611 612 613 614 615 616 617 618 619 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 568 def get_extended_information_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDeviceExtendedInfo.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_extended_information_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets additional information for the specified data box edge/gateway device.
will be added to the HTTP request.
554 555 556 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 554 def get_extended_information_with_http_info(device_name, resource_group_name, custom_headers:nil) get_extended_information_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#get_network_settings(device_name, resource_group_name, custom_headers: nil) ⇒ NetworkSettings
Gets the network settings of the specified data box edge/gateway device.
will be added to the HTTP request.
669 670 671 672 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 669 def get_network_settings(device_name, resource_group_name, custom_headers:nil) response = get_network_settings_async(device_name, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_network_settings_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the network settings of the specified data box edge/gateway device.
to the HTTP request.
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 698 def get_network_settings_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::NetworkSettings.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_network_settings_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the network settings of the specified data box edge/gateway device.
will be added to the HTTP request.
684 685 686 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 684 def get_network_settings_with_http_info(device_name, resource_group_name, custom_headers:nil) get_network_settings_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#get_update_summary(device_name, resource_group_name, custom_headers: nil) ⇒ UpdateSummary
Gets information about the availability of updates based on the last scan of the device. It also gets information about any ongoing download or install jobs on the device.
will be added to the HTTP request.
841 842 843 844 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 841 def get_update_summary(device_name, resource_group_name, custom_headers:nil) response = get_update_summary_async(device_name, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_update_summary_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the availability of updates based on the last scan of the device. It also gets information about any ongoing download or install jobs on the device.
to the HTTP request.
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 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 874 def get_update_summary_async(device_name, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::UpdateSummary.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_update_summary_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the availability of updates based on the last scan of the device. It also gets information about any ongoing download or install jobs on the device.
will be added to the HTTP request.
858 859 860 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 858 def get_update_summary_with_http_info(device_name, resource_group_name, custom_headers:nil) get_update_summary_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#get_with_http_info(device_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the properties of the data box edge/gateway device.
will be added to the HTTP request.
239 240 241 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 239 def get_with_http_info(device_name, resource_group_name, custom_headers:nil) get_async(device_name, resource_group_name, custom_headers:custom_headers).value! end |
#install_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Installs the updates on the data box edge/gateway device.
will be added to the HTTP request.
629 630 631 632 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 629 def install_updates(device_name, resource_group_name, custom_headers:nil) response = install_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#install_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 643 def install_updates_async(device_name, resource_group_name, custom_headers:nil) # Send request promise = begin_install_updates_async(device_name, resource_group_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 |
#list_by_resource_group(resource_group_name, expand: nil, custom_headers: nil) ⇒ Array<DataBoxEdgeDevice>
Gets all the data box edge/gateway devices in a resource group.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. will be added to the HTTP request.
129 130 131 132 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 129 def list_by_resource_group(resource_group_name, expand:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, expand: nil, custom_headers: nil) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a resource group.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. will be added to the HTTP request.
response.
1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1761 def list_by_resource_group_as_lazy(resource_group_name, expand:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, expand:, 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, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the data box edge/gateway devices in a resource group.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. to the HTTP request.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 162 def list_by_resource_group_async(resource_group_name, expand:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDeviceList.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) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a resource group.
to List operation. will be added to the HTTP request.
1647 1648 1649 1650 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1647 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 data box edge/gateway devices in a resource group.
to List operation. to the HTTP request.
1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1676 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDeviceList.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 data box edge/gateway devices in a resource group.
to List operation. will be added to the HTTP request.
1662 1663 1664 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1662 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, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the data box edge/gateway devices in a resource group.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. will be added to the HTTP request.
146 147 148 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 146 def list_by_resource_group_with_http_info(resource_group_name, expand:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, expand:, custom_headers:custom_headers).value! end |
#list_by_subscription(expand: nil, custom_headers: nil) ⇒ Array<DataBoxEdgeDevice>
Gets all the data box edge/gateway devices in a subscription.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. will be added to the HTTP request.
35 36 37 38 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 35 def list_by_subscription(expand:nil, custom_headers:nil) first_page = list_by_subscription_as_lazy(expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_subscription_as_lazy(expand: nil, custom_headers: nil) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a subscription.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. will be added to the HTTP request.
response.
1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1737 def list_by_subscription_as_lazy(expand:nil, custom_headers:nil) response = list_by_subscription_async(expand:, 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(expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the data box edge/gateway devices in a subscription.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. 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 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 66 def list_by_subscription_async(expand:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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 = 'subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices' 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,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDeviceList.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) ⇒ DataBoxEdgeDeviceList
Gets all the data box edge/gateway devices in a subscription.
to List operation. will be added to the HTTP request.
1559 1560 1561 1562 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1559 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 data box edge/gateway devices in a subscription.
to List operation. to the HTTP request.
1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1588 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDeviceList.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 data box edge/gateway devices in a subscription.
to List operation. will be added to the HTTP request.
1574 1575 1576 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 1574 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(expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the data box edge/gateway devices in a subscription.
related to the resource or Specify $skipToken=<token> to populate the next page in the list. will be added to the HTTP request.
51 52 53 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 51 def list_by_subscription_with_http_info(expand:nil, custom_headers:nil) list_by_subscription_async(expand:, custom_headers:custom_headers).value! end |
#scan_for_updates(device_name, resource_group_name, custom_headers: nil) ⇒ Object
Scans for updates on a data box edge/gateway device.
will be added to the HTTP request.
759 760 761 762 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 759 def scan_for_updates(device_name, resource_group_name, custom_headers:nil) response = scan_for_updates_async(device_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#scan_for_updates_async(device_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 773 def scan_for_updates_async(device_name, resource_group_name, custom_headers:nil) # Send request promise = begin_scan_for_updates_async(device_name, resource_group_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 |
#update(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ DataBoxEdgeDevice
Modifies a Data Box Edge/Gateway resource.
will be added to the HTTP request.
399 400 401 402 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 399 def update(device_name, parameters, resource_group_name, custom_headers:nil) response = update_async(device_name, parameters, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Modifies a Data Box Edge/Gateway resource.
to the HTTP request.
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 430 def update_async(device_name, parameters, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDevicePatch.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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::DataBoxEdgeDevice.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_with_http_info(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Modifies a Data Box Edge/Gateway resource.
will be added to the HTTP request.
415 416 417 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 415 def update_with_http_info(device_name, parameters, resource_group_name, custom_headers:nil) update_async(device_name, parameters, resource_group_name, custom_headers:custom_headers).value! end |
#upload_certificate(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ UploadCertificateResponse
Uploads registration certificate for the device.
will be added to the HTTP request.
938 939 940 941 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 938 def upload_certificate(device_name, parameters, resource_group_name, custom_headers:nil) response = upload_certificate_async(device_name, parameters, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#upload_certificate_async(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Uploads registration certificate for the device.
to the HTTP request.
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 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 969 def upload_certificate_async(device_name, parameters, resource_group_name, custom_headers:nil) fail ArgumentError, 'device_name is nil' if device_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.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::EdgeGateway::Mgmt::V2019_03_01::Models::UploadCertificateRequest.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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EdgeGateway::Mgmt::V2019_03_01::Models::UploadCertificateResponse.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 |
#upload_certificate_with_http_info(device_name, parameters, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Uploads registration certificate for the device.
will be added to the HTTP request.
954 955 956 |
# File 'lib/2019-03-01/generated/azure_mgmt_edgegateway/devices.rb', line 954 def upload_certificate_with_http_info(device_name, parameters, resource_group_name, custom_headers:nil) upload_certificate_async(device_name, parameters, resource_group_name, custom_headers:custom_headers).value! end |