Class: Azure::Postgresql::Profiles::Latest::Mgmt::PostgresqlManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/profiles/latest/modules/postgresql_profile_module.rb

Overview

PostgresqlManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PostgresqlManagementClass

Returns a new instance of PostgresqlManagementClass.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 71

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

  reset!(options)

  @configurable = self
  @base_url = options[:base_url].nil? ? nil:options[:base_url]
  @options = options[:options].nil? ? nil:options[:options]

  @client_0 = Azure::Postgresql::Mgmt::V2017_12_01::PostgreSQLManagementClient.new(configurable.credentials, base_url, options)
  if(@client_0.respond_to?(:subscription_id))
    @client_0.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_0)
  @servers = @client_0.servers
  @replicas = @client_0.replicas
  @firewall_rules = @client_0.firewall_rules
  @virtual_network_rules = @client_0.virtual_network_rules
  @databases = @client_0.databases
  @configurations = @client_0.configurations
  @log_files = @client_0.log_files
  @location_based_performance_tier = @client_0.location_based_performance_tier
  @check_name_availability = @client_0.check_name_availability
  @server_security_alert_policies = @client_0.server_security_alert_policies
  @operations = @client_0.operations

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



109
110
111
112
113
114
115
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 109

def method_missing(method, *args)
  if @client_0.respond_to?method
    @client_0.send(method, *args)
  else
    super
  end
end

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def base_url
  @base_url
end

#check_name_availabilityObject (readonly)

Returns the value of attribute check_name_availability.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def check_name_availability
  @check_name_availability
end

#configurableObject (readonly)

Returns the value of attribute configurable.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def configurable
  @configurable
end

#configurationsObject (readonly)

Returns the value of attribute configurations.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def configurations
  @configurations
end

#databasesObject (readonly)

Returns the value of attribute databases.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def databases
  @databases
end

#firewall_rulesObject (readonly)

Returns the value of attribute firewall_rules.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def firewall_rules
  @firewall_rules
end

#location_based_performance_tierObject (readonly)

Returns the value of attribute location_based_performance_tier.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def location_based_performance_tier
  @location_based_performance_tier
end

#log_filesObject (readonly)

Returns the value of attribute log_files.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def log_files
  @log_files
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def options
  @options
end

#replicasObject (readonly)

Returns the value of attribute replicas.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def replicas
  @replicas
end

#server_security_alert_policiesObject (readonly)

Returns the value of attribute server_security_alert_policies.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def server_security_alert_policies
  @server_security_alert_policies
end

#serversObject (readonly)

Returns the value of attribute servers.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def servers
  @servers
end

#virtual_network_rulesObject (readonly)

Returns the value of attribute virtual_network_rules.



69
70
71
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 69

def virtual_network_rules
  @virtual_network_rules
end

Instance Method Details

#add_telemetry(client) ⇒ Object



104
105
106
107
# File 'lib/profiles/latest/modules/postgresql_profile_module.rb', line 104

def add_telemetry(client)
  profile_information = 'Profiles/Latest/Postgresql/Mgmt'
  client.add_user_agent_information(profile_information)
end