Class: OCI::ManagedKafka::Models::KafkaCluster
- Inherits:
-
Object
- Object
- OCI::ManagedKafka::Models::KafkaCluster
- Defined in:
- lib/oci/managed_kafka/models/kafka_cluster.rb
Overview
A KafkaCluster is a description of a KafkaCluster.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CLUSTER_TYPE_ENUM =
[ CLUSTER_TYPE_DEVELOPMENT = 'DEVELOPMENT'.freeze, CLUSTER_TYPE_PRODUCTION = 'PRODUCTION'.freeze, CLUSTER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- COORDINATION_TYPE_ENUM =
[ COORDINATION_TYPE_ZOOKEEPER = 'ZOOKEEPER'.freeze, COORDINATION_TYPE_KRAFT = 'KRAFT'.freeze, COORDINATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#access_subnets ⇒ Array<OCI::ManagedKafka::Models::SubnetSet>
[Required] Subnets where broker/coordinator VNICs will be created.
-
#broker_shape ⇒ OCI::ManagedKafka::Models::BrokerShape
This attribute is required.
-
#client_certificate_bundle ⇒ String
CA certificate bundle for mTLS broker authentication.
-
#cluster_config_id ⇒ String
[Required] The OCID of Kafka Cluster configuration object.
-
#cluster_config_version ⇒ Integer
[Required] The version of configuration object.
-
#cluster_type ⇒ String
[Required] Type of the cluster to spin up.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment.
-
#coordination_type ⇒ String
Kafka coordination type.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#display_name ⇒ String
[Required] A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the KafkaCluster.
-
#kafka_bootstrap_urls ⇒ Array<OCI::ManagedKafka::Models::BootstrapUrl>
Bootstrap URL that can be used to connect to Kafka.
-
#kafka_version ⇒ String
[Required] Version of Kafka to use to spin up the cluster.
-
#lifecycle_details ⇒ String
A message that describes the current state of the KafkaCluster in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the KafkaCluster.
-
#secret_id ⇒ String
The OCID of the secret that contains superuser password.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] The date and time the KafkaCluster was created, in the format defined by RFC 3339.
-
#time_updated ⇒ DateTime
The date and time the KafkaCluster was updated, in the format defined by RFC 3339.
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 = {}) ⇒ KafkaCluster
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 = {}) ⇒ KafkaCluster
Initializes the object
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 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 223 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.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.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_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] 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.access_subnets = attributes[:'accessSubnets'] if attributes[:'accessSubnets'] raise 'You cannot provide both :accessSubnets and :access_subnets' if attributes.key?(:'accessSubnets') && attributes.key?(:'access_subnets') self.access_subnets = attributes[:'access_subnets'] if attributes[:'access_subnets'] self.client_certificate_bundle = attributes[:'clientCertificateBundle'] if attributes[:'clientCertificateBundle'] raise 'You cannot provide both :clientCertificateBundle and :client_certificate_bundle' if attributes.key?(:'clientCertificateBundle') && attributes.key?(:'client_certificate_bundle') self.client_certificate_bundle = attributes[:'client_certificate_bundle'] if attributes[:'client_certificate_bundle'] self.kafka_version = attributes[:'kafkaVersion'] if attributes[:'kafkaVersion'] raise 'You cannot provide both :kafkaVersion and :kafka_version' if attributes.key?(:'kafkaVersion') && attributes.key?(:'kafka_version') self.kafka_version = attributes[:'kafka_version'] if attributes[:'kafka_version'] self.cluster_type = attributes[:'clusterType'] if attributes[:'clusterType'] raise 'You cannot provide both :clusterType and :cluster_type' if attributes.key?(:'clusterType') && attributes.key?(:'cluster_type') self.cluster_type = attributes[:'cluster_type'] if attributes[:'cluster_type'] self.broker_shape = attributes[:'brokerShape'] if attributes[:'brokerShape'] raise 'You cannot provide both :brokerShape and :broker_shape' if attributes.key?(:'brokerShape') && attributes.key?(:'broker_shape') self.broker_shape = attributes[:'broker_shape'] if attributes[:'broker_shape'] self.cluster_config_id = attributes[:'clusterConfigId'] if attributes[:'clusterConfigId'] raise 'You cannot provide both :clusterConfigId and :cluster_config_id' if attributes.key?(:'clusterConfigId') && attributes.key?(:'cluster_config_id') self.cluster_config_id = attributes[:'cluster_config_id'] if attributes[:'cluster_config_id'] self.cluster_config_version = attributes[:'clusterConfigVersion'] if attributes[:'clusterConfigVersion'] raise 'You cannot provide both :clusterConfigVersion and :cluster_config_version' if attributes.key?(:'clusterConfigVersion') && attributes.key?(:'cluster_config_version') self.cluster_config_version = attributes[:'cluster_config_version'] if attributes[:'cluster_config_version'] self.kafka_bootstrap_urls = attributes[:'kafkaBootstrapUrls'] if attributes[:'kafkaBootstrapUrls'] raise 'You cannot provide both :kafkaBootstrapUrls and :kafka_bootstrap_urls' if attributes.key?(:'kafkaBootstrapUrls') && attributes.key?(:'kafka_bootstrap_urls') self.kafka_bootstrap_urls = attributes[:'kafka_bootstrap_urls'] if attributes[:'kafka_bootstrap_urls'] self.coordination_type = attributes[:'coordinationType'] if attributes[:'coordinationType'] raise 'You cannot provide both :coordinationType and :coordination_type' if attributes.key?(:'coordinationType') && attributes.key?(:'coordination_type') self.coordination_type = attributes[:'coordination_type'] if attributes[:'coordination_type'] self.secret_id = attributes[:'secretId'] if attributes[:'secretId'] raise 'You cannot provide both :secretId and :secret_id' if attributes.key?(:'secretId') && attributes.key?(:'secret_id') self.secret_id = attributes[:'secret_id'] if attributes[:'secret_id'] 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'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#access_subnets ⇒ Array<OCI::ManagedKafka::Models::SubnetSet>
[Required] Subnets where broker/coordinator VNICs will be created.
77 78 79 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 77 def access_subnets @access_subnets end |
#broker_shape ⇒ OCI::ManagedKafka::Models::BrokerShape
This attribute is required.
96 97 98 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 96 def broker_shape @broker_shape end |
#client_certificate_bundle ⇒ String
CA certificate bundle for mTLS broker authentication.
81 82 83 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 81 def client_certificate_bundle @client_certificate_bundle end |
#cluster_config_id ⇒ String
[Required] The OCID of Kafka Cluster configuration object
100 101 102 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 100 def cluster_config_id @cluster_config_id end |
#cluster_config_version ⇒ Integer
[Required] The version of configuration object
104 105 106 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 104 def cluster_config_version @cluster_config_version end |
#cluster_type ⇒ String
[Required] Type of the cluster to spin up. DEVELOPMENT - setting that allows to sacrifice HA and spin up cluster on a single node PRODUCTION - Minimum allowed broker count is 3
92 93 94 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 92 def cluster_type @cluster_type end |
#compartment_id ⇒ String
[Required] The OCID of the compartment.
49 50 51 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 49 def compartment_id @compartment_id end |
#coordination_type ⇒ String
Kafka coordination type. Set of available types depends on Kafka version
112 113 114 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 112 def coordination_type @coordination_type end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
132 133 134 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 132 def @defined_tags end |
#display_name ⇒ String
[Required] A user-friendly name. Does not have to be unique, and it's changeable.
45 46 47 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 45 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
[Required] 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\"}
124 125 126 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 124 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the KafkaCluster.
41 42 43 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 41 def id @id end |
#kafka_bootstrap_urls ⇒ Array<OCI::ManagedKafka::Models::BootstrapUrl>
Bootstrap URL that can be used to connect to Kafka
108 109 110 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 108 def kafka_bootstrap_urls @kafka_bootstrap_urls end |
#kafka_version ⇒ String
[Required] Version of Kafka to use to spin up the cluster
85 86 87 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 85 def kafka_version @kafka_version end |
#lifecycle_details ⇒ String
A message that describes the current state of the KafkaCluster in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
73 74 75 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 73 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the KafkaCluster.
67 68 69 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 67 def lifecycle_state @lifecycle_state end |
#secret_id ⇒ String
The OCID of the secret that contains superuser password.
116 117 118 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 116 def secret_id @secret_id end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
139 140 141 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 139 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time the KafkaCluster was created, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
56 57 58 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 56 def time_created @time_created end |
#time_updated ⇒ DateTime
The date and time the KafkaCluster was updated, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
63 64 65 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 63 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 142 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'access_subnets': :'accessSubnets', 'client_certificate_bundle': :'clientCertificateBundle', 'kafka_version': :'kafkaVersion', 'cluster_type': :'clusterType', 'broker_shape': :'brokerShape', 'cluster_config_id': :'clusterConfigId', 'cluster_config_version': :'clusterConfigVersion', 'kafka_bootstrap_urls': :'kafkaBootstrapUrls', 'coordination_type': :'coordinationType', 'secret_id': :'secretId', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 170 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'compartment_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'access_subnets': :'Array<OCI::ManagedKafka::Models::SubnetSet>', 'client_certificate_bundle': :'String', 'kafka_version': :'String', 'cluster_type': :'String', 'broker_shape': :'OCI::ManagedKafka::Models::BrokerShape', 'cluster_config_id': :'String', 'cluster_config_version': :'Integer', 'kafka_bootstrap_urls': :'Array<OCI::ManagedKafka::Models::BootstrapUrl>', 'coordination_type': :'String', 'secret_id': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 392 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && compartment_id == other.compartment_id && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && access_subnets == other.access_subnets && client_certificate_bundle == other.client_certificate_bundle && kafka_version == other.kafka_version && cluster_type == other.cluster_type && broker_shape == other.broker_shape && cluster_config_id == other.cluster_config_id && cluster_config_version == other.cluster_config_version && kafka_bootstrap_urls == other.kafka_bootstrap_urls && coordination_type == other.coordination_type && secret_id == other.secret_id && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 441 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
421 422 423 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 421 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
430 431 432 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 430 def hash [id, display_name, compartment_id, time_created, time_updated, lifecycle_state, lifecycle_details, access_subnets, client_certificate_bundle, kafka_version, cluster_type, broker_shape, cluster_config_id, cluster_config_version, kafka_bootstrap_urls, coordination_type, secret_id, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
474 475 476 477 478 479 480 481 482 483 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 474 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
468 469 470 |
# File 'lib/oci/managed_kafka/models/kafka_cluster.rb', line 468 def to_s to_hash.to_s end |