Class: OCI::Database::Models::AutonomousDatabaseDataguardAssociation
- Inherits:
-
Object
- Object
- OCI::Database::Models::AutonomousDatabaseDataguardAssociation
- Defined in:
- lib/oci/database/models/autonomous_database_dataguard_association.rb
Overview
The properties that define dataguard association between two different Autonomous Databases. Note that Autonomous Databases inherit DataGuard association from parent Autonomous Container Database. No actions can be taken on AutonomousDatabaseDataguardAssociation, usage is strictly informational.
Constant Summary collapse
- ROLE_ENUM =
[ ROLE_PRIMARY = 'PRIMARY'.freeze, ROLE_STANDBY = 'STANDBY'.freeze, ROLE_DISABLED_STANDBY = 'DISABLED_STANDBY'.freeze, ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze, LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze, LIFECYCLE_STATE_ROLE_CHANGE_IN_PROGRESS = 'ROLE_CHANGE_IN_PROGRESS'.freeze, LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze, LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PEER_ROLE_ENUM =
[ PEER_ROLE_PRIMARY = 'PRIMARY'.freeze, PEER_ROLE_STANDBY = 'STANDBY'.freeze, PEER_ROLE_DISABLED_STANDBY = 'DISABLED_STANDBY'.freeze, PEER_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_ENUM =
[ PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze, PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze, PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_ROLE_CHANGE_IN_PROGRESS = 'ROLE_CHANGE_IN_PROGRESS'.freeze, PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_TERMINATING = 'TERMINATING'.freeze, PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_TERMINATED = 'TERMINATED'.freeze, PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_FAILED = 'FAILED'.freeze, PEER_AUTONOMOUS_DATABASE_LIFE_CYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PROTECTION_MODE_ENUM =
[ PROTECTION_MODE_MAXIMUM_AVAILABILITY = 'MAXIMUM_AVAILABILITY'.freeze, PROTECTION_MODE_MAXIMUM_PERFORMANCE = 'MAXIMUM_PERFORMANCE'.freeze, PROTECTION_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#apply_lag ⇒ String
The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database.
-
#apply_rate ⇒ String
The rate at which redo logs are synced between the associated databases.
-
#autonomous_database_id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database that has a relationship with the peer Autonomous Database.
-
#id ⇒ String
[Required] The OCID of the Autonomous Dataguard created for Autonomous Container Database where given Autonomous Database resides in.
-
#lifecycle_details ⇒ String
Additional information about the current lifecycleState, if available.
-
#lifecycle_state ⇒ String
[Required] The current state of Autonomous Data Guard.
-
#peer_autonomous_database_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the peer Autonomous Database.
-
#peer_autonomous_database_life_cycle_state ⇒ String
The current state of Autonomous Data Guard.
-
#peer_role ⇒ String
[Required] The role of the Autonomous Data Guard-enabled Autonomous Container Database.
-
#protection_mode ⇒ String
The protection mode of this Data Guard association.
-
#role ⇒ String
[Required] The role of the Autonomous Data Guard-enabled Autonomous Container Database.
-
#time_created ⇒ DateTime
The date and time the Data Guard association was created.
-
#time_last_role_changed ⇒ DateTime
The date and time when the last role change action happened.
-
#time_last_synced ⇒ DateTime
The date and time of the last update to the apply lag, apply rate, and transport lag values.
-
#transport_lag ⇒ String
The approximate number of seconds of redo data not yet available on the standby Autonomous Container Database, as computed by the reporting database.
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 = {}) ⇒ AutonomousDatabaseDataguardAssociation
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.
Constructor Details
#initialize(attributes = {}) ⇒ AutonomousDatabaseDataguardAssociation
Initializes the object
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 198 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.autonomous_database_id = attributes[:'autonomousDatabaseId'] if attributes[:'autonomousDatabaseId'] raise 'You cannot provide both :autonomousDatabaseId and :autonomous_database_id' if attributes.key?(:'autonomousDatabaseId') && attributes.key?(:'autonomous_database_id') self.autonomous_database_id = attributes[:'autonomous_database_id'] if attributes[:'autonomous_database_id'] self.role = attributes[:'role'] if attributes[:'role'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.peer_role = attributes[:'peerRole'] if attributes[:'peerRole'] raise 'You cannot provide both :peerRole and :peer_role' if attributes.key?(:'peerRole') && attributes.key?(:'peer_role') self.peer_role = attributes[:'peer_role'] if attributes[:'peer_role'] self.peer_autonomous_database_id = attributes[:'peerAutonomousDatabaseId'] if attributes[:'peerAutonomousDatabaseId'] raise 'You cannot provide both :peerAutonomousDatabaseId and :peer_autonomous_database_id' if attributes.key?(:'peerAutonomousDatabaseId') && attributes.key?(:'peer_autonomous_database_id') self.peer_autonomous_database_id = attributes[:'peer_autonomous_database_id'] if attributes[:'peer_autonomous_database_id'] self.peer_autonomous_database_life_cycle_state = attributes[:'peerAutonomousDatabaseLifeCycleState'] if attributes[:'peerAutonomousDatabaseLifeCycleState'] raise 'You cannot provide both :peerAutonomousDatabaseLifeCycleState and :peer_autonomous_database_life_cycle_state' if attributes.key?(:'peerAutonomousDatabaseLifeCycleState') && attributes.key?(:'peer_autonomous_database_life_cycle_state') self.peer_autonomous_database_life_cycle_state = attributes[:'peer_autonomous_database_life_cycle_state'] if attributes[:'peer_autonomous_database_life_cycle_state'] self.protection_mode = attributes[:'protectionMode'] if attributes[:'protectionMode'] raise 'You cannot provide both :protectionMode and :protection_mode' if attributes.key?(:'protectionMode') && attributes.key?(:'protection_mode') self.protection_mode = attributes[:'protection_mode'] if attributes[:'protection_mode'] self.apply_lag = attributes[:'applyLag'] if attributes[:'applyLag'] raise 'You cannot provide both :applyLag and :apply_lag' if attributes.key?(:'applyLag') && attributes.key?(:'apply_lag') self.apply_lag = attributes[:'apply_lag'] if attributes[:'apply_lag'] self.apply_rate = attributes[:'applyRate'] if attributes[:'applyRate'] raise 'You cannot provide both :applyRate and :apply_rate' if attributes.key?(:'applyRate') && attributes.key?(:'apply_rate') self.apply_rate = attributes[:'apply_rate'] if attributes[:'apply_rate'] self.transport_lag = attributes[:'transportLag'] if attributes[:'transportLag'] raise 'You cannot provide both :transportLag and :transport_lag' if attributes.key?(:'transportLag') && attributes.key?(:'transport_lag') self.transport_lag = attributes[:'transport_lag'] if attributes[:'transport_lag'] self.time_last_synced = attributes[:'timeLastSynced'] if attributes[:'timeLastSynced'] raise 'You cannot provide both :timeLastSynced and :time_last_synced' if attributes.key?(:'timeLastSynced') && attributes.key?(:'time_last_synced') self.time_last_synced = attributes[:'time_last_synced'] if attributes[:'time_last_synced'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_last_role_changed = attributes[:'timeLastRoleChanged'] if attributes[:'timeLastRoleChanged'] raise 'You cannot provide both :timeLastRoleChanged and :time_last_role_changed' if attributes.key?(:'timeLastRoleChanged') && attributes.key?(:'time_last_role_changed') self.time_last_role_changed = attributes[:'time_last_role_changed'] if attributes[:'time_last_role_changed'] end |
Instance Attribute Details
#apply_lag ⇒ String
The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database.
Example: ‘9 seconds`
102 103 104 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 102 def apply_lag @apply_lag end |
#apply_rate ⇒ String
The rate at which redo logs are synced between the associated databases.
Example: ‘180 Mb per second`
109 110 111 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 109 def apply_rate @apply_rate end |
#autonomous_database_id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database that has a relationship with the peer Autonomous Database.
61 62 63 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 61 def autonomous_database_id @autonomous_database_id end |
#id ⇒ String
[Required] The OCID of the Autonomous Dataguard created for Autonomous Container Database where given Autonomous Database resides in.
56 57 58 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 56 def id @id end |
#lifecycle_details ⇒ String
Additional information about the current lifecycleState, if available.
74 75 76 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 74 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of Autonomous Data Guard.
69 70 71 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 69 def lifecycle_state @lifecycle_state end |
#peer_autonomous_database_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the peer Autonomous Database.
83 84 85 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 83 def peer_autonomous_database_id @peer_autonomous_database_id end |
#peer_autonomous_database_life_cycle_state ⇒ String
The current state of Autonomous Data Guard.
87 88 89 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 87 def peer_autonomous_database_life_cycle_state @peer_autonomous_database_life_cycle_state end |
#peer_role ⇒ String
[Required] The role of the Autonomous Data Guard-enabled Autonomous Container Database.
78 79 80 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 78 def peer_role @peer_role end |
#protection_mode ⇒ String
The protection mode of this Data Guard association. For more information, see [Oracle Data Guard Protection Modes](docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) in the Oracle Data Guard documentation.
94 95 96 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 94 def protection_mode @protection_mode end |
#role ⇒ String
[Required] The role of the Autonomous Data Guard-enabled Autonomous Container Database.
65 66 67 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 65 def role @role end |
#time_created ⇒ DateTime
The date and time the Data Guard association was created.
125 126 127 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 125 def time_created @time_created end |
#time_last_role_changed ⇒ DateTime
The date and time when the last role change action happened.
129 130 131 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 129 def time_last_role_changed @time_last_role_changed end |
#time_last_synced ⇒ DateTime
The date and time of the last update to the apply lag, apply rate, and transport lag values.
121 122 123 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 121 def time_last_synced @time_last_synced end |
#transport_lag ⇒ String
The approximate number of seconds of redo data not yet available on the standby Autonomous Container Database, as computed by the reporting database.
Example: ‘7 seconds`
117 118 119 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 117 def transport_lag @transport_lag end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 132 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'autonomous_database_id': :'autonomousDatabaseId', 'role': :'role', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'peer_role': :'peerRole', 'peer_autonomous_database_id': :'peerAutonomousDatabaseId', 'peer_autonomous_database_life_cycle_state': :'peerAutonomousDatabaseLifeCycleState', 'protection_mode': :'protectionMode', 'apply_lag': :'applyLag', 'apply_rate': :'applyRate', 'transport_lag': :'transportLag', 'time_last_synced': :'timeLastSynced', 'time_created': :'timeCreated', 'time_last_role_changed': :'timeLastRoleChanged' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 155 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'autonomous_database_id': :'String', 'role': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'peer_role': :'String', 'peer_autonomous_database_id': :'String', 'peer_autonomous_database_life_cycle_state': :'String', 'protection_mode': :'String', 'apply_lag': :'String', 'apply_rate': :'String', 'transport_lag': :'String', 'time_last_synced': :'DateTime', 'time_created': :'DateTime', 'time_last_role_changed': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 359 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && autonomous_database_id == other.autonomous_database_id && role == other.role && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && peer_role == other.peer_role && peer_autonomous_database_id == other.peer_autonomous_database_id && peer_autonomous_database_life_cycle_state == other.peer_autonomous_database_life_cycle_state && protection_mode == other.protection_mode && apply_lag == other.apply_lag && apply_rate == other.apply_rate && transport_lag == other.transport_lag && time_last_synced == other.time_last_synced && time_created == other.time_created && time_last_role_changed == other.time_last_role_changed end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 403 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
383 384 385 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 383 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
392 393 394 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 392 def hash [id, autonomous_database_id, role, lifecycle_state, lifecycle_details, peer_role, peer_autonomous_database_id, peer_autonomous_database_life_cycle_state, protection_mode, apply_lag, apply_rate, transport_lag, time_last_synced, time_created, time_last_role_changed].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
436 437 438 439 440 441 442 443 444 445 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 436 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
430 431 432 |
# File 'lib/oci/database/models/autonomous_database_dataguard_association.rb', line 430 def to_s to_hash.to_s end |