Class: OCI::ManagementAgent::Models::UpdatePrometheusEmitterDataSourceDetails
- Inherits:
-
UpdateDataSourceDetails
- Object
- UpdateDataSourceDetails
- OCI::ManagementAgent::Models::UpdatePrometheusEmitterDataSourceDetails
- Defined in:
- lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb
Overview
A Prometheus data source.
Constant Summary
Constants inherited from UpdateDataSourceDetails
OCI::ManagementAgent::Models::UpdateDataSourceDetails::TYPE_ENUM
Instance Attribute Summary collapse
-
#allow_metrics ⇒ String
Comma separated metric name list.
-
#connection_timeout ⇒ Integer
Number in milliseconds.
-
#metric_dimensions ⇒ Array<OCI::ManagementAgent::Models::MetricDimension>
The names of other user-supplied properties expressed as fixed values to be used as dimensions for every uploaded datapoint.
-
#proxy_url ⇒ String
The url of the network proxy that provides access to the Prometheus Exporter's endpoint (url required property).
-
#read_data_limit_in_kilobytes ⇒ Integer
Number in kilobytes.
-
#read_timeout ⇒ Integer
Number in milliseconds.
-
#resource_group ⇒ String
OCI monitoring resource group to assign the metric to.
-
#schedule_mins ⇒ Integer
Number in minutes.
-
#url ⇒ String
[Required] The url through which the Prometheus Exporter publishes its metrics.
Attributes inherited from UpdateDataSourceDetails
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdatePrometheusEmitterDataSourceDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from UpdateDataSourceDetails
Constructor Details
#initialize(attributes = {}) ⇒ UpdatePrometheusEmitterDataSourceDetails
Initializes the object
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 100 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'PROMETHEUS_EMITTER' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.url = attributes[:'url'] if attributes[:'url'] self.allow_metrics = attributes[:'allowMetrics'] if attributes[:'allowMetrics'] self.allow_metrics = "*" if allow_metrics.nil? && !attributes.key?(:'allowMetrics') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :allowMetrics and :allow_metrics' if attributes.key?(:'allowMetrics') && attributes.key?(:'allow_metrics') self.allow_metrics = attributes[:'allow_metrics'] if attributes[:'allow_metrics'] self.allow_metrics = "*" if allow_metrics.nil? && !attributes.key?(:'allowMetrics') && !attributes.key?(:'allow_metrics') # rubocop:disable Style/StringLiterals self.proxy_url = attributes[:'proxyUrl'] if attributes[:'proxyUrl'] raise 'You cannot provide both :proxyUrl and :proxy_url' if attributes.key?(:'proxyUrl') && attributes.key?(:'proxy_url') self.proxy_url = attributes[:'proxy_url'] if attributes[:'proxy_url'] self.connection_timeout = attributes[:'connectionTimeout'] if attributes[:'connectionTimeout'] raise 'You cannot provide both :connectionTimeout and :connection_timeout' if attributes.key?(:'connectionTimeout') && attributes.key?(:'connection_timeout') self.connection_timeout = attributes[:'connection_timeout'] if attributes[:'connection_timeout'] self.read_timeout = attributes[:'readTimeout'] if attributes[:'readTimeout'] raise 'You cannot provide both :readTimeout and :read_timeout' if attributes.key?(:'readTimeout') && attributes.key?(:'read_timeout') self.read_timeout = attributes[:'read_timeout'] if attributes[:'read_timeout'] self.read_data_limit_in_kilobytes = attributes[:'readDataLimitInKilobytes'] if attributes[:'readDataLimitInKilobytes'] raise 'You cannot provide both :readDataLimitInKilobytes and :read_data_limit_in_kilobytes' if attributes.key?(:'readDataLimitInKilobytes') && attributes.key?(:'read_data_limit_in_kilobytes') self.read_data_limit_in_kilobytes = attributes[:'read_data_limit_in_kilobytes'] if attributes[:'read_data_limit_in_kilobytes'] self.schedule_mins = attributes[:'scheduleMins'] if attributes[:'scheduleMins'] raise 'You cannot provide both :scheduleMins and :schedule_mins' if attributes.key?(:'scheduleMins') && attributes.key?(:'schedule_mins') self.schedule_mins = attributes[:'schedule_mins'] if attributes[:'schedule_mins'] self.resource_group = attributes[:'resourceGroup'] if attributes[:'resourceGroup'] raise 'You cannot provide both :resourceGroup and :resource_group' if attributes.key?(:'resourceGroup') && attributes.key?(:'resource_group') self.resource_group = attributes[:'resource_group'] if attributes[:'resource_group'] self.metric_dimensions = attributes[:'metricDimensions'] if attributes[:'metricDimensions'] raise 'You cannot provide both :metricDimensions and :metric_dimensions' if attributes.key?(:'metricDimensions') && attributes.key?(:'metric_dimensions') self.metric_dimensions = attributes[:'metric_dimensions'] if attributes[:'metric_dimensions'] end |
Instance Attribute Details
#allow_metrics ⇒ String
Comma separated metric name list. The complete set of desired scraped metrics. Use this property to limit the set of metrics uploaded if required.
19 20 21 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 19 def allow_metrics @allow_metrics end |
#connection_timeout ⇒ Integer
Number in milliseconds. The timeout for connecting to the Prometheus Exporter's endpoint.
27 28 29 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 27 def connection_timeout @connection_timeout end |
#metric_dimensions ⇒ Array<OCI::ManagementAgent::Models::MetricDimension>
The names of other user-supplied properties expressed as fixed values to be used as dimensions for every uploaded datapoint.
47 48 49 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 47 def metric_dimensions @metric_dimensions end |
#proxy_url ⇒ String
The url of the network proxy that provides access to the Prometheus Exporter's endpoint (url required property).
23 24 25 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 23 def proxy_url @proxy_url end |
#read_data_limit_in_kilobytes ⇒ Integer
Number in kilobytes. The limit on the data being sent, not to exceed the agent's fixed limit of 400 (KB).
35 36 37 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 35 def read_data_limit_in_kilobytes @read_data_limit_in_kilobytes end |
#read_timeout ⇒ Integer
Number in milliseconds. The timeout for reading the response from the Prometheus Exporter's endpoint.
31 32 33 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 31 def read_timeout @read_timeout end |
#resource_group ⇒ String
OCI monitoring resource group to assign the metric to.
43 44 45 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 43 def resource_group @resource_group end |
#schedule_mins ⇒ Integer
Number in minutes. The scraping occurs at the specified interval.
39 40 41 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 39 def schedule_mins @schedule_mins end |
#url ⇒ String
[Required] The url through which the Prometheus Exporter publishes its metrics. (http only)
15 16 17 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 15 def url @url end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 50 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'url': :'url', 'allow_metrics': :'allowMetrics', 'proxy_url': :'proxyUrl', 'connection_timeout': :'connectionTimeout', 'read_timeout': :'readTimeout', 'read_data_limit_in_kilobytes': :'readDataLimitInKilobytes', 'schedule_mins': :'scheduleMins', 'resource_group': :'resourceGroup', 'metric_dimensions': :'metricDimensions' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 68 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'url': :'String', 'allow_metrics': :'String', 'proxy_url': :'String', 'connection_timeout': :'Integer', 'read_timeout': :'Integer', 'read_data_limit_in_kilobytes': :'Integer', 'schedule_mins': :'Integer', 'resource_group': :'String', 'metric_dimensions': :'Array<OCI::ManagementAgent::Models::MetricDimension>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 170 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && url == other.url && allow_metrics == other.allow_metrics && proxy_url == other.proxy_url && connection_timeout == other.connection_timeout && read_timeout == other.read_timeout && read_data_limit_in_kilobytes == other.read_data_limit_in_kilobytes && schedule_mins == other.schedule_mins && resource_group == other.resource_group && metric_dimensions == other.metric_dimensions end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 209 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
189 190 191 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 189 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
198 199 200 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 198 def hash [type, url, allow_metrics, proxy_url, connection_timeout, read_timeout, read_data_limit_in_kilobytes, schedule_mins, resource_group, metric_dimensions].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 242 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
236 237 238 |
# File 'lib/oci/management_agent/models/update_prometheus_emitter_data_source_details.rb', line 236 def to_s to_hash.to_s end |