azure_mgmt_subscriptions 0.18.0 → 0.18.5
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/subscription_client.rb +1 -1
- data/lib/2017-11-01-preview/generated/azure_mgmt_subscriptions/subscription_definitions_client.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
- data/lib/2018-11-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
- data/lib/2019-03-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +1 -1
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions.rb +43 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/location.rb +108 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/location_list_result.rb +55 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/managed_by_tenant.rb +47 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/operation.rb +58 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/operation_display.rb +80 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/operation_list_result.rb +100 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/spending_limit.rb +17 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/subscription.rb +145 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb +98 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/subscription_policies.rb +76 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/subscription_state.rb +19 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb +61 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb +98 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/operations.rb +222 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/subscription_client.rb +136 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/subscriptions.rb +409 -0
- data/lib/2019-06-01/generated/azure_mgmt_subscriptions/tenants.rb +222 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions.rb +44 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/ad_principal.rb +47 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/canceled_subscription_id.rb +47 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/enabled_subscription_id.rb +47 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/error_response.rb +57 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/modern_csp_subscription_creation_parameters.rb +70 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/modern_subscription_creation_parameters.rb +117 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/offer_type.rb +16 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/operation.rb +58 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/operation_display.rb +69 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/operation_list_result.rb +68 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/renamed_subscription_id.rb +47 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/subscription_creation_parameters.rb +115 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/subscription_creation_result.rb +47 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/models/subscription_name.rb +46 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/operations.rb +110 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/subscription.rb +788 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/subscription_client.rb +137 -0
- data/lib/2019-10-01-preview/generated/azure_mgmt_subscriptions/subscription_operation.rb +118 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions.rb +48 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/location.rb +109 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/location_list_result.rb +55 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/location_metadata.rb +129 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/managed_by_tenant.rb +47 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/operation.rb +58 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/operation_display.rb +80 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/operation_list_result.rb +100 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/paired_region.rb +72 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/region_category.rb +16 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/region_type.rb +16 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/spending_limit.rb +17 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/subscription.rb +164 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb +98 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/subscription_policies.rb +76 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/subscription_state.rb +19 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/tenant_category.rb +17 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb +131 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb +98 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/operations.rb +222 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/subscription_client.rb +136 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/subscriptions.rb +409 -0
- data/lib/2019-11-01/generated/azure_mgmt_subscriptions/tenants.rb +222 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions.rb +46 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/alias_model.rb +429 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/canceled_subscription_id.rb +47 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/enabled_subscription_id.rb +47 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/error_response.rb +57 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/error_response_body.rb +48 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/operation.rb +58 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/operation_display.rb +69 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/operation_list_result.rb +68 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/provisioning_state.rb +17 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_list_result.rb +68 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_request.rb +47 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_request_properties.rb +83 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_response.rb +83 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/put_alias_response_properties.rb +59 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/renamed_subscription_id.rb +47 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/subscription_name.rb +46 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/models/workload.rb +16 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/operations.rb +110 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/subscription.rb +304 -0
- data/lib/2020-09-01/generated/azure_mgmt_subscriptions/subscription_client.rb +137 -0
- data/lib/azure_mgmt_subscriptions.rb +4 -0
- data/lib/profiles/latest/modules/subscriptions_profile_module.rb +121 -61
- data/lib/version.rb +1 -1
- metadata +89 -4
@@ -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::V2019_10_01_preview
|
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 2019-10-01-preview
|
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 [SubscriptionOperation] subscription_operation
|
40
|
+
attr_reader :subscription_operation
|
41
|
+
|
42
|
+
# @return [Operations] operations
|
43
|
+
attr_reader :operations
|
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
|
+
@subscription_operation = SubscriptionOperation.new(self)
|
60
|
+
@operations = Operations.new(self)
|
61
|
+
@api_version = '2019-10-01-preview'
|
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
|
@@ -0,0 +1,118 @@
|
|
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_10_01_preview
|
7
|
+
#
|
8
|
+
# Subscription client provides an interface to create and manage Azure
|
9
|
+
# subscriptions programmatically.
|
10
|
+
#
|
11
|
+
class SubscriptionOperation
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the SubscriptionOperation 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
|
+
# Get the status of the pending Microsoft.Subscription API operations.
|
27
|
+
#
|
28
|
+
# @param operation_id [String] The operation ID, which can be found from the
|
29
|
+
# Location field in the generate recommendation response header.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [SubscriptionCreationResult] operation results.
|
34
|
+
#
|
35
|
+
def get(operation_id, custom_headers:nil)
|
36
|
+
response = get_async(operation_id, custom_headers:custom_headers).value!
|
37
|
+
response.body unless response.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Get the status of the pending Microsoft.Subscription API operations.
|
42
|
+
#
|
43
|
+
# @param operation_id [String] The operation ID, which can be found from the
|
44
|
+
# Location field in the generate recommendation response header.
|
45
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
46
|
+
# will be added to the HTTP request.
|
47
|
+
#
|
48
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
49
|
+
#
|
50
|
+
def get_with_http_info(operation_id, custom_headers:nil)
|
51
|
+
get_async(operation_id, custom_headers:custom_headers).value!
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Get the status of the pending Microsoft.Subscription API operations.
|
56
|
+
#
|
57
|
+
# @param operation_id [String] The operation ID, which can be found from the
|
58
|
+
# Location field in the generate recommendation response header.
|
59
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
60
|
+
# to the HTTP request.
|
61
|
+
#
|
62
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
63
|
+
#
|
64
|
+
def get_async(operation_id, custom_headers:nil)
|
65
|
+
fail ArgumentError, 'operation_id is nil' if operation_id.nil?
|
66
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
67
|
+
|
68
|
+
|
69
|
+
request_headers = {}
|
70
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
71
|
+
|
72
|
+
# Set Headers
|
73
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
74
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
75
|
+
path_template = 'providers/Microsoft.Subscription/subscriptionOperations/{operationId}'
|
76
|
+
|
77
|
+
request_url = @base_url || @client.base_url
|
78
|
+
|
79
|
+
options = {
|
80
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
81
|
+
path_params: {'operationId' => operation_id},
|
82
|
+
query_params: {'api-version' => @client.api_version},
|
83
|
+
headers: request_headers.merge(custom_headers || {}),
|
84
|
+
base_url: request_url
|
85
|
+
}
|
86
|
+
promise = @client.make_request_async(:get, path_template, options)
|
87
|
+
|
88
|
+
promise = promise.then do |result|
|
89
|
+
http_response = result.response
|
90
|
+
status_code = http_response.status
|
91
|
+
response_content = http_response.body
|
92
|
+
unless status_code == 200 || status_code == 202
|
93
|
+
error_model = JSON.load(response_content)
|
94
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
95
|
+
end
|
96
|
+
|
97
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
98
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
99
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
100
|
+
# Deserialize Response
|
101
|
+
if status_code == 200
|
102
|
+
begin
|
103
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
104
|
+
result_mapper = Azure::Subscriptions::Mgmt::V2019_10_01_preview::Models::SubscriptionCreationResult.mapper()
|
105
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
106
|
+
rescue Exception => e
|
107
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
result
|
112
|
+
end
|
113
|
+
|
114
|
+
promise.execute
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2019-11-01/generated/azure_mgmt_subscriptions/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Subscriptions::Mgmt::V2019_11_01
|
23
|
+
autoload :Operations, '2019-11-01/generated/azure_mgmt_subscriptions/operations.rb'
|
24
|
+
autoload :Subscriptions, '2019-11-01/generated/azure_mgmt_subscriptions/subscriptions.rb'
|
25
|
+
autoload :Tenants, '2019-11-01/generated/azure_mgmt_subscriptions/tenants.rb'
|
26
|
+
autoload :SubscriptionClient, '2019-11-01/generated/azure_mgmt_subscriptions/subscription_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :Subscription, '2019-11-01/generated/azure_mgmt_subscriptions/models/subscription.rb'
|
30
|
+
autoload :SubscriptionListResult, '2019-11-01/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb'
|
31
|
+
autoload :LocationMetadata, '2019-11-01/generated/azure_mgmt_subscriptions/models/location_metadata.rb'
|
32
|
+
autoload :TenantIdDescription, '2019-11-01/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb'
|
33
|
+
autoload :LocationListResult, '2019-11-01/generated/azure_mgmt_subscriptions/models/location_list_result.rb'
|
34
|
+
autoload :TenantListResult, '2019-11-01/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb'
|
35
|
+
autoload :ManagedByTenant, '2019-11-01/generated/azure_mgmt_subscriptions/models/managed_by_tenant.rb'
|
36
|
+
autoload :OperationDisplay, '2019-11-01/generated/azure_mgmt_subscriptions/models/operation_display.rb'
|
37
|
+
autoload :Location, '2019-11-01/generated/azure_mgmt_subscriptions/models/location.rb'
|
38
|
+
autoload :Operation, '2019-11-01/generated/azure_mgmt_subscriptions/models/operation.rb'
|
39
|
+
autoload :PairedRegion, '2019-11-01/generated/azure_mgmt_subscriptions/models/paired_region.rb'
|
40
|
+
autoload :OperationListResult, '2019-11-01/generated/azure_mgmt_subscriptions/models/operation_list_result.rb'
|
41
|
+
autoload :SubscriptionPolicies, '2019-11-01/generated/azure_mgmt_subscriptions/models/subscription_policies.rb'
|
42
|
+
autoload :RegionType, '2019-11-01/generated/azure_mgmt_subscriptions/models/region_type.rb'
|
43
|
+
autoload :RegionCategory, '2019-11-01/generated/azure_mgmt_subscriptions/models/region_category.rb'
|
44
|
+
autoload :SubscriptionState, '2019-11-01/generated/azure_mgmt_subscriptions/models/subscription_state.rb'
|
45
|
+
autoload :SpendingLimit, '2019-11-01/generated/azure_mgmt_subscriptions/models/spending_limit.rb'
|
46
|
+
autoload :TenantCategory, '2019-11-01/generated/azure_mgmt_subscriptions/models/tenant_category.rb'
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,109 @@
|
|
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_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Location information.
|
10
|
+
#
|
11
|
+
class Location
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The fully qualified ID of the location. For example,
|
16
|
+
# /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# @return [String] The subscription ID.
|
20
|
+
attr_accessor :subscription_id
|
21
|
+
|
22
|
+
# @return [String] The location name.
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
# @return [String] The display name of the location.
|
26
|
+
attr_accessor :display_name
|
27
|
+
|
28
|
+
# @return [String] The display name of the location and its region.
|
29
|
+
attr_accessor :regional_display_name
|
30
|
+
|
31
|
+
# @return [LocationMetadata] Metadata of the location, such as lat/long,
|
32
|
+
# paired region, and others.
|
33
|
+
attr_accessor :metadata
|
34
|
+
|
35
|
+
|
36
|
+
#
|
37
|
+
# Mapper for Location class as Ruby Hash.
|
38
|
+
# This will be used for serialization/deserialization.
|
39
|
+
#
|
40
|
+
def self.mapper()
|
41
|
+
{
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'Location',
|
45
|
+
type: {
|
46
|
+
name: 'Composite',
|
47
|
+
class_name: 'Location',
|
48
|
+
model_properties: {
|
49
|
+
id: {
|
50
|
+
client_side_validation: true,
|
51
|
+
required: false,
|
52
|
+
read_only: true,
|
53
|
+
serialized_name: 'id',
|
54
|
+
type: {
|
55
|
+
name: 'String'
|
56
|
+
}
|
57
|
+
},
|
58
|
+
subscription_id: {
|
59
|
+
client_side_validation: true,
|
60
|
+
required: false,
|
61
|
+
read_only: true,
|
62
|
+
serialized_name: 'subscriptionId',
|
63
|
+
type: {
|
64
|
+
name: 'String'
|
65
|
+
}
|
66
|
+
},
|
67
|
+
name: {
|
68
|
+
client_side_validation: true,
|
69
|
+
required: false,
|
70
|
+
read_only: true,
|
71
|
+
serialized_name: 'name',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
},
|
76
|
+
display_name: {
|
77
|
+
client_side_validation: true,
|
78
|
+
required: false,
|
79
|
+
read_only: true,
|
80
|
+
serialized_name: 'displayName',
|
81
|
+
type: {
|
82
|
+
name: 'String'
|
83
|
+
}
|
84
|
+
},
|
85
|
+
regional_display_name: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
read_only: true,
|
89
|
+
serialized_name: 'regionalDisplayName',
|
90
|
+
type: {
|
91
|
+
name: 'String'
|
92
|
+
}
|
93
|
+
},
|
94
|
+
metadata: {
|
95
|
+
client_side_validation: true,
|
96
|
+
required: false,
|
97
|
+
serialized_name: 'metadata',
|
98
|
+
type: {
|
99
|
+
name: 'Composite',
|
100
|
+
class_name: 'LocationMetadata'
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Location list operation response.
|
10
|
+
#
|
11
|
+
class LocationListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<Location>] An array of locations.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for LocationListResult 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: 'LocationListResult',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'LocationListResult',
|
31
|
+
model_properties: {
|
32
|
+
value: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'value',
|
36
|
+
type: {
|
37
|
+
name: 'Sequence',
|
38
|
+
element: {
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'LocationElementType',
|
42
|
+
type: {
|
43
|
+
name: 'Composite',
|
44
|
+
class_name: 'Location'
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|