azure_mgmt_web 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/azure_mgmt_web.gemspec +1 -1
- data/lib/generated/azure_mgmt_web/certificate_orders.rb +234 -7
- data/lib/generated/azure_mgmt_web/certificates.rb +115 -4
- data/lib/generated/azure_mgmt_web/classic_mobile_services.rb +115 -4
- data/lib/generated/azure_mgmt_web/domains.rb +115 -4
- data/lib/generated/azure_mgmt_web/global.rb +793 -20
- data/lib/generated/azure_mgmt_web/global_certificate_order.rb +114 -4
- data/lib/generated/azure_mgmt_web/global_domain_registration.rb +229 -7
- data/lib/generated/azure_mgmt_web/global_resource_groups.rb +1 -1
- data/lib/generated/azure_mgmt_web/hosting_environments.rb +2388 -54
- data/lib/generated/azure_mgmt_web/managed_hosting_environments.rb +459 -11
- data/lib/generated/azure_mgmt_web/models/backup_item_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/certificate_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/certificate_order_certificate_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/certificate_order_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/classic_mobile_service_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/deleted_site_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/deployment_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/domain_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/geo_region_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/hosting_environment_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/managed_hosting_environment_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/metric_definition_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/server_farm_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/site_instance_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/sku_info_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/source_control_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/usage_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb +31 -0
- data/lib/generated/azure_mgmt_web/provider.rb +114 -4
- data/lib/generated/azure_mgmt_web/recommendations.rb +1 -1
- data/lib/generated/azure_mgmt_web/server_farms.rb +356 -10
- data/lib/generated/azure_mgmt_web/sites.rb +2471 -68
- data/lib/generated/azure_mgmt_web/top_level_domains.rb +230 -7
- data/lib/generated/azure_mgmt_web/usage_operations.rb +1 -1
- data/lib/generated/azure_mgmt_web/version.rb +1 -1
- data/lib/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2963a02605d44dc4f00f71c7bce37ca74f6f3dbb
|
4
|
+
data.tar.gz: c69494333b0bf1a3608062161b6f1b0f39c3195d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 301ba52f6d90fd7ce6bc70e36a582d8004516fd9a6e4ef7523c5851b83fb54980e42367ab6cb412bf31acb5f1790a96de6a579a605a62c4f737e355845c608d8
|
7
|
+
data.tar.gz: 196a0452b1d5832f19d0db1de7462f1cd09483d41753cb8a833fdae68977e4615cfa0cbf1a8b0d760efbb15cb4c3ceeafecb375add7f731cd30002bacb492cb2
|
data/azure_mgmt_web.gemspec
CHANGED
@@ -26,7 +26,7 @@ module Azure::ARM::Web
|
|
26
26
|
@client = client
|
27
27
|
end
|
28
28
|
|
29
|
-
# @return reference to the WebSiteManagementClient
|
29
|
+
# @return [WebSiteManagementClient] reference to the WebSiteManagementClient
|
30
30
|
attr_reader :client
|
31
31
|
|
32
32
|
#
|
@@ -854,11 +854,32 @@ module Azure::ARM::Web
|
|
854
854
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
855
855
|
# will be added to the HTTP request.
|
856
856
|
#
|
857
|
-
# @return [CertificateOrderCollection]
|
857
|
+
# @return [CertificateOrderCollection] which provide lazy access to pages of
|
858
|
+
# the response.
|
858
859
|
#
|
859
|
-
def
|
860
|
+
def get_certificate_orders_as_lazy(resource_group_name, custom_headers = nil)
|
860
861
|
response = get_certificate_orders_async(resource_group_name, custom_headers).value!
|
861
|
-
|
862
|
+
unless response.nil?
|
863
|
+
page = response.body
|
864
|
+
page.next_method = Proc.new do |next_link|
|
865
|
+
get_certificate_orders_next_async(next_link, custom_headers)
|
866
|
+
end
|
867
|
+
page
|
868
|
+
end
|
869
|
+
end
|
870
|
+
|
871
|
+
#
|
872
|
+
# Get certificate orders in a resource group
|
873
|
+
#
|
874
|
+
# @param resource_group_name [String] Azure resource group name
|
875
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
876
|
+
# will be added to the HTTP request.
|
877
|
+
#
|
878
|
+
# @return [Array<CertificateOrder>] operation results.
|
879
|
+
#
|
880
|
+
def get_certificate_orders(resource_group_name, custom_headers = nil)
|
881
|
+
first_page = get_certificate_orders_as_lazy(resource_group_name, custom_headers)
|
882
|
+
first_page.get_all_items
|
862
883
|
end
|
863
884
|
|
864
885
|
#
|
@@ -946,11 +967,34 @@ module Azure::ARM::Web
|
|
946
967
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
947
968
|
# will be added to the HTTP request.
|
948
969
|
#
|
949
|
-
# @return [CertificateOrderCertificateCollection]
|
970
|
+
# @return [CertificateOrderCertificateCollection] which provide lazy access to
|
971
|
+
# pages of the response.
|
950
972
|
#
|
951
|
-
def
|
973
|
+
def get_certificates_as_lazy(resource_group_name, certificate_order_name, custom_headers = nil)
|
952
974
|
response = get_certificates_async(resource_group_name, certificate_order_name, custom_headers).value!
|
953
|
-
|
975
|
+
unless response.nil?
|
976
|
+
page = response.body
|
977
|
+
page.next_method = Proc.new do |next_link|
|
978
|
+
get_certificates_next_async(next_link, custom_headers)
|
979
|
+
end
|
980
|
+
page
|
981
|
+
end
|
982
|
+
end
|
983
|
+
|
984
|
+
#
|
985
|
+
# List all certificates associated with a certificate order (only one
|
986
|
+
# certificate can be associated with an order at a time)
|
987
|
+
#
|
988
|
+
# @param resource_group_name [String] Azure resource group name
|
989
|
+
# @param certificate_order_name [String] Certificate name
|
990
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
991
|
+
# will be added to the HTTP request.
|
992
|
+
#
|
993
|
+
# @return [Array<CertificateOrderCertificate>] operation results.
|
994
|
+
#
|
995
|
+
def get_certificates(resource_group_name, certificate_order_name, custom_headers = nil)
|
996
|
+
first_page = get_certificates_as_lazy(resource_group_name, certificate_order_name, custom_headers)
|
997
|
+
first_page.get_all_items
|
954
998
|
end
|
955
999
|
|
956
1000
|
#
|
@@ -1618,5 +1662,188 @@ module Azure::ARM::Web
|
|
1618
1662
|
promise.execute
|
1619
1663
|
end
|
1620
1664
|
|
1665
|
+
#
|
1666
|
+
# Get certificate orders in a resource group
|
1667
|
+
#
|
1668
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1669
|
+
# call to List operation.
|
1670
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1671
|
+
# will be added to the HTTP request.
|
1672
|
+
#
|
1673
|
+
# @return [CertificateOrderCollection] operation results.
|
1674
|
+
#
|
1675
|
+
def get_certificate_orders_next(next_page_link, custom_headers = nil)
|
1676
|
+
response = get_certificate_orders_next_async(next_page_link, custom_headers).value!
|
1677
|
+
response.body unless response.nil?
|
1678
|
+
end
|
1679
|
+
|
1680
|
+
#
|
1681
|
+
# Get certificate orders in a resource group
|
1682
|
+
#
|
1683
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1684
|
+
# call to List operation.
|
1685
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1686
|
+
# will be added to the HTTP request.
|
1687
|
+
#
|
1688
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1689
|
+
#
|
1690
|
+
def get_certificate_orders_next_with_http_info(next_page_link, custom_headers = nil)
|
1691
|
+
get_certificate_orders_next_async(next_page_link, custom_headers).value!
|
1692
|
+
end
|
1693
|
+
|
1694
|
+
#
|
1695
|
+
# Get certificate orders in a resource group
|
1696
|
+
#
|
1697
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1698
|
+
# call to List operation.
|
1699
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1700
|
+
# to the HTTP request.
|
1701
|
+
#
|
1702
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1703
|
+
#
|
1704
|
+
def get_certificate_orders_next_async(next_page_link, custom_headers = nil)
|
1705
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1706
|
+
|
1707
|
+
|
1708
|
+
request_headers = {}
|
1709
|
+
|
1710
|
+
# Set Headers
|
1711
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1712
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1713
|
+
path_template = '{nextLink}'
|
1714
|
+
options = {
|
1715
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1716
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1717
|
+
headers: request_headers.merge(custom_headers || {})
|
1718
|
+
}
|
1719
|
+
|
1720
|
+
request_url = @base_url || @client.base_url
|
1721
|
+
|
1722
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1723
|
+
promise = request.run_promise do |req|
|
1724
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1725
|
+
end
|
1726
|
+
|
1727
|
+
promise = promise.then do |http_response|
|
1728
|
+
status_code = http_response.status
|
1729
|
+
response_content = http_response.body
|
1730
|
+
unless status_code == 200
|
1731
|
+
error_model = JSON.load(response_content)
|
1732
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1733
|
+
end
|
1734
|
+
|
1735
|
+
# Create Result
|
1736
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1737
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1738
|
+
# Deserialize Response
|
1739
|
+
if status_code == 200
|
1740
|
+
begin
|
1741
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1742
|
+
result_mapper = CertificateOrderCollection.mapper()
|
1743
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1744
|
+
rescue Exception => e
|
1745
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1746
|
+
end
|
1747
|
+
end
|
1748
|
+
|
1749
|
+
result
|
1750
|
+
end
|
1751
|
+
|
1752
|
+
promise.execute
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
#
|
1756
|
+
# List all certificates associated with a certificate order (only one
|
1757
|
+
# certificate can be associated with an order at a time)
|
1758
|
+
#
|
1759
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1760
|
+
# call to List operation.
|
1761
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1762
|
+
# will be added to the HTTP request.
|
1763
|
+
#
|
1764
|
+
# @return [CertificateOrderCertificateCollection] operation results.
|
1765
|
+
#
|
1766
|
+
def get_certificates_next(next_page_link, custom_headers = nil)
|
1767
|
+
response = get_certificates_next_async(next_page_link, custom_headers).value!
|
1768
|
+
response.body unless response.nil?
|
1769
|
+
end
|
1770
|
+
|
1771
|
+
#
|
1772
|
+
# List all certificates associated with a certificate order (only one
|
1773
|
+
# certificate can be associated with an order at a time)
|
1774
|
+
#
|
1775
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1776
|
+
# call to List operation.
|
1777
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1778
|
+
# will be added to the HTTP request.
|
1779
|
+
#
|
1780
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1781
|
+
#
|
1782
|
+
def get_certificates_next_with_http_info(next_page_link, custom_headers = nil)
|
1783
|
+
get_certificates_next_async(next_page_link, custom_headers).value!
|
1784
|
+
end
|
1785
|
+
|
1786
|
+
#
|
1787
|
+
# List all certificates associated with a certificate order (only one
|
1788
|
+
# certificate can be associated with an order at a time)
|
1789
|
+
#
|
1790
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1791
|
+
# call to List operation.
|
1792
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1793
|
+
# to the HTTP request.
|
1794
|
+
#
|
1795
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1796
|
+
#
|
1797
|
+
def get_certificates_next_async(next_page_link, custom_headers = nil)
|
1798
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1799
|
+
|
1800
|
+
|
1801
|
+
request_headers = {}
|
1802
|
+
|
1803
|
+
# Set Headers
|
1804
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1805
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1806
|
+
path_template = '{nextLink}'
|
1807
|
+
options = {
|
1808
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1809
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1810
|
+
headers: request_headers.merge(custom_headers || {})
|
1811
|
+
}
|
1812
|
+
|
1813
|
+
request_url = @base_url || @client.base_url
|
1814
|
+
|
1815
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1816
|
+
promise = request.run_promise do |req|
|
1817
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1818
|
+
end
|
1819
|
+
|
1820
|
+
promise = promise.then do |http_response|
|
1821
|
+
status_code = http_response.status
|
1822
|
+
response_content = http_response.body
|
1823
|
+
unless status_code == 200
|
1824
|
+
error_model = JSON.load(response_content)
|
1825
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1826
|
+
end
|
1827
|
+
|
1828
|
+
# Create Result
|
1829
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1830
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1831
|
+
# Deserialize Response
|
1832
|
+
if status_code == 200
|
1833
|
+
begin
|
1834
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1835
|
+
result_mapper = CertificateOrderCertificateCollection.mapper()
|
1836
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1837
|
+
rescue Exception => e
|
1838
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1839
|
+
end
|
1840
|
+
end
|
1841
|
+
|
1842
|
+
result
|
1843
|
+
end
|
1844
|
+
|
1845
|
+
promise.execute
|
1846
|
+
end
|
1847
|
+
|
1621
1848
|
end
|
1622
1849
|
end
|
@@ -26,7 +26,7 @@ module Azure::ARM::Web
|
|
26
26
|
@client = client
|
27
27
|
end
|
28
28
|
|
29
|
-
# @return reference to the WebSiteManagementClient
|
29
|
+
# @return [WebSiteManagementClient] reference to the WebSiteManagementClient
|
30
30
|
attr_reader :client
|
31
31
|
|
32
32
|
#
|
@@ -36,11 +36,32 @@ module Azure::ARM::Web
|
|
36
36
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
37
|
# will be added to the HTTP request.
|
38
38
|
#
|
39
|
-
# @return [CertificateCollection]
|
39
|
+
# @return [CertificateCollection] which provide lazy access to pages of the
|
40
|
+
# response.
|
40
41
|
#
|
41
|
-
def
|
42
|
+
def get_certificates_as_lazy(resource_group_name, custom_headers = nil)
|
42
43
|
response = get_certificates_async(resource_group_name, custom_headers).value!
|
43
|
-
|
44
|
+
unless response.nil?
|
45
|
+
page = response.body
|
46
|
+
page.next_method = Proc.new do |next_link|
|
47
|
+
get_certificates_next_async(next_link, custom_headers)
|
48
|
+
end
|
49
|
+
page
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Get certificates for a subscription in the specified resource group.
|
55
|
+
#
|
56
|
+
# @param resource_group_name [String] Name of the resource group
|
57
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
58
|
+
# will be added to the HTTP request.
|
59
|
+
#
|
60
|
+
# @return [Array<Certificate>] operation results.
|
61
|
+
#
|
62
|
+
def get_certificates(resource_group_name, custom_headers = nil)
|
63
|
+
first_page = get_certificates_as_lazy(resource_group_name, custom_headers)
|
64
|
+
first_page.get_all_items
|
44
65
|
end
|
45
66
|
|
46
67
|
#
|
@@ -1028,5 +1049,95 @@ module Azure::ARM::Web
|
|
1028
1049
|
promise.execute
|
1029
1050
|
end
|
1030
1051
|
|
1052
|
+
#
|
1053
|
+
# Get certificates for a subscription in the specified resource group.
|
1054
|
+
#
|
1055
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1056
|
+
# call to List operation.
|
1057
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1058
|
+
# will be added to the HTTP request.
|
1059
|
+
#
|
1060
|
+
# @return [CertificateCollection] operation results.
|
1061
|
+
#
|
1062
|
+
def get_certificates_next(next_page_link, custom_headers = nil)
|
1063
|
+
response = get_certificates_next_async(next_page_link, custom_headers).value!
|
1064
|
+
response.body unless response.nil?
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
#
|
1068
|
+
# Get certificates for a subscription in the specified resource group.
|
1069
|
+
#
|
1070
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1071
|
+
# call to List operation.
|
1072
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1073
|
+
# will be added to the HTTP request.
|
1074
|
+
#
|
1075
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1076
|
+
#
|
1077
|
+
def get_certificates_next_with_http_info(next_page_link, custom_headers = nil)
|
1078
|
+
get_certificates_next_async(next_page_link, custom_headers).value!
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
#
|
1082
|
+
# Get certificates for a subscription in the specified resource group.
|
1083
|
+
#
|
1084
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1085
|
+
# call to List operation.
|
1086
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1087
|
+
# to the HTTP request.
|
1088
|
+
#
|
1089
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1090
|
+
#
|
1091
|
+
def get_certificates_next_async(next_page_link, custom_headers = nil)
|
1092
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1093
|
+
|
1094
|
+
|
1095
|
+
request_headers = {}
|
1096
|
+
|
1097
|
+
# Set Headers
|
1098
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1099
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1100
|
+
path_template = '{nextLink}'
|
1101
|
+
options = {
|
1102
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1103
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1104
|
+
headers: request_headers.merge(custom_headers || {})
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
request_url = @base_url || @client.base_url
|
1108
|
+
|
1109
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1110
|
+
promise = request.run_promise do |req|
|
1111
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1112
|
+
end
|
1113
|
+
|
1114
|
+
promise = promise.then do |http_response|
|
1115
|
+
status_code = http_response.status
|
1116
|
+
response_content = http_response.body
|
1117
|
+
unless status_code == 200
|
1118
|
+
error_model = JSON.load(response_content)
|
1119
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1120
|
+
end
|
1121
|
+
|
1122
|
+
# Create Result
|
1123
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1124
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1125
|
+
# Deserialize Response
|
1126
|
+
if status_code == 200
|
1127
|
+
begin
|
1128
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1129
|
+
result_mapper = CertificateCollection.mapper()
|
1130
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1131
|
+
rescue Exception => e
|
1132
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1133
|
+
end
|
1134
|
+
end
|
1135
|
+
|
1136
|
+
result
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
promise.execute
|
1140
|
+
end
|
1141
|
+
|
1031
1142
|
end
|
1032
1143
|
end
|
@@ -26,7 +26,7 @@ module Azure::ARM::Web
|
|
26
26
|
@client = client
|
27
27
|
end
|
28
28
|
|
29
|
-
# @return reference to the WebSiteManagementClient
|
29
|
+
# @return [WebSiteManagementClient] reference to the WebSiteManagementClient
|
30
30
|
attr_reader :client
|
31
31
|
|
32
32
|
#
|
@@ -36,11 +36,32 @@ module Azure::ARM::Web
|
|
36
36
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
37
|
# will be added to the HTTP request.
|
38
38
|
#
|
39
|
-
# @return [ClassicMobileServiceCollection]
|
39
|
+
# @return [ClassicMobileServiceCollection] which provide lazy access to pages
|
40
|
+
# of the response.
|
40
41
|
#
|
41
|
-
def
|
42
|
+
def get_classic_mobile_services_as_lazy(resource_group_name, custom_headers = nil)
|
42
43
|
response = get_classic_mobile_services_async(resource_group_name, custom_headers).value!
|
43
|
-
|
44
|
+
unless response.nil?
|
45
|
+
page = response.body
|
46
|
+
page.next_method = Proc.new do |next_link|
|
47
|
+
get_classic_mobile_services_next_async(next_link, custom_headers)
|
48
|
+
end
|
49
|
+
page
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Get all mobile services in a resource group.
|
55
|
+
#
|
56
|
+
# @param resource_group_name [String] Name of resource group
|
57
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
58
|
+
# will be added to the HTTP request.
|
59
|
+
#
|
60
|
+
# @return [Array<ClassicMobileService>] operation results.
|
61
|
+
#
|
62
|
+
def get_classic_mobile_services(resource_group_name, custom_headers = nil)
|
63
|
+
first_page = get_classic_mobile_services_as_lazy(resource_group_name, custom_headers)
|
64
|
+
first_page.get_all_items
|
44
65
|
end
|
45
66
|
|
46
67
|
#
|
@@ -297,5 +318,95 @@ module Azure::ARM::Web
|
|
297
318
|
promise.execute
|
298
319
|
end
|
299
320
|
|
321
|
+
#
|
322
|
+
# Get all mobile services in a resource group.
|
323
|
+
#
|
324
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
325
|
+
# call to List operation.
|
326
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
327
|
+
# will be added to the HTTP request.
|
328
|
+
#
|
329
|
+
# @return [ClassicMobileServiceCollection] operation results.
|
330
|
+
#
|
331
|
+
def get_classic_mobile_services_next(next_page_link, custom_headers = nil)
|
332
|
+
response = get_classic_mobile_services_next_async(next_page_link, custom_headers).value!
|
333
|
+
response.body unless response.nil?
|
334
|
+
end
|
335
|
+
|
336
|
+
#
|
337
|
+
# Get all mobile services in a resource group.
|
338
|
+
#
|
339
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
340
|
+
# call to List operation.
|
341
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
342
|
+
# will be added to the HTTP request.
|
343
|
+
#
|
344
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
345
|
+
#
|
346
|
+
def get_classic_mobile_services_next_with_http_info(next_page_link, custom_headers = nil)
|
347
|
+
get_classic_mobile_services_next_async(next_page_link, custom_headers).value!
|
348
|
+
end
|
349
|
+
|
350
|
+
#
|
351
|
+
# Get all mobile services in a resource group.
|
352
|
+
#
|
353
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
354
|
+
# call to List operation.
|
355
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
356
|
+
# to the HTTP request.
|
357
|
+
#
|
358
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
359
|
+
#
|
360
|
+
def get_classic_mobile_services_next_async(next_page_link, custom_headers = nil)
|
361
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
362
|
+
|
363
|
+
|
364
|
+
request_headers = {}
|
365
|
+
|
366
|
+
# Set Headers
|
367
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
368
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
369
|
+
path_template = '{nextLink}'
|
370
|
+
options = {
|
371
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
372
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
373
|
+
headers: request_headers.merge(custom_headers || {})
|
374
|
+
}
|
375
|
+
|
376
|
+
request_url = @base_url || @client.base_url
|
377
|
+
|
378
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
379
|
+
promise = request.run_promise do |req|
|
380
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
381
|
+
end
|
382
|
+
|
383
|
+
promise = promise.then do |http_response|
|
384
|
+
status_code = http_response.status
|
385
|
+
response_content = http_response.body
|
386
|
+
unless status_code == 200
|
387
|
+
error_model = JSON.load(response_content)
|
388
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
389
|
+
end
|
390
|
+
|
391
|
+
# Create Result
|
392
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
393
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
394
|
+
# Deserialize Response
|
395
|
+
if status_code == 200
|
396
|
+
begin
|
397
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
398
|
+
result_mapper = ClassicMobileServiceCollection.mapper()
|
399
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
400
|
+
rescue Exception => e
|
401
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
405
|
+
result
|
406
|
+
end
|
407
|
+
|
408
|
+
promise.execute
|
409
|
+
end
|
410
|
+
|
300
411
|
end
|
301
412
|
end
|