azure_mgmt_subscriptions 0.14.0 → 0.15.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/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/location.rb +95 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/location_list_result.rb +52 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription.rb +86 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb +94 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription_policies.rb +54 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb +54 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb +94 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/subscription_client.rb +130 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/subscriptions.rb +385 -0
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions/tenants.rb +213 -0
- data/lib/{generated → 2015-11-01/generated}/azure_mgmt_subscriptions/version.rb +2 -2
- data/lib/2015-11-01/generated/azure_mgmt_subscriptions.rb +36 -0
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/location.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/location_list_result.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/spending_limit.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription_list_result.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription_policies.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription_state.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/tenant_id_description.rb +1 -1
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/tenant_list_result.rb +1 -1
- data/lib/2016-06-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/subscription_client.rb +3 -3
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/subscriptions.rb +5 -5
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/tenants.rb +3 -3
- data/lib/{generated/azure_mgmt_subscriptions/module_definition.rb → 2016-06-01/generated/azure_mgmt_subscriptions/version.rb} +3 -3
- data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions.rb +14 -14
- data/lib/azure_mgmt_subscriptions.rb +4 -1
- data/lib/module_definition.rb +9 -0
- data/lib/profiles/common/configurable.rb +73 -0
- data/lib/profiles/common/default.rb +68 -0
- data/lib/profiles/latest/modules/subscriptions_profile_module.rb +80 -0
- data/lib/profiles/latest/subscriptions_latest_profile_client.rb +33 -0
- data/lib/profiles/latest/subscriptions_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/modules/subscriptions_profile_module.rb +80 -0
- data/lib/profiles/v2017_03_09/subscriptions_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/subscriptions_v2017_03_09_profile_client.rb +33 -0
- data/lib/version.rb +7 -0
- metadata +40 -17
@@ -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::V2016_06_01 end
|
@@ -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::
|
6
|
+
module Azure::Subscriptions::Mgmt::V2016_06_01
|
7
7
|
#
|
8
8
|
# A service client - single point of access to the REST API.
|
9
9
|
#
|
@@ -121,8 +121,8 @@ module Azure::ARM::Subscriptions
|
|
121
121
|
#
|
122
122
|
def add_telemetry
|
123
123
|
sdk_information = 'azure_mgmt_subscriptions'
|
124
|
-
if defined? Azure::
|
125
|
-
sdk_information = "#{sdk_information}/#{Azure::
|
124
|
+
if defined? Azure::Subscriptions::Mgmt::V2016_06_01::VERSION
|
125
|
+
sdk_information = "#{sdk_information}/#{Azure::Subscriptions::Mgmt::V2016_06_01::VERSION}"
|
126
126
|
end
|
127
127
|
add_user_agent_information(sdk_information)
|
128
128
|
end
|
@@ -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::
|
6
|
+
module Azure::Subscriptions::Mgmt::V2016_06_01
|
7
7
|
#
|
8
8
|
# All resource groups and resources exist within subscriptions. These
|
9
9
|
# operation enable you get information about your subscriptions and tenants.
|
@@ -106,7 +106,7 @@ module Azure::ARM::Subscriptions
|
|
106
106
|
if status_code == 200
|
107
107
|
begin
|
108
108
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
109
|
-
result_mapper = Azure::
|
109
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2016_06_01::Models::LocationListResult.mapper()
|
110
110
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
111
111
|
rescue Exception => e
|
112
112
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -192,7 +192,7 @@ module Azure::ARM::Subscriptions
|
|
192
192
|
if status_code == 200
|
193
193
|
begin
|
194
194
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
195
|
-
result_mapper = Azure::
|
195
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Subscription.mapper()
|
196
196
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
197
197
|
rescue Exception => e
|
198
198
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -273,7 +273,7 @@ module Azure::ARM::Subscriptions
|
|
273
273
|
if status_code == 200
|
274
274
|
begin
|
275
275
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
276
|
-
result_mapper = Azure::
|
276
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult.mapper()
|
277
277
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
278
278
|
rescue Exception => e
|
279
279
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -360,7 +360,7 @@ module Azure::ARM::Subscriptions
|
|
360
360
|
if status_code == 200
|
361
361
|
begin
|
362
362
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
363
|
-
result_mapper = Azure::
|
363
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult.mapper()
|
364
364
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
365
365
|
rescue Exception => e
|
366
366
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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::
|
6
|
+
module Azure::Subscriptions::Mgmt::V2016_06_01
|
7
7
|
#
|
8
8
|
# All resource groups and resources exist within subscriptions. These
|
9
9
|
# operation enable you get information about your subscriptions and tenants.
|
@@ -92,7 +92,7 @@ module Azure::ARM::Subscriptions
|
|
92
92
|
if status_code == 200
|
93
93
|
begin
|
94
94
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
-
result_mapper = Azure::
|
95
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantListResult.mapper()
|
96
96
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
97
97
|
rescue Exception => e
|
98
98
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -179,7 +179,7 @@ module Azure::ARM::Subscriptions
|
|
179
179
|
if status_code == 200
|
180
180
|
begin
|
181
181
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
182
|
-
result_mapper = Azure::
|
182
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantListResult.mapper()
|
183
183
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
184
184
|
rescue Exception => e
|
185
185
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -16,23 +16,23 @@ require 'faraday'
|
|
16
16
|
require 'faraday-cookie_jar'
|
17
17
|
require 'concurrent'
|
18
18
|
require 'ms_rest'
|
19
|
-
require 'generated/azure_mgmt_subscriptions/module_definition'
|
19
|
+
require '2016-06-01/generated/azure_mgmt_subscriptions/module_definition'
|
20
20
|
require 'ms_rest_azure'
|
21
21
|
|
22
|
-
module Azure::
|
23
|
-
autoload :Subscriptions, 'generated/azure_mgmt_subscriptions/subscriptions.rb'
|
24
|
-
autoload :Tenants, 'generated/azure_mgmt_subscriptions/tenants.rb'
|
25
|
-
autoload :SubscriptionClient, 'generated/azure_mgmt_subscriptions/subscription_client.rb'
|
22
|
+
module Azure::Subscriptions::Mgmt::V2016_06_01
|
23
|
+
autoload :Subscriptions, '2016-06-01/generated/azure_mgmt_subscriptions/subscriptions.rb'
|
24
|
+
autoload :Tenants, '2016-06-01/generated/azure_mgmt_subscriptions/tenants.rb'
|
25
|
+
autoload :SubscriptionClient, '2016-06-01/generated/azure_mgmt_subscriptions/subscription_client.rb'
|
26
26
|
|
27
27
|
module Models
|
28
|
-
autoload :Subscription, 'generated/azure_mgmt_subscriptions/models/subscription.rb'
|
29
|
-
autoload :SubscriptionListResult, 'generated/azure_mgmt_subscriptions/models/subscription_list_result.rb'
|
30
|
-
autoload :LocationListResult, 'generated/azure_mgmt_subscriptions/models/location_list_result.rb'
|
31
|
-
autoload :TenantIdDescription, 'generated/azure_mgmt_subscriptions/models/tenant_id_description.rb'
|
32
|
-
autoload :Location, 'generated/azure_mgmt_subscriptions/models/location.rb'
|
33
|
-
autoload :TenantListResult, 'generated/azure_mgmt_subscriptions/models/tenant_list_result.rb'
|
34
|
-
autoload :SubscriptionPolicies, 'generated/azure_mgmt_subscriptions/models/subscription_policies.rb'
|
35
|
-
autoload :SubscriptionState, 'generated/azure_mgmt_subscriptions/models/subscription_state.rb'
|
36
|
-
autoload :SpendingLimit, 'generated/azure_mgmt_subscriptions/models/spending_limit.rb'
|
28
|
+
autoload :Subscription, '2016-06-01/generated/azure_mgmt_subscriptions/models/subscription.rb'
|
29
|
+
autoload :SubscriptionListResult, '2016-06-01/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb'
|
30
|
+
autoload :LocationListResult, '2016-06-01/generated/azure_mgmt_subscriptions/models/location_list_result.rb'
|
31
|
+
autoload :TenantIdDescription, '2016-06-01/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb'
|
32
|
+
autoload :Location, '2016-06-01/generated/azure_mgmt_subscriptions/models/location.rb'
|
33
|
+
autoload :TenantListResult, '2016-06-01/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb'
|
34
|
+
autoload :SubscriptionPolicies, '2016-06-01/generated/azure_mgmt_subscriptions/models/subscription_policies.rb'
|
35
|
+
autoload :SubscriptionState, '2016-06-01/generated/azure_mgmt_subscriptions/models/subscription_state.rb'
|
36
|
+
autoload :SpendingLimit, '2016-06-01/generated/azure_mgmt_subscriptions/models/spending_limit.rb'
|
37
37
|
end
|
38
38
|
end
|
@@ -2,4 +2,7 @@
|
|
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 'generated/azure_mgmt_subscriptions'
|
5
|
+
require '2015-11-01/generated/azure_mgmt_subscriptions'
|
6
|
+
require '2016-06-01/generated/azure_mgmt_subscriptions'
|
7
|
+
require 'profiles/latest/subscriptions_latest_profile_client'
|
8
|
+
require 'profiles/v2017_03_09/subscriptions_v2017_03_09_profile_client'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::Subscriptions end
|
7
|
+
module Azure::Subscriptions::Mgmt end
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure::ARM
|
6
|
+
# The Azure::ARM::Configurable module provides basic configuration for Azure ARM activities.
|
7
|
+
module Configurable
|
8
|
+
# @return [String] Azure tenant id (also known as domain).
|
9
|
+
attr_accessor :tenant_id
|
10
|
+
|
11
|
+
# @return [String] Azure client id.
|
12
|
+
attr_accessor :client_id
|
13
|
+
|
14
|
+
# @return [String] Azure secret key.
|
15
|
+
attr_accessor :client_secret
|
16
|
+
|
17
|
+
# @return [String] Azure subscription id.
|
18
|
+
attr_accessor :subscription_id
|
19
|
+
|
20
|
+
# @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure active directory service settings.
|
21
|
+
attr_accessor :active_directory_settings
|
22
|
+
|
23
|
+
# @return [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
24
|
+
attr_accessor :credentials
|
25
|
+
|
26
|
+
class << self
|
27
|
+
#
|
28
|
+
# List of configurable keys for {Azure::ARM::Client}.
|
29
|
+
# @return [Array] of option keys.
|
30
|
+
#
|
31
|
+
def keys
|
32
|
+
@keys ||= [:tenant_id, :client_id, :client_secret, :subscription_id, :active_directory_settings, :credentials]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# Set configuration options using a block.
|
38
|
+
#
|
39
|
+
def configure
|
40
|
+
yield self
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Resets the configurable options to provided options or defaults.
|
45
|
+
# This will also creates MsRest::TokenCredentials to be used for subsequent Azure Resource Manager clients.
|
46
|
+
#
|
47
|
+
def reset!(options = {})
|
48
|
+
Azure::ARM::Configurable.keys.each do |key|
|
49
|
+
default_value = Azure::ARM::Default.options[key]
|
50
|
+
instance_variable_set(:"@#{key}", options.fetch(key, default_value))
|
51
|
+
end
|
52
|
+
|
53
|
+
self
|
54
|
+
end
|
55
|
+
|
56
|
+
def config
|
57
|
+
self
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
#
|
63
|
+
# configures configurable options to default values
|
64
|
+
#
|
65
|
+
def setup_options
|
66
|
+
opts = {}
|
67
|
+
Azure::ARM::Configurable.keys.map do |key|
|
68
|
+
opts[key] = Azure::ARM::Default.options[key]
|
69
|
+
end
|
70
|
+
opts
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure::ARM
|
6
|
+
# Default configuration options for {Azure::ARM.Client}
|
7
|
+
module Default
|
8
|
+
class << self
|
9
|
+
#
|
10
|
+
# Default Azure Tenant Id.
|
11
|
+
# @return [String] Azure Tenant Id.
|
12
|
+
#
|
13
|
+
def tenant_id
|
14
|
+
ENV['AZURE_TENANT_ID']
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# Default Azure Client Id.
|
19
|
+
# @return [String] Azure Client Id.
|
20
|
+
#
|
21
|
+
def client_id
|
22
|
+
ENV['AZURE_CLIENT_ID']
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# Default Azure Client Secret.
|
27
|
+
# @return [String] Azure Client Secret.
|
28
|
+
#
|
29
|
+
def client_secret
|
30
|
+
ENV['AZURE_CLIENT_SECRET']
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# Default Azure Subscription Id.
|
35
|
+
# @return [String] Azure Subscription Id.
|
36
|
+
#
|
37
|
+
def subscription_id
|
38
|
+
ENV['AZURE_SUBSCRIPTION_ID']
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Default Azure credentials to authorize HTTP requests made by the service client.
|
43
|
+
# @return [MsRest::ServiceClientCredentials] Azure credentials to authorize HTTP requests made by the service client.
|
44
|
+
#
|
45
|
+
def credentials
|
46
|
+
MsRest::TokenCredentials.new(
|
47
|
+
MsRestAzure::ApplicationTokenProvider.new(
|
48
|
+
self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Default Azure Active Directory Service Settings.
|
53
|
+
# @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure Active Directory Service Settings.
|
54
|
+
#
|
55
|
+
def active_directory_settings
|
56
|
+
MsRestAzure::ActiveDirectoryServiceSettings.get_azure_settings
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Configuration options.
|
61
|
+
# @return [Hash] Configuration options.
|
62
|
+
#
|
63
|
+
def options
|
64
|
+
Hash[Azure::ARM::Configurable.keys.map{|key| [key, send(key)]}]
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'azure_mgmt_subscriptions'
|
6
|
+
|
7
|
+
module Azure::Subscriptions::Profiles::Latest::Mgmt
|
8
|
+
Subscriptions = Azure::Subscriptions::Mgmt::V2016_06_01::Subscriptions
|
9
|
+
Tenants = Azure::Subscriptions::Mgmt::V2016_06_01::Tenants
|
10
|
+
|
11
|
+
module Models
|
12
|
+
Subscription = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Subscription
|
13
|
+
SubscriptionListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult
|
14
|
+
LocationListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::LocationListResult
|
15
|
+
TenantIdDescription = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantIdDescription
|
16
|
+
Location = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Location
|
17
|
+
TenantListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantListResult
|
18
|
+
SubscriptionPolicies = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionPolicies
|
19
|
+
SubscriptionState = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionState
|
20
|
+
SpendingLimit = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SpendingLimit
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Subscriptions
|
25
|
+
#
|
26
|
+
class SubscriptionsClass
|
27
|
+
attr_reader :subscriptions, :tenants, :configurable, :base_url, :options, :model_classes
|
28
|
+
|
29
|
+
def initialize(options = {})
|
30
|
+
if options.is_a?(Hash) && options.length == 0
|
31
|
+
@options = setup_options
|
32
|
+
else
|
33
|
+
@options = options
|
34
|
+
end
|
35
|
+
|
36
|
+
reset!(options)
|
37
|
+
|
38
|
+
@configurable, @base_url, @options = self, nil, nil
|
39
|
+
|
40
|
+
client_0 = Azure::Subscriptions::Mgmt::V2016_06_01::SubscriptionClient.new(configurable.credentials, base_url, options)
|
41
|
+
if(client_0.respond_to?(:subscription_id))
|
42
|
+
client_0.subscription_id = configurable.subscription_id
|
43
|
+
end
|
44
|
+
@subscriptions = client_0.subscriptions
|
45
|
+
@tenants = client_0.tenants
|
46
|
+
|
47
|
+
@model_classes = ModelClasses.new
|
48
|
+
end
|
49
|
+
|
50
|
+
class ModelClasses
|
51
|
+
def subscription
|
52
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::Subscription
|
53
|
+
end
|
54
|
+
def subscription_list_result
|
55
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult
|
56
|
+
end
|
57
|
+
def location_list_result
|
58
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::LocationListResult
|
59
|
+
end
|
60
|
+
def tenant_id_description
|
61
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantIdDescription
|
62
|
+
end
|
63
|
+
def location
|
64
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::Location
|
65
|
+
end
|
66
|
+
def tenant_list_result
|
67
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantListResult
|
68
|
+
end
|
69
|
+
def subscription_policies
|
70
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionPolicies
|
71
|
+
end
|
72
|
+
def subscription_state
|
73
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionState
|
74
|
+
end
|
75
|
+
def spending_limit
|
76
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SpendingLimit
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'profiles/latest/subscriptions_module_definition'
|
6
|
+
require 'profiles/latest/modules/subscriptions_profile_module'
|
7
|
+
require 'profiles/common/configurable'
|
8
|
+
require 'profiles/common/default'
|
9
|
+
|
10
|
+
module Azure::Subscriptions::Profiles::Latest::Mgmt
|
11
|
+
#
|
12
|
+
# Client class for the Latest profile SDK.
|
13
|
+
#
|
14
|
+
class Client < SubscriptionsClass
|
15
|
+
include Azure::ARM::Configurable
|
16
|
+
|
17
|
+
|
18
|
+
def initialize(options = {})
|
19
|
+
super(options)
|
20
|
+
end
|
21
|
+
|
22
|
+
def credentials
|
23
|
+
if @credentials.nil?
|
24
|
+
self.active_directory_settings ||= Azure::ARM::Default.active_directory_settings
|
25
|
+
|
26
|
+
@credentials = MsRest::TokenCredentials.new(
|
27
|
+
MsRestAzure::ApplicationTokenProvider.new(
|
28
|
+
self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
|
29
|
+
end
|
30
|
+
@credentials
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::Subscriptions end
|
7
|
+
module Azure::Subscriptions::Profiles end
|
8
|
+
module Azure::Subscriptions::Profiles::Latest end
|
9
|
+
module Azure::Subscriptions::Profiles::Latest::Mgmt end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'azure_mgmt_subscriptions'
|
6
|
+
|
7
|
+
module Azure::Subscriptions::Profiles::V2017_03_09::Mgmt
|
8
|
+
Subscriptions = Azure::Subscriptions::Mgmt::V2016_06_01::Subscriptions
|
9
|
+
Tenants = Azure::Subscriptions::Mgmt::V2016_06_01::Tenants
|
10
|
+
|
11
|
+
module Models
|
12
|
+
Subscription = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Subscription
|
13
|
+
SubscriptionListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult
|
14
|
+
LocationListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::LocationListResult
|
15
|
+
TenantIdDescription = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantIdDescription
|
16
|
+
Location = Azure::Subscriptions::Mgmt::V2016_06_01::Models::Location
|
17
|
+
TenantListResult = Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantListResult
|
18
|
+
SubscriptionPolicies = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionPolicies
|
19
|
+
SubscriptionState = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionState
|
20
|
+
SpendingLimit = Azure::Subscriptions::Mgmt::V2016_06_01::Models::SpendingLimit
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Subscriptions
|
25
|
+
#
|
26
|
+
class SubscriptionsClass
|
27
|
+
attr_reader :subscriptions, :tenants, :configurable, :base_url, :options, :model_classes
|
28
|
+
|
29
|
+
def initialize(options = {})
|
30
|
+
if options.is_a?(Hash) && options.length == 0
|
31
|
+
@options = setup_options
|
32
|
+
else
|
33
|
+
@options = options
|
34
|
+
end
|
35
|
+
|
36
|
+
reset!(options)
|
37
|
+
|
38
|
+
@configurable, @base_url, @options = self, nil, nil
|
39
|
+
|
40
|
+
client_0 = Azure::Subscriptions::Mgmt::V2016_06_01::SubscriptionClient.new(configurable.credentials, base_url, options)
|
41
|
+
if(client_0.respond_to?(:subscription_id))
|
42
|
+
client_0.subscription_id = configurable.subscription_id
|
43
|
+
end
|
44
|
+
@subscriptions = client_0.subscriptions
|
45
|
+
@tenants = client_0.tenants
|
46
|
+
|
47
|
+
@model_classes = ModelClasses.new
|
48
|
+
end
|
49
|
+
|
50
|
+
class ModelClasses
|
51
|
+
def subscription
|
52
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::Subscription
|
53
|
+
end
|
54
|
+
def subscription_list_result
|
55
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionListResult
|
56
|
+
end
|
57
|
+
def location_list_result
|
58
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::LocationListResult
|
59
|
+
end
|
60
|
+
def tenant_id_description
|
61
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantIdDescription
|
62
|
+
end
|
63
|
+
def location
|
64
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::Location
|
65
|
+
end
|
66
|
+
def tenant_list_result
|
67
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::TenantListResult
|
68
|
+
end
|
69
|
+
def subscription_policies
|
70
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionPolicies
|
71
|
+
end
|
72
|
+
def subscription_state
|
73
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SubscriptionState
|
74
|
+
end
|
75
|
+
def spending_limit
|
76
|
+
Azure::Subscriptions::Mgmt::V2016_06_01::Models::SpendingLimit
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::Subscriptions end
|
7
|
+
module Azure::Subscriptions::Profiles end
|
8
|
+
module Azure::Subscriptions::Profiles::V2017_03_09 end
|
9
|
+
module Azure::Subscriptions::Profiles::V2017_03_09::Mgmt end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'profiles/v2017_03_09/subscriptions_module_definition'
|
6
|
+
require 'profiles/v2017_03_09/modules/subscriptions_profile_module'
|
7
|
+
require 'profiles/common/configurable'
|
8
|
+
require 'profiles/common/default'
|
9
|
+
|
10
|
+
module Azure::Subscriptions::Profiles::V2017_03_09::Mgmt
|
11
|
+
#
|
12
|
+
# Client class for the V2017_03_09 profile SDK.
|
13
|
+
#
|
14
|
+
class Client < SubscriptionsClass
|
15
|
+
include Azure::ARM::Configurable
|
16
|
+
|
17
|
+
|
18
|
+
def initialize(options = {})
|
19
|
+
super(options)
|
20
|
+
end
|
21
|
+
|
22
|
+
def credentials
|
23
|
+
if @credentials.nil?
|
24
|
+
self.active_directory_settings ||= Azure::ARM::Default.active_directory_settings
|
25
|
+
|
26
|
+
@credentials = MsRest::TokenCredentials.new(
|
27
|
+
MsRestAzure::ApplicationTokenProvider.new(
|
28
|
+
self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
|
29
|
+
end
|
30
|
+
@credentials
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|