Class: AWSCDK::Kinesis::CfnStreamConsumerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kinesis/cfn_stream_consumer_props.rb

Overview

Properties for defining a CfnStreamConsumer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(consumer_name:, stream_arn:, tags: nil) ⇒ CfnStreamConsumerProps

Returns a new instance of CfnStreamConsumerProps.

Parameters:

  • consumer_name (String)

    The name of the consumer is something you choose when you register the consumer.

  • stream_arn (String)

    The ARN of the stream with which you registered the consumer.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of tags to be added to a specified Kinesis resource.



12
13
14
15
16
17
18
19
# File 'kinesis/cfn_stream_consumer_props.rb', line 12

def initialize(consumer_name:, stream_arn:, tags: nil)
  @consumer_name = consumer_name
  Jsii::Type.check_type(@consumer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "consumerName")
  @stream_arn = stream_arn
  Jsii::Type.check_type(@stream_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "streamArn")
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#consumer_nameString (readonly)

The name of the consumer is something you choose when you register the consumer.



25
26
27
# File 'kinesis/cfn_stream_consumer_props.rb', line 25

def consumer_name
  @consumer_name
end

#stream_arnString (readonly)

The ARN of the stream with which you registered the consumer.



30
31
32
# File 'kinesis/cfn_stream_consumer_props.rb', line 30

def stream_arn
  @stream_arn
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of tags to be added to a specified Kinesis resource.

A tag consists of a required key and an optional value. You can specify up to 50 tag key-value pairs.



37
38
39
# File 'kinesis/cfn_stream_consumer_props.rb', line 37

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'kinesis/cfn_stream_consumer_props.rb', line 39

def self.jsii_properties
  {
    :consumer_name => "consumerName",
    :stream_arn => "streamArn",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'kinesis/cfn_stream_consumer_props.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "consumerName" => @consumer_name,
    "streamArn" => @stream_arn,
    "tags" => @tags,
  })
  result.compact
end