azure_mgmt_datashare 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/2018-11-01-preview/generated/azure_mgmt_datashare.rb +117 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/accounts.rb +981 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/consumer_invitations.rb +442 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/consumer_source_data_sets.rb +254 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_set_mappings.rb +603 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_sets.rb +587 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_share_management_client.rb +175 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/invitations.rb +587 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account.rb +135 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account_update_parameters.rb +54 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1file_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1folder_data_set.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set_mapping.rb +167 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set_mapping.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set_mapping.rb +155 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set_mapping.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set_mapping.rb +167 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set_mapping.rb +155 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation.rb +194 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_status.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_type.rb +24 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error.rb +47 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error_info.rb +88 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/default_dto.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/dimension_properties.rb +57 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/identity.rb +70 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation.rb +159 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_status.rb +18 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_log_specification.rb +68 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_metric_specification.rb +181 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_service_specification.rb +77 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model.rb +81 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model_properties.rb +79 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_response.rb +82 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/output_type.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription.rb +148 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provisioning_state.rb +19 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/proxy_dto.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/recurrence_interval.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_source_synchronization_setting.rb +73 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_synchronization_setting.rb +140 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_trigger.rb +162 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_kind.rb +15 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_list.rb +98 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription.rb +197 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_status.rb +18 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization.rb +106 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization.rb +123 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting.rb +46 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set.rb +122 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set_mapping.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set.rb +122 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set_mapping.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/status.rb +20 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details.rb +221 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_mode.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronize.rb +48 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_status.rb +17 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/type.rb +15 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/module_definition.rb +9 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/operations.rb +232 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/provider_share_subscriptions.rb +636 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/share_subscriptions.rb +1685 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/shares.rb +1101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/synchronization_settings.rb +667 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/triggers.rb +701 -0
- data/lib/azure_mgmt_datashare.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/datashare_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/datashare_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/datashare_profile_module.rb +395 -0
- data/lib/version.rb +7 -0
- metadata +217 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c67d1c43f9e344f576811b1610b975cb898b912441e7b413945cb64056688bf1
|
4
|
+
data.tar.gz: 8f73b031d856b5a2787b500b3e2e194fabea6b7b54f08929b1e97481cc7426de
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3e94622470edfa2af9be1cc9f1f80cf342a0b33aab2301632ce7d70ff994fc44b1e3599445beaa5750324029dfe0c0158f37b84a6d2b4989897b7449842cd251
|
7
|
+
data.tar.gz: 19e6bc0df513c500f5afe4fd4dfb3d0972d8cc3faec0b9ce5a0259a15db88fe240bd58e5d153f37be4f4fe6e9669bce401d0da54b5080d7a40ab6618c0c38607
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2018-11-01-preview/generated/azure_mgmt_datashare/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::DataShare::Mgmt::V2018_11_01_preview
|
23
|
+
autoload :Accounts, '2018-11-01-preview/generated/azure_mgmt_datashare/accounts.rb'
|
24
|
+
autoload :ConsumerInvitations, '2018-11-01-preview/generated/azure_mgmt_datashare/consumer_invitations.rb'
|
25
|
+
autoload :DataSets, '2018-11-01-preview/generated/azure_mgmt_datashare/data_sets.rb'
|
26
|
+
autoload :DataSetMappings, '2018-11-01-preview/generated/azure_mgmt_datashare/data_set_mappings.rb'
|
27
|
+
autoload :Invitations, '2018-11-01-preview/generated/azure_mgmt_datashare/invitations.rb'
|
28
|
+
autoload :Operations, '2018-11-01-preview/generated/azure_mgmt_datashare/operations.rb'
|
29
|
+
autoload :Shares, '2018-11-01-preview/generated/azure_mgmt_datashare/shares.rb'
|
30
|
+
autoload :ProviderShareSubscriptions, '2018-11-01-preview/generated/azure_mgmt_datashare/provider_share_subscriptions.rb'
|
31
|
+
autoload :ShareSubscriptions, '2018-11-01-preview/generated/azure_mgmt_datashare/share_subscriptions.rb'
|
32
|
+
autoload :ConsumerSourceDataSets, '2018-11-01-preview/generated/azure_mgmt_datashare/consumer_source_data_sets.rb'
|
33
|
+
autoload :SynchronizationSettings, '2018-11-01-preview/generated/azure_mgmt_datashare/synchronization_settings.rb'
|
34
|
+
autoload :Triggers, '2018-11-01-preview/generated/azure_mgmt_datashare/triggers.rb'
|
35
|
+
autoload :DataShareManagementClient, '2018-11-01-preview/generated/azure_mgmt_datashare/data_share_management_client.rb'
|
36
|
+
|
37
|
+
module Models
|
38
|
+
autoload :SourceShareSynchronizationSetting, '2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting.rb'
|
39
|
+
autoload :Identity, '2018-11-01-preview/generated/azure_mgmt_datashare/models/identity.rb'
|
40
|
+
autoload :SourceShareSynchronizationSettingList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting_list.rb'
|
41
|
+
autoload :DataShareErrorInfo, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error_info.rb'
|
42
|
+
autoload :ShareSubscriptionSynchronization, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization.rb'
|
43
|
+
autoload :AccountUpdateParameters, '2018-11-01-preview/generated/azure_mgmt_datashare/models/account_update_parameters.rb'
|
44
|
+
autoload :ShareSubscriptionSynchronizationList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization_list.rb'
|
45
|
+
autoload :AccountList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/account_list.rb'
|
46
|
+
autoload :Synchronize, '2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronize.rb'
|
47
|
+
autoload :ConsumerInvitationList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation_list.rb'
|
48
|
+
autoload :ShareSubscriptionList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_list.rb'
|
49
|
+
autoload :DataSetList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_list.rb'
|
50
|
+
autoload :SynchronizationDetailsList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details_list.rb'
|
51
|
+
autoload :SynchronizationDetails, '2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details.rb'
|
52
|
+
autoload :DataSetMappingList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_list.rb'
|
53
|
+
autoload :InvitationList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_list.rb'
|
54
|
+
autoload :DefaultDto, '2018-11-01-preview/generated/azure_mgmt_datashare/models/default_dto.rb'
|
55
|
+
autoload :OperationMetaLogSpecification, '2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_log_specification.rb'
|
56
|
+
autoload :ProviderShareSubscriptionList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription_list.rb'
|
57
|
+
autoload :OperationMetaMetricSpecification, '2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_metric_specification.rb'
|
58
|
+
autoload :TriggerList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_list.rb'
|
59
|
+
autoload :OperationModel, '2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model.rb'
|
60
|
+
autoload :ProxyDto, '2018-11-01-preview/generated/azure_mgmt_datashare/models/proxy_dto.rb'
|
61
|
+
autoload :SynchronizationSettingList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting_list.rb'
|
62
|
+
autoload :ShareList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_list.rb'
|
63
|
+
autoload :ConsumerSourceDataSetList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set_list.rb'
|
64
|
+
autoload :ShareSynchronizationList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization_list.rb'
|
65
|
+
autoload :OperationList, '2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_list.rb'
|
66
|
+
autoload :ShareSynchronization, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization.rb'
|
67
|
+
autoload :DimensionProperties, '2018-11-01-preview/generated/azure_mgmt_datashare/models/dimension_properties.rb'
|
68
|
+
autoload :OperationModelProperties, '2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model_properties.rb'
|
69
|
+
autoload :OperationResponse, '2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_response.rb'
|
70
|
+
autoload :OperationMetaServiceSpecification, '2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_service_specification.rb'
|
71
|
+
autoload :DataShareError, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error.rb'
|
72
|
+
autoload :Account, '2018-11-01-preview/generated/azure_mgmt_datashare/models/account.rb'
|
73
|
+
autoload :ConsumerInvitation, '2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation.rb'
|
74
|
+
autoload :DataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set.rb'
|
75
|
+
autoload :DataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping.rb'
|
76
|
+
autoload :Invitation, '2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation.rb'
|
77
|
+
autoload :Share, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share.rb'
|
78
|
+
autoload :ProviderShareSubscription, '2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription.rb'
|
79
|
+
autoload :ShareSubscription, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription.rb'
|
80
|
+
autoload :ConsumerSourceDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set.rb'
|
81
|
+
autoload :SynchronizationSetting, '2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting.rb'
|
82
|
+
autoload :Trigger, '2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger.rb'
|
83
|
+
autoload :ScheduledSynchronizationSetting, '2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_synchronization_setting.rb'
|
84
|
+
autoload :ScheduledTrigger, '2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_trigger.rb'
|
85
|
+
autoload :BlobDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set.rb'
|
86
|
+
autoload :BlobFolderDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set.rb'
|
87
|
+
autoload :BlobContainerDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set.rb'
|
88
|
+
autoload :ADLSGen2FileDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set.rb'
|
89
|
+
autoload :ADLSGen2FolderDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set.rb'
|
90
|
+
autoload :ADLSGen2FileSystemDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set.rb'
|
91
|
+
autoload :ADLSGen1FolderDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1folder_data_set.rb'
|
92
|
+
autoload :ADLSGen1FileDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1file_data_set.rb'
|
93
|
+
autoload :SqlDWTableDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set.rb'
|
94
|
+
autoload :SqlDBTableDataSet, '2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set.rb'
|
95
|
+
autoload :BlobDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set_mapping.rb'
|
96
|
+
autoload :BlobFolderDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set_mapping.rb'
|
97
|
+
autoload :BlobContainerDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set_mapping.rb'
|
98
|
+
autoload :ADLSGen2FileDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set_mapping.rb'
|
99
|
+
autoload :ADLSGen2FolderDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set_mapping.rb'
|
100
|
+
autoload :ADLSGen2FileSystemDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set_mapping.rb'
|
101
|
+
autoload :SqlDWTableDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set_mapping.rb'
|
102
|
+
autoload :SqlDBTableDataSetMapping, '2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set_mapping.rb'
|
103
|
+
autoload :ScheduledSourceSynchronizationSetting, '2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_source_synchronization_setting.rb'
|
104
|
+
autoload :Type, '2018-11-01-preview/generated/azure_mgmt_datashare/models/type.rb'
|
105
|
+
autoload :ProvisioningState, '2018-11-01-preview/generated/azure_mgmt_datashare/models/provisioning_state.rb'
|
106
|
+
autoload :Status, '2018-11-01-preview/generated/azure_mgmt_datashare/models/status.rb'
|
107
|
+
autoload :InvitationStatus, '2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_status.rb'
|
108
|
+
autoload :ShareKind, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_kind.rb'
|
109
|
+
autoload :DataSetType, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_type.rb'
|
110
|
+
autoload :ShareSubscriptionStatus, '2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_status.rb'
|
111
|
+
autoload :SynchronizationMode, '2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_mode.rb'
|
112
|
+
autoload :RecurrenceInterval, '2018-11-01-preview/generated/azure_mgmt_datashare/models/recurrence_interval.rb'
|
113
|
+
autoload :TriggerStatus, '2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_status.rb'
|
114
|
+
autoload :DataSetMappingStatus, '2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_status.rb'
|
115
|
+
autoload :OutputType, '2018-11-01-preview/generated/azure_mgmt_datashare/models/output_type.rb'
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,981 @@
|
|
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::DataShare::Mgmt::V2018_11_01_preview
|
7
|
+
#
|
8
|
+
# Creates a Microsoft.DataShare management client.
|
9
|
+
#
|
10
|
+
class Accounts
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Accounts class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [DataShareManagementClient] reference to the DataShareManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get an account under a resource group
|
26
|
+
#
|
27
|
+
# Get an account
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The resource group name.
|
30
|
+
# @param account_name [String] The name of the share account.
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
# @return [Account] operation results.
|
35
|
+
#
|
36
|
+
def get(resource_group_name, account_name, custom_headers:nil)
|
37
|
+
response = get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
38
|
+
response.body unless response.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Get an account under a resource group
|
43
|
+
#
|
44
|
+
# Get an account
|
45
|
+
#
|
46
|
+
# @param resource_group_name [String] The resource group name.
|
47
|
+
# @param account_name [String] The name of the share account.
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
52
|
+
#
|
53
|
+
def get_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
54
|
+
get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Get an account under a resource group
|
59
|
+
#
|
60
|
+
# Get an account
|
61
|
+
#
|
62
|
+
# @param resource_group_name [String] The resource group name.
|
63
|
+
# @param account_name [String] The name of the share account.
|
64
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
65
|
+
# to the HTTP request.
|
66
|
+
#
|
67
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
68
|
+
#
|
69
|
+
def get_async(resource_group_name, account_name, custom_headers:nil)
|
70
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
71
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
72
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
73
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
74
|
+
|
75
|
+
|
76
|
+
request_headers = {}
|
77
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
78
|
+
|
79
|
+
# Set Headers
|
80
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
81
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'
|
83
|
+
|
84
|
+
request_url = @base_url || @client.base_url
|
85
|
+
|
86
|
+
options = {
|
87
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
89
|
+
query_params: {'api-version' => @client.api_version},
|
90
|
+
headers: request_headers.merge(custom_headers || {}),
|
91
|
+
base_url: request_url
|
92
|
+
}
|
93
|
+
promise = @client.make_request_async(:get, path_template, options)
|
94
|
+
|
95
|
+
promise = promise.then do |result|
|
96
|
+
http_response = result.response
|
97
|
+
status_code = http_response.status
|
98
|
+
response_content = http_response.body
|
99
|
+
unless status_code == 200
|
100
|
+
error_model = JSON.load(response_content)
|
101
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
102
|
+
end
|
103
|
+
|
104
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
105
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
106
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
107
|
+
# Deserialize Response
|
108
|
+
if status_code == 200
|
109
|
+
begin
|
110
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
111
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Account.mapper()
|
112
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
113
|
+
rescue Exception => e
|
114
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
result
|
119
|
+
end
|
120
|
+
|
121
|
+
promise.execute
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Create an account in the given resource group
|
126
|
+
#
|
127
|
+
# Create an account
|
128
|
+
#
|
129
|
+
# @param resource_group_name [String] The resource group name.
|
130
|
+
# @param account_name [String] The name of the share account.
|
131
|
+
# @param account [Account] The account payload.
|
132
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
133
|
+
# will be added to the HTTP request.
|
134
|
+
#
|
135
|
+
# @return [Account] operation results.
|
136
|
+
#
|
137
|
+
def create(resource_group_name, account_name, account, custom_headers:nil)
|
138
|
+
response = create_async(resource_group_name, account_name, account, custom_headers:custom_headers).value!
|
139
|
+
response.body unless response.nil?
|
140
|
+
end
|
141
|
+
|
142
|
+
#
|
143
|
+
# @param resource_group_name [String] The resource group name.
|
144
|
+
# @param account_name [String] The name of the share account.
|
145
|
+
# @param account [Account] The account payload.
|
146
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
147
|
+
# will be added to the HTTP request.
|
148
|
+
#
|
149
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
150
|
+
# response.
|
151
|
+
#
|
152
|
+
def create_async(resource_group_name, account_name, account, custom_headers:nil)
|
153
|
+
# Send request
|
154
|
+
promise = begin_create_async(resource_group_name, account_name, account, custom_headers:custom_headers)
|
155
|
+
|
156
|
+
promise = promise.then do |response|
|
157
|
+
# Defining deserialization method.
|
158
|
+
deserialize_method = lambda do |parsed_response|
|
159
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Account.mapper()
|
160
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
161
|
+
end
|
162
|
+
|
163
|
+
# Waiting for response.
|
164
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
165
|
+
end
|
166
|
+
|
167
|
+
promise
|
168
|
+
end
|
169
|
+
|
170
|
+
#
|
171
|
+
# Delete an account
|
172
|
+
#
|
173
|
+
# DeleteAccount
|
174
|
+
#
|
175
|
+
# @param resource_group_name [String] The resource group name.
|
176
|
+
# @param account_name [String] The name of the share account.
|
177
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
178
|
+
# will be added to the HTTP request.
|
179
|
+
#
|
180
|
+
# @return [OperationResponse] operation results.
|
181
|
+
#
|
182
|
+
def delete(resource_group_name, account_name, custom_headers:nil)
|
183
|
+
response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
184
|
+
response.body unless response.nil?
|
185
|
+
end
|
186
|
+
|
187
|
+
#
|
188
|
+
# @param resource_group_name [String] The resource group name.
|
189
|
+
# @param account_name [String] The name of the share account.
|
190
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
191
|
+
# will be added to the HTTP request.
|
192
|
+
#
|
193
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
194
|
+
# response.
|
195
|
+
#
|
196
|
+
def delete_async(resource_group_name, account_name, custom_headers:nil)
|
197
|
+
# Send request
|
198
|
+
promise = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers)
|
199
|
+
|
200
|
+
promise = promise.then do |response|
|
201
|
+
# Defining deserialization method.
|
202
|
+
deserialize_method = lambda do |parsed_response|
|
203
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::OperationResponse.mapper()
|
204
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
205
|
+
end
|
206
|
+
|
207
|
+
# Waiting for response.
|
208
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
209
|
+
end
|
210
|
+
|
211
|
+
promise
|
212
|
+
end
|
213
|
+
|
214
|
+
#
|
215
|
+
# Patch a given account
|
216
|
+
#
|
217
|
+
# Patch an account
|
218
|
+
#
|
219
|
+
# @param resource_group_name [String] The resource group name.
|
220
|
+
# @param account_name [String] The name of the share account.
|
221
|
+
# @param account_update_parameters [AccountUpdateParameters] The account update
|
222
|
+
# parameters.
|
223
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
224
|
+
# will be added to the HTTP request.
|
225
|
+
#
|
226
|
+
# @return [Account] operation results.
|
227
|
+
#
|
228
|
+
def update(resource_group_name, account_name, account_update_parameters, custom_headers:nil)
|
229
|
+
response = update_async(resource_group_name, account_name, account_update_parameters, custom_headers:custom_headers).value!
|
230
|
+
response.body unless response.nil?
|
231
|
+
end
|
232
|
+
|
233
|
+
#
|
234
|
+
# Patch a given account
|
235
|
+
#
|
236
|
+
# Patch an account
|
237
|
+
#
|
238
|
+
# @param resource_group_name [String] The resource group name.
|
239
|
+
# @param account_name [String] The name of the share account.
|
240
|
+
# @param account_update_parameters [AccountUpdateParameters] The account update
|
241
|
+
# parameters.
|
242
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
243
|
+
# will be added to the HTTP request.
|
244
|
+
#
|
245
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
246
|
+
#
|
247
|
+
def update_with_http_info(resource_group_name, account_name, account_update_parameters, custom_headers:nil)
|
248
|
+
update_async(resource_group_name, account_name, account_update_parameters, custom_headers:custom_headers).value!
|
249
|
+
end
|
250
|
+
|
251
|
+
#
|
252
|
+
# Patch a given account
|
253
|
+
#
|
254
|
+
# Patch an account
|
255
|
+
#
|
256
|
+
# @param resource_group_name [String] The resource group name.
|
257
|
+
# @param account_name [String] The name of the share account.
|
258
|
+
# @param account_update_parameters [AccountUpdateParameters] The account update
|
259
|
+
# parameters.
|
260
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
261
|
+
# to the HTTP request.
|
262
|
+
#
|
263
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
264
|
+
#
|
265
|
+
def update_async(resource_group_name, account_name, account_update_parameters, custom_headers:nil)
|
266
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
267
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
268
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
269
|
+
fail ArgumentError, 'account_update_parameters is nil' if account_update_parameters.nil?
|
270
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
271
|
+
|
272
|
+
|
273
|
+
request_headers = {}
|
274
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
275
|
+
|
276
|
+
# Set Headers
|
277
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
278
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
279
|
+
|
280
|
+
# Serialize Request
|
281
|
+
request_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::AccountUpdateParameters.mapper()
|
282
|
+
request_content = @client.serialize(request_mapper, account_update_parameters)
|
283
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
284
|
+
|
285
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'
|
286
|
+
|
287
|
+
request_url = @base_url || @client.base_url
|
288
|
+
|
289
|
+
options = {
|
290
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
291
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
292
|
+
query_params: {'api-version' => @client.api_version},
|
293
|
+
body: request_content,
|
294
|
+
headers: request_headers.merge(custom_headers || {}),
|
295
|
+
base_url: request_url
|
296
|
+
}
|
297
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
298
|
+
|
299
|
+
promise = promise.then do |result|
|
300
|
+
http_response = result.response
|
301
|
+
status_code = http_response.status
|
302
|
+
response_content = http_response.body
|
303
|
+
unless status_code == 200
|
304
|
+
error_model = JSON.load(response_content)
|
305
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
306
|
+
end
|
307
|
+
|
308
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
309
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
310
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
311
|
+
# Deserialize Response
|
312
|
+
if status_code == 200
|
313
|
+
begin
|
314
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
315
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Account.mapper()
|
316
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
317
|
+
rescue Exception => e
|
318
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
result
|
323
|
+
end
|
324
|
+
|
325
|
+
promise.execute
|
326
|
+
end
|
327
|
+
|
328
|
+
#
|
329
|
+
# List Accounts in a subscription
|
330
|
+
#
|
331
|
+
# List Accounts in Subscription
|
332
|
+
#
|
333
|
+
# @param skip_token [String] Continuation token
|
334
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
335
|
+
# will be added to the HTTP request.
|
336
|
+
#
|
337
|
+
# @return [Array<Account>] operation results.
|
338
|
+
#
|
339
|
+
def list_by_subscription(skip_token:nil, custom_headers:nil)
|
340
|
+
first_page = list_by_subscription_as_lazy(skip_token:skip_token, custom_headers:custom_headers)
|
341
|
+
first_page.get_all_items
|
342
|
+
end
|
343
|
+
|
344
|
+
#
|
345
|
+
# List Accounts in a subscription
|
346
|
+
#
|
347
|
+
# List Accounts in Subscription
|
348
|
+
#
|
349
|
+
# @param skip_token [String] Continuation token
|
350
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
351
|
+
# will be added to the HTTP request.
|
352
|
+
#
|
353
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
354
|
+
#
|
355
|
+
def list_by_subscription_with_http_info(skip_token:nil, custom_headers:nil)
|
356
|
+
list_by_subscription_async(skip_token:skip_token, custom_headers:custom_headers).value!
|
357
|
+
end
|
358
|
+
|
359
|
+
#
|
360
|
+
# List Accounts in a subscription
|
361
|
+
#
|
362
|
+
# List Accounts in Subscription
|
363
|
+
#
|
364
|
+
# @param skip_token [String] Continuation token
|
365
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
366
|
+
# to the HTTP request.
|
367
|
+
#
|
368
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
369
|
+
#
|
370
|
+
def list_by_subscription_async(skip_token:nil, custom_headers:nil)
|
371
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
372
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
373
|
+
|
374
|
+
|
375
|
+
request_headers = {}
|
376
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
377
|
+
|
378
|
+
# Set Headers
|
379
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
380
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
381
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts'
|
382
|
+
|
383
|
+
request_url = @base_url || @client.base_url
|
384
|
+
|
385
|
+
options = {
|
386
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
387
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
388
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
389
|
+
headers: request_headers.merge(custom_headers || {}),
|
390
|
+
base_url: request_url
|
391
|
+
}
|
392
|
+
promise = @client.make_request_async(:get, path_template, options)
|
393
|
+
|
394
|
+
promise = promise.then do |result|
|
395
|
+
http_response = result.response
|
396
|
+
status_code = http_response.status
|
397
|
+
response_content = http_response.body
|
398
|
+
unless status_code == 200
|
399
|
+
error_model = JSON.load(response_content)
|
400
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
401
|
+
end
|
402
|
+
|
403
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
404
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
405
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
406
|
+
# Deserialize Response
|
407
|
+
if status_code == 200
|
408
|
+
begin
|
409
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
410
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::AccountList.mapper()
|
411
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
412
|
+
rescue Exception => e
|
413
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
414
|
+
end
|
415
|
+
end
|
416
|
+
|
417
|
+
result
|
418
|
+
end
|
419
|
+
|
420
|
+
promise.execute
|
421
|
+
end
|
422
|
+
|
423
|
+
#
|
424
|
+
# List Accounts in a resource group
|
425
|
+
#
|
426
|
+
# List Accounts in ResourceGroup
|
427
|
+
#
|
428
|
+
# @param resource_group_name [String] The resource group name.
|
429
|
+
# @param skip_token [String] Continuation token
|
430
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
431
|
+
# will be added to the HTTP request.
|
432
|
+
#
|
433
|
+
# @return [Array<Account>] operation results.
|
434
|
+
#
|
435
|
+
def list_by_resource_group(resource_group_name, skip_token:nil, custom_headers:nil)
|
436
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, skip_token:skip_token, custom_headers:custom_headers)
|
437
|
+
first_page.get_all_items
|
438
|
+
end
|
439
|
+
|
440
|
+
#
|
441
|
+
# List Accounts in a resource group
|
442
|
+
#
|
443
|
+
# List Accounts in ResourceGroup
|
444
|
+
#
|
445
|
+
# @param resource_group_name [String] The resource group name.
|
446
|
+
# @param skip_token [String] Continuation token
|
447
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
448
|
+
# will be added to the HTTP request.
|
449
|
+
#
|
450
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
451
|
+
#
|
452
|
+
def list_by_resource_group_with_http_info(resource_group_name, skip_token:nil, custom_headers:nil)
|
453
|
+
list_by_resource_group_async(resource_group_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
454
|
+
end
|
455
|
+
|
456
|
+
#
|
457
|
+
# List Accounts in a resource group
|
458
|
+
#
|
459
|
+
# List Accounts in ResourceGroup
|
460
|
+
#
|
461
|
+
# @param resource_group_name [String] The resource group name.
|
462
|
+
# @param skip_token [String] Continuation token
|
463
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
464
|
+
# to the HTTP request.
|
465
|
+
#
|
466
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
467
|
+
#
|
468
|
+
def list_by_resource_group_async(resource_group_name, skip_token:nil, custom_headers:nil)
|
469
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
470
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
471
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
472
|
+
|
473
|
+
|
474
|
+
request_headers = {}
|
475
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
476
|
+
|
477
|
+
# Set Headers
|
478
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
479
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
480
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts'
|
481
|
+
|
482
|
+
request_url = @base_url || @client.base_url
|
483
|
+
|
484
|
+
options = {
|
485
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
486
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
487
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
488
|
+
headers: request_headers.merge(custom_headers || {}),
|
489
|
+
base_url: request_url
|
490
|
+
}
|
491
|
+
promise = @client.make_request_async(:get, path_template, options)
|
492
|
+
|
493
|
+
promise = promise.then do |result|
|
494
|
+
http_response = result.response
|
495
|
+
status_code = http_response.status
|
496
|
+
response_content = http_response.body
|
497
|
+
unless status_code == 200
|
498
|
+
error_model = JSON.load(response_content)
|
499
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
500
|
+
end
|
501
|
+
|
502
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
503
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
504
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
505
|
+
# Deserialize Response
|
506
|
+
if status_code == 200
|
507
|
+
begin
|
508
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
509
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::AccountList.mapper()
|
510
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
511
|
+
rescue Exception => e
|
512
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
result
|
517
|
+
end
|
518
|
+
|
519
|
+
promise.execute
|
520
|
+
end
|
521
|
+
|
522
|
+
#
|
523
|
+
# Create an account in the given resource group
|
524
|
+
#
|
525
|
+
# Create an account
|
526
|
+
#
|
527
|
+
# @param resource_group_name [String] The resource group name.
|
528
|
+
# @param account_name [String] The name of the share account.
|
529
|
+
# @param account [Account] The account payload.
|
530
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
531
|
+
# will be added to the HTTP request.
|
532
|
+
#
|
533
|
+
# @return [Account] operation results.
|
534
|
+
#
|
535
|
+
def begin_create(resource_group_name, account_name, account, custom_headers:nil)
|
536
|
+
response = begin_create_async(resource_group_name, account_name, account, custom_headers:custom_headers).value!
|
537
|
+
response.body unless response.nil?
|
538
|
+
end
|
539
|
+
|
540
|
+
#
|
541
|
+
# Create an account in the given resource group
|
542
|
+
#
|
543
|
+
# Create an account
|
544
|
+
#
|
545
|
+
# @param resource_group_name [String] The resource group name.
|
546
|
+
# @param account_name [String] The name of the share account.
|
547
|
+
# @param account [Account] The account payload.
|
548
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
549
|
+
# will be added to the HTTP request.
|
550
|
+
#
|
551
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
552
|
+
#
|
553
|
+
def begin_create_with_http_info(resource_group_name, account_name, account, custom_headers:nil)
|
554
|
+
begin_create_async(resource_group_name, account_name, account, custom_headers:custom_headers).value!
|
555
|
+
end
|
556
|
+
|
557
|
+
#
|
558
|
+
# Create an account in the given resource group
|
559
|
+
#
|
560
|
+
# Create an account
|
561
|
+
#
|
562
|
+
# @param resource_group_name [String] The resource group name.
|
563
|
+
# @param account_name [String] The name of the share account.
|
564
|
+
# @param account [Account] The account payload.
|
565
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
566
|
+
# to the HTTP request.
|
567
|
+
#
|
568
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
569
|
+
#
|
570
|
+
def begin_create_async(resource_group_name, account_name, account, custom_headers:nil)
|
571
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
572
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
573
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
574
|
+
fail ArgumentError, 'account is nil' if account.nil?
|
575
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
576
|
+
|
577
|
+
|
578
|
+
request_headers = {}
|
579
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
580
|
+
|
581
|
+
# Set Headers
|
582
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
583
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
584
|
+
|
585
|
+
# Serialize Request
|
586
|
+
request_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Account.mapper()
|
587
|
+
request_content = @client.serialize(request_mapper, account)
|
588
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
589
|
+
|
590
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'
|
591
|
+
|
592
|
+
request_url = @base_url || @client.base_url
|
593
|
+
|
594
|
+
options = {
|
595
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
596
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
597
|
+
query_params: {'api-version' => @client.api_version},
|
598
|
+
body: request_content,
|
599
|
+
headers: request_headers.merge(custom_headers || {}),
|
600
|
+
base_url: request_url
|
601
|
+
}
|
602
|
+
promise = @client.make_request_async(:put, path_template, options)
|
603
|
+
|
604
|
+
promise = promise.then do |result|
|
605
|
+
http_response = result.response
|
606
|
+
status_code = http_response.status
|
607
|
+
response_content = http_response.body
|
608
|
+
unless status_code == 201 || status_code == 200
|
609
|
+
error_model = JSON.load(response_content)
|
610
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
611
|
+
end
|
612
|
+
|
613
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
614
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
615
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
616
|
+
# Deserialize Response
|
617
|
+
if status_code == 201
|
618
|
+
begin
|
619
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
620
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Account.mapper()
|
621
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
622
|
+
rescue Exception => e
|
623
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
624
|
+
end
|
625
|
+
end
|
626
|
+
# Deserialize Response
|
627
|
+
if status_code == 200
|
628
|
+
begin
|
629
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
630
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Account.mapper()
|
631
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
632
|
+
rescue Exception => e
|
633
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
634
|
+
end
|
635
|
+
end
|
636
|
+
|
637
|
+
result
|
638
|
+
end
|
639
|
+
|
640
|
+
promise.execute
|
641
|
+
end
|
642
|
+
|
643
|
+
#
|
644
|
+
# Delete an account
|
645
|
+
#
|
646
|
+
# DeleteAccount
|
647
|
+
#
|
648
|
+
# @param resource_group_name [String] The resource group name.
|
649
|
+
# @param account_name [String] The name of the share account.
|
650
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
651
|
+
# will be added to the HTTP request.
|
652
|
+
#
|
653
|
+
# @return [OperationResponse] operation results.
|
654
|
+
#
|
655
|
+
def begin_delete(resource_group_name, account_name, custom_headers:nil)
|
656
|
+
response = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
657
|
+
response.body unless response.nil?
|
658
|
+
end
|
659
|
+
|
660
|
+
#
|
661
|
+
# Delete an account
|
662
|
+
#
|
663
|
+
# DeleteAccount
|
664
|
+
#
|
665
|
+
# @param resource_group_name [String] The resource group name.
|
666
|
+
# @param account_name [String] The name of the share account.
|
667
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
668
|
+
# will be added to the HTTP request.
|
669
|
+
#
|
670
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
671
|
+
#
|
672
|
+
def begin_delete_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
673
|
+
begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
674
|
+
end
|
675
|
+
|
676
|
+
#
|
677
|
+
# Delete an account
|
678
|
+
#
|
679
|
+
# DeleteAccount
|
680
|
+
#
|
681
|
+
# @param resource_group_name [String] The resource group name.
|
682
|
+
# @param account_name [String] The name of the share account.
|
683
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
684
|
+
# to the HTTP request.
|
685
|
+
#
|
686
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
687
|
+
#
|
688
|
+
def begin_delete_async(resource_group_name, account_name, custom_headers:nil)
|
689
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
690
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
691
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
692
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
693
|
+
|
694
|
+
|
695
|
+
request_headers = {}
|
696
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
697
|
+
|
698
|
+
# Set Headers
|
699
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
700
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
701
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'
|
702
|
+
|
703
|
+
request_url = @base_url || @client.base_url
|
704
|
+
|
705
|
+
options = {
|
706
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
707
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
708
|
+
query_params: {'api-version' => @client.api_version},
|
709
|
+
headers: request_headers.merge(custom_headers || {}),
|
710
|
+
base_url: request_url
|
711
|
+
}
|
712
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
713
|
+
|
714
|
+
promise = promise.then do |result|
|
715
|
+
http_response = result.response
|
716
|
+
status_code = http_response.status
|
717
|
+
response_content = http_response.body
|
718
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
719
|
+
error_model = JSON.load(response_content)
|
720
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
721
|
+
end
|
722
|
+
|
723
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
724
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
725
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
726
|
+
# Deserialize Response
|
727
|
+
if status_code == 200
|
728
|
+
begin
|
729
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
730
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::OperationResponse.mapper()
|
731
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
732
|
+
rescue Exception => e
|
733
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
734
|
+
end
|
735
|
+
end
|
736
|
+
|
737
|
+
result
|
738
|
+
end
|
739
|
+
|
740
|
+
promise.execute
|
741
|
+
end
|
742
|
+
|
743
|
+
#
|
744
|
+
# List Accounts in a subscription
|
745
|
+
#
|
746
|
+
# List Accounts in Subscription
|
747
|
+
#
|
748
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
749
|
+
# to List operation.
|
750
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
751
|
+
# will be added to the HTTP request.
|
752
|
+
#
|
753
|
+
# @return [AccountList] operation results.
|
754
|
+
#
|
755
|
+
def list_by_subscription_next(next_page_link, custom_headers:nil)
|
756
|
+
response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
757
|
+
response.body unless response.nil?
|
758
|
+
end
|
759
|
+
|
760
|
+
#
|
761
|
+
# List Accounts in a subscription
|
762
|
+
#
|
763
|
+
# List Accounts in Subscription
|
764
|
+
#
|
765
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
766
|
+
# to List operation.
|
767
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
768
|
+
# will be added to the HTTP request.
|
769
|
+
#
|
770
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
771
|
+
#
|
772
|
+
def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
|
773
|
+
list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
774
|
+
end
|
775
|
+
|
776
|
+
#
|
777
|
+
# List Accounts in a subscription
|
778
|
+
#
|
779
|
+
# List Accounts in Subscription
|
780
|
+
#
|
781
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
782
|
+
# to List operation.
|
783
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
784
|
+
# to the HTTP request.
|
785
|
+
#
|
786
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
787
|
+
#
|
788
|
+
def list_by_subscription_next_async(next_page_link, custom_headers:nil)
|
789
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
790
|
+
|
791
|
+
|
792
|
+
request_headers = {}
|
793
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
794
|
+
|
795
|
+
# Set Headers
|
796
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
797
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
798
|
+
path_template = '{nextLink}'
|
799
|
+
|
800
|
+
request_url = @base_url || @client.base_url
|
801
|
+
|
802
|
+
options = {
|
803
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
804
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
805
|
+
headers: request_headers.merge(custom_headers || {}),
|
806
|
+
base_url: request_url
|
807
|
+
}
|
808
|
+
promise = @client.make_request_async(:get, path_template, options)
|
809
|
+
|
810
|
+
promise = promise.then do |result|
|
811
|
+
http_response = result.response
|
812
|
+
status_code = http_response.status
|
813
|
+
response_content = http_response.body
|
814
|
+
unless status_code == 200
|
815
|
+
error_model = JSON.load(response_content)
|
816
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
817
|
+
end
|
818
|
+
|
819
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
820
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
821
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
822
|
+
# Deserialize Response
|
823
|
+
if status_code == 200
|
824
|
+
begin
|
825
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
826
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::AccountList.mapper()
|
827
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
828
|
+
rescue Exception => e
|
829
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
830
|
+
end
|
831
|
+
end
|
832
|
+
|
833
|
+
result
|
834
|
+
end
|
835
|
+
|
836
|
+
promise.execute
|
837
|
+
end
|
838
|
+
|
839
|
+
#
|
840
|
+
# List Accounts in a resource group
|
841
|
+
#
|
842
|
+
# List Accounts in ResourceGroup
|
843
|
+
#
|
844
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
845
|
+
# to List operation.
|
846
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
847
|
+
# will be added to the HTTP request.
|
848
|
+
#
|
849
|
+
# @return [AccountList] operation results.
|
850
|
+
#
|
851
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
852
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
853
|
+
response.body unless response.nil?
|
854
|
+
end
|
855
|
+
|
856
|
+
#
|
857
|
+
# List Accounts in a resource group
|
858
|
+
#
|
859
|
+
# List Accounts in ResourceGroup
|
860
|
+
#
|
861
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
862
|
+
# to List operation.
|
863
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
864
|
+
# will be added to the HTTP request.
|
865
|
+
#
|
866
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
867
|
+
#
|
868
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
869
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
870
|
+
end
|
871
|
+
|
872
|
+
#
|
873
|
+
# List Accounts in a resource group
|
874
|
+
#
|
875
|
+
# List Accounts in ResourceGroup
|
876
|
+
#
|
877
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
878
|
+
# to List operation.
|
879
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
880
|
+
# to the HTTP request.
|
881
|
+
#
|
882
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
883
|
+
#
|
884
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
885
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
886
|
+
|
887
|
+
|
888
|
+
request_headers = {}
|
889
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
890
|
+
|
891
|
+
# Set Headers
|
892
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
893
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
894
|
+
path_template = '{nextLink}'
|
895
|
+
|
896
|
+
request_url = @base_url || @client.base_url
|
897
|
+
|
898
|
+
options = {
|
899
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
900
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
901
|
+
headers: request_headers.merge(custom_headers || {}),
|
902
|
+
base_url: request_url
|
903
|
+
}
|
904
|
+
promise = @client.make_request_async(:get, path_template, options)
|
905
|
+
|
906
|
+
promise = promise.then do |result|
|
907
|
+
http_response = result.response
|
908
|
+
status_code = http_response.status
|
909
|
+
response_content = http_response.body
|
910
|
+
unless status_code == 200
|
911
|
+
error_model = JSON.load(response_content)
|
912
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
913
|
+
end
|
914
|
+
|
915
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
916
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
917
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
918
|
+
# Deserialize Response
|
919
|
+
if status_code == 200
|
920
|
+
begin
|
921
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
922
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::AccountList.mapper()
|
923
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
924
|
+
rescue Exception => e
|
925
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
926
|
+
end
|
927
|
+
end
|
928
|
+
|
929
|
+
result
|
930
|
+
end
|
931
|
+
|
932
|
+
promise.execute
|
933
|
+
end
|
934
|
+
|
935
|
+
#
|
936
|
+
# List Accounts in a subscription
|
937
|
+
#
|
938
|
+
# List Accounts in Subscription
|
939
|
+
#
|
940
|
+
# @param skip_token [String] Continuation token
|
941
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
942
|
+
# will be added to the HTTP request.
|
943
|
+
#
|
944
|
+
# @return [AccountList] which provide lazy access to pages of the response.
|
945
|
+
#
|
946
|
+
def list_by_subscription_as_lazy(skip_token:nil, custom_headers:nil)
|
947
|
+
response = list_by_subscription_async(skip_token:skip_token, custom_headers:custom_headers).value!
|
948
|
+
unless response.nil?
|
949
|
+
page = response.body
|
950
|
+
page.next_method = Proc.new do |next_page_link|
|
951
|
+
list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
|
952
|
+
end
|
953
|
+
page
|
954
|
+
end
|
955
|
+
end
|
956
|
+
|
957
|
+
#
|
958
|
+
# List Accounts in a resource group
|
959
|
+
#
|
960
|
+
# List Accounts in ResourceGroup
|
961
|
+
#
|
962
|
+
# @param resource_group_name [String] The resource group name.
|
963
|
+
# @param skip_token [String] Continuation token
|
964
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
965
|
+
# will be added to the HTTP request.
|
966
|
+
#
|
967
|
+
# @return [AccountList] which provide lazy access to pages of the response.
|
968
|
+
#
|
969
|
+
def list_by_resource_group_as_lazy(resource_group_name, skip_token:nil, custom_headers:nil)
|
970
|
+
response = list_by_resource_group_async(resource_group_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
971
|
+
unless response.nil?
|
972
|
+
page = response.body
|
973
|
+
page.next_method = Proc.new do |next_page_link|
|
974
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
975
|
+
end
|
976
|
+
page
|
977
|
+
end
|
978
|
+
end
|
979
|
+
|
980
|
+
end
|
981
|
+
end
|