Module: Armrest::Api::Settings
- Included in:
- Mods
- Defined in:
- lib/armrest/api/settings.rb
Instance Method Summary collapse
- #client_id ⇒ Object
- #client_secret ⇒ Object
- #endpoint ⇒ Object
- #group ⇒ Object
- #location ⇒ Object
- #resource ⇒ Object
- #subscription_id ⇒ Object
- #tenant_id ⇒ Object
Instance Method Details
#client_id ⇒ Object
5 6 7 |
# File 'lib/armrest/api/settings.rb', line 5 def client_id @options[:client_id] || ENV['ARM_CLIENT_ID'] || ENV['AZURE_CLIENT_ID'] end |
#client_secret ⇒ Object
9 10 11 |
# File 'lib/armrest/api/settings.rb', line 9 def client_secret @options[:client_secret] || ENV['ARM_CLIENT_SECRET'] || ENV['AZURE_CLIENT_SECRET'] end |
#endpoint ⇒ Object
33 34 35 |
# File 'lib/armrest/api/settings.rb', line 33 def endpoint @options[:endpoint] || "https://management.azure.com" end |
#group ⇒ Object
29 30 31 |
# File 'lib/armrest/api/settings.rb', line 29 def group @options[:group] || ENV['ARM_GROUP'] || AzureInfo.group end |
#location ⇒ Object
25 26 27 |
# File 'lib/armrest/api/settings.rb', line 25 def location @options[:location] || ENV['ARM_LOCATION'] || ENV['AZURE_LOCATION'] || AzureInfo.location end |
#resource ⇒ Object
17 18 19 |
# File 'lib/armrest/api/settings.rb', line 17 def resource @options[:resource] || "https://management.azure.com" end |
#subscription_id ⇒ Object
21 22 23 |
# File 'lib/armrest/api/settings.rb', line 21 def subscription_id @options[:subscription_id] || ENV['ARM_SUBSCRIPTION_ID'] || ENV['AZURE_SUBSCRIPTION_ID'] || AzureInfo.subscription_id end |
#tenant_id ⇒ Object
13 14 15 |
# File 'lib/armrest/api/settings.rb', line 13 def tenant_id @options[:tenant_id] || ENV['ARM_TENANT_ID'] || ENV['AZURE_TENANT_ID'] || AzureInfo.tenant_id end |