azure_mgmt_subscriptions 0.17.3 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2016-06-01/generated/azure_mgmt_subscriptions/operations.rb +4 -0
- data/lib/2016-06-01/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
- data/lib/2016-06-01/generated/azure_mgmt_subscriptions/subscriptions.rb +8 -0
- data/lib/2016-06-01/generated/azure_mgmt_subscriptions/tenants.rb +4 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_subscriptions/subscription_definitions.rb +10 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_subscriptions/subscription_definitions_client.rb +1 -1
- data/lib/2017-11-01-preview/generated/azure_mgmt_subscriptions/subscription_definitions_operation_metadata.rb +4 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions.rb +3 -7
- data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions/models/ad_principal.rb +2 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions/models/subscription_creation_result.rb +2 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -5
- data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions/subscription_factory.rb +2 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions/subscription_operations.rb +2 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions.rb +38 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/models/ad_principal.rb +47 -0
- data/lib/{2015-11-01/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb → 2018-11-01-preview/generated/azure_mgmt_subscriptions/models/error_response.rb} +14 -14
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/models/modern_subscription_creation_parameters.rb +129 -0
- data/lib/{2018-03-01-preview → 2018-11-01-preview}/generated/azure_mgmt_subscriptions/models/operation.rb +1 -1
- data/lib/{2018-03-01-preview → 2018-11-01-preview}/generated/azure_mgmt_subscriptions/models/operation_display.rb +1 -1
- data/lib/{2018-03-01-preview → 2018-11-01-preview}/generated/azure_mgmt_subscriptions/models/operation_list_result.rb +1 -1
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/models/subscription_creation_result.rb +47 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/models/subscription_operation.rb +69 -0
- data/lib/{2015-11-01/generated/azure_mgmt_subscriptions/models/location_list_result.rb → 2018-11-01-preview/generated/azure_mgmt_subscriptions/models/subscription_operation_list_result.rb} +10 -9
- data/lib/{2015-11-01 → 2018-11-01-preview}/generated/azure_mgmt_subscriptions/module_definition.rb +1 -1
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +134 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/subscription_factory.rb +189 -0
- data/lib/{2018-03-01-preview/generated/azure_mgmt_subscriptions/operations.rb → 2018-11-01-preview/generated/azure_mgmt_subscriptions/subscription_operation_operations.rb} +26 -16
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions.rb +35 -0
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/models/canceled_subscription_id.rb +47 -0
- data/lib/{2015-11-01/generated/azure_mgmt_subscriptions/models/subscription_policies.rb → 2019-03-01-preview/generated/azure_mgmt_subscriptions/models/error_response.rb} +14 -14
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/models/operation.rb +58 -0
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/models/operation_display.rb +69 -0
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/models/operation_list_result.rb +68 -0
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/models/renamed_subscription_id.rb +47 -0
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/models/subscription_name.rb +46 -0
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
- data/lib/{2015-11-01 → 2019-03-01-preview}/generated/azure_mgmt_subscriptions/subscription_client.rb +5 -8
- data/lib/{2015-11-01/generated/azure_mgmt_subscriptions/tenants.rb → 2019-03-01-preview/generated/azure_mgmt_subscriptions/subscriptions.rb} +59 -59
- data/lib/azure_mgmt_subscriptions.rb +4 -3
- data/lib/profiles/latest/modules/subscriptions_profile_module.rb +110 -16
- data/lib/version.rb +1 -1
- metadata +30 -21
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions.rb +0 -36
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/location.rb +0 -102
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription.rb +0 -92
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb +0 -98
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb +0 -98
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/subscriptions.rb +0 -389
data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/models/renamed_subscription_id.rb
ADDED
@@ -0,0 +1,47 @@
|
|
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::Subscriptions::Mgmt::V2019_03_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The ID of the subscriptions that is being renamed
|
10
|
+
#
|
11
|
+
class RenamedSubscriptionId
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The ID of the subscriptions that is being renamed
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for RenamedSubscriptionId class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'RenamedSubscriptionId',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'RenamedSubscriptionId',
|
31
|
+
model_properties: {
|
32
|
+
value: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
read_only: true,
|
36
|
+
serialized_name: 'value',
|
37
|
+
type: {
|
38
|
+
name: 'String'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,46 @@
|
|
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::Subscriptions::Mgmt::V2019_03_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The new name of the subscription.
|
10
|
+
#
|
11
|
+
class SubscriptionName
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] New subscription name
|
16
|
+
attr_accessor :subscription_name
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for SubscriptionName class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'SubscriptionName',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'SubscriptionName',
|
31
|
+
model_properties: {
|
32
|
+
subscription_name: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'subscriptionName',
|
36
|
+
type: {
|
37
|
+
name: 'String'
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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 end
|
7
|
+
module Azure::Subscriptions end
|
8
|
+
module Azure::Subscriptions::Mgmt end
|
9
|
+
module Azure::Subscriptions::Mgmt::V2019_03_01_preview end
|
data/lib/{2015-11-01 → 2019-03-01-preview}/generated/azure_mgmt_subscriptions/subscription_client.rb
RENAMED
@@ -3,7 +3,7 @@
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
|
-
module Azure::Subscriptions::Mgmt::
|
6
|
+
module Azure::Subscriptions::Mgmt::V2019_03_01_preview
|
7
7
|
#
|
8
8
|
# A service client - single point of access to the REST API.
|
9
9
|
#
|
@@ -17,7 +17,8 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
17
17
|
# @return Credentials needed for the client to connect to Azure.
|
18
18
|
attr_reader :credentials
|
19
19
|
|
20
|
-
# @return [String]
|
20
|
+
# @return [String] Version of the API to be used with the client request.
|
21
|
+
# Current version is 2019-03-01-preview
|
21
22
|
attr_reader :api_version
|
22
23
|
|
23
24
|
# @return [String] The preferred language for the response.
|
@@ -35,9 +36,6 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
35
36
|
# @return [Subscriptions] subscriptions
|
36
37
|
attr_reader :subscriptions
|
37
38
|
|
38
|
-
# @return [Tenants] tenants
|
39
|
-
attr_reader :tenants
|
40
|
-
|
41
39
|
#
|
42
40
|
# Creates initializes a new instance of the SubscriptionClient class.
|
43
41
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
@@ -52,8 +50,7 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
52
50
|
@credentials = credentials
|
53
51
|
|
54
52
|
@subscriptions = Subscriptions.new(self)
|
55
|
-
@
|
56
|
-
@api_version = '2015-11-01'
|
53
|
+
@api_version = '2019-03-01-preview'
|
57
54
|
@accept_language = 'en-US'
|
58
55
|
@long_running_operation_retry_timeout = 30
|
59
56
|
@generate_client_request_id = true
|
@@ -125,7 +122,7 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
125
122
|
#
|
126
123
|
def add_telemetry
|
127
124
|
sdk_information = 'azure_mgmt_subscriptions'
|
128
|
-
sdk_information = "#{sdk_information}/0.
|
125
|
+
sdk_information = "#{sdk_information}/0.18.0"
|
129
126
|
add_user_agent_information(sdk_information)
|
130
127
|
end
|
131
128
|
end
|
@@ -3,15 +3,16 @@
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
|
-
module Azure::Subscriptions::Mgmt::
|
6
|
+
module Azure::Subscriptions::Mgmt::V2019_03_01_preview
|
7
7
|
#
|
8
|
-
#
|
8
|
+
# Subscription client provides an interface to create and manage Azure
|
9
|
+
# subscriptions programmatically.
|
9
10
|
#
|
10
|
-
class
|
11
|
+
class Subscriptions
|
11
12
|
include MsRestAzure
|
12
13
|
|
13
14
|
#
|
14
|
-
# Creates and initializes a new instance of the
|
15
|
+
# Creates and initializes a new instance of the Subscriptions class.
|
15
16
|
# @param client service class for accessing basic functionality.
|
16
17
|
#
|
17
18
|
def initialize(client)
|
@@ -22,39 +23,43 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
22
23
|
attr_reader :client
|
23
24
|
|
24
25
|
#
|
25
|
-
#
|
26
|
+
# The operation to cancel a subscription
|
26
27
|
#
|
28
|
+
# @param subscription_id [String] Subscription Id.
|
27
29
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
28
30
|
# will be added to the HTTP request.
|
29
31
|
#
|
30
|
-
# @return [
|
32
|
+
# @return [CanceledSubscriptionId] operation results.
|
31
33
|
#
|
32
|
-
def
|
33
|
-
|
34
|
-
|
34
|
+
def cancel(subscription_id, custom_headers:nil)
|
35
|
+
response = cancel_async(subscription_id, custom_headers:custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
35
37
|
end
|
36
38
|
|
37
39
|
#
|
38
|
-
#
|
40
|
+
# The operation to cancel a subscription
|
39
41
|
#
|
42
|
+
# @param subscription_id [String] Subscription Id.
|
40
43
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
41
44
|
# will be added to the HTTP request.
|
42
45
|
#
|
43
46
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
47
|
#
|
45
|
-
def
|
46
|
-
|
48
|
+
def cancel_with_http_info(subscription_id, custom_headers:nil)
|
49
|
+
cancel_async(subscription_id, custom_headers:custom_headers).value!
|
47
50
|
end
|
48
51
|
|
49
52
|
#
|
50
|
-
#
|
53
|
+
# The operation to cancel a subscription
|
51
54
|
#
|
55
|
+
# @param subscription_id [String] Subscription Id.
|
52
56
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
53
57
|
# to the HTTP request.
|
54
58
|
#
|
55
59
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
60
|
#
|
57
|
-
def
|
61
|
+
def cancel_async(subscription_id, custom_headers:nil)
|
62
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
58
63
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
59
64
|
|
60
65
|
|
@@ -64,17 +69,18 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
64
69
|
# Set Headers
|
65
70
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
66
71
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
67
|
-
path_template = '
|
72
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel'
|
68
73
|
|
69
74
|
request_url = @base_url || @client.base_url
|
70
75
|
|
71
76
|
options = {
|
72
77
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
78
|
+
path_params: {'subscriptionId' => subscription_id},
|
73
79
|
query_params: {'api-version' => @client.api_version},
|
74
80
|
headers: request_headers.merge(custom_headers || {}),
|
75
81
|
base_url: request_url
|
76
82
|
}
|
77
|
-
promise = @client.make_request_async(:
|
83
|
+
promise = @client.make_request_async(:post, path_template, options)
|
78
84
|
|
79
85
|
promise = promise.then do |result|
|
80
86
|
http_response = result.response
|
@@ -82,15 +88,17 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
82
88
|
response_content = http_response.body
|
83
89
|
unless status_code == 200
|
84
90
|
error_model = JSON.load(response_content)
|
85
|
-
fail
|
91
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
86
92
|
end
|
87
93
|
|
88
94
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
95
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
96
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
89
97
|
# Deserialize Response
|
90
98
|
if status_code == 200
|
91
99
|
begin
|
92
100
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
93
|
-
result_mapper = Azure::Subscriptions::Mgmt::
|
101
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::CanceledSubscriptionId.mapper()
|
94
102
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
95
103
|
rescue Exception => e
|
96
104
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -104,46 +112,48 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
104
112
|
end
|
105
113
|
|
106
114
|
#
|
107
|
-
#
|
115
|
+
# The operation to rename a subscription
|
108
116
|
#
|
109
|
-
# @param
|
110
|
-
#
|
117
|
+
# @param subscription_id [String] Subscription Id.
|
118
|
+
# @param body [SubscriptionName] Subscription Name
|
111
119
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
112
120
|
# will be added to the HTTP request.
|
113
121
|
#
|
114
|
-
# @return [
|
122
|
+
# @return [RenamedSubscriptionId] operation results.
|
115
123
|
#
|
116
|
-
def
|
117
|
-
response =
|
124
|
+
def rename(subscription_id, body, custom_headers:nil)
|
125
|
+
response = rename_async(subscription_id, body, custom_headers:custom_headers).value!
|
118
126
|
response.body unless response.nil?
|
119
127
|
end
|
120
128
|
|
121
129
|
#
|
122
|
-
#
|
130
|
+
# The operation to rename a subscription
|
123
131
|
#
|
124
|
-
# @param
|
125
|
-
#
|
132
|
+
# @param subscription_id [String] Subscription Id.
|
133
|
+
# @param body [SubscriptionName] Subscription Name
|
126
134
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
127
135
|
# will be added to the HTTP request.
|
128
136
|
#
|
129
137
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
130
138
|
#
|
131
|
-
def
|
132
|
-
|
139
|
+
def rename_with_http_info(subscription_id, body, custom_headers:nil)
|
140
|
+
rename_async(subscription_id, body, custom_headers:custom_headers).value!
|
133
141
|
end
|
134
142
|
|
135
143
|
#
|
136
|
-
#
|
144
|
+
# The operation to rename a subscription
|
137
145
|
#
|
138
|
-
# @param
|
139
|
-
#
|
146
|
+
# @param subscription_id [String] Subscription Id.
|
147
|
+
# @param body [SubscriptionName] Subscription Name
|
140
148
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
141
149
|
# to the HTTP request.
|
142
150
|
#
|
143
151
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
144
152
|
#
|
145
|
-
def
|
146
|
-
fail ArgumentError, '
|
153
|
+
def rename_async(subscription_id, body, custom_headers:nil)
|
154
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
155
|
+
fail ArgumentError, 'body is nil' if body.nil?
|
156
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
147
157
|
|
148
158
|
|
149
159
|
request_headers = {}
|
@@ -152,17 +162,25 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
152
162
|
# Set Headers
|
153
163
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
154
164
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
155
|
-
|
165
|
+
|
166
|
+
# Serialize Request
|
167
|
+
request_mapper = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::SubscriptionName.mapper()
|
168
|
+
request_content = @client.serialize(request_mapper, body)
|
169
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
170
|
+
|
171
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename'
|
156
172
|
|
157
173
|
request_url = @base_url || @client.base_url
|
158
174
|
|
159
175
|
options = {
|
160
176
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
161
|
-
|
177
|
+
path_params: {'subscriptionId' => subscription_id},
|
178
|
+
query_params: {'api-version' => @client.api_version},
|
179
|
+
body: request_content,
|
162
180
|
headers: request_headers.merge(custom_headers || {}),
|
163
181
|
base_url: request_url
|
164
182
|
}
|
165
|
-
promise = @client.make_request_async(:
|
183
|
+
promise = @client.make_request_async(:post, path_template, options)
|
166
184
|
|
167
185
|
promise = promise.then do |result|
|
168
186
|
http_response = result.response
|
@@ -170,15 +188,17 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
170
188
|
response_content = http_response.body
|
171
189
|
unless status_code == 200
|
172
190
|
error_model = JSON.load(response_content)
|
173
|
-
fail
|
191
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
174
192
|
end
|
175
193
|
|
176
194
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
195
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
196
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
177
197
|
# Deserialize Response
|
178
198
|
if status_code == 200
|
179
199
|
begin
|
180
200
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
181
|
-
result_mapper = Azure::Subscriptions::Mgmt::
|
201
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::RenamedSubscriptionId.mapper()
|
182
202
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
183
203
|
rescue Exception => e
|
184
204
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -191,25 +211,5 @@ module Azure::Subscriptions::Mgmt::V2015_11_01
|
|
191
211
|
promise.execute
|
192
212
|
end
|
193
213
|
|
194
|
-
#
|
195
|
-
# Gets a list of the tenantIds.
|
196
|
-
#
|
197
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
198
|
-
# will be added to the HTTP request.
|
199
|
-
#
|
200
|
-
# @return [TenantListResult] which provide lazy access to pages of the
|
201
|
-
# response.
|
202
|
-
#
|
203
|
-
def list_as_lazy(custom_headers:nil)
|
204
|
-
response = list_async(custom_headers:custom_headers).value!
|
205
|
-
unless response.nil?
|
206
|
-
page = response.body
|
207
|
-
page.next_method = Proc.new do |next_page_link|
|
208
|
-
list_next_async(next_page_link, custom_headers:custom_headers)
|
209
|
-
end
|
210
|
-
page
|
211
|
-
end
|
212
|
-
end
|
213
|
-
|
214
214
|
end
|
215
215
|
end
|
@@ -2,11 +2,12 @@
|
|
2
2
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
4
|
|
5
|
-
require '2015-11-01/generated/azure_mgmt_subscriptions'
|
6
5
|
require '2018-03-01-preview/generated/azure_mgmt_subscriptions'
|
6
|
+
require '2018-11-01-preview/generated/azure_mgmt_subscriptions'
|
7
7
|
require '2017-11-01-preview/generated/azure_mgmt_subscriptions'
|
8
8
|
require '2016-06-01/generated/azure_mgmt_subscriptions'
|
9
|
-
require '
|
9
|
+
require '2019-03-01-preview/generated/azure_mgmt_subscriptions'
|
10
10
|
require 'profiles/latest/subscriptions_latest_profile_client'
|
11
|
-
require 'profiles/
|
11
|
+
require 'profiles/v2017_03_09/subscriptions_v2017_03_09_profile_client'
|
12
12
|
require 'profiles/v2018_03_01/subscriptions_v2018_03_01_profile_client'
|
13
|
+
require 'profiles/v2019_03_01_hybrid/subscriptions_v2019_03_01_hybrid_profile_client'
|
@@ -7,29 +7,47 @@ require 'azure_mgmt_subscriptions'
|
|
7
7
|
module Azure::Subscriptions::Profiles::Latest
|
8
8
|
module Mgmt
|
9
9
|
Operations = Azure::Subscriptions::Mgmt::V2016_06_01::Operations
|
10
|
-
Subscriptions = Azure::Subscriptions::Mgmt::V2016_06_01::Subscriptions
|
11
10
|
Tenants = Azure::Subscriptions::Mgmt::V2016_06_01::Tenants
|
11
|
+
SubscriptionDefinitionsOperationMetadata = Azure::Subscriptions::Mgmt::V2017_11_01_preview::SubscriptionDefinitionsOperationMetadata
|
12
|
+
SubscriptionDefinitions = Azure::Subscriptions::Mgmt::V2017_11_01_preview::SubscriptionDefinitions
|
13
|
+
SubscriptionOperations = Azure::Subscriptions::Mgmt::V2018_03_01_preview::SubscriptionOperations
|
14
|
+
SubscriptionOperationOperations = Azure::Subscriptions::Mgmt::V2018_11_01_preview::SubscriptionOperationOperations
|
15
|
+
SubscriptionFactory = Azure::Subscriptions::Mgmt::V2018_11_01_preview::SubscriptionFactory
|
16
|
+
Subscriptions = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Subscriptions
|
12
17
|
|
13
18
|
module Models
|
14
19
|
TenantIdDescription = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantIdDescription
|
15
20
|
Location = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Location
|
16
21
|
TenantListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantListResult
|
17
22
|
SubscriptionPolicies = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionPolicies
|
18
|
-
OperationDisplay = Azure::Subscriptions::Mgmt::V2016_06_01::Models::OperationDisplay
|
19
23
|
SubscriptionListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult
|
20
|
-
Operation = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Operation
|
21
24
|
Subscription = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Subscription
|
22
|
-
OperationListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::OperationListResult
|
23
25
|
LocationListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::LocationListResult
|
24
26
|
SubscriptionState = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionState
|
25
27
|
SpendingLimit = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SpendingLimit
|
28
|
+
SubscriptionDefinition = Azure::Subscriptions::Mgmt::V2017_11_01_preview::Models::SubscriptionDefinition
|
29
|
+
SubscriptionDefinitionList = Azure::Subscriptions::Mgmt::V2017_11_01_preview::Models::SubscriptionDefinitionList
|
30
|
+
SubscriptionCreationParameters = Azure::Subscriptions::Mgmt::V2018_03_01_preview::Models::SubscriptionCreationParameters
|
31
|
+
OfferType = Azure::Subscriptions::Mgmt::V2018_03_01_preview::Models::OfferType
|
32
|
+
SubscriptionOperation = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionOperation
|
33
|
+
SubscriptionOperationListResult = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionOperationListResult
|
34
|
+
AdPrincipal = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::AdPrincipal
|
35
|
+
ModernSubscriptionCreationParameters = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::ModernSubscriptionCreationParameters
|
36
|
+
SubscriptionCreationResult = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionCreationResult
|
37
|
+
SubscriptionName = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::SubscriptionName
|
38
|
+
OperationDisplay = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::OperationDisplay
|
39
|
+
CanceledSubscriptionId = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::CanceledSubscriptionId
|
40
|
+
Operation = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::Operation
|
41
|
+
ErrorResponse = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::ErrorResponse
|
42
|
+
OperationListResult = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::OperationListResult
|
43
|
+
RenamedSubscriptionId = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::RenamedSubscriptionId
|
26
44
|
end
|
27
45
|
|
28
46
|
#
|
29
47
|
# SubscriptionsManagementClass
|
30
48
|
#
|
31
49
|
class SubscriptionsManagementClass
|
32
|
-
attr_reader :operations, :
|
50
|
+
attr_reader :operations, :tenants, :subscription_definitions_operation_metadata, :subscription_definitions, :subscription_operations, :subscription_operation_operations, :subscription_factory, :subscriptions, :configurable, :base_url, :options, :model_classes
|
33
51
|
|
34
52
|
def initialize(options = {})
|
35
53
|
if options.is_a?(Hash) && options.length == 0
|
@@ -50,9 +68,38 @@ module Azure::Subscriptions::Profiles::Latest
|
|
50
68
|
end
|
51
69
|
add_telemetry(@client_0)
|
52
70
|
@operations = @client_0.operations
|
53
|
-
@subscriptions = @client_0.subscriptions
|
54
71
|
@tenants = @client_0.tenants
|
55
72
|
|
73
|
+
@client_1 = Azure::Subscriptions::Mgmt::V2017_11_01_preview::SubscriptionDefinitionsClient.new(configurable.credentials, base_url, options)
|
74
|
+
if(@client_1.respond_to?(:subscription_id))
|
75
|
+
@client_1.subscription_id = configurable.subscription_id
|
76
|
+
end
|
77
|
+
add_telemetry(@client_1)
|
78
|
+
@subscription_definitions_operation_metadata = @client_1.subscription_definitions_operation_metadata
|
79
|
+
@subscription_definitions = @client_1.subscription_definitions
|
80
|
+
|
81
|
+
@client_2 = Azure::Subscriptions::Mgmt::V2018_03_01_preview::SubscriptionClient.new(configurable.credentials, base_url, options)
|
82
|
+
if(@client_2.respond_to?(:subscription_id))
|
83
|
+
@client_2.subscription_id = configurable.subscription_id
|
84
|
+
end
|
85
|
+
add_telemetry(@client_2)
|
86
|
+
@subscription_operations = @client_2.subscription_operations
|
87
|
+
|
88
|
+
@client_3 = Azure::Subscriptions::Mgmt::V2018_11_01_preview::SubscriptionClient.new(configurable.credentials, base_url, options)
|
89
|
+
if(@client_3.respond_to?(:subscription_id))
|
90
|
+
@client_3.subscription_id = configurable.subscription_id
|
91
|
+
end
|
92
|
+
add_telemetry(@client_3)
|
93
|
+
@subscription_operation_operations = @client_3.subscription_operation_operations
|
94
|
+
@subscription_factory = @client_3.subscription_factory
|
95
|
+
|
96
|
+
@client_4 = Azure::Subscriptions::Mgmt::V2019_03_01_preview::SubscriptionClient.new(configurable.credentials, base_url, options)
|
97
|
+
if(@client_4.respond_to?(:subscription_id))
|
98
|
+
@client_4.subscription_id = configurable.subscription_id
|
99
|
+
end
|
100
|
+
add_telemetry(@client_4)
|
101
|
+
@subscriptions = @client_4.subscriptions
|
102
|
+
|
56
103
|
@model_classes = ModelClasses.new
|
57
104
|
end
|
58
105
|
|
@@ -62,7 +109,15 @@ module Azure::Subscriptions::Profiles::Latest
|
|
62
109
|
end
|
63
110
|
|
64
111
|
def method_missing(method, *args)
|
65
|
-
if @
|
112
|
+
if @client_4.respond_to?method
|
113
|
+
@client_4.send(method, *args)
|
114
|
+
elsif @client_3.respond_to?method
|
115
|
+
@client_3.send(method, *args)
|
116
|
+
elsif @client_2.respond_to?method
|
117
|
+
@client_2.send(method, *args)
|
118
|
+
elsif @client_1.respond_to?method
|
119
|
+
@client_1.send(method, *args)
|
120
|
+
elsif @client_0.respond_to?method
|
66
121
|
@client_0.send(method, *args)
|
67
122
|
else
|
68
123
|
super
|
@@ -84,21 +139,12 @@ module Azure::Subscriptions::Profiles::Latest
|
|
84
139
|
def subscription_policies
|
85
140
|
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionPolicies
|
86
141
|
end
|
87
|
-
def operation_display
|
88
|
-
Azure::Subscriptions::Mgmt::V2016_06_01::Models::OperationDisplay
|
89
|
-
end
|
90
142
|
def subscription_list_result
|
91
143
|
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult
|
92
144
|
end
|
93
|
-
def operation
|
94
|
-
Azure::Subscriptions::Mgmt::V2016_06_01::Models::Operation
|
95
|
-
end
|
96
145
|
def subscription
|
97
146
|
Azure::Subscriptions::Mgmt::V2016_06_01::Models::Subscription
|
98
147
|
end
|
99
|
-
def operation_list_result
|
100
|
-
Azure::Subscriptions::Mgmt::V2016_06_01::Models::OperationListResult
|
101
|
-
end
|
102
148
|
def location_list_result
|
103
149
|
Azure::Subscriptions::Mgmt::V2016_06_01::Models::LocationListResult
|
104
150
|
end
|
@@ -108,6 +154,54 @@ module Azure::Subscriptions::Profiles::Latest
|
|
108
154
|
def spending_limit
|
109
155
|
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SpendingLimit
|
110
156
|
end
|
157
|
+
def subscription_definition
|
158
|
+
Azure::Subscriptions::Mgmt::V2017_11_01_preview::Models::SubscriptionDefinition
|
159
|
+
end
|
160
|
+
def subscription_definition_list
|
161
|
+
Azure::Subscriptions::Mgmt::V2017_11_01_preview::Models::SubscriptionDefinitionList
|
162
|
+
end
|
163
|
+
def subscription_creation_parameters
|
164
|
+
Azure::Subscriptions::Mgmt::V2018_03_01_preview::Models::SubscriptionCreationParameters
|
165
|
+
end
|
166
|
+
def offer_type
|
167
|
+
Azure::Subscriptions::Mgmt::V2018_03_01_preview::Models::OfferType
|
168
|
+
end
|
169
|
+
def subscription_operation
|
170
|
+
Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionOperation
|
171
|
+
end
|
172
|
+
def subscription_operation_list_result
|
173
|
+
Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionOperationListResult
|
174
|
+
end
|
175
|
+
def ad_principal
|
176
|
+
Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::AdPrincipal
|
177
|
+
end
|
178
|
+
def modern_subscription_creation_parameters
|
179
|
+
Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::ModernSubscriptionCreationParameters
|
180
|
+
end
|
181
|
+
def subscription_creation_result
|
182
|
+
Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionCreationResult
|
183
|
+
end
|
184
|
+
def subscription_name
|
185
|
+
Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::SubscriptionName
|
186
|
+
end
|
187
|
+
def operation_display
|
188
|
+
Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::OperationDisplay
|
189
|
+
end
|
190
|
+
def canceled_subscription_id
|
191
|
+
Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::CanceledSubscriptionId
|
192
|
+
end
|
193
|
+
def operation
|
194
|
+
Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::Operation
|
195
|
+
end
|
196
|
+
def error_response
|
197
|
+
Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::ErrorResponse
|
198
|
+
end
|
199
|
+
def operation_list_result
|
200
|
+
Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::OperationListResult
|
201
|
+
end
|
202
|
+
def renamed_subscription_id
|
203
|
+
Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::RenamedSubscriptionId
|
204
|
+
end
|
111
205
|
end
|
112
206
|
end
|
113
207
|
end
|