You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::KinesisAnalytics::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::SharedCredentials - Used for loading credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is search for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test endpoints. This should be avalid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before rasing a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session yeidled by #session_for.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idble before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session yeidled by #session_for.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



261
262
263
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 261

def initialize(*args)
  super
end

Instance Method Details

#add_application_cloud_watch_logging_option(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Adds a CloudWatch log stream to monitor application configuration errors. For more information about using CloudWatch log streams with Amazon Kinesis Analytics applications, see Working with Amazon CloudWatch Logs.

Examples:

Request syntax with placeholder values


resp = client.add_application_cloud_watch_logging_option({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  cloud_watch_logging_option: { # required
    log_stream_arn: "LogStreamARN", # required
    role_arn: "RoleARN", # required
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    The Kinesis Analytics application name.

  • :current_application_version_id (required, Integer)

    The version ID of the Kinesis Analytics application.

  • :cloud_watch_logging_option (required, Types::CloudWatchLoggingOption)

    Provides the CloudWatch log stream Amazon Resource Name (ARN) and the IAM role ARN. Note: To write application messages to CloudWatch, the IAM role that is used must have the PutLogEvents policy action enabled.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



313
314
315
316
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 313

def add_application_cloud_watch_logging_option(params = {}, options = {})
  req = build_request(:add_application_cloud_watch_logging_option, params)
  req.send_request(options)
end

#add_application_input(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Adds a streaming source to your Amazon Kinesis application. For conceptual information, see Configuring Application Input.

You can add a streaming source either when you create an application or you can use this operation to add a streaming source after you create an application. For more information, see CreateApplication.

Any configuration update, including adding a streaming source using this operation, results in a new version of the application. You can use the DescribeApplication operation to find the current application version.

This operation requires permissions to perform the kinesisanalytics:AddApplicationInput action.

Examples:

Request syntax with placeholder values


resp = client.add_application_input({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  input: { # required
    name_prefix: "InAppStreamName", # required
    input_processing_configuration: {
      input_lambda_processor: { # required
        resource_arn: "ResourceARN", # required
        role_arn: "RoleARN", # required
      },
    },
    kinesis_streams_input: {
      resource_arn: "ResourceARN", # required
      role_arn: "RoleARN", # required
    },
    kinesis_firehose_input: {
      resource_arn: "ResourceARN", # required
      role_arn: "RoleARN", # required
    },
    input_parallelism: {
      count: 1,
    },
    input_schema: { # required
      record_format: { # required
        record_format_type: "JSON", # required, accepts JSON, CSV
        mapping_parameters: {
          json_mapping_parameters: {
            record_row_path: "RecordRowPath", # required
          },
          csv_mapping_parameters: {
            record_row_delimiter: "RecordRowDelimiter", # required
            record_column_delimiter: "RecordColumnDelimiter", # required
          },
        },
      },
      record_encoding: "RecordEncoding",
      record_columns: [ # required
        {
          name: "RecordColumnName", # required
          mapping: "RecordColumnMapping",
          sql_type: "RecordColumnSqlType", # required
        },
      ],
    },
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of your existing Amazon Kinesis Analytics application to which you want to add the streaming source.

  • :current_application_version_id (required, Integer)

    Current version of your Amazon Kinesis Analytics application. You can use the DescribeApplication operation to find the current application version.

  • :input (required, Types::Input)

    The Input to add.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



423
424
425
426
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 423

def add_application_input(params = {}, options = {})
  req = build_request(:add_application_input, params)
  req.send_request(options)
end

#add_application_input_processing_configuration(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Adds an InputProcessingConfiguration to an application. An input processor preprocesses records on the input stream before the application's SQL code executes. Currently, the only input processor available is AWS Lambda.

Examples:

Request syntax with placeholder values


resp = client.add_application_input_processing_configuration({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  input_id: "Id", # required
  input_processing_configuration: { # required
    input_lambda_processor: { # required
      resource_arn: "ResourceARN", # required
      role_arn: "RoleARN", # required
    },
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of the application to which you want to add the input processing configuration.

  • :current_application_version_id (required, Integer)

    Version of the application to which you want to add the input processing configuration. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.

  • :input_id (required, String)

    The ID of the input configuration to add the input processing configuration to. You can get a list of the input IDs for an application using the DescribeApplication operation.

  • :input_processing_configuration (required, Types::InputProcessingConfiguration)

    The InputProcessingConfiguration to add to the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



497
498
499
500
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 497

def add_application_input_processing_configuration(params = {}, options = {})
  req = build_request(:add_application_input_processing_configuration, params)
  req.send_request(options)
end

#add_application_output(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Adds an external destination to your Amazon Kinesis Analytics application.

If you want Amazon Kinesis Analytics to deliver data from an in-application stream within your application to an external destination (such as an Amazon Kinesis stream, an Amazon Kinesis Firehose delivery stream, or an AWS Lambda function), you add the relevant configuration to your application using this operation. You can configure one or more outputs for your application. Each output configuration maps an in-application stream and an external destination.

You can use one of the output configurations to deliver data from your in-application error stream to an external destination so that you can analyze the errors. For more information, see Understanding Application Output (Destination).

Any configuration update, including adding a streaming source using this operation, results in a new version of the application. You can use the DescribeApplication operation to find the current application version.

For the limits on the number of application inputs and outputs you can configure, see Limits.

This operation requires permissions to perform the kinesisanalytics:AddApplicationOutput action.

Examples:

Request syntax with placeholder values


resp = client.add_application_output({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  output: { # required
    name: "InAppStreamName", # required
    kinesis_streams_output: {
      resource_arn: "ResourceARN", # required
      role_arn: "RoleARN", # required
    },
    kinesis_firehose_output: {
      resource_arn: "ResourceARN", # required
      role_arn: "RoleARN", # required
    },
    lambda_output: {
      resource_arn: "ResourceARN", # required
      role_arn: "RoleARN", # required
    },
    destination_schema: { # required
      record_format_type: "JSON", # required, accepts JSON, CSV
    },
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of the application to which you want to add the output configuration.

  • :current_application_version_id (required, Integer)

    Version of the application to which you want to add the output configuration. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.

  • :output (required, Types::Output)

    An array of objects, each describing one output configuration. In the output configuration, you specify the name of an in-application stream, a destination (that is, an Amazon Kinesis stream, an Amazon Kinesis Firehose delivery stream, or an AWS Lambda function), and record the formation to use when writing to the destination.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



597
598
599
600
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 597

def add_application_output(params = {}, options = {})
  req = build_request(:add_application_output, params)
  req.send_request(options)
end

#add_application_reference_data_source(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Adds a reference data source to an existing application.

Amazon Kinesis Analytics reads reference data (that is, an Amazon S3 object) and creates an in-application table within your application. In the request, you provide the source (S3 bucket name and object key name), name of the in-application table to create, and the necessary mapping information that describes how data in Amazon S3 object maps to columns in the resulting in-application table.

For conceptual information, see Configuring Application Input. For the limits on data sources you can add to your application, see Limits.

This operation requires permissions to perform the kinesisanalytics:AddApplicationOutput action.

Examples:

Request syntax with placeholder values


resp = client.add_application_reference_data_source({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  reference_data_source: { # required
    table_name: "InAppTableName", # required
    s3_reference_data_source: {
      bucket_arn: "BucketARN", # required
      file_key: "FileKey", # required
      reference_role_arn: "RoleARN", # required
    },
    reference_schema: { # required
      record_format: { # required
        record_format_type: "JSON", # required, accepts JSON, CSV
        mapping_parameters: {
          json_mapping_parameters: {
            record_row_path: "RecordRowPath", # required
          },
          csv_mapping_parameters: {
            record_row_delimiter: "RecordRowDelimiter", # required
            record_column_delimiter: "RecordColumnDelimiter", # required
          },
        },
      },
      record_encoding: "RecordEncoding",
      record_columns: [ # required
        {
          name: "RecordColumnName", # required
          mapping: "RecordColumnMapping",
          sql_type: "RecordColumnSqlType", # required
        },
      ],
    },
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of an existing application.

  • :current_application_version_id (required, Integer)

    Version of the application for which you are adding the reference data source. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.

  • :reference_data_source (required, Types::ReferenceDataSource)

    The reference data source can be an object in your Amazon S3 bucket. Amazon Kinesis Analytics reads the object and copies the data into the in-application table that is created. You provide an S3 bucket, object key name, and the resulting in-application table that is created. You must also provide an IAM role with the necessary permissions that Amazon Kinesis Analytics can assume to read the object from your S3 bucket on your behalf.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



696
697
698
699
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 696

def add_application_reference_data_source(params = {}, options = {})
  req = build_request(:add_application_reference_data_source, params)
  req.send_request(options)
end

#create_application(params = {}) ⇒ Types::CreateApplicationResponse

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Creates an Amazon Kinesis Analytics application. You can configure each application with one streaming source as input, application code to process the input, and up to three destinations where you want Amazon Kinesis Analytics to write the output data from your application. For an overview, see How it Works.

In the input configuration, you map the streaming source to an in-application stream, which you can think of as a constantly updating table. In the mapping, you must provide a schema for the in-application stream and map each data column in the in-application stream to a data element in the streaming source.

Your application code is one or more SQL statements that read input data, transform it, and generate output. Your application code can create one or more SQL artifacts like SQL streams or pumps.

In the output configuration, you can configure the application to write data from in-application streams created in your applications to up to three destinations.

To read data from your source stream or write data to destination streams, Amazon Kinesis Analytics needs your permissions. You grant these permissions by creating IAM roles. This operation requires permissions to perform the kinesisanalytics:CreateApplication action.

For introductory exercises to create an Amazon Kinesis Analytics application, see Getting Started.

Examples:

Request syntax with placeholder values


resp = client.create_application({
  application_name: "ApplicationName", # required
  application_description: "ApplicationDescription",
  inputs: [
    {
      name_prefix: "InAppStreamName", # required
      input_processing_configuration: {
        input_lambda_processor: { # required
          resource_arn: "ResourceARN", # required
          role_arn: "RoleARN", # required
        },
      },
      kinesis_streams_input: {
        resource_arn: "ResourceARN", # required
        role_arn: "RoleARN", # required
      },
      kinesis_firehose_input: {
        resource_arn: "ResourceARN", # required
        role_arn: "RoleARN", # required
      },
      input_parallelism: {
        count: 1,
      },
      input_schema: { # required
        record_format: { # required
          record_format_type: "JSON", # required, accepts JSON, CSV
          mapping_parameters: {
            json_mapping_parameters: {
              record_row_path: "RecordRowPath", # required
            },
            csv_mapping_parameters: {
              record_row_delimiter: "RecordRowDelimiter", # required
              record_column_delimiter: "RecordColumnDelimiter", # required
            },
          },
        },
        record_encoding: "RecordEncoding",
        record_columns: [ # required
          {
            name: "RecordColumnName", # required
            mapping: "RecordColumnMapping",
            sql_type: "RecordColumnSqlType", # required
          },
        ],
      },
    },
  ],
  outputs: [
    {
      name: "InAppStreamName", # required
      kinesis_streams_output: {
        resource_arn: "ResourceARN", # required
        role_arn: "RoleARN", # required
      },
      kinesis_firehose_output: {
        resource_arn: "ResourceARN", # required
        role_arn: "RoleARN", # required
      },
      lambda_output: {
        resource_arn: "ResourceARN", # required
        role_arn: "RoleARN", # required
      },
      destination_schema: { # required
        record_format_type: "JSON", # required, accepts JSON, CSV
      },
    },
  ],
  cloud_watch_logging_options: [
    {
      log_stream_arn: "LogStreamARN", # required
      role_arn: "RoleARN", # required
    },
  ],
  application_code: "ApplicationCode",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.application_summary.application_name #=> String
resp.application_summary.application_arn #=> String
resp.application_summary.application_status #=> String, one of "DELETING", "STARTING", "STOPPING", "READY", "RUNNING", "UPDATING"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

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

  • :application_description (String)

    Summary description of the application.

  • :inputs (Array<Types::Input>)

    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.

  • :outputs (Array<Types::Output>)

    You can configure application output to write data from any of the in-application streams to up to three destinations.

    These destinations can be Amazon Kinesis streams, Amazon Kinesis Firehose delivery streams, AWS Lambda destinations, or any combination of the three.

    In the configuration, you specify the in-application stream name, the destination stream or Lambda function Amazon Resource Name (ARN), and the format to use when writing data. You must also provide an IAM role that Amazon Kinesis Analytics can assume to write to the destination stream or Lambda function on your behalf.

    In the output configuration, you also provide the output stream or Lambda function ARN. For stream destinations, you provide the format of data in the stream (for example, JSON, CSV). You also must provide an IAM role that Amazon Kinesis Analytics can assume to write to the stream or Lambda function on your behalf.

  • :cloud_watch_logging_options (Array<Types::CloudWatchLoggingOption>)

    Use this parameter to configure a CloudWatch log stream to monitor application configuration errors. For more information, see Working with Amazon CloudWatch Logs.

  • :application_code (String)

    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.

  • :tags (Array<Types::Tag>)

    A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see Using Tagging.

Returns:

See Also:



929
930
931
932
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 929

def create_application(params = {}, options = {})
  req = build_request(:create_application, params)
  req.send_request(options)
end

#delete_application(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Deletes the specified application. Amazon Kinesis Analytics halts application execution and deletes the application, including any application artifacts (such as in-application streams, reference table, and application code).

This operation requires permissions to perform the kinesisanalytics:DeleteApplication action.

Examples:

Request syntax with placeholder values


resp = client.delete_application({
  application_name: "ApplicationName", # required
  create_timestamp: Time.now, # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of the Amazon Kinesis Analytics application to delete.

  • :create_timestamp (required, Time, DateTime, Date, Integer, String)

    You can use the DescribeApplication operation to get this value.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



969
970
971
972
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 969

def delete_application(params = {}, options = {})
  req = build_request(:delete_application, params)
  req.send_request(options)
end

#delete_application_cloud_watch_logging_option(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Deletes a CloudWatch log stream from an application. For more information about using CloudWatch log streams with Amazon Kinesis Analytics applications, see Working with Amazon CloudWatch Logs.

Examples:

Request syntax with placeholder values


resp = client.delete_application_cloud_watch_logging_option({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  cloud_watch_logging_option_id: "Id", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    The Kinesis Analytics application name.

  • :current_application_version_id (required, Integer)

    The version ID of the Kinesis Analytics application.

  • :cloud_watch_logging_option_id (required, String)

    The CloudWatchLoggingOptionId of the CloudWatch logging option to delete. You can get the CloudWatchLoggingOptionId by using the DescribeApplication operation.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1019
1020
1021
1022
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1019

def delete_application_cloud_watch_logging_option(params = {}, options = {})
  req = build_request(:delete_application_cloud_watch_logging_option, params)
  req.send_request(options)
end

#delete_application_input_processing_configuration(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Deletes an InputProcessingConfiguration from an input.

Examples:

Request syntax with placeholder values


resp = client.delete_application_input_processing_configuration({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  input_id: "Id", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    The Kinesis Analytics application name.

  • :current_application_version_id (required, Integer)

    The version ID of the Kinesis Analytics application.

  • :input_id (required, String)

    The ID of the input configuration from which to delete the input processing configuration. You can get a list of the input IDs for an application by using the DescribeApplication operation.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1067
1068
1069
1070
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1067

def delete_application_input_processing_configuration(params = {}, options = {})
  req = build_request(:delete_application_input_processing_configuration, params)
  req.send_request(options)
end

#delete_application_output(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Deletes output destination configuration from your application configuration. Amazon Kinesis Analytics will no longer write data from the corresponding in-application stream to the external output destination.

This operation requires permissions to perform the kinesisanalytics:DeleteApplicationOutput action.

Examples:

Request syntax with placeholder values


resp = client.delete_application_output({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  output_id: "Id", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Amazon Kinesis Analytics application name.

  • :current_application_version_id (required, Integer)

    Amazon Kinesis Analytics application version. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.

  • :output_id (required, String)

    The ID of the configuration to delete. Each output configuration that is added to the application, either when the application is created or later using the AddApplicationOutput operation, has a unique ID. You need to provide the ID to uniquely identify the output configuration that you want to delete from the application configuration. You can use the DescribeApplication operation to get the specific OutputId.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1129
1130
1131
1132
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1129

def delete_application_output(params = {}, options = {})
  req = build_request(:delete_application_output, params)
  req.send_request(options)
end

#delete_application_reference_data_source(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Deletes a reference data source configuration from the specified application configuration.

If the application is running, Amazon Kinesis Analytics immediately removes the in-application table that you created using the AddApplicationReferenceDataSource operation.

This operation requires permissions to perform the kinesisanalytics.DeleteApplicationReferenceDataSource action.

Examples:

Request syntax with placeholder values


resp = client.delete_application_reference_data_source({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  reference_id: "Id", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of an existing application.

  • :current_application_version_id (required, Integer)

    Version of the application. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.

  • :reference_id (required, String)

    ID of the reference data source. When you add a reference data source to your application using the AddApplicationReferenceDataSource, Amazon Kinesis Analytics assigns an ID. You can use the DescribeApplication operation to get the reference ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1194
1195
1196
1197
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1194

def delete_application_reference_data_source(params = {}, options = {})
  req = build_request(:delete_application_reference_data_source, params)
  req.send_request(options)
end

#describe_application(params = {}) ⇒ Types::DescribeApplicationResponse

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Returns information about a specific Amazon Kinesis Analytics application.

If you want to retrieve a list of all applications in your account, use the ListApplications operation.

This operation requires permissions to perform the kinesisanalytics:DescribeApplication action. You can use DescribeApplication to get the current application versionId, which you need to call other operations such as Update.

Examples:

Request syntax with placeholder values


resp = client.describe_application({
  application_name: "ApplicationName", # required
})

Response structure


resp.application_detail.application_name #=> String
resp.application_detail.application_description #=> String
resp.application_detail.application_arn #=> String
resp.application_detail.application_status #=> String, one of "DELETING", "STARTING", "STOPPING", "READY", "RUNNING", "UPDATING"
resp.application_detail.create_timestamp #=> Time
resp.application_detail.last_update_timestamp #=> Time
resp.application_detail.input_descriptions #=> Array
resp.application_detail.input_descriptions[0].input_id #=> String
resp.application_detail.input_descriptions[0].name_prefix #=> String
resp.application_detail.input_descriptions[0].in_app_stream_names #=> Array
resp.application_detail.input_descriptions[0].in_app_stream_names[0] #=> String
resp.application_detail.input_descriptions[0].input_processing_configuration_description.input_lambda_processor_description.resource_arn #=> String
resp.application_detail.input_descriptions[0].input_processing_configuration_description.input_lambda_processor_description.role_arn #=> String
resp.application_detail.input_descriptions[0].kinesis_streams_input_description.resource_arn #=> String
resp.application_detail.input_descriptions[0].kinesis_streams_input_description.role_arn #=> String
resp.application_detail.input_descriptions[0].kinesis_firehose_input_description.resource_arn #=> String
resp.application_detail.input_descriptions[0].kinesis_firehose_input_description.role_arn #=> String
resp.application_detail.input_descriptions[0].input_schema.record_format.record_format_type #=> String, one of "JSON", "CSV"
resp.application_detail.input_descriptions[0].input_schema.record_format.mapping_parameters.json_mapping_parameters.record_row_path #=> String
resp.application_detail.input_descriptions[0].input_schema.record_format.mapping_parameters.csv_mapping_parameters.record_row_delimiter #=> String
resp.application_detail.input_descriptions[0].input_schema.record_format.mapping_parameters.csv_mapping_parameters.record_column_delimiter #=> String
resp.application_detail.input_descriptions[0].input_schema.record_encoding #=> String
resp.application_detail.input_descriptions[0].input_schema.record_columns #=> Array
resp.application_detail.input_descriptions[0].input_schema.record_columns[0].name #=> String
resp.application_detail.input_descriptions[0].input_schema.record_columns[0].mapping #=> String
resp.application_detail.input_descriptions[0].input_schema.record_columns[0].sql_type #=> String
resp.application_detail.input_descriptions[0].input_parallelism.count #=> Integer
resp.application_detail.input_descriptions[0].input_starting_position_configuration.input_starting_position #=> String, one of "NOW", "TRIM_HORIZON", "LAST_STOPPED_POINT"
resp.application_detail.output_descriptions #=> Array
resp.application_detail.output_descriptions[0].output_id #=> String
resp.application_detail.output_descriptions[0].name #=> String
resp.application_detail.output_descriptions[0].kinesis_streams_output_description.resource_arn #=> String
resp.application_detail.output_descriptions[0].kinesis_streams_output_description.role_arn #=> String
resp.application_detail.output_descriptions[0].kinesis_firehose_output_description.resource_arn #=> String
resp.application_detail.output_descriptions[0].kinesis_firehose_output_description.role_arn #=> String
resp.application_detail.output_descriptions[0].lambda_output_description.resource_arn #=> String
resp.application_detail.output_descriptions[0].lambda_output_description.role_arn #=> String
resp.application_detail.output_descriptions[0].destination_schema.record_format_type #=> String, one of "JSON", "CSV"
resp.application_detail.reference_data_source_descriptions #=> Array
resp.application_detail.reference_data_source_descriptions[0].reference_id #=> String
resp.application_detail.reference_data_source_descriptions[0].table_name #=> String
resp.application_detail.reference_data_source_descriptions[0].s3_reference_data_source_description.bucket_arn #=> String
resp.application_detail.reference_data_source_descriptions[0].s3_reference_data_source_description.file_key #=> String
resp.application_detail.reference_data_source_descriptions[0].s3_reference_data_source_description.reference_role_arn #=> String
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_format.record_format_type #=> String, one of "JSON", "CSV"
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_format.mapping_parameters.json_mapping_parameters.record_row_path #=> String
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_format.mapping_parameters.csv_mapping_parameters.record_row_delimiter #=> String
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_format.mapping_parameters.csv_mapping_parameters.record_column_delimiter #=> String
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_encoding #=> String
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_columns #=> Array
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_columns[0].name #=> String
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_columns[0].mapping #=> String
resp.application_detail.reference_data_source_descriptions[0].reference_schema.record_columns[0].sql_type #=> String
resp.application_detail.cloud_watch_logging_option_descriptions #=> Array
resp.application_detail.cloud_watch_logging_option_descriptions[0].cloud_watch_logging_option_id #=> String
resp.application_detail.cloud_watch_logging_option_descriptions[0].log_stream_arn #=> String
resp.application_detail.cloud_watch_logging_option_descriptions[0].role_arn #=> String
resp.application_detail.application_code #=> String
resp.application_detail.application_version_id #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of the application.

Returns:

See Also:



1301
1302
1303
1304
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1301

def describe_application(params = {}, options = {})
  req = build_request(:describe_application, params)
  req.send_request(options)
end

#discover_input_schema(params = {}) ⇒ Types::DiscoverInputSchemaResponse

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Infers a schema by evaluating sample records on the specified streaming source (Amazon Kinesis stream or Amazon Kinesis Firehose delivery stream) or S3 object. In the response, the operation returns the inferred schema and also the sample records that the operation used to infer the schema.

You can use the inferred schema when configuring a streaming source for your application. For conceptual information, see Configuring Application Input. Note that when you create an application using the Amazon Kinesis Analytics console, the console uses this operation to infer a schema and show it in the console user interface.

This operation requires permissions to perform the kinesisanalytics:DiscoverInputSchema action.

Examples:

Request syntax with placeholder values


resp = client.discover_input_schema({
  resource_arn: "ResourceARN",
  role_arn: "RoleARN",
  input_starting_position_configuration: {
    input_starting_position: "NOW", # accepts NOW, TRIM_HORIZON, LAST_STOPPED_POINT
  },
  s3_configuration: {
    role_arn: "RoleARN", # required
    bucket_arn: "BucketARN", # required
    file_key: "FileKey", # required
  },
  input_processing_configuration: {
    input_lambda_processor: { # required
      resource_arn: "ResourceARN", # required
      role_arn: "RoleARN", # required
    },
  },
})

Response structure


resp.input_schema.record_format.record_format_type #=> String, one of "JSON", "CSV"
resp.input_schema.record_format.mapping_parameters.json_mapping_parameters.record_row_path #=> String
resp.input_schema.record_format.mapping_parameters.csv_mapping_parameters.record_row_delimiter #=> String
resp.input_schema.record_format.mapping_parameters.csv_mapping_parameters.record_column_delimiter #=> String
resp.input_schema.record_encoding #=> String
resp.input_schema.record_columns #=> Array
resp.input_schema.record_columns[0].name #=> String
resp.input_schema.record_columns[0].mapping #=> String
resp.input_schema.record_columns[0].sql_type #=> String
resp.parsed_input_records #=> Array
resp.parsed_input_records[0] #=> Array
resp.parsed_input_records[0][0] #=> String
resp.processed_input_records #=> Array
resp.processed_input_records[0] #=> String
resp.raw_input_records #=> Array
resp.raw_input_records[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (String)

    Amazon Resource Name (ARN) of the streaming source.

  • :role_arn (String)

    ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf.

  • :input_starting_position_configuration (Types::InputStartingPositionConfiguration)

    Point at which you want Amazon Kinesis Analytics to start reading records from the specified streaming source discovery purposes.

  • :s3_configuration (Types::S3Configuration)

    Specify this parameter to discover a schema from data in an Amazon S3 object.

  • :input_processing_configuration (Types::InputProcessingConfiguration)

    The InputProcessingConfiguration to use to preprocess the records before discovering the schema of the records.

Returns:

See Also:



1407
1408
1409
1410
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1407

def discover_input_schema(params = {}, options = {})
  req = build_request(:discover_input_schema, params)
  req.send_request(options)
end

#list_applications(params = {}) ⇒ Types::ListApplicationsResponse

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Returns a list of Amazon Kinesis Analytics applications in your account. For each application, the response includes the application name, Amazon Resource Name (ARN), and status. If the response returns the HasMoreApplications value as true, you can send another request by adding the ExclusiveStartApplicationName in the request body, and set the value of this to the last application name from the previous response.

If you want detailed information about a specific application, use DescribeApplication.

This operation requires permissions to perform the kinesisanalytics:ListApplications action.

Examples:

Request syntax with placeholder values


resp = client.list_applications({
  limit: 1,
  exclusive_start_application_name: "ApplicationName",
})

Response structure


resp.application_summaries #=> Array
resp.application_summaries[0].application_name #=> String
resp.application_summaries[0].application_arn #=> String
resp.application_summaries[0].application_status #=> String, one of "DELETING", "STARTING", "STOPPING", "READY", "RUNNING", "UPDATING"
resp.has_more_applications #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :limit (Integer)

    Maximum number of applications to list.

  • :exclusive_start_application_name (String)

    Name of the application to start the list with. When using pagination to retrieve the list, you don't need to specify this parameter in the first request. However, in subsequent requests, you add the last application name from the previous response to get the next page of applications.

Returns:

See Also:



1472
1473
1474
1475
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1472

def list_applications(params = {}, options = {})
  req = build_request(:list_applications, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Retrieves the list of key-value tags assigned to the application. For more information, see Using Tagging.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "KinesisAnalyticsARN", # required
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the application for which to retrieve tags.

Returns:

See Also:



1507
1508
1509
1510
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1507

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#start_application(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Starts the specified Amazon Kinesis Analytics application. After creating an application, you must exclusively call this operation to start your application.

After the application starts, it begins consuming the input data, processes it, and writes the output to the configured destination.

The application status must be READY for you to start an application. You can get the application status in the console or using the DescribeApplication operation.

After you start the application, you can stop the application from processing the input by calling the StopApplication operation.

This operation requires permissions to perform the kinesisanalytics:StartApplication action.

Examples:

Request syntax with placeholder values


resp = client.start_application({
  application_name: "ApplicationName", # required
  input_configurations: [ # required
    {
      id: "Id", # required
      input_starting_position_configuration: { # required
        input_starting_position: "NOW", # accepts NOW, TRIM_HORIZON, LAST_STOPPED_POINT
      },
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of the application.

  • :input_configurations (required, Array<Types::InputConfiguration>)

    Identifies the specific input, by ID, that the application starts consuming. Amazon Kinesis Analytics starts reading the streaming source associated with the input. You can also specify where in the streaming source you want Amazon Kinesis Analytics to start reading.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1571
1572
1573
1574
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1571

def start_application(params = {}, options = {})
  req = build_request(:start_application, params)
  req.send_request(options)
end

#stop_application(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Stops the application from processing input data. You can stop an application only if it is in the running state. You can use the DescribeApplication operation to find the application state. After the application is stopped, Amazon Kinesis Analytics stops reading data from the input, the application stops processing data, and there is no output written to the destination.

This operation requires permissions to perform the kinesisanalytics:StopApplication action.

Examples:

Request syntax with placeholder values


resp = client.stop_application({
  application_name: "ApplicationName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of the running application to stop.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1613
1614
1615
1616
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1613

def stop_application(params = {}, options = {})
  req = build_request(:stop_application, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds one or more key-value tags to a Kinesis Analytics application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see Using Tagging.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "KinesisAnalyticsARN", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the application to assign the tags.

  • :tags (required, Array<Types::Tag>)

    The key-value tags to assign to the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1651
1652
1653
1654
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1651

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes one or more tags from a Kinesis Analytics application. For more information, see Using Tagging.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "KinesisAnalyticsARN", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the Kinesis Analytics application from which to remove the tags.

  • :tag_keys (required, Array<String>)

    A list of keys of tags to remove from the specified application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1683
1684
1685
1686
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1683

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_application(params = {}) ⇒ Struct

This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see Amazon Kinesis Data Analytics API V2 Documentation.

Updates an existing Amazon Kinesis Analytics application. Using this API, you can update application code, input configuration, and output configuration.

Note that Amazon Kinesis Analytics updates the CurrentApplicationVersionId each time you update your application.

This operation requires permission for the kinesisanalytics:UpdateApplication action.

Examples:

Request syntax with placeholder values


resp = client.update_application({
  application_name: "ApplicationName", # required
  current_application_version_id: 1, # required
  application_update: { # required
    input_updates: [
      {
        input_id: "Id", # required
        name_prefix_update: "InAppStreamName",
        input_processing_configuration_update: {
          input_lambda_processor_update: { # required
            resource_arn_update: "ResourceARN",
            role_arn_update: "RoleARN",
          },
        },
        kinesis_streams_input_update: {
          resource_arn_update: "ResourceARN",
          role_arn_update: "RoleARN",
        },
        kinesis_firehose_input_update: {
          resource_arn_update: "ResourceARN",
          role_arn_update: "RoleARN",
        },
        input_schema_update: {
          record_format_update: {
            record_format_type: "JSON", # required, accepts JSON, CSV
            mapping_parameters: {
              json_mapping_parameters: {
                record_row_path: "RecordRowPath", # required
              },
              csv_mapping_parameters: {
                record_row_delimiter: "RecordRowDelimiter", # required
                record_column_delimiter: "RecordColumnDelimiter", # required
              },
            },
          },
          record_encoding_update: "RecordEncoding",
          record_column_updates: [
            {
              name: "RecordColumnName", # required
              mapping: "RecordColumnMapping",
              sql_type: "RecordColumnSqlType", # required
            },
          ],
        },
        input_parallelism_update: {
          count_update: 1,
        },
      },
    ],
    application_code_update: "ApplicationCode",
    output_updates: [
      {
        output_id: "Id", # required
        name_update: "InAppStreamName",
        kinesis_streams_output_update: {
          resource_arn_update: "ResourceARN",
          role_arn_update: "RoleARN",
        },
        kinesis_firehose_output_update: {
          resource_arn_update: "ResourceARN",
          role_arn_update: "RoleARN",
        },
        lambda_output_update: {
          resource_arn_update: "ResourceARN",
          role_arn_update: "RoleARN",
        },
        destination_schema_update: {
          record_format_type: "JSON", # required, accepts JSON, CSV
        },
      },
    ],
    reference_data_source_updates: [
      {
        reference_id: "Id", # required
        table_name_update: "InAppTableName",
        s3_reference_data_source_update: {
          bucket_arn_update: "BucketARN",
          file_key_update: "FileKey",
          reference_role_arn_update: "RoleARN",
        },
        reference_schema_update: {
          record_format: { # required
            record_format_type: "JSON", # required, accepts JSON, CSV
            mapping_parameters: {
              json_mapping_parameters: {
                record_row_path: "RecordRowPath", # required
              },
              csv_mapping_parameters: {
                record_row_delimiter: "RecordRowDelimiter", # required
                record_column_delimiter: "RecordColumnDelimiter", # required
              },
            },
          },
          record_encoding: "RecordEncoding",
          record_columns: [ # required
            {
              name: "RecordColumnName", # required
              mapping: "RecordColumnMapping",
              sql_type: "RecordColumnSqlType", # required
            },
          ],
        },
      },
    ],
    cloud_watch_logging_option_updates: [
      {
        cloud_watch_logging_option_id: "Id", # required
        log_stream_arn_update: "LogStreamARN",
        role_arn_update: "RoleARN",
      },
    ],
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :application_name (required, String)

    Name of the Amazon Kinesis Analytics application to update.

  • :current_application_version_id (required, Integer)

    The current application version ID. You can use the DescribeApplication operation to get this value.

  • :application_update (required, Types::ApplicationUpdate)

    Describes application updates.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1842
1843
1844
1845
# File 'gems/aws-sdk-kinesisanalytics/lib/aws-sdk-kinesisanalytics/client.rb', line 1842

def update_application(params = {}, options = {})
  req = build_request(:update_application, params)
  req.send_request(options)
end