azure_mgmt_consumption 0.15.1 → 0.15.2
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/2017-04-24-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +1 -3
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/error_details.rb +4 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/error_response.rb +2 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/meter_details.rb +8 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/operation.rb +3 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/operation_display.rb +4 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +4 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/resource.rb +6 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/usage_detail.rb +22 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +4 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/usage_details.rb +2 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption.rb +38 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/consumption_management_client.rb +132 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/operation.rb +59 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/resource.rb +91 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/usage_detail.rb +355 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
- data/lib/{2017-04-24-preview/generated/azure_mgmt_consumption/version.rb → 2017-11-30/generated/azure_mgmt_consumption/module_definition.rb} +4 -3
- data/lib/2017-11-30/generated/azure_mgmt_consumption/operations.rb +214 -0
- data/lib/2017-11-30/generated/azure_mgmt_consumption/usage_details.rb +301 -0
- data/lib/azure_mgmt_consumption.rb +1 -0
- data/lib/profiles/latest/consumption_latest_profile_client.rb +1 -3
- data/lib/profiles/latest/modules/consumption_profile_module.rb +21 -21
- data/lib/version.rb +1 -1
- metadata +24 -8
- data/lib/profiles/common/configurable.rb +0 -86
- data/lib/profiles/common/default.rb +0 -57
@@ -3,4 +3,5 @@
|
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
4
|
|
5
5
|
require '2017-04-24-preview/generated/azure_mgmt_consumption'
|
6
|
+
require '2017-11-30/generated/azure_mgmt_consumption'
|
6
7
|
require 'profiles/latest/consumption_latest_profile_client'
|
@@ -4,15 +4,13 @@
|
|
4
4
|
|
5
5
|
require 'profiles/latest/consumption_module_definition'
|
6
6
|
require 'profiles/latest/modules/consumption_profile_module'
|
7
|
-
require 'profiles/common/configurable'
|
8
|
-
require 'profiles/common/default'
|
9
7
|
|
10
8
|
module Azure::Consumption::Profiles::Latest::Mgmt
|
11
9
|
#
|
12
10
|
# Client class for the Latest profile SDK.
|
13
11
|
#
|
14
12
|
class Client < ConsumptionClass
|
15
|
-
include
|
13
|
+
include MsRestAzure::Common::Configurable
|
16
14
|
|
17
15
|
|
18
16
|
def initialize(options = {})
|
@@ -5,19 +5,19 @@
|
|
5
5
|
require 'azure_mgmt_consumption'
|
6
6
|
|
7
7
|
module Azure::Consumption::Profiles::Latest::Mgmt
|
8
|
-
UsageDetails = Azure::Consumption::Mgmt::
|
9
|
-
Operations = Azure::Consumption::Mgmt::
|
8
|
+
UsageDetails = Azure::Consumption::Mgmt::V2017_11_30::UsageDetails
|
9
|
+
Operations = Azure::Consumption::Mgmt::V2017_11_30::Operations
|
10
10
|
|
11
11
|
module Models
|
12
|
-
ErrorResponse = Azure::Consumption::Mgmt::
|
13
|
-
OperationDisplay = Azure::Consumption::Mgmt::
|
14
|
-
UsageDetailsListResult = Azure::Consumption::Mgmt::
|
15
|
-
Operation = Azure::Consumption::Mgmt::
|
16
|
-
MeterDetails = Azure::Consumption::Mgmt::
|
17
|
-
OperationListResult = Azure::Consumption::Mgmt::
|
18
|
-
ErrorDetails = Azure::Consumption::Mgmt::
|
19
|
-
Resource = Azure::Consumption::Mgmt::
|
20
|
-
UsageDetail = Azure::Consumption::Mgmt::
|
12
|
+
ErrorResponse = Azure::Consumption::Mgmt::V2017_11_30::Models::ErrorResponse
|
13
|
+
OperationDisplay = Azure::Consumption::Mgmt::V2017_11_30::Models::OperationDisplay
|
14
|
+
UsageDetailsListResult = Azure::Consumption::Mgmt::V2017_11_30::Models::UsageDetailsListResult
|
15
|
+
Operation = Azure::Consumption::Mgmt::V2017_11_30::Models::Operation
|
16
|
+
MeterDetails = Azure::Consumption::Mgmt::V2017_11_30::Models::MeterDetails
|
17
|
+
OperationListResult = Azure::Consumption::Mgmt::V2017_11_30::Models::OperationListResult
|
18
|
+
ErrorDetails = Azure::Consumption::Mgmt::V2017_11_30::Models::ErrorDetails
|
19
|
+
Resource = Azure::Consumption::Mgmt::V2017_11_30::Models::Resource
|
20
|
+
UsageDetail = Azure::Consumption::Mgmt::V2017_11_30::Models::UsageDetail
|
21
21
|
end
|
22
22
|
|
23
23
|
#
|
@@ -37,7 +37,7 @@ module Azure::Consumption::Profiles::Latest::Mgmt
|
|
37
37
|
|
38
38
|
@configurable, @base_url, @options = self, nil, nil
|
39
39
|
|
40
|
-
client_0 = Azure::Consumption::Mgmt::
|
40
|
+
client_0 = Azure::Consumption::Mgmt::V2017_11_30::ConsumptionManagementClient.new(configurable.credentials, base_url, options)
|
41
41
|
if(client_0.respond_to?(:subscription_id))
|
42
42
|
client_0.subscription_id = configurable.subscription_id
|
43
43
|
end
|
@@ -49,31 +49,31 @@ module Azure::Consumption::Profiles::Latest::Mgmt
|
|
49
49
|
|
50
50
|
class ModelClasses
|
51
51
|
def error_response
|
52
|
-
Azure::Consumption::Mgmt::
|
52
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::ErrorResponse
|
53
53
|
end
|
54
54
|
def operation_display
|
55
|
-
Azure::Consumption::Mgmt::
|
55
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::OperationDisplay
|
56
56
|
end
|
57
57
|
def usage_details_list_result
|
58
|
-
Azure::Consumption::Mgmt::
|
58
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::UsageDetailsListResult
|
59
59
|
end
|
60
60
|
def operation
|
61
|
-
Azure::Consumption::Mgmt::
|
61
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::Operation
|
62
62
|
end
|
63
63
|
def meter_details
|
64
|
-
Azure::Consumption::Mgmt::
|
64
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::MeterDetails
|
65
65
|
end
|
66
66
|
def operation_list_result
|
67
|
-
Azure::Consumption::Mgmt::
|
67
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::OperationListResult
|
68
68
|
end
|
69
69
|
def error_details
|
70
|
-
Azure::Consumption::Mgmt::
|
70
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::ErrorDetails
|
71
71
|
end
|
72
72
|
def resource
|
73
|
-
Azure::Consumption::Mgmt::
|
73
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::Resource
|
74
74
|
end
|
75
75
|
def usage_detail
|
76
|
-
Azure::Consumption::Mgmt::
|
76
|
+
Azure::Consumption::Mgmt::V2017_11_30::Models::UsageDetail
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_consumption
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.10.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.10.0
|
83
83
|
description: Microsoft Azure Consumption Services Library for Ruby
|
84
84
|
email: azrubyteam@microsoft.com
|
85
85
|
executables: []
|
@@ -101,11 +101,22 @@ files:
|
|
101
101
|
- lib/2017-04-24-preview/generated/azure_mgmt_consumption/module_definition.rb
|
102
102
|
- lib/2017-04-24-preview/generated/azure_mgmt_consumption/operations.rb
|
103
103
|
- lib/2017-04-24-preview/generated/azure_mgmt_consumption/usage_details.rb
|
104
|
-
- lib/2017-
|
104
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption.rb
|
105
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/consumption_management_client.rb
|
106
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/error_details.rb
|
107
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/error_response.rb
|
108
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/meter_details.rb
|
109
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/operation.rb
|
110
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/operation_display.rb
|
111
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/operation_list_result.rb
|
112
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/resource.rb
|
113
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/usage_detail.rb
|
114
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/models/usage_details_list_result.rb
|
115
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/module_definition.rb
|
116
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/operations.rb
|
117
|
+
- lib/2017-11-30/generated/azure_mgmt_consumption/usage_details.rb
|
105
118
|
- lib/azure_mgmt_consumption.rb
|
106
119
|
- lib/module_definition.rb
|
107
|
-
- lib/profiles/common/configurable.rb
|
108
|
-
- lib/profiles/common/default.rb
|
109
120
|
- lib/profiles/latest/consumption_latest_profile_client.rb
|
110
121
|
- lib/profiles/latest/consumption_module_definition.rb
|
111
122
|
- lib/profiles/latest/modules/consumption_profile_module.rb
|
@@ -113,7 +124,12 @@ files:
|
|
113
124
|
homepage: https://aka.ms/azure-sdk-for-ruby
|
114
125
|
licenses:
|
115
126
|
- MIT
|
116
|
-
metadata:
|
127
|
+
metadata:
|
128
|
+
bug_tracker_uri: https://github.com/Azure/azure-sdk-for-ruby/issues
|
129
|
+
changelog_uri: https://github.com/Azure/azure-sdk-for-ruby/blob/master/ChangeLog.md
|
130
|
+
documentation_uri: https://azure.microsoft.com/en-us/develop/ruby/
|
131
|
+
homepage_uri: https://aka.ms/azure-sdk-for-ruby
|
132
|
+
source_code_uri: https://github.com/Azure/azure-sdk-for-ruby/tree/master/management/azure_mgmt_consumption
|
117
133
|
post_install_message:
|
118
134
|
rdoc_options: []
|
119
135
|
require_paths:
|
@@ -1,86 +0,0 @@
|
|
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::Common
|
6
|
-
# The Azure::Common::Configurable module provides basic configuration for Azure 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::Common::Client}.
|
29
|
-
# @return [Array] of option keys.
|
30
|
-
#
|
31
|
-
def keys
|
32
|
-
@keys ||= [:tenant_id, :client_id, :client_secret, :subscription_id, :active_directory_settings]
|
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::Common::Configurable.keys.each do |key|
|
49
|
-
default_value = Azure::Common::Default.options[key]
|
50
|
-
instance_variable_set(:"@#{key}", options.fetch(key, default_value))
|
51
|
-
end
|
52
|
-
|
53
|
-
fail ArgumentError, 'tenant_id is nil' if self.tenant_id.nil?
|
54
|
-
fail ArgumentError, 'client_id is nil' if self.client_id.nil?
|
55
|
-
fail ArgumentError, 'client_secret is nil' if self.client_secret.nil?
|
56
|
-
fail ArgumentError, 'subscription_id is nil' if self.subscription_id.nil?
|
57
|
-
fail ArgumentError, 'active_directory_settings is nil' if self.active_directory_settings.nil?
|
58
|
-
|
59
|
-
default_value = MsRest::TokenCredentials.new(
|
60
|
-
MsRestAzure::ApplicationTokenProvider.new(
|
61
|
-
self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
|
62
|
-
|
63
|
-
instance_variable_set(:"@credentials", options.fetch(:credentials, default_value))
|
64
|
-
|
65
|
-
self
|
66
|
-
end
|
67
|
-
|
68
|
-
def config
|
69
|
-
self
|
70
|
-
end
|
71
|
-
|
72
|
-
private
|
73
|
-
|
74
|
-
#
|
75
|
-
# configures configurable options to default values
|
76
|
-
#
|
77
|
-
def setup_default_options
|
78
|
-
opts = {}
|
79
|
-
Azure::Common::Configurable.keys.map do |key|
|
80
|
-
opts[key] = Azure::Common::Default.options[key]
|
81
|
-
end
|
82
|
-
|
83
|
-
opts
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
@@ -1,57 +0,0 @@
|
|
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::Common
|
6
|
-
module Default
|
7
|
-
class << self
|
8
|
-
#
|
9
|
-
# Default Azure Tenant Id.
|
10
|
-
# @return [String] Azure Tenant Id.
|
11
|
-
#
|
12
|
-
def tenant_id
|
13
|
-
ENV['AZURE_TENANT_ID']
|
14
|
-
end
|
15
|
-
|
16
|
-
#
|
17
|
-
# Default Azure Client Id.
|
18
|
-
# @return [String] Azure Client Id.
|
19
|
-
#
|
20
|
-
def client_id
|
21
|
-
ENV['AZURE_CLIENT_ID']
|
22
|
-
end
|
23
|
-
|
24
|
-
#
|
25
|
-
# Default Azure Client Secret.
|
26
|
-
# @return [String] Azure Client Secret.
|
27
|
-
#
|
28
|
-
def client_secret
|
29
|
-
ENV['AZURE_CLIENT_SECRET']
|
30
|
-
end
|
31
|
-
|
32
|
-
#
|
33
|
-
# Default Azure Subscription Id.
|
34
|
-
# @return [String] Azure Subscription Id.
|
35
|
-
#
|
36
|
-
def subscription_id
|
37
|
-
ENV['AZURE_SUBSCRIPTION_ID']
|
38
|
-
end
|
39
|
-
|
40
|
-
#
|
41
|
-
# Default Azure Active Directory Service Settings.
|
42
|
-
# @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure Active Directory Service Settings.
|
43
|
-
#
|
44
|
-
def active_directory_settings
|
45
|
-
MsRestAzure::ActiveDirectoryServiceSettings.get_azure_settings
|
46
|
-
end
|
47
|
-
|
48
|
-
#
|
49
|
-
# Configuration options.
|
50
|
-
# @return [Hash] Configuration options.
|
51
|
-
#
|
52
|
-
def options
|
53
|
-
Hash[Azure::Common::Configurable.keys.map { |key| [key, send(key)]}]
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|