Class: OpenStax::Aws::MskCluster

Inherits:
Object
  • Object
show all
Defined in:
lib/openstax/aws/msk_cluster.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster_arn:, region:) ⇒ MskCluster

Returns a new instance of MskCluster.



8
9
10
11
# File 'lib/openstax/aws/msk_cluster.rb', line 8

def initialize(cluster_arn:, region:)
  @cluster_arn = cluster_arn
  @client = ::Aws::Kafka::Client.new(region: region)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



4
5
6
# File 'lib/openstax/aws/msk_cluster.rb', line 4

def client
  @client
end

#cluster_arnObject (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

Instance Method Details

#bootstrap_broker_stringObject



13
14
15
# File 'lib/openstax/aws/msk_cluster.rb', line 13

def bootstrap_broker_string
  client.get_bootstrap_brokers(cluster_arn: cluster_arn).bootstrap_broker_string
end