Class: MsRestAzure::AzureEnvironments::AzureEnvironment
- Inherits:
-
Object
- Object
- MsRestAzure::AzureEnvironments::AzureEnvironment
- Defined in:
- lib/ms_rest_azure/azure_environment.rb
Overview
An instance of this class describes an environment in Azure
Instance Attribute Summary collapse
-
#active_directory_endpoint_url ⇒ String
readonly
The Active Directory login endpoint.
-
#active_directory_graph_api_version ⇒ String
readonly
The Active Directory resource ID.
-
#active_directory_graph_resource_id ⇒ String
readonly
The Active Directory resource ID.
-
#active_directory_resource_id ⇒ String
readonly
The resource ID to obtain AD tokens for.
-
#datalake_analytics_catalog_and_job_endpoint_suffix ⇒ String
readonly
The data lake analytics job and catalog service dns suffix.
-
#datalake_store_filesystem_endpoint_suffix ⇒ String
readonly
The data lake store filesystem service dns suffix.
-
#gallery_endpoint_url ⇒ String
readonly
The template gallery endpoint.
-
#key_vault_dns_suffix ⇒ String
readonly
The KeyVault service dns suffix.
-
#management_endpoint_url ⇒ String
readonly
The management service endpoint.
-
#name ⇒ String
readonly
The Environment name.
-
#portal_url ⇒ String
readonly
The management portal URL.
-
#publishing_profile_url ⇒ String
readonly
The publish settings file URL.
-
#resource_manager_endpoint_url ⇒ String
readonly
The resource management endpoint.
-
#sql_management_endpoint_url ⇒ String
readonly
The sql server management endpoint for mobile commands.
-
#sql_server_hostname_suffix ⇒ String
readonly
The dns suffix for sql servers.
-
#storage_endpoint_suffix ⇒ String
readonly
The endpoint suffix for storage accounts.
-
#validate_authority ⇒ Boolean
readonly
Determines whether the authentication endpoint should be validated with Azure AD.
Instance Method Summary collapse
-
#initialize(options) ⇒ AzureEnvironment
constructor
A new instance of AzureEnvironment.
Constructor Details
#initialize(options) ⇒ AzureEnvironment
Returns a new instance of AzureEnvironment.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 63 def initialize() required_properties = [:name, :portal_url, :management_endpoint_url, :resource_manager_endpoint_url, :active_directory_endpoint_url, :active_directory_resource_id] required_supplied_properties = required_properties & .keys if required_supplied_properties.nil? || required_supplied_properties.empty? || (required_supplied_properties & required_properties) != required_properties raise ArgumentError.new("#{required_properties.to_s} are the required properties but provided properties are #{.to_s}") end required_supplied_properties.each do |prop| if [prop].nil? || ![prop].is_a?(String) || [prop].empty? raise ArgumentError.new("Value of the '#{prop}' property must be of type String and non empty.") end end # Setting default to true @validate_authority = true .each do |k, v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#active_directory_endpoint_url ⇒ String (readonly)
Returns the Active Directory login endpoint.
37 38 39 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 37 def active_directory_endpoint_url @active_directory_endpoint_url end |
#active_directory_graph_api_version ⇒ String (readonly)
Returns the Active Directory resource ID.
46 47 48 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 46 def active_directory_graph_api_version @active_directory_graph_api_version end |
#active_directory_graph_resource_id ⇒ String (readonly)
Returns the Active Directory resource ID.
43 44 45 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 43 def active_directory_graph_resource_id @active_directory_graph_resource_id end |
#active_directory_resource_id ⇒ String (readonly)
Returns the resource ID to obtain AD tokens for.
40 41 42 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 40 def active_directory_resource_id @active_directory_resource_id end |
#datalake_analytics_catalog_and_job_endpoint_suffix ⇒ String (readonly)
Returns the data lake analytics job and catalog service dns suffix.
58 59 60 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 58 def datalake_analytics_catalog_and_job_endpoint_suffix @datalake_analytics_catalog_and_job_endpoint_suffix end |
#datalake_store_filesystem_endpoint_suffix ⇒ String (readonly)
Returns the data lake store filesystem service dns suffix.
55 56 57 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 55 def datalake_store_filesystem_endpoint_suffix @datalake_store_filesystem_endpoint_suffix end |
#gallery_endpoint_url ⇒ String (readonly)
Returns the template gallery endpoint.
34 35 36 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 34 def gallery_endpoint_url @gallery_endpoint_url end |
#key_vault_dns_suffix ⇒ String (readonly)
Returns the KeyVault service dns suffix.
52 53 54 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 52 def key_vault_dns_suffix @key_vault_dns_suffix end |
#management_endpoint_url ⇒ String (readonly)
Returns the management service endpoint.
22 23 24 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 22 def management_endpoint_url @management_endpoint_url end |
#name ⇒ String (readonly)
Returns the Environment name.
13 14 15 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 13 def name @name end |
#portal_url ⇒ String (readonly)
Returns the management portal URL.
16 17 18 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 16 def portal_url @portal_url end |
#publishing_profile_url ⇒ String (readonly)
Returns the publish settings file URL.
19 20 21 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 19 def publishing_profile_url @publishing_profile_url end |
#resource_manager_endpoint_url ⇒ String (readonly)
Returns the resource management endpoint.
25 26 27 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 25 def resource_manager_endpoint_url @resource_manager_endpoint_url end |
#sql_management_endpoint_url ⇒ String (readonly)
Returns the sql server management endpoint for mobile commands.
28 29 30 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 28 def sql_management_endpoint_url @sql_management_endpoint_url end |
#sql_server_hostname_suffix ⇒ String (readonly)
Returns the dns suffix for sql servers.
31 32 33 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 31 def sql_server_hostname_suffix @sql_server_hostname_suffix end |
#storage_endpoint_suffix ⇒ String (readonly)
Returns the endpoint suffix for storage accounts.
49 50 51 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 49 def storage_endpoint_suffix @storage_endpoint_suffix end |
#validate_authority ⇒ Boolean (readonly)
Returns determines whether the authentication endpoint should be validated with Azure AD. Default value is true.
61 62 63 |
# File 'lib/ms_rest_azure/azure_environment.rb', line 61 def @validate_authority end |