class Azure::Core::Configuration
Singleton that keeps the configuration of the system.
Attributes
Public: Set the certificate key for SSL/HTTPS request with PEM certificate
Public: Set the private key for SSL/HTTPS request with PEM certificate
Public: Get the Subscription Id and certificate key for the management API.
Public: Set the host for the management API.
Public: Get/Set the Service
Bus Access Key (Issuer Secret) for this service.
Public: Set the Service
Bus Issuer for this service.
Public: Get/Set the Service
Bus Namespace for this service.
Public: Set this to enable Management certificate authentication or SQL Server authentication
Public: Set the host for SQL Management API (SQL Server authentication Endpoint)
Public: Get/Set the Access Key for this service.
Public: Get/Set the Account Name for this service.
Public: Set the host for the Blob
service. Only set this if you want something custom (like, for example, to point this to a LocalStorage emulator). This should be the complete host, including http:// at the start. When using the emulator, make sure to include your account name at the end.
Example:
config.storage_blob_host = "http://127.0.0.1:10000/devstoreaccount1"
Public: Set the host for the Queue
service. Only set this if you want something custom (like, for example, to point this to a LocalStorage emulator). This should be the complete host, including http:// at the start. When using the emulator, make sure to include your account name at the end.
Example:
config.storage_queue_host = "http://127.0.0.1:10001/devstoreaccount1"
Public: Set the host for the Table
service. Only set this if you want something custom (like, for example, to point this to a LocalStorage emulator). This should be the complete host, including http:// at the start. When using the emulator, make sure to include your account name at the end.
Example:
config.storage_table_host = "http://127.0.0.1:10002/devstoreaccount1"
Public: Get/Set the Subscription Id for the management API.
Public Instance Methods
Public: Get the host for the ACS service.
# File lib/azure/core/configuration.rb, line 133 def acs_host "https://#{sb_namespace}-sb.accesscontrol.windows.net" end
Calculate the default host for a given service in the cloud.
service - One of :table, :blob, :queue, etc.
Returns a String
with the hostname, including your account name.
# File lib/azure/core/configuration.rb, line 147 def default_host(service) "http://#{storage_account_name}.#{service}.core.windows.net" end
# File lib/azure/core/configuration.rb, line 173 def management_endpoint if @management_endpoint.nil? or @management_endpoint.empty? "https://management.core.windows.net/" elsif !@management_endpoint.end_with?('/') @management_endpoint += '/' elsif URI(@management_endpoint).scheme.nil? "https://#{@management_endpoint}" else @management_endpoint end end
Public: Get the issuer for the service bus. If you set something using sb_issuer=
, then we use that. Otherwise, we default to the default issuer: “owner”
# File lib/azure/core/configuration.rb, line 71 def sb_issuer @sb_issuer || "owner" end
Public: Get the host for the Service
Bus service.
# File lib/azure/core/configuration.rb, line 138 def service_bus_host "https://#{sb_namespace}.servicebus.windows.net" end
Public: Get the host for this service. If you set something using storage_blob_host=
, then we use that. Else we default to Azure’s default hosts, based on your account name.
# File lib/azure/core/configuration.rb, line 110 def storage_blob_host @storage_blob_host || default_host(:blob) end
Public: Get the host for this service. If you set something using storage_queue_host=
, then we use that. Else we default to Azure’s default hosts, based on your account name.
# File lib/azure/core/configuration.rb, line 128 def storage_queue_host @storage_queue_host || default_host(:queue) end
Public: Get the host for this service. If you set something using storage_table_host=
, then we use that. Else we default to Azure’s default hosts, based on your account name.
# File lib/azure/core/configuration.rb, line 92 def storage_table_host @storage_table_host || default_host(:table) end