Class: OCI::Database::Models::CreateDataGuardAssociationWithNewDbSystemDetails
- Inherits:
-
CreateDataGuardAssociationDetails
- Object
- CreateDataGuardAssociationDetails
- OCI::Database::Models::CreateDataGuardAssociationWithNewDbSystemDetails
- Defined in:
- lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb
Overview
The configuration details for creating a Data Guard association for a bare metal DB system or virtual machine DB system database. A new DB system will be launched to create the standby database.
NOTE - You must use this subtype to create a Data Guard association for a database in a virtual machine DB system.
Constant Summary
Constants inherited from CreateDataGuardAssociationDetails
OCI::Database::Models::CreateDataGuardAssociationDetails::PROTECTION_MODE_ENUM, OCI::Database::Models::CreateDataGuardAssociationDetails::TRANSPORT_TYPE_ENUM
Instance Attribute Summary collapse
-
#availability_domain ⇒ String
The name of the availability domain that the standby database DB system will be located in.
-
#backup_network_nsg_ids ⇒ Array<String>
A list of the [OCIDs](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to.
-
#display_name ⇒ String
The user-friendly name of the DB system that will contain the the standby database.
-
#hostname ⇒ String
The hostname for the DB node.
-
#nsg_ids ⇒ Array<String>
A list of the [OCIDs](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this DB system belongs to.
-
#subnet_id ⇒ String
The OCID of the subnet the DB system is associated with.
Attributes inherited from CreateDataGuardAssociationDetails
#creation_type, #database_admin_password, #protection_mode, #transport_type
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 = {}) ⇒ CreateDataGuardAssociationWithNewDbSystemDetails
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 CreateDataGuardAssociationDetails
Constructor Details
#initialize(attributes = {}) ⇒ CreateDataGuardAssociationWithNewDbSystemDetails
Initializes the object
97 98 99 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 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 97 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['creationType'] = 'NewDbSystem' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain'] raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain') self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain'] self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId'] raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id') self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id'] self.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds'] raise 'You cannot provide both :nsgIds and :nsg_ids' if attributes.key?(:'nsgIds') && attributes.key?(:'nsg_ids') self.nsg_ids = attributes[:'nsg_ids'] if attributes[:'nsg_ids'] self.backup_network_nsg_ids = attributes[:'backupNetworkNsgIds'] if attributes[:'backupNetworkNsgIds'] raise 'You cannot provide both :backupNetworkNsgIds and :backup_network_nsg_ids' if attributes.key?(:'backupNetworkNsgIds') && attributes.key?(:'backup_network_nsg_ids') self.backup_network_nsg_ids = attributes[:'backup_network_nsg_ids'] if attributes[:'backup_network_nsg_ids'] self.hostname = attributes[:'hostname'] if attributes[:'hostname'] end |
Instance Attribute Details
#availability_domain ⇒ String
The name of the availability domain that the standby database DB system will be located in. For example- "Uocm:PHX-AD-1".
19 20 21 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 19 def availability_domain @availability_domain end |
#backup_network_nsg_ids ⇒ Array<String>
A list of the [OCIDs](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata DB systems.
40 41 42 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 40 def backup_network_nsg_ids @backup_network_nsg_ids end |
#display_name ⇒ String
The user-friendly name of the DB system that will contain the the standby database. The display name does not have to be unique.
15 16 17 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 15 def display_name @display_name end |
#hostname ⇒ String
The hostname for the DB node.
44 45 46 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 44 def hostname @hostname end |
#nsg_ids ⇒ Array<String>
A list of the [OCIDs](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm).
35 36 37 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 35 def nsg_ids @nsg_ids end |
#subnet_id ⇒ String
The OCID of the subnet the DB system is associated with. **Subnet Restrictions:**
-
For 1- and 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.16.16/28
These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and backup subnet.
30 31 32 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 30 def subnet_id @subnet_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 47 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'database_admin_password': :'databaseAdminPassword', 'protection_mode': :'protectionMode', 'transport_type': :'transportType', 'creation_type': :'creationType', 'display_name': :'displayName', 'availability_domain': :'availabilityDomain', 'subnet_id': :'subnetId', 'nsg_ids': :'nsgIds', 'backup_network_nsg_ids': :'backupNetworkNsgIds', 'hostname': :'hostname' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 65 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'database_admin_password': :'String', 'protection_mode': :'String', 'transport_type': :'String', 'creation_type': :'String', 'display_name': :'String', 'availability_domain': :'String', 'subnet_id': :'String', 'nsg_ids': :'Array<String>', 'backup_network_nsg_ids': :'Array<String>', 'hostname': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 147 def ==(other) return true if equal?(other) self.class == other.class && database_admin_password == other.database_admin_password && protection_mode == other.protection_mode && transport_type == other.transport_type && creation_type == other.creation_type && display_name == other.display_name && availability_domain == other.availability_domain && subnet_id == other.subnet_id && nsg_ids == other.nsg_ids && backup_network_nsg_ids == other.backup_network_nsg_ids && hostname == other.hostname end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 186 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
166 167 168 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 166 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
175 176 177 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 175 def hash [database_admin_password, protection_mode, transport_type, creation_type, display_name, availability_domain, subnet_id, nsg_ids, backup_network_nsg_ids, hostname].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 219 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
213 214 215 |
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 213 def to_s to_hash.to_s end |