Class: MsRestAzure::AzureEnvironments::AzureEnvironment

Inherits:
Object
  • Object
show all
Defined in:
lib/ms_rest_azure/azure_environment.rb

Overview

An instance of this class describes an environment in Azure

Instance Attribute Summary collapse

Instance Method Summary collapse

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(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

Instance Attribute Details

#active_directory_endpoint_urlString (readonly)

Returns the Active Directory login endpoint.

Returns:

  • (String)

    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_versionString (readonly)

Returns the Active Directory resource ID.

Returns:

  • (String)

    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_idString (readonly)

Returns the Active Directory resource ID.

Returns:

  • (String)

    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_idString (readonly)

Returns the resource ID to obtain AD tokens for.

Returns:

  • (String)

    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_suffixString (readonly)

Returns the data lake analytics job and catalog service dns suffix.

Returns:

  • (String)

    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_suffixString (readonly)

Returns the data lake store filesystem service dns suffix.

Returns:

  • (String)

    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

Returns the template gallery endpoint.

Returns:

  • (String)

    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_suffixString (readonly)

Returns the KeyVault service dns suffix.

Returns:

  • (String)

    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_urlString (readonly)

Returns the management service endpoint.

Returns:

  • (String)

    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

#nameString (readonly)

Returns the Environment name.

Returns:

  • (String)

    the Environment name



13
14
15
# File 'lib/ms_rest_azure/azure_environment.rb', line 13

def name
  @name
end

#portal_urlString (readonly)

Returns the management portal URL.

Returns:

  • (String)

    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_urlString (readonly)

Returns the publish settings file URL.

Returns:

  • (String)

    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_urlString (readonly)

Returns the resource management endpoint.

Returns:

  • (String)

    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_urlString (readonly)

Returns the sql server management endpoint for mobile commands.

Returns:

  • (String)

    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_suffixString (readonly)

Returns the dns suffix for sql servers.

Returns:

  • (String)

    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_suffixString (readonly)

Returns the endpoint suffix for storage accounts.

Returns:

  • (String)

    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_authorityBoolean (readonly)

Returns determines whether the authentication endpoint should be validated with Azure AD. Default value is true.

Returns:

  • (Boolean)

    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
  @validate_authority
end