class MsRestAzure::AzureEnvironments::AzureEnvironment

An instance of this class describes an environment in Azure

Attributes

active_directory_endpoint_url[R]

@return [String] the Active Directory login endpoint

active_directory_graph_api_version[R]

@return [String] the Active Directory resource ID

active_directory_graph_resource_id[R]

@return [String] the Active Directory resource ID

active_directory_resource_id[R]

@return [String] the resource ID to obtain AD tokens for

datalake_analytics_catalog_and_job_endpoint_suffix[R]

@return [String] the data lake analytics job and catalog service dns suffix

datalake_store_filesystem_endpoint_suffix[R]

@return [String] the data lake store filesystem service dns suffix

key_vault_dns_suffix[R]

@return [String] the KeyVault service dns suffix

management_endpoint_url[R]

@return [String] the management service endpoint

name[R]

@return [String] the Environment name

portal_url[R]

@return [String] the management portal URL

publishing_profile_url[R]

@return [String] the publish settings file URL

resource_manager_endpoint_url[R]

@return [String] the resource management endpoint

sql_management_endpoint_url[R]

@return [String] the sql server management endpoint for mobile commands

sql_server_hostname_suffix[R]

@return [String] the dns suffix for sql servers

storage_endpoint_suffix[R]

@return [String] the endpoint suffix for storage accounts

validate_authority[R]

@return [Boolean] determines whether the authentication endpoint should be validated with Azure AD. Default value is true.

Public Class Methods

new(options) click to toggle source
# File lib/ms_rest_azure/azure_environment.rb, line 63
def initialize(options)
  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 & options.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 #{options.to_s}")
  end

  required_supplied_properties.each do |prop|
    if options[prop].nil? || !options[prop].is_a?(String) || options[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

  options.each do |k, v|
    instance_variable_set("@#{k}", v) unless v.nil?
  end
end