Class: OCI::DataSafe::Models::CreateAuditProfileDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::CreateAuditProfileDetails
- Defined in:
- lib/oci/data_safe/models/create_audit_profile_details.rb
Overview
The details used to create a new audit profile.
Constant Summary collapse
- TARGET_TYPE_ENUM =
[ TARGET_TYPE_TARGET_DATABASE = 'TARGET_DATABASE'.freeze, TARGET_TYPE_TARGET_DATABASE_GROUP = 'TARGET_DATABASE_GROUP'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the audit profile.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
The description of the audit profile.
-
#display_name ⇒ String
The display name of the audit profile.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#is_override_global_paid_usage ⇒ BOOLEAN
Indicates whether audit paid usage settings specified at the target database level override both the global and the target database group level paid usage settings.
-
#is_paid_usage_enabled ⇒ BOOLEAN
Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges.
-
#offline_months ⇒ Integer
Number of months the audit records will be stored offline in the offline archive.
-
#online_months ⇒ Integer
Number of months the audit records will be stored online in the audit repository for immediate reporting and analysis.
-
#target_id ⇒ String
[Required] The OCID of the target database or target database group for which the audit profile is created.
-
#target_type ⇒ String
[Required] The resource type that is represented by the audit profile.
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 = {}) ⇒ CreateAuditProfileDetails
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 = {}) ⇒ CreateAuditProfileDetails
Initializes the object
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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 131 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.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.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.target_id = attributes[:'targetId'] if attributes[:'targetId'] raise 'You cannot provide both :targetId and :target_id' if attributes.key?(:'targetId') && attributes.key?(:'target_id') self.target_id = attributes[:'target_id'] if attributes[:'target_id'] self.description = attributes[:'description'] if attributes[:'description'] self.target_type = attributes[:'targetType'] if attributes[:'targetType'] raise 'You cannot provide both :targetType and :target_type' if attributes.key?(:'targetType') && attributes.key?(:'target_type') self.target_type = attributes[:'target_type'] if attributes[:'target_type'] self.is_paid_usage_enabled = attributes[:'isPaidUsageEnabled'] unless attributes[:'isPaidUsageEnabled'].nil? raise 'You cannot provide both :isPaidUsageEnabled and :is_paid_usage_enabled' if attributes.key?(:'isPaidUsageEnabled') && attributes.key?(:'is_paid_usage_enabled') self.is_paid_usage_enabled = attributes[:'is_paid_usage_enabled'] unless attributes[:'is_paid_usage_enabled'].nil? self.online_months = attributes[:'onlineMonths'] if attributes[:'onlineMonths'] raise 'You cannot provide both :onlineMonths and :online_months' if attributes.key?(:'onlineMonths') && attributes.key?(:'online_months') self.online_months = attributes[:'online_months'] if attributes[:'online_months'] self.offline_months = attributes[:'offlineMonths'] if attributes[:'offlineMonths'] raise 'You cannot provide both :offlineMonths and :offline_months' if attributes.key?(:'offlineMonths') && attributes.key?(:'offline_months') self.offline_months = attributes[:'offline_months'] if attributes[:'offline_months'] self.is_override_global_paid_usage = attributes[:'isOverrideGlobalPaidUsage'] unless attributes[:'isOverrideGlobalPaidUsage'].nil? raise 'You cannot provide both :isOverrideGlobalPaidUsage and :is_override_global_paid_usage' if attributes.key?(:'isOverrideGlobalPaidUsage') && attributes.key?(:'is_override_global_paid_usage') self.is_override_global_paid_usage = attributes[:'is_override_global_paid_usage'] unless attributes[:'is_override_global_paid_usage'].nil? self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the audit profile.
22 23 24 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 22 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {\"Operations\": {\"CostCenter\": \"42\"}}
74 75 76 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 74 def @defined_tags end |
#description ⇒ String
The description of the audit profile.
30 31 32 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 30 def description @description end |
#display_name ⇒ String
The display name of the audit profile. The name does not have to be unique, and it's updatable.
18 19 20 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 18 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags
Example: {\"Department\": \"Finance\"}
68 69 70 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 68 def @freeform_tags end |
#is_override_global_paid_usage ⇒ BOOLEAN
Indicates whether audit paid usage settings specified at the target database level override both the global and the target database group level paid usage settings. Enabling paid usage continues the collection of audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. For more information, see Data Safe Price List.
61 62 63 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 61 def is_override_global_paid_usage @is_override_global_paid_usage end |
#is_paid_usage_enabled ⇒ BOOLEAN
Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
41 42 43 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 41 def is_paid_usage_enabled @is_paid_usage_enabled end |
#offline_months ⇒ Integer
Number of months the audit records will be stored offline in the offline archive. Minimum: 0; Maximum: 72 months. If you have a requirement to store the audit data even longer in the offline archive, please contact the Oracle Support.
54 55 56 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 54 def offline_months @offline_months end |
#online_months ⇒ Integer
Number of months the audit records will be stored online in the audit repository for immediate reporting and analysis. Minimum: 1; Maximum: 12 months
47 48 49 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 47 def online_months @online_months end |
#target_id ⇒ String
[Required] The OCID of the target database or target database group for which the audit profile is created.
26 27 28 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 26 def target_id @target_id end |
#target_type ⇒ String
[Required] The resource type that is represented by the audit profile.
34 35 36 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 34 def target_type @target_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'target_id': :'targetId', 'description': :'description', 'target_type': :'targetType', 'is_paid_usage_enabled': :'isPaidUsageEnabled', 'online_months': :'onlineMonths', 'offline_months': :'offlineMonths', 'is_override_global_paid_usage': :'isOverrideGlobalPaidUsage', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 96 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'compartment_id': :'String', 'target_id': :'String', 'description': :'String', 'target_type': :'String', 'is_paid_usage_enabled': :'BOOLEAN', 'online_months': :'Integer', 'offline_months': :'Integer', 'is_override_global_paid_usage': :'BOOLEAN', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 215 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && compartment_id == other.compartment_id && target_id == other.target_id && description == other.description && target_type == other.target_type && is_paid_usage_enabled == other.is_paid_usage_enabled && online_months == other.online_months && offline_months == other.offline_months && is_override_global_paid_usage == other.is_override_global_paid_usage && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 255 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
235 236 237 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 235 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
244 245 246 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 244 def hash [display_name, compartment_id, target_id, description, target_type, is_paid_usage_enabled, online_months, offline_months, is_override_global_paid_usage, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
288 289 290 291 292 293 294 295 296 297 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 288 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
282 283 284 |
# File 'lib/oci/data_safe/models/create_audit_profile_details.rb', line 282 def to_s to_hash.to_s end |