Class: AWSCDK::KinesisAnalytics::CfnApplicationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kinesis_analytics/cfn_application_props.rb

Overview

Properties for defining a CfnApplication.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inputs:, application_code: nil, application_description: nil, application_name: nil) ⇒ CfnApplicationProps

Returns a new instance of CfnApplicationProps.

Parameters:

  • inputs (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::KinesisAnalytics::CfnApplication::InputProperty>)

    Use this parameter to configure the application input.

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

    One or more SQL statements that read input data, transform it, and generate output.

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

    Summary description of the application.

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

    Name of your Amazon Kinesis Analytics application (for example, sample-app ).



13
14
15
16
17
18
19
20
21
22
# File 'kinesis_analytics/cfn_application_props.rb', line 13

def initialize(inputs:, application_code: nil, application_description: nil, application_name: nil)
  @inputs = inputs
  Jsii::Type.check_type(@inputs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2FuYWx5dGljcy5DZm5BcHBsaWNhdGlvbi5JbnB1dFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "inputs")
  @application_code = application_code
  Jsii::Type.check_type(@application_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationCode") unless @application_code.nil?
  @application_description = application_description
  Jsii::Type.check_type(@application_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationDescription") unless @application_description.nil?
  @application_name = application_name
  Jsii::Type.check_type(@application_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationName") unless @application_name.nil?
end

Instance Attribute Details

#application_codeString? (readonly)

One or more SQL statements that read input data, transform it, and generate output.

For example, you can write a SQL statement that reads data from one in-application stream, generates a running average of the number of advertisement clicks by vendor, and insert resulting rows in another in-application stream using pumps. For more information about the typical pattern, see Application Code .

You can provide such series of SQL statements, where output of one statement can be used as the input for the next statement. You store intermediate results by creating in-application streams and pumps.

Note that the application code must create the streams with names specified in the Outputs . For example, if your Outputs defines output streams named ExampleOutputStream1 and ExampleOutputStream2 , then your application code must create these streams.



45
46
47
# File 'kinesis_analytics/cfn_application_props.rb', line 45

def application_code
  @application_code
end

#application_descriptionString? (readonly)

Summary description of the application.



50
51
52
# File 'kinesis_analytics/cfn_application_props.rb', line 50

def application_description
  @application_description
end

#application_nameString? (readonly)

Name of your Amazon Kinesis Analytics application (for example, sample-app ).



55
56
57
# File 'kinesis_analytics/cfn_application_props.rb', line 55

def application_name
  @application_name
end

#inputsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::KinesisAnalytics::CfnApplication::InputProperty> (readonly)

Use this parameter to configure the application input.

You can configure your application to receive input from a single streaming source. In this configuration, you map this streaming source to an in-application stream that is created. Your application code can then query the in-application stream like a table (you can think of it as a constantly updating table).

For the streaming source, you provide its Amazon Resource Name (ARN) and format of data on the stream (for example, JSON, CSV, etc.). You also must provide an IAM role that Amazon Kinesis Analytics can assume to read this stream on your behalf.

To create the in-application stream, you need to specify a schema to transform your data into a schematized version used in SQL. In the schema, you provide the necessary mapping of the data elements in the streaming source to record columns in the in-app stream.



34
35
36
# File 'kinesis_analytics/cfn_application_props.rb', line 34

def inputs
  @inputs
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
# File 'kinesis_analytics/cfn_application_props.rb', line 57

def self.jsii_properties
  {
    :inputs => "inputs",
    :application_code => "applicationCode",
    :application_description => "applicationDescription",
    :application_name => "applicationName",
  }
end

Instance Method Details

#to_jsiiObject



66
67
68
69
70
71
72
73
74
75
# File 'kinesis_analytics/cfn_application_props.rb', line 66

def to_jsii
  result = {}
  result.merge!({
    "inputs" => @inputs,
    "applicationCode" => @application_code,
    "applicationDescription" => @application_description,
    "applicationName" => @application_name,
  })
  result.compact
end