Class: Azure::Profiles::V2017_03_09::Mgmt::Client

Inherits:
Object
  • Object
show all
Includes:
ARM::Configurable
Defined in:
lib/v2017_03_09/v2017_03_09_profile_client.rb

Overview

Client class for the V2017_03_09 profile SDK.

Instance Attribute Summary collapse

Attributes included from ARM::Configurable

#active_directory_settings, #client_id, #client_secret, #subscription_id, #tenant_id

Instance Method Summary collapse

Methods included from ARM::Configurable

#config, #configure, keys, #reset!

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 27

def initialize(options = {})
  if options.is_a?(Hash) && options.length == 0
    @options = setup_options
  else
    @options = options
  end

  reset!(options)

  @storage = Azure::Profiles::V2017_03_09::Storage::Mgmt::StorageClass.new(self)
  @network = Azure::Profiles::V2017_03_09::Network::Mgmt::NetworkClass.new(self)
  @compute = Azure::Profiles::V2017_03_09::Compute::Mgmt::ComputeClass.new(self)
  @features = Azure::Profiles::V2017_03_09::Features::Mgmt::FeaturesClass.new(self)
  @links = Azure::Profiles::V2017_03_09::Links::Mgmt::LinksClass.new(self)
  @locks = Azure::Profiles::V2017_03_09::Locks::Mgmt::LocksClass.new(self)
  @policy = Azure::Profiles::V2017_03_09::Policy::Mgmt::PolicyClass.new(self)
  @resources = Azure::Profiles::V2017_03_09::Resources::Mgmt::ResourcesClass.new(self)
  @subscriptions = Azure::Profiles::V2017_03_09::Subscriptions::Mgmt::SubscriptionsClass.new(self)
end

Instance Attribute Details

#computeObject (readonly)

Returns the value of attribute compute.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def compute
  @compute
end

#featuresObject (readonly)

Returns the value of attribute features.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def features
  @features
end

Returns the value of attribute links.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def links
  @links
end

#locksObject (readonly)

Returns the value of attribute locks.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def locks
  @locks
end

#networkObject (readonly)

Returns the value of attribute network.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def network
  @network
end

#policyObject (readonly)

Returns the value of attribute policy.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def policy
  @policy
end

#resourcesObject (readonly)

Returns the value of attribute resources.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def resources
  @resources
end

#storageObject (readonly)

Returns the value of attribute storage.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def storage
  @storage
end

#subscriptionsObject (readonly)

Returns the value of attribute subscriptions.



25
26
27
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 25

def subscriptions
  @subscriptions
end

Instance Method Details

#credentialsObject



47
48
49
50
51
52
53
54
55
56
# File 'lib/v2017_03_09/v2017_03_09_profile_client.rb', line 47

def credentials
  if @credentials.nil?
    self.active_directory_settings ||= Azure::ARM::Default.active_directory_settings

    @credentials = MsRest::TokenCredentials.new(
                MsRestAzure::ApplicationTokenProvider.new(
                    self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
  end
  @credentials
end