azure_mgmt_subscriptions 0.18.4 → 0.18.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-06-01/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
  3. data/lib/2017-11-01-preview/generated/azure_mgmt_subscriptions/subscription_definitions_client.rb +1 -1
  4. data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
  5. data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
  6. data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
  7. data/lib/2019-06-01/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
  8. data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
  9. data/lib/2019-11-01/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
  10. data/lib/2020-09-01/generated/azure_mgmt_subscriptions.rb +46 -0
  11. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/alias_model.rb +429 -0
  12. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/canceled_subscription_id.rb +47 -0
  13. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/enabled_subscription_id.rb +47 -0
  14. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/error_response.rb +57 -0
  15. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/error_response_body.rb +48 -0
  16. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/operation.rb +58 -0
  17. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/operation_display.rb +69 -0
  18. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/operation_list_result.rb +68 -0
  19. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/provisioning_state.rb +17 -0
  20. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_list_result.rb +68 -0
  21. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_request.rb +47 -0
  22. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_request_properties.rb +83 -0
  23. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_response.rb +83 -0
  24. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_response_properties.rb +59 -0
  25. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/renamed_subscription_id.rb +47 -0
  26. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/subscription_name.rb +46 -0
  27. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/workload.rb +16 -0
  28. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
  29. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/operations.rb +110 -0
  30. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/subscription.rb +304 -0
  31. data/lib/2020-09-01/generated/azure_mgmt_subscriptions/subscription_client.rb +137 -0
  32. data/lib/azure_mgmt_subscriptions.rb +1 -0
  33. data/lib/profiles/latest/modules/subscriptions_profile_module.rb +92 -72
  34. data/lib/version.rb +1 -1
  35. metadata +24 -2
@@ -0,0 +1,304 @@
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::V2020_09_01
7
+ #
8
+ # Subscription client provides an interface to create and manage Azure
9
+ # subscriptions programmatically.
10
+ #
11
+ class Subscription
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Subscription class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [SubscriptionClient] reference to the SubscriptionClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # The operation to cancel a subscription
27
+ #
28
+ # @param subscription_id [String] Subscription Id.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [CanceledSubscriptionId] operation results.
33
+ #
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?
37
+ end
38
+
39
+ #
40
+ # The operation to cancel a subscription
41
+ #
42
+ # @param subscription_id [String] Subscription Id.
43
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
44
+ # will be added to the HTTP request.
45
+ #
46
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
47
+ #
48
+ def cancel_with_http_info(subscription_id, custom_headers:nil)
49
+ cancel_async(subscription_id, custom_headers:custom_headers).value!
50
+ end
51
+
52
+ #
53
+ # The operation to cancel a subscription
54
+ #
55
+ # @param subscription_id [String] Subscription Id.
56
+ # @param [Hash{String => String}] A hash of custom headers that will be added
57
+ # to the HTTP request.
58
+ #
59
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
60
+ #
61
+ def cancel_async(subscription_id, custom_headers:nil)
62
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
63
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
64
+
65
+
66
+ request_headers = {}
67
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
68
+
69
+ # Set Headers
70
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
71
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
72
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel'
73
+
74
+ request_url = @base_url || @client.base_url
75
+
76
+ options = {
77
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
+ path_params: {'subscriptionId' => subscription_id},
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:post, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
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?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::Subscriptions::Mgmt::V2020_09_01::Models::CanceledSubscriptionId.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ #
115
+ # The operation to rename a subscription
116
+ #
117
+ # @param subscription_id [String] Subscription Id.
118
+ # @param body [SubscriptionName] Subscription Name
119
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
120
+ # will be added to the HTTP request.
121
+ #
122
+ # @return [RenamedSubscriptionId] operation results.
123
+ #
124
+ def rename(subscription_id, body, custom_headers:nil)
125
+ response = rename_async(subscription_id, body, custom_headers:custom_headers).value!
126
+ response.body unless response.nil?
127
+ end
128
+
129
+ #
130
+ # The operation to rename a subscription
131
+ #
132
+ # @param subscription_id [String] Subscription Id.
133
+ # @param body [SubscriptionName] Subscription Name
134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
+ # will be added to the HTTP request.
136
+ #
137
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
138
+ #
139
+ def rename_with_http_info(subscription_id, body, custom_headers:nil)
140
+ rename_async(subscription_id, body, custom_headers:custom_headers).value!
141
+ end
142
+
143
+ #
144
+ # The operation to rename a subscription
145
+ #
146
+ # @param subscription_id [String] Subscription Id.
147
+ # @param body [SubscriptionName] Subscription Name
148
+ # @param [Hash{String => String}] A hash of custom headers that will be added
149
+ # to the HTTP request.
150
+ #
151
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
152
+ #
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?
157
+
158
+
159
+ request_headers = {}
160
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
161
+
162
+ # Set Headers
163
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
164
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
165
+
166
+ # Serialize Request
167
+ request_mapper = Azure::Subscriptions::Mgmt::V2020_09_01::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'
172
+
173
+ request_url = @base_url || @client.base_url
174
+
175
+ options = {
176
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
177
+ path_params: {'subscriptionId' => subscription_id},
178
+ query_params: {'api-version' => @client.api_version},
179
+ body: request_content,
180
+ headers: request_headers.merge(custom_headers || {}),
181
+ base_url: request_url
182
+ }
183
+ promise = @client.make_request_async(:post, path_template, options)
184
+
185
+ promise = promise.then do |result|
186
+ http_response = result.response
187
+ status_code = http_response.status
188
+ response_content = http_response.body
189
+ unless status_code == 200
190
+ error_model = JSON.load(response_content)
191
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
192
+ end
193
+
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?
197
+ # Deserialize Response
198
+ if status_code == 200
199
+ begin
200
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
201
+ result_mapper = Azure::Subscriptions::Mgmt::V2020_09_01::Models::RenamedSubscriptionId.mapper()
202
+ result.body = @client.deserialize(result_mapper, parsed_response)
203
+ rescue Exception => e
204
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
205
+ end
206
+ end
207
+
208
+ result
209
+ end
210
+
211
+ promise.execute
212
+ end
213
+
214
+ #
215
+ # The operation to enable a subscription
216
+ #
217
+ # @param subscription_id [String] Subscription Id.
218
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
219
+ # will be added to the HTTP request.
220
+ #
221
+ # @return [EnabledSubscriptionId] operation results.
222
+ #
223
+ def enable(subscription_id, custom_headers:nil)
224
+ response = enable_async(subscription_id, custom_headers:custom_headers).value!
225
+ response.body unless response.nil?
226
+ end
227
+
228
+ #
229
+ # The operation to enable a subscription
230
+ #
231
+ # @param subscription_id [String] Subscription Id.
232
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
233
+ # will be added to the HTTP request.
234
+ #
235
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
236
+ #
237
+ def enable_with_http_info(subscription_id, custom_headers:nil)
238
+ enable_async(subscription_id, custom_headers:custom_headers).value!
239
+ end
240
+
241
+ #
242
+ # The operation to enable a subscription
243
+ #
244
+ # @param subscription_id [String] Subscription Id.
245
+ # @param [Hash{String => String}] A hash of custom headers that will be added
246
+ # to the HTTP request.
247
+ #
248
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
249
+ #
250
+ def enable_async(subscription_id, custom_headers:nil)
251
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
252
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
253
+
254
+
255
+ request_headers = {}
256
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
257
+
258
+ # Set Headers
259
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
260
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
261
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable'
262
+
263
+ request_url = @base_url || @client.base_url
264
+
265
+ options = {
266
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
267
+ path_params: {'subscriptionId' => subscription_id},
268
+ query_params: {'api-version' => @client.api_version},
269
+ headers: request_headers.merge(custom_headers || {}),
270
+ base_url: request_url
271
+ }
272
+ promise = @client.make_request_async(:post, path_template, options)
273
+
274
+ promise = promise.then do |result|
275
+ http_response = result.response
276
+ status_code = http_response.status
277
+ response_content = http_response.body
278
+ unless status_code == 200
279
+ error_model = JSON.load(response_content)
280
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
281
+ end
282
+
283
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
284
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
285
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
286
+ # Deserialize Response
287
+ if status_code == 200
288
+ begin
289
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
290
+ result_mapper = Azure::Subscriptions::Mgmt::V2020_09_01::Models::EnabledSubscriptionId.mapper()
291
+ result.body = @client.deserialize(result_mapper, parsed_response)
292
+ rescue Exception => e
293
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
294
+ end
295
+ end
296
+
297
+ result
298
+ end
299
+
300
+ promise.execute
301
+ end
302
+
303
+ end
304
+ end
@@ -0,0 +1,137 @@
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::V2020_09_01
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class SubscriptionClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Version of the API to be used with the client request.
21
+ # Current version is 2020-09-01
22
+ attr_reader :api_version
23
+
24
+ # @return [String] The preferred language for the response.
25
+ attr_accessor :accept_language
26
+
27
+ # @return [Integer] The retry timeout in seconds for Long Running
28
+ # Operations. Default value is 30.
29
+ attr_accessor :long_running_operation_retry_timeout
30
+
31
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
32
+ # generated. When set to true a unique x-ms-client-request-id value is
33
+ # generated and included in each request. Default is true.
34
+ attr_accessor :generate_client_request_id
35
+
36
+ # @return [Subscription] subscription
37
+ attr_reader :subscription
38
+
39
+ # @return [Operations] operations
40
+ attr_reader :operations
41
+
42
+ # @return [AliasModel] alias_model
43
+ attr_reader :alias_model
44
+
45
+ #
46
+ # Creates initializes a new instance of the SubscriptionClient class.
47
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
48
+ # @param base_url [String] the base URI of the service.
49
+ # @param options [Array] filters to be applied to the HTTP requests.
50
+ #
51
+ def initialize(credentials = nil, base_url = nil, options = nil)
52
+ super(credentials, options)
53
+ @base_url = base_url || 'https://management.azure.com'
54
+
55
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
56
+ @credentials = credentials
57
+
58
+ @subscription = Subscription.new(self)
59
+ @operations = Operations.new(self)
60
+ @alias_model = AliasModel.new(self)
61
+ @api_version = '2020-09-01'
62
+ @accept_language = 'en-US'
63
+ @long_running_operation_retry_timeout = 30
64
+ @generate_client_request_id = true
65
+ add_telemetry
66
+ end
67
+
68
+ #
69
+ # Makes a request and returns the body of the response.
70
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
71
+ # @param path [String] the path, relative to {base_url}.
72
+ # @param options [Hash{String=>String}] specifying any request options like :body.
73
+ # @return [Hash{String=>String}] containing the body of the response.
74
+ # Example:
75
+ #
76
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
77
+ # path = "/path"
78
+ # options = {
79
+ # body: request_content,
80
+ # query_params: {'api-version' => '2016-02-01'}
81
+ # }
82
+ # result = @client.make_request(:put, path, options)
83
+ #
84
+ def make_request(method, path, options = {})
85
+ result = make_request_with_http_info(method, path, options)
86
+ result.body unless result.nil?
87
+ end
88
+
89
+ #
90
+ # Makes a request and returns the operation response.
91
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
92
+ # @param path [String] the path, relative to {base_url}.
93
+ # @param options [Hash{String=>String}] specifying any request options like :body.
94
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
95
+ #
96
+ def make_request_with_http_info(method, path, options = {})
97
+ result = make_request_async(method, path, options).value!
98
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
99
+ result
100
+ end
101
+
102
+ #
103
+ # Makes a request asynchronously.
104
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
105
+ # @param path [String] the path, relative to {base_url}.
106
+ # @param options [Hash{String=>String}] specifying any request options like :body.
107
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
108
+ #
109
+ def make_request_async(method, path, options = {})
110
+ fail ArgumentError, 'method is nil' if method.nil?
111
+ fail ArgumentError, 'path is nil' if path.nil?
112
+
113
+ request_url = options[:base_url] || @base_url
114
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
115
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
116
+ end
117
+
118
+ request_headers = @request_headers
119
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
120
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
121
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
122
+
123
+ super(request_url, method, path, options)
124
+ end
125
+
126
+
127
+ private
128
+ #
129
+ # Adds telemetry information.
130
+ #
131
+ def add_telemetry
132
+ sdk_information = 'azure_mgmt_subscriptions'
133
+ sdk_information = "#{sdk_information}/0.18.5"
134
+ add_user_agent_information(sdk_information)
135
+ end
136
+ end
137
+ end
@@ -4,6 +4,7 @@
4
4
 
5
5
  require '2019-11-01/generated/azure_mgmt_subscriptions'
6
6
  require '2018-03-01-preview/generated/azure_mgmt_subscriptions'
7
+ require '2020-09-01/generated/azure_mgmt_subscriptions'
7
8
  require '2019-10-01-preview/generated/azure_mgmt_subscriptions'
8
9
  require '2018-11-01-preview/generated/azure_mgmt_subscriptions'
9
10
  require '2017-11-01-preview/generated/azure_mgmt_subscriptions'
@@ -11,9 +11,11 @@ module Azure::Subscriptions::Profiles::Latest
11
11
  SubscriptionOperations = Azure::Subscriptions::Mgmt::V2018_03_01_preview::SubscriptionOperations
12
12
  SubscriptionOperationOperations = Azure::Subscriptions::Mgmt::V2018_11_01_preview::SubscriptionOperationOperations
13
13
  SubscriptionFactory = Azure::Subscriptions::Mgmt::V2018_11_01_preview::SubscriptionFactory
14
- Operations = Azure::Subscriptions::Mgmt::V2019_11_01::Operations
15
- Subscriptions = Azure::Subscriptions::Mgmt::V2019_11_01::Subscriptions
16
- Tenants = Azure::Subscriptions::Mgmt::V2019_11_01::Tenants
14
+ Subscriptions = Azure::Subscriptions::Mgmt::V2019_06_01::Subscriptions
15
+ Tenants = Azure::Subscriptions::Mgmt::V2019_06_01::Tenants
16
+ Subscription = Azure::Subscriptions::Mgmt::V2020_09_01::Subscription
17
+ Operations = Azure::Subscriptions::Mgmt::V2020_09_01::Operations
18
+ AliasModel = Azure::Subscriptions::Mgmt::V2020_09_01::AliasModel
17
19
 
18
20
  module Models
19
21
  SubscriptionDefinition = Azure::Subscriptions::Mgmt::V2017_11_01_preview::Models::SubscriptionDefinition
@@ -25,35 +27,39 @@ module Azure::Subscriptions::Profiles::Latest
25
27
  AdPrincipal = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::AdPrincipal
26
28
  ModernSubscriptionCreationParameters = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::ModernSubscriptionCreationParameters
27
29
  SubscriptionCreationResult = Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionCreationResult
28
- SubscriptionName = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::SubscriptionName
29
- CanceledSubscriptionId = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::CanceledSubscriptionId
30
- ErrorResponse = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::ErrorResponse
31
- RenamedSubscriptionId = Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::RenamedSubscriptionId
32
- Subscription = Azure::Subscriptions::Mgmt::V2019_11_01::Models::Subscription
33
- SubscriptionListResult = Azure::Subscriptions::Mgmt::V2019_11_01::Models::SubscriptionListResult
34
- LocationMetadata = Azure::Subscriptions::Mgmt::V2019_11_01::Models::LocationMetadata
35
- TenantIdDescription = Azure::Subscriptions::Mgmt::V2019_11_01::Models::TenantIdDescription
36
- LocationListResult = Azure::Subscriptions::Mgmt::V2019_11_01::Models::LocationListResult
37
- TenantListResult = Azure::Subscriptions::Mgmt::V2019_11_01::Models::TenantListResult
38
- ManagedByTenant = Azure::Subscriptions::Mgmt::V2019_11_01::Models::ManagedByTenant
39
- OperationDisplay = Azure::Subscriptions::Mgmt::V2019_11_01::Models::OperationDisplay
40
- Location = Azure::Subscriptions::Mgmt::V2019_11_01::Models::Location
41
- Operation = Azure::Subscriptions::Mgmt::V2019_11_01::Models::Operation
42
- PairedRegion = Azure::Subscriptions::Mgmt::V2019_11_01::Models::PairedRegion
43
- OperationListResult = Azure::Subscriptions::Mgmt::V2019_11_01::Models::OperationListResult
44
- SubscriptionPolicies = Azure::Subscriptions::Mgmt::V2019_11_01::Models::SubscriptionPolicies
45
- RegionType = Azure::Subscriptions::Mgmt::V2019_11_01::Models::RegionType
46
- RegionCategory = Azure::Subscriptions::Mgmt::V2019_11_01::Models::RegionCategory
47
- SubscriptionState = Azure::Subscriptions::Mgmt::V2019_11_01::Models::SubscriptionState
48
- SpendingLimit = Azure::Subscriptions::Mgmt::V2019_11_01::Models::SpendingLimit
49
- TenantCategory = Azure::Subscriptions::Mgmt::V2019_11_01::Models::TenantCategory
30
+ SubscriptionListResult = Azure::Subscriptions::Mgmt::V2019_06_01::Models::SubscriptionListResult
31
+ TenantIdDescription = Azure::Subscriptions::Mgmt::V2019_06_01::Models::TenantIdDescription
32
+ LocationListResult = Azure::Subscriptions::Mgmt::V2019_06_01::Models::LocationListResult
33
+ TenantListResult = Azure::Subscriptions::Mgmt::V2019_06_01::Models::TenantListResult
34
+ ManagedByTenant = Azure::Subscriptions::Mgmt::V2019_06_01::Models::ManagedByTenant
35
+ Location = Azure::Subscriptions::Mgmt::V2019_06_01::Models::Location
36
+ Subscription = Azure::Subscriptions::Mgmt::V2019_06_01::Models::Subscription
37
+ SubscriptionPolicies = Azure::Subscriptions::Mgmt::V2019_06_01::Models::SubscriptionPolicies
38
+ SubscriptionState = Azure::Subscriptions::Mgmt::V2019_06_01::Models::SubscriptionState
39
+ SpendingLimit = Azure::Subscriptions::Mgmt::V2019_06_01::Models::SpendingLimit
40
+ Operation = Azure::Subscriptions::Mgmt::V2020_09_01::Models::Operation
41
+ ErrorResponse = Azure::Subscriptions::Mgmt::V2020_09_01::Models::ErrorResponse
42
+ OperationListResult = Azure::Subscriptions::Mgmt::V2020_09_01::Models::OperationListResult
43
+ CanceledSubscriptionId = Azure::Subscriptions::Mgmt::V2020_09_01::Models::CanceledSubscriptionId
44
+ PutAliasRequestProperties = Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasRequestProperties
45
+ EnabledSubscriptionId = Azure::Subscriptions::Mgmt::V2020_09_01::Models::EnabledSubscriptionId
46
+ PutAliasRequest = Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasRequest
47
+ OperationDisplay = Azure::Subscriptions::Mgmt::V2020_09_01::Models::OperationDisplay
48
+ PutAliasResponseProperties = Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasResponseProperties
49
+ RenamedSubscriptionId = Azure::Subscriptions::Mgmt::V2020_09_01::Models::RenamedSubscriptionId
50
+ PutAliasResponse = Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasResponse
51
+ ErrorResponseBody = Azure::Subscriptions::Mgmt::V2020_09_01::Models::ErrorResponseBody
52
+ PutAliasListResult = Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasListResult
53
+ SubscriptionName = Azure::Subscriptions::Mgmt::V2020_09_01::Models::SubscriptionName
54
+ Workload = Azure::Subscriptions::Mgmt::V2020_09_01::Models::Workload
55
+ ProvisioningState = Azure::Subscriptions::Mgmt::V2020_09_01::Models::ProvisioningState
50
56
  end
51
57
 
52
58
  #
53
59
  # SubscriptionsManagementClass
54
60
  #
55
61
  class SubscriptionsManagementClass
56
- attr_reader :subscription_definitions_operation_metadata, :subscription_definitions, :subscription_operations, :subscription_operation_operations, :subscription_factory, :operations, :subscriptions, :tenants, :configurable, :base_url, :options, :model_classes
62
+ attr_reader :subscription_definitions_operation_metadata, :subscription_definitions, :subscription_operations, :subscription_operation_operations, :subscription_factory, :subscriptions, :tenants, :subscription, :operations, :alias_model, :configurable, :base_url, :options, :model_classes
57
63
 
58
64
  def initialize(options = {})
59
65
  if options.is_a?(Hash) && options.length == 0
@@ -108,15 +114,17 @@ module Azure::Subscriptions::Profiles::Latest
108
114
  @client_5.subscription_id = configurable.subscription_id
109
115
  end
110
116
  add_telemetry(@client_5)
117
+ @subscriptions = @client_5.subscriptions
118
+ @tenants = @client_5.tenants
111
119
 
112
- @client_6 = Azure::Subscriptions::Mgmt::V2019_11_01::SubscriptionClient.new(configurable.credentials, base_url, options)
120
+ @client_6 = Azure::Subscriptions::Mgmt::V2020_09_01::SubscriptionClient.new(configurable.credentials, base_url, options)
113
121
  if(@client_6.respond_to?(:subscription_id))
114
122
  @client_6.subscription_id = configurable.subscription_id
115
123
  end
116
124
  add_telemetry(@client_6)
125
+ @subscription = @client_6.subscription
117
126
  @operations = @client_6.operations
118
- @subscriptions = @client_6.subscriptions
119
- @tenants = @client_6.tenants
127
+ @alias_model = @client_6.alias_model
120
128
 
121
129
  @model_classes = ModelClasses.new
122
130
  end
@@ -176,71 +184,83 @@ module Azure::Subscriptions::Profiles::Latest
176
184
  def subscription_creation_result
177
185
  Azure::Subscriptions::Mgmt::V2018_11_01_preview::Models::SubscriptionCreationResult
178
186
  end
179
- def subscription_name
180
- Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::SubscriptionName
181
- end
182
- def canceled_subscription_id
183
- Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::CanceledSubscriptionId
184
- end
185
- def error_response
186
- Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::ErrorResponse
187
- end
188
- def renamed_subscription_id
189
- Azure::Subscriptions::Mgmt::V2019_03_01_preview::Models::RenamedSubscriptionId
190
- end
191
- def subscription
192
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::Subscription
193
- end
194
187
  def subscription_list_result
195
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::SubscriptionListResult
196
- end
197
- def location_metadata
198
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::LocationMetadata
188
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::SubscriptionListResult
199
189
  end
200
190
  def tenant_id_description
201
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::TenantIdDescription
191
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::TenantIdDescription
202
192
  end
203
193
  def location_list_result
204
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::LocationListResult
194
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::LocationListResult
205
195
  end
206
196
  def tenant_list_result
207
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::TenantListResult
197
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::TenantListResult
208
198
  end
209
199
  def managed_by_tenant
210
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::ManagedByTenant
211
- end
212
- def operation_display
213
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::OperationDisplay
200
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::ManagedByTenant
214
201
  end
215
202
  def location
216
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::Location
203
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::Location
204
+ end
205
+ def subscription
206
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::Subscription
207
+ end
208
+ def subscription_policies
209
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::SubscriptionPolicies
210
+ end
211
+ def subscription_state
212
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::SubscriptionState
213
+ end
214
+ def spending_limit
215
+ Azure::Subscriptions::Mgmt::V2019_06_01::Models::SpendingLimit
217
216
  end
218
217
  def operation
219
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::Operation
218
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::Operation
220
219
  end
221
- def paired_region
222
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::PairedRegion
220
+ def error_response
221
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::ErrorResponse
223
222
  end
224
223
  def operation_list_result
225
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::OperationListResult
224
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::OperationListResult
226
225
  end
227
- def subscription_policies
228
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::SubscriptionPolicies
226
+ def canceled_subscription_id
227
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::CanceledSubscriptionId
229
228
  end
230
- def region_type
231
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::RegionType
229
+ def put_alias_request_properties
230
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasRequestProperties
232
231
  end
233
- def region_category
234
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::RegionCategory
232
+ def enabled_subscription_id
233
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::EnabledSubscriptionId
235
234
  end
236
- def subscription_state
237
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::SubscriptionState
235
+ def put_alias_request
236
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasRequest
238
237
  end
239
- def spending_limit
240
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::SpendingLimit
238
+ def operation_display
239
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::OperationDisplay
240
+ end
241
+ def put_alias_response_properties
242
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasResponseProperties
243
+ end
244
+ def renamed_subscription_id
245
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::RenamedSubscriptionId
246
+ end
247
+ def put_alias_response
248
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasResponse
249
+ end
250
+ def error_response_body
251
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::ErrorResponseBody
252
+ end
253
+ def put_alias_list_result
254
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::PutAliasListResult
255
+ end
256
+ def subscription_name
257
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::SubscriptionName
258
+ end
259
+ def workload
260
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::Workload
241
261
  end
242
- def tenant_category
243
- Azure::Subscriptions::Mgmt::V2019_11_01::Models::TenantCategory
262
+ def provisioning_state
263
+ Azure::Subscriptions::Mgmt::V2020_09_01::Models::ProvisioningState
244
264
  end
245
265
  end
246
266
  end