Class: OpenStax::Aws::MskCluster
- Inherits:
-
Object
- Object
- OpenStax::Aws::MskCluster
- Defined in:
- lib/openstax/aws/msk_cluster.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#cluster_arn ⇒ Object
readonly
Returns the value of attribute cluster_arn.
Class Method Summary collapse
Instance Method Summary collapse
- #bootstrap_broker_string ⇒ Object
-
#initialize(cluster_arn:, region:) ⇒ MskCluster
constructor
A new instance of MskCluster.
- #sorted_bootstrap_broker_string ⇒ Object
Constructor Details
#initialize(cluster_arn:, region:) ⇒ MskCluster
Returns a new instance of MskCluster.
12 13 14 15 |
# File 'lib/openstax/aws/msk_cluster.rb', line 12 def initialize(cluster_arn:, region:) @cluster_arn = cluster_arn @client = ::Aws::Kafka::Client.new(region: region) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/openstax/aws/msk_cluster.rb', line 4 def client @client end |
#cluster_arn ⇒ Object (readonly)
Returns the value of attribute cluster_arn.
4 5 6 |
# File 'lib/openstax/aws/msk_cluster.rb', line 4 def cluster_arn @cluster_arn end |
Class Method Details
.physical_resource_id_attribute ⇒ Object
8 9 10 |
# File 'lib/openstax/aws/msk_cluster.rb', line 8 def self.physical_resource_id_attribute :cluster_arn end |
Instance Method Details
#bootstrap_broker_string ⇒ Object
17 18 19 |
# File 'lib/openstax/aws/msk_cluster.rb', line 17 def bootstrap_broker_string client.get_bootstrap_brokers(cluster_arn: cluster_arn).bootstrap_broker_string end |
#sorted_bootstrap_broker_string ⇒ Object
21 22 23 |
# File 'lib/openstax/aws/msk_cluster.rb', line 21 def sorted_bootstrap_broker_string bootstrap_broker_string.split(',').sort.join(',') end |