Class: AWSCDK::Pipes::CfnPipe::PipeSourceManagedStreamingKafkaParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pipes/cfn_pipe.rb

Overview

The parameters for using an MSK stream as a source.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic_name:, batch_size: nil, consumer_group_id: nil, credentials: nil, maximum_batching_window_in_seconds: nil, starting_position: nil) ⇒ PipeSourceManagedStreamingKafkaParametersProperty

Returns a new instance of PipeSourceManagedStreamingKafkaParametersProperty.

Parameters:

  • topic_name (String)

    The name of the topic that the pipe will read from.

  • batch_size (Numeric, nil) (defaults to: nil)

    The maximum number of records to include in each batch.

  • consumer_group_id (String, nil) (defaults to: nil)

    The name of the destination queue to consume.

  • credentials (AWSCDK::IResolvable, AWSCDK::Pipes::CfnPipe::MSKAccessCredentialsProperty, nil) (defaults to: nil)

    The credentials needed to access the resource.

  • maximum_batching_window_in_seconds (Numeric, nil) (defaults to: nil)

    The maximum length of a time to wait for events.

  • starting_position (String, nil) (defaults to: nil)

    The position in a stream from which to start reading.



2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
# File 'pipes/cfn_pipe.rb', line 2546

def initialize(topic_name:, batch_size: nil, consumer_group_id: nil, credentials: nil, maximum_batching_window_in_seconds: nil, starting_position: nil)
  @topic_name = topic_name
  Jsii::Type.check_type(@topic_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicName")
  @batch_size = batch_size
  Jsii::Type.check_type(@batch_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "batchSize") unless @batch_size.nil?
  @consumer_group_id = consumer_group_id
  Jsii::Type.check_type(@consumer_group_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "consumerGroupId") unless @consumer_group_id.nil?
  @credentials = credentials.is_a?(Hash) ? ::AWSCDK::Pipes::CfnPipe::MSKAccessCredentialsProperty.new(**credentials.transform_keys(&:to_sym)) : credentials
  Jsii::Type.check_type(@credentials, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waXBlcy5DZm5QaXBlLk1TS0FjY2Vzc0NyZWRlbnRpYWxzUHJvcGVydHkifV19fQ==")), "credentials") unless @credentials.nil?
  @maximum_batching_window_in_seconds = maximum_batching_window_in_seconds
  Jsii::Type.check_type(@maximum_batching_window_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumBatchingWindowInSeconds") unless @maximum_batching_window_in_seconds.nil?
  @starting_position = starting_position
  Jsii::Type.check_type(@starting_position, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startingPosition") unless @starting_position.nil?
end

Instance Attribute Details

#batch_sizeNumeric? (readonly)

The maximum number of records to include in each batch.



2570
2571
2572
# File 'pipes/cfn_pipe.rb', line 2570

def batch_size
  @batch_size
end

#consumer_group_idString? (readonly)

The name of the destination queue to consume.



2575
2576
2577
# File 'pipes/cfn_pipe.rb', line 2575

def consumer_group_id
  @consumer_group_id
end

#credentialsAWSCDK::IResolvable, ... (readonly)

The credentials needed to access the resource.



2580
2581
2582
# File 'pipes/cfn_pipe.rb', line 2580

def credentials
  @credentials
end

#maximum_batching_window_in_secondsNumeric? (readonly)

The maximum length of a time to wait for events.



2585
2586
2587
# File 'pipes/cfn_pipe.rb', line 2585

def maximum_batching_window_in_seconds
  @maximum_batching_window_in_seconds
end

#starting_positionString? (readonly)

The position in a stream from which to start reading.



2590
2591
2592
# File 'pipes/cfn_pipe.rb', line 2590

def starting_position
  @starting_position
end

#topic_nameString (readonly)

The name of the topic that the pipe will read from.



2565
2566
2567
# File 'pipes/cfn_pipe.rb', line 2565

def topic_name
  @topic_name
end

Class Method Details

.jsii_propertiesObject



2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
# File 'pipes/cfn_pipe.rb', line 2592

def self.jsii_properties
  {
    :topic_name => "topicName",
    :batch_size => "batchSize",
    :consumer_group_id => "consumerGroupId",
    :credentials => "credentials",
    :maximum_batching_window_in_seconds => "maximumBatchingWindowInSeconds",
    :starting_position => "startingPosition",
  }
end

Instance Method Details

#to_jsiiObject



2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
# File 'pipes/cfn_pipe.rb', line 2603

def to_jsii
  result = {}
  result.merge!({
    "topicName" => @topic_name,
    "batchSize" => @batch_size,
    "consumerGroupId" => @consumer_group_id,
    "credentials" => @credentials,
    "maximumBatchingWindowInSeconds" => @maximum_batching_window_in_seconds,
    "startingPosition" => @starting_position,
  })
  result.compact
end