azure_mgmt_databoxedge 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge.rb +158 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/alerts.rb +328 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/bandwidth_schedules.rb +621 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/containers.rb +771 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/data_box_edge_management_client.rb +191 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/devices.rb +1811 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/jobs.rb +126 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/account_type.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/address.rb +112 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert.rb +156 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert_error_details.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert_severity.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/armbase_model.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/asymmetric_encrypted_secret.rb +70 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/authentication.rb +47 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/authentication_type.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/azure_container_data_format.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/azure_container_info.rb +72 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/bandwidth_schedule.rb +115 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/bandwidth_schedules_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/client_access_right.rb +59 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/client_permission_type.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/contact_details.rb +87 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/container.rb +113 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/container_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/container_status.rb +19 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device.rb +300 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_extended_info.rb +97 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_list.rb +101 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_patch.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_status.rb +21 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_policy.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/day_of_week.rb +21 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/device_type.rb +15 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/download_phase.rb +18 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/encryption_algorithm.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/file_event_trigger.rb +115 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/file_source_info.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/install_reboot_behavior.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/io_tdevice_info.rb +80 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/io_trole.rb +147 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/ipv4config.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/ipv6config.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job.rb +242 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_error_details.rb +80 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_error_item.rb +79 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_status.rb +21 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_type.rb +20 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_aggregation_type.rb +21 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_category.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_dimension_v1.rb +68 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_specification_v1.rb +187 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_unit.rb +22 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/monitoring_status.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/mount_point_map.rb +83 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter.rb +229 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_dhcpstatus.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_position.rb +60 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_rdmastatus.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_status.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_group.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_settings.rb +83 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/node.rb +152 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/node_list.rb +56 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/node_status.rb +19 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/operation.rb +81 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/operation_display.rb +80 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/operations_list.rb +99 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order.rb +177 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order_state.rb +28 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order_status.rb +96 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/periodic_timer_event_trigger.rb +115 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/periodic_timer_source_info.rb +73 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/platform_type.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/refresh_details.rb +87 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/resource_type_sku.rb +202 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_list.rb +102 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_sink_info.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_status.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_types.rb +18 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/security_settings.rb +78 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/service_specification.rb +56 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share.rb +208 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_access_protocol.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_access_right.rb +59 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_access_type.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_status.rb +19 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku.rb +61 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_cost.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_information_list.rb +68 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_location_info.rb +87 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_name.rb +23 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_restriction.rb +94 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_restriction_info.rb +75 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_restriction_reason_code.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_tier.rb +15 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sslstatus.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account.rb +134 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_credential.rb +154 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_credential_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_list.rb +101 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_status.rb +19 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/symmetric_key.rb +48 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/time_grain.rb +22 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/tracking_info.rb +79 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/trigger.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/trigger_list.rb +102 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_download_progress.rb +108 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_install_progress.rb +71 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_operation.rb +18 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_operation_stage.rb +31 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_summary.rb +281 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/upload_certificate_request.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/upload_certificate_response.rb +132 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user.rb +108 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user_access_right.rb +59 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user_type.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/module_definition.rb +9 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/nodes.rb +119 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/operations.rb +218 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/operations_status.rb +126 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/orders.rb +594 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/roles.rb +610 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/shares.rb +737 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/skus.rb +117 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/storage_account_credentials.rb +623 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/storage_accounts.rb +615 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/triggers.rb +618 -0
- data/lib/2019-08-01/generated/azure_mgmt_databoxedge/users.rb +622 -0
- data/lib/azure_mgmt_databoxedge.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/databoxedge_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/databoxedge_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/databoxedge_profile_module.rb +551 -0
- data/lib/version.rb +7 -0
- metadata +258 -0
@@ -0,0 +1,615 @@
|
|
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::DataBoxEdge::Mgmt::V2019_08_01
|
7
|
+
#
|
8
|
+
# StorageAccounts
|
9
|
+
#
|
10
|
+
class StorageAccounts
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the StorageAccounts class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [DataBoxEdgeManagementClient] reference to the DataBoxEdgeManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all the storage accounts in a Data Box Edge/Data Box Gateway device.
|
26
|
+
#
|
27
|
+
# @param device_name [String] The device name.
|
28
|
+
# @param resource_group_name [String] The resource group name.
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [Array<StorageAccount>] operation results.
|
33
|
+
#
|
34
|
+
def list_by_data_box_edge_device(device_name, resource_group_name, custom_headers:nil)
|
35
|
+
first_page = list_by_data_box_edge_device_as_lazy(device_name, resource_group_name, custom_headers:custom_headers)
|
36
|
+
first_page.get_all_items
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Lists all the storage accounts in a Data Box Edge/Data Box Gateway device.
|
41
|
+
#
|
42
|
+
# @param device_name [String] The device name.
|
43
|
+
# @param resource_group_name [String] The resource group name.
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_by_data_box_edge_device_with_http_info(device_name, resource_group_name, custom_headers:nil)
|
50
|
+
list_by_data_box_edge_device_async(device_name, resource_group_name, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Lists all the storage accounts in a Data Box Edge/Data Box Gateway device.
|
55
|
+
#
|
56
|
+
# @param device_name [String] The device name.
|
57
|
+
# @param resource_group_name [String] The resource group name.
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_by_data_box_edge_device_async(device_name, resource_group_name, custom_headers:nil)
|
64
|
+
fail ArgumentError, 'device_name is nil' if device_name.nil?
|
65
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
66
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
67
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
68
|
+
|
69
|
+
|
70
|
+
request_headers = {}
|
71
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
72
|
+
|
73
|
+
# Set Headers
|
74
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
75
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
76
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts'
|
77
|
+
|
78
|
+
request_url = @base_url || @client.base_url
|
79
|
+
|
80
|
+
options = {
|
81
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
82
|
+
path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
83
|
+
query_params: {'api-version' => @client.api_version},
|
84
|
+
headers: request_headers.merge(custom_headers || {}),
|
85
|
+
base_url: request_url
|
86
|
+
}
|
87
|
+
promise = @client.make_request_async(:get, path_template, options)
|
88
|
+
|
89
|
+
promise = promise.then do |result|
|
90
|
+
http_response = result.response
|
91
|
+
status_code = http_response.status
|
92
|
+
response_content = http_response.body
|
93
|
+
unless status_code == 200
|
94
|
+
error_model = JSON.load(response_content)
|
95
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
96
|
+
end
|
97
|
+
|
98
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
99
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
100
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
101
|
+
# Deserialize Response
|
102
|
+
if status_code == 200
|
103
|
+
begin
|
104
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
105
|
+
result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::StorageAccountList.mapper()
|
106
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
107
|
+
rescue Exception => e
|
108
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
result
|
113
|
+
end
|
114
|
+
|
115
|
+
promise.execute
|
116
|
+
end
|
117
|
+
|
118
|
+
#
|
119
|
+
# Gets a StorageAccount by name.
|
120
|
+
#
|
121
|
+
# @param device_name [String] The device name.
|
122
|
+
# @param storage_account_name [String] The storage account name.
|
123
|
+
# @param resource_group_name [String] The resource group name.
|
124
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
125
|
+
# will be added to the HTTP request.
|
126
|
+
#
|
127
|
+
# @return [StorageAccount] operation results.
|
128
|
+
#
|
129
|
+
def get(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
130
|
+
response = get_async(device_name, storage_account_name, resource_group_name, custom_headers:custom_headers).value!
|
131
|
+
response.body unless response.nil?
|
132
|
+
end
|
133
|
+
|
134
|
+
#
|
135
|
+
# Gets a StorageAccount by name.
|
136
|
+
#
|
137
|
+
# @param device_name [String] The device name.
|
138
|
+
# @param storage_account_name [String] The storage account name.
|
139
|
+
# @param resource_group_name [String] The resource group name.
|
140
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
141
|
+
# will be added to the HTTP request.
|
142
|
+
#
|
143
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
144
|
+
#
|
145
|
+
def get_with_http_info(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
146
|
+
get_async(device_name, storage_account_name, resource_group_name, custom_headers:custom_headers).value!
|
147
|
+
end
|
148
|
+
|
149
|
+
#
|
150
|
+
# Gets a StorageAccount by name.
|
151
|
+
#
|
152
|
+
# @param device_name [String] The device name.
|
153
|
+
# @param storage_account_name [String] The storage account name.
|
154
|
+
# @param resource_group_name [String] The resource group name.
|
155
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
156
|
+
# to the HTTP request.
|
157
|
+
#
|
158
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
159
|
+
#
|
160
|
+
def get_async(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
161
|
+
fail ArgumentError, 'device_name is nil' if device_name.nil?
|
162
|
+
fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
|
163
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
164
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
165
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
166
|
+
|
167
|
+
|
168
|
+
request_headers = {}
|
169
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
170
|
+
|
171
|
+
# Set Headers
|
172
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
173
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
174
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'
|
175
|
+
|
176
|
+
request_url = @base_url || @client.base_url
|
177
|
+
|
178
|
+
options = {
|
179
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
180
|
+
path_params: {'deviceName' => device_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
181
|
+
query_params: {'api-version' => @client.api_version},
|
182
|
+
headers: request_headers.merge(custom_headers || {}),
|
183
|
+
base_url: request_url
|
184
|
+
}
|
185
|
+
promise = @client.make_request_async(:get, path_template, options)
|
186
|
+
|
187
|
+
promise = promise.then do |result|
|
188
|
+
http_response = result.response
|
189
|
+
status_code = http_response.status
|
190
|
+
response_content = http_response.body
|
191
|
+
unless status_code == 200
|
192
|
+
error_model = JSON.load(response_content)
|
193
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
194
|
+
end
|
195
|
+
|
196
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
197
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
198
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
199
|
+
# Deserialize Response
|
200
|
+
if status_code == 200
|
201
|
+
begin
|
202
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
203
|
+
result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::StorageAccount.mapper()
|
204
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
205
|
+
rescue Exception => e
|
206
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
result
|
211
|
+
end
|
212
|
+
|
213
|
+
promise.execute
|
214
|
+
end
|
215
|
+
|
216
|
+
#
|
217
|
+
# Creates a new StorageAccount or updates an existing StorageAccount on the
|
218
|
+
# device.
|
219
|
+
#
|
220
|
+
# @param device_name [String] The device name.
|
221
|
+
# @param storage_account_name [String] The StorageAccount name.
|
222
|
+
# @param storage_account [StorageAccount] The StorageAccount properties.
|
223
|
+
# @param resource_group_name [String] The resource group name.
|
224
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
225
|
+
# will be added to the HTTP request.
|
226
|
+
#
|
227
|
+
# @return [StorageAccount] operation results.
|
228
|
+
#
|
229
|
+
def create_or_update(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:nil)
|
230
|
+
response = create_or_update_async(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:custom_headers).value!
|
231
|
+
response.body unless response.nil?
|
232
|
+
end
|
233
|
+
|
234
|
+
#
|
235
|
+
# @param device_name [String] The device name.
|
236
|
+
# @param storage_account_name [String] The StorageAccount name.
|
237
|
+
# @param storage_account [StorageAccount] The StorageAccount properties.
|
238
|
+
# @param resource_group_name [String] The resource group name.
|
239
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
240
|
+
# will be added to the HTTP request.
|
241
|
+
#
|
242
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
243
|
+
# response.
|
244
|
+
#
|
245
|
+
def create_or_update_async(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:nil)
|
246
|
+
# Send request
|
247
|
+
promise = begin_create_or_update_async(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:custom_headers)
|
248
|
+
|
249
|
+
promise = promise.then do |response|
|
250
|
+
# Defining deserialization method.
|
251
|
+
deserialize_method = lambda do |parsed_response|
|
252
|
+
result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::StorageAccount.mapper()
|
253
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
254
|
+
end
|
255
|
+
|
256
|
+
# Waiting for response.
|
257
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
258
|
+
end
|
259
|
+
|
260
|
+
promise
|
261
|
+
end
|
262
|
+
|
263
|
+
#
|
264
|
+
# Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device.
|
265
|
+
#
|
266
|
+
# @param device_name [String] The device name.
|
267
|
+
# @param storage_account_name [String] The StorageAccount name.
|
268
|
+
# @param resource_group_name [String] The resource group name.
|
269
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
270
|
+
# will be added to the HTTP request.
|
271
|
+
#
|
272
|
+
def delete(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
273
|
+
response = delete_async(device_name, storage_account_name, resource_group_name, custom_headers:custom_headers).value!
|
274
|
+
nil
|
275
|
+
end
|
276
|
+
|
277
|
+
#
|
278
|
+
# @param device_name [String] The device name.
|
279
|
+
# @param storage_account_name [String] The StorageAccount name.
|
280
|
+
# @param resource_group_name [String] The resource group name.
|
281
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
282
|
+
# will be added to the HTTP request.
|
283
|
+
#
|
284
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
285
|
+
# response.
|
286
|
+
#
|
287
|
+
def delete_async(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
288
|
+
# Send request
|
289
|
+
promise = begin_delete_async(device_name, storage_account_name, resource_group_name, custom_headers:custom_headers)
|
290
|
+
|
291
|
+
promise = promise.then do |response|
|
292
|
+
# Defining deserialization method.
|
293
|
+
deserialize_method = lambda do |parsed_response|
|
294
|
+
end
|
295
|
+
|
296
|
+
# Waiting for response.
|
297
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
298
|
+
end
|
299
|
+
|
300
|
+
promise
|
301
|
+
end
|
302
|
+
|
303
|
+
#
|
304
|
+
# Creates a new StorageAccount or updates an existing StorageAccount on the
|
305
|
+
# device.
|
306
|
+
#
|
307
|
+
# @param device_name [String] The device name.
|
308
|
+
# @param storage_account_name [String] The StorageAccount name.
|
309
|
+
# @param storage_account [StorageAccount] The StorageAccount properties.
|
310
|
+
# @param resource_group_name [String] The resource group name.
|
311
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
312
|
+
# will be added to the HTTP request.
|
313
|
+
#
|
314
|
+
# @return [StorageAccount] operation results.
|
315
|
+
#
|
316
|
+
def begin_create_or_update(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:nil)
|
317
|
+
response = begin_create_or_update_async(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:custom_headers).value!
|
318
|
+
response.body unless response.nil?
|
319
|
+
end
|
320
|
+
|
321
|
+
#
|
322
|
+
# Creates a new StorageAccount or updates an existing StorageAccount on the
|
323
|
+
# device.
|
324
|
+
#
|
325
|
+
# @param device_name [String] The device name.
|
326
|
+
# @param storage_account_name [String] The StorageAccount name.
|
327
|
+
# @param storage_account [StorageAccount] The StorageAccount properties.
|
328
|
+
# @param resource_group_name [String] The resource group name.
|
329
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
330
|
+
# will be added to the HTTP request.
|
331
|
+
#
|
332
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
333
|
+
#
|
334
|
+
def begin_create_or_update_with_http_info(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:nil)
|
335
|
+
begin_create_or_update_async(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:custom_headers).value!
|
336
|
+
end
|
337
|
+
|
338
|
+
#
|
339
|
+
# Creates a new StorageAccount or updates an existing StorageAccount on the
|
340
|
+
# device.
|
341
|
+
#
|
342
|
+
# @param device_name [String] The device name.
|
343
|
+
# @param storage_account_name [String] The StorageAccount name.
|
344
|
+
# @param storage_account [StorageAccount] The StorageAccount properties.
|
345
|
+
# @param resource_group_name [String] The resource group name.
|
346
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
347
|
+
# to the HTTP request.
|
348
|
+
#
|
349
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
350
|
+
#
|
351
|
+
def begin_create_or_update_async(device_name, storage_account_name, storage_account, resource_group_name, custom_headers:nil)
|
352
|
+
fail ArgumentError, 'device_name is nil' if device_name.nil?
|
353
|
+
fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
|
354
|
+
fail ArgumentError, 'storage_account is nil' if storage_account.nil?
|
355
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
356
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
357
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
358
|
+
|
359
|
+
|
360
|
+
request_headers = {}
|
361
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
362
|
+
|
363
|
+
# Set Headers
|
364
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
365
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
366
|
+
|
367
|
+
# Serialize Request
|
368
|
+
request_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::StorageAccount.mapper()
|
369
|
+
request_content = @client.serialize(request_mapper, storage_account)
|
370
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
371
|
+
|
372
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'
|
373
|
+
|
374
|
+
request_url = @base_url || @client.base_url
|
375
|
+
|
376
|
+
options = {
|
377
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
378
|
+
path_params: {'deviceName' => device_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
379
|
+
query_params: {'api-version' => @client.api_version},
|
380
|
+
body: request_content,
|
381
|
+
headers: request_headers.merge(custom_headers || {}),
|
382
|
+
base_url: request_url
|
383
|
+
}
|
384
|
+
promise = @client.make_request_async(:put, path_template, options)
|
385
|
+
|
386
|
+
promise = promise.then do |result|
|
387
|
+
http_response = result.response
|
388
|
+
status_code = http_response.status
|
389
|
+
response_content = http_response.body
|
390
|
+
unless status_code == 200 || status_code == 202
|
391
|
+
error_model = JSON.load(response_content)
|
392
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
393
|
+
end
|
394
|
+
|
395
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
396
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
397
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
398
|
+
# Deserialize Response
|
399
|
+
if status_code == 200
|
400
|
+
begin
|
401
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
402
|
+
result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::StorageAccount.mapper()
|
403
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
404
|
+
rescue Exception => e
|
405
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
result
|
410
|
+
end
|
411
|
+
|
412
|
+
promise.execute
|
413
|
+
end
|
414
|
+
|
415
|
+
#
|
416
|
+
# Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device.
|
417
|
+
#
|
418
|
+
# @param device_name [String] The device name.
|
419
|
+
# @param storage_account_name [String] The StorageAccount name.
|
420
|
+
# @param resource_group_name [String] The resource group name.
|
421
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
422
|
+
# will be added to the HTTP request.
|
423
|
+
#
|
424
|
+
#
|
425
|
+
def begin_delete(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
426
|
+
response = begin_delete_async(device_name, storage_account_name, resource_group_name, custom_headers:custom_headers).value!
|
427
|
+
nil
|
428
|
+
end
|
429
|
+
|
430
|
+
#
|
431
|
+
# Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device.
|
432
|
+
#
|
433
|
+
# @param device_name [String] The device name.
|
434
|
+
# @param storage_account_name [String] The StorageAccount name.
|
435
|
+
# @param resource_group_name [String] The resource group name.
|
436
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
437
|
+
# will be added to the HTTP request.
|
438
|
+
#
|
439
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
440
|
+
#
|
441
|
+
def begin_delete_with_http_info(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
442
|
+
begin_delete_async(device_name, storage_account_name, resource_group_name, custom_headers:custom_headers).value!
|
443
|
+
end
|
444
|
+
|
445
|
+
#
|
446
|
+
# Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device.
|
447
|
+
#
|
448
|
+
# @param device_name [String] The device name.
|
449
|
+
# @param storage_account_name [String] The StorageAccount name.
|
450
|
+
# @param resource_group_name [String] The resource group name.
|
451
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
452
|
+
# to the HTTP request.
|
453
|
+
#
|
454
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
455
|
+
#
|
456
|
+
def begin_delete_async(device_name, storage_account_name, resource_group_name, custom_headers:nil)
|
457
|
+
fail ArgumentError, 'device_name is nil' if device_name.nil?
|
458
|
+
fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
|
459
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
460
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
461
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
462
|
+
|
463
|
+
|
464
|
+
request_headers = {}
|
465
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
466
|
+
|
467
|
+
# Set Headers
|
468
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
469
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
470
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'
|
471
|
+
|
472
|
+
request_url = @base_url || @client.base_url
|
473
|
+
|
474
|
+
options = {
|
475
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
476
|
+
path_params: {'deviceName' => device_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
477
|
+
query_params: {'api-version' => @client.api_version},
|
478
|
+
headers: request_headers.merge(custom_headers || {}),
|
479
|
+
base_url: request_url
|
480
|
+
}
|
481
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
482
|
+
|
483
|
+
promise = promise.then do |result|
|
484
|
+
http_response = result.response
|
485
|
+
status_code = http_response.status
|
486
|
+
response_content = http_response.body
|
487
|
+
unless status_code == 202 || status_code == 204
|
488
|
+
error_model = JSON.load(response_content)
|
489
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
490
|
+
end
|
491
|
+
|
492
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
493
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
494
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
495
|
+
|
496
|
+
result
|
497
|
+
end
|
498
|
+
|
499
|
+
promise.execute
|
500
|
+
end
|
501
|
+
|
502
|
+
#
|
503
|
+
# Lists all the storage accounts in a Data Box Edge/Data Box Gateway device.
|
504
|
+
#
|
505
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
506
|
+
# to List operation.
|
507
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
508
|
+
# will be added to the HTTP request.
|
509
|
+
#
|
510
|
+
# @return [StorageAccountList] operation results.
|
511
|
+
#
|
512
|
+
def list_by_data_box_edge_device_next(next_page_link, custom_headers:nil)
|
513
|
+
response = list_by_data_box_edge_device_next_async(next_page_link, custom_headers:custom_headers).value!
|
514
|
+
response.body unless response.nil?
|
515
|
+
end
|
516
|
+
|
517
|
+
#
|
518
|
+
# Lists all the storage accounts in a Data Box Edge/Data Box Gateway device.
|
519
|
+
#
|
520
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
521
|
+
# to List operation.
|
522
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
523
|
+
# will be added to the HTTP request.
|
524
|
+
#
|
525
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
526
|
+
#
|
527
|
+
def list_by_data_box_edge_device_next_with_http_info(next_page_link, custom_headers:nil)
|
528
|
+
list_by_data_box_edge_device_next_async(next_page_link, custom_headers:custom_headers).value!
|
529
|
+
end
|
530
|
+
|
531
|
+
#
|
532
|
+
# Lists all the storage accounts in a Data Box Edge/Data Box Gateway device.
|
533
|
+
#
|
534
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
535
|
+
# to List operation.
|
536
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
537
|
+
# to the HTTP request.
|
538
|
+
#
|
539
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
540
|
+
#
|
541
|
+
def list_by_data_box_edge_device_next_async(next_page_link, custom_headers:nil)
|
542
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
543
|
+
|
544
|
+
|
545
|
+
request_headers = {}
|
546
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
547
|
+
|
548
|
+
# Set Headers
|
549
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
550
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
551
|
+
path_template = '{nextLink}'
|
552
|
+
|
553
|
+
request_url = @base_url || @client.base_url
|
554
|
+
|
555
|
+
options = {
|
556
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
557
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
558
|
+
headers: request_headers.merge(custom_headers || {}),
|
559
|
+
base_url: request_url
|
560
|
+
}
|
561
|
+
promise = @client.make_request_async(:get, path_template, options)
|
562
|
+
|
563
|
+
promise = promise.then do |result|
|
564
|
+
http_response = result.response
|
565
|
+
status_code = http_response.status
|
566
|
+
response_content = http_response.body
|
567
|
+
unless status_code == 200
|
568
|
+
error_model = JSON.load(response_content)
|
569
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
570
|
+
end
|
571
|
+
|
572
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
573
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
574
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
575
|
+
# Deserialize Response
|
576
|
+
if status_code == 200
|
577
|
+
begin
|
578
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
579
|
+
result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::StorageAccountList.mapper()
|
580
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
581
|
+
rescue Exception => e
|
582
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
583
|
+
end
|
584
|
+
end
|
585
|
+
|
586
|
+
result
|
587
|
+
end
|
588
|
+
|
589
|
+
promise.execute
|
590
|
+
end
|
591
|
+
|
592
|
+
#
|
593
|
+
# Lists all the storage accounts in a Data Box Edge/Data Box Gateway device.
|
594
|
+
#
|
595
|
+
# @param device_name [String] The device name.
|
596
|
+
# @param resource_group_name [String] The resource group name.
|
597
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
598
|
+
# will be added to the HTTP request.
|
599
|
+
#
|
600
|
+
# @return [StorageAccountList] which provide lazy access to pages of the
|
601
|
+
# response.
|
602
|
+
#
|
603
|
+
def list_by_data_box_edge_device_as_lazy(device_name, resource_group_name, custom_headers:nil)
|
604
|
+
response = list_by_data_box_edge_device_async(device_name, resource_group_name, custom_headers:custom_headers).value!
|
605
|
+
unless response.nil?
|
606
|
+
page = response.body
|
607
|
+
page.next_method = Proc.new do |next_page_link|
|
608
|
+
list_by_data_box_edge_device_next_async(next_page_link, custom_headers:custom_headers)
|
609
|
+
end
|
610
|
+
page
|
611
|
+
end
|
612
|
+
end
|
613
|
+
|
614
|
+
end
|
615
|
+
end
|