KinesisAnalytics / Client / update_application
update_application#
- KinesisAnalytics.Client.update_application(**kwargs)#
Note
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.See also: AWS API Documentation
Request Syntax
response = client.update_application( ApplicationName='string', CurrentApplicationVersionId=123, ApplicationUpdate={ 'InputUpdates': [ { 'InputId': 'string', 'NamePrefixUpdate': 'string', 'InputProcessingConfigurationUpdate': { 'InputLambdaProcessorUpdate': { 'ResourceARNUpdate': 'string', 'RoleARNUpdate': 'string' } }, 'KinesisStreamsInputUpdate': { 'ResourceARNUpdate': 'string', 'RoleARNUpdate': 'string' }, 'KinesisFirehoseInputUpdate': { 'ResourceARNUpdate': 'string', 'RoleARNUpdate': 'string' }, 'InputSchemaUpdate': { 'RecordFormatUpdate': { 'RecordFormatType': 'JSON'|'CSV', 'MappingParameters': { 'JSONMappingParameters': { 'RecordRowPath': 'string' }, 'CSVMappingParameters': { 'RecordRowDelimiter': 'string', 'RecordColumnDelimiter': 'string' } } }, 'RecordEncodingUpdate': 'string', 'RecordColumnUpdates': [ { 'Name': 'string', 'Mapping': 'string', 'SqlType': 'string' }, ] }, 'InputParallelismUpdate': { 'CountUpdate': 123 } }, ], 'ApplicationCodeUpdate': 'string', 'OutputUpdates': [ { 'OutputId': 'string', 'NameUpdate': 'string', 'KinesisStreamsOutputUpdate': { 'ResourceARNUpdate': 'string', 'RoleARNUpdate': 'string' }, 'KinesisFirehoseOutputUpdate': { 'ResourceARNUpdate': 'string', 'RoleARNUpdate': 'string' }, 'LambdaOutputUpdate': { 'ResourceARNUpdate': 'string', 'RoleARNUpdate': 'string' }, 'DestinationSchemaUpdate': { 'RecordFormatType': 'JSON'|'CSV' } }, ], 'ReferenceDataSourceUpdates': [ { 'ReferenceId': 'string', 'TableNameUpdate': 'string', 'S3ReferenceDataSourceUpdate': { 'BucketARNUpdate': 'string', 'FileKeyUpdate': 'string', 'ReferenceRoleARNUpdate': 'string' }, 'ReferenceSchemaUpdate': { 'RecordFormat': { 'RecordFormatType': 'JSON'|'CSV', 'MappingParameters': { 'JSONMappingParameters': { 'RecordRowPath': 'string' }, 'CSVMappingParameters': { 'RecordRowDelimiter': 'string', 'RecordColumnDelimiter': 'string' } } }, 'RecordEncoding': 'string', 'RecordColumns': [ { 'Name': 'string', 'Mapping': 'string', 'SqlType': 'string' }, ] } }, ], 'CloudWatchLoggingOptionUpdates': [ { 'CloudWatchLoggingOptionId': 'string', 'LogStreamARNUpdate': 'string', 'RoleARNUpdate': 'string' }, ] } )
- Parameters:
ApplicationName (string) –
[REQUIRED]
Name of the Amazon Kinesis Analytics application to update.
CurrentApplicationVersionId (integer) –
[REQUIRED]
The current application version ID. You can use the DescribeApplication operation to get this value.
ApplicationUpdate (dict) –
[REQUIRED]
Describes application updates.
InputUpdates (list) –
Describes application input configuration updates.
(dict) –
Describes updates to a specific input configuration (identified by the
InputId
of an application).InputId (string) – [REQUIRED]
Input ID of the application input to be updated.
NamePrefixUpdate (string) –
Name prefix for in-application streams that Amazon Kinesis Analytics creates for the specific streaming source.
InputProcessingConfigurationUpdate (dict) –
Describes updates for an input processing configuration.
InputLambdaProcessorUpdate (dict) – [REQUIRED]
Provides update information for an InputLambdaProcessor.
ResourceARNUpdate (string) –
The Amazon Resource Name (ARN) of the new AWS Lambda function that is used to preprocess the records in the stream.
Note
To specify an earlier version of the Lambda function than the latest, include the Lambda function version in the Lambda function ARN. For more information about Lambda ARNs, see Example ARNs: AWS Lambda
RoleARNUpdate (string) –
The ARN of the new IAM role that is used to access the AWS Lambda function.
KinesisStreamsInputUpdate (dict) –
If an Amazon Kinesis stream is the streaming source to be updated, provides an updated stream Amazon Resource Name (ARN) and IAM role ARN.
ResourceARNUpdate (string) –
Amazon Resource Name (ARN) of the input Amazon Kinesis stream to read.
RoleARNUpdate (string) –
ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
KinesisFirehoseInputUpdate (dict) –
If an Amazon Kinesis Firehose delivery stream is the streaming source to be updated, provides an updated stream ARN and IAM role ARN.
ResourceARNUpdate (string) –
Amazon Resource Name (ARN) of the input Amazon Kinesis Firehose delivery stream to read.
RoleARNUpdate (string) –
ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
InputSchemaUpdate (dict) –
Describes the data format on the streaming source, and how record elements on the streaming source map to columns of the in-application stream that is created.
RecordFormatUpdate (dict) –
Specifies the format of the records on the streaming source.
RecordFormatType (string) – [REQUIRED]
The type of record format.
MappingParameters (dict) –
When configuring application input at the time of creating or updating an application, provides additional mapping information specific to the record format (such as JSON, CSV, or record fields delimited by some delimiter) on the streaming source.
JSONMappingParameters (dict) –
Provides additional mapping information when JSON is the record format on the streaming source.
RecordRowPath (string) – [REQUIRED]
Path to the top-level parent that contains the records.
CSVMappingParameters (dict) –
Provides additional mapping information when the record format uses delimiters (for example, CSV).
RecordRowDelimiter (string) – [REQUIRED]
Row delimiter. For example, in a CSV format, ‘n’ is the typical row delimiter.
RecordColumnDelimiter (string) – [REQUIRED]
Column delimiter. For example, in a CSV format, a comma (“,”) is the typical column delimiter.
RecordEncodingUpdate (string) –
Specifies the encoding of the records in the streaming source. For example, UTF-8.
RecordColumnUpdates (list) –
A list of
RecordColumn
objects. Each object describes the mapping of the streaming source element to the corresponding column in the in-application stream.(dict) –
Describes the mapping of each data element in the streaming source to the corresponding column in the in-application stream.
Also used to describe the format of the reference data source.
Name (string) – [REQUIRED]
Name of the column created in the in-application input stream or reference table.
Mapping (string) –
Reference to the data element in the streaming input or the reference data source. This element is required if the RecordFormatType is
JSON
.SqlType (string) – [REQUIRED]
Type of column created in the in-application input stream or reference table.
InputParallelismUpdate (dict) –
Describes the parallelism updates (the number in-application streams Amazon Kinesis Analytics creates for the specific streaming source).
CountUpdate (integer) –
Number of in-application streams to create for the specified streaming source.
ApplicationCodeUpdate (string) –
Describes application code updates.
OutputUpdates (list) –
Describes application output configuration updates.
(dict) –
Describes updates to the output configuration identified by the
OutputId
.OutputId (string) – [REQUIRED]
Identifies the specific output configuration that you want to update.
NameUpdate (string) –
If you want to specify a different in-application stream for this output configuration, use this field to specify the new in-application stream name.
KinesisStreamsOutputUpdate (dict) –
Describes an Amazon Kinesis stream as the destination for the output.
ResourceARNUpdate (string) –
Amazon Resource Name (ARN) of the Amazon Kinesis stream where you want to write the output.
RoleARNUpdate (string) –
ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
KinesisFirehoseOutputUpdate (dict) –
Describes an Amazon Kinesis Firehose delivery stream as the destination for the output.
ResourceARNUpdate (string) –
Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream to write to.
RoleARNUpdate (string) –
ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
LambdaOutputUpdate (dict) –
Describes an AWS Lambda function as the destination for the output.
ResourceARNUpdate (string) –
Amazon Resource Name (ARN) of the destination Lambda function.
Note
To specify an earlier version of the Lambda function than the latest, include the Lambda function version in the Lambda function ARN. For more information about Lambda ARNs, see Example ARNs: AWS Lambda
RoleARNUpdate (string) –
ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the destination function on your behalf. You need to grant the necessary permissions to this role.
DestinationSchemaUpdate (dict) –
Describes the data format when records are written to the destination. For more information, see Configuring Application Output.
RecordFormatType (string) – [REQUIRED]
Specifies the format of the records on the output stream.
ReferenceDataSourceUpdates (list) –
Describes application reference data source updates.
(dict) –
When you update a reference data source configuration for an application, this object provides all the updated values (such as the source bucket name and object key name), the in-application table name that is created, and updated mapping information that maps the data in the Amazon S3 object to the in-application reference table that is created.
ReferenceId (string) – [REQUIRED]
ID of the reference data source being updated. You can use the DescribeApplication operation to get this value.
TableNameUpdate (string) –
In-application table name that is created by this update.
S3ReferenceDataSourceUpdate (dict) –
Describes the S3 bucket name, object key name, and IAM role that Amazon Kinesis Analytics can assume to read the Amazon S3 object on your behalf and populate the in-application reference table.
BucketARNUpdate (string) –
Amazon Resource Name (ARN) of the S3 bucket.
FileKeyUpdate (string) –
Object key name.
ReferenceRoleARNUpdate (string) –
ARN of the IAM role that Amazon Kinesis Analytics can assume to read the Amazon S3 object and populate the in-application.
ReferenceSchemaUpdate (dict) –
Describes the format of the data in the streaming source, and how each data element maps to corresponding columns created in the in-application stream.
RecordFormat (dict) – [REQUIRED]
Specifies the format of the records on the streaming source.
RecordFormatType (string) – [REQUIRED]
The type of record format.
MappingParameters (dict) –
When configuring application input at the time of creating or updating an application, provides additional mapping information specific to the record format (such as JSON, CSV, or record fields delimited by some delimiter) on the streaming source.
JSONMappingParameters (dict) –
Provides additional mapping information when JSON is the record format on the streaming source.
RecordRowPath (string) – [REQUIRED]
Path to the top-level parent that contains the records.
CSVMappingParameters (dict) –
Provides additional mapping information when the record format uses delimiters (for example, CSV).
RecordRowDelimiter (string) – [REQUIRED]
Row delimiter. For example, in a CSV format, ‘n’ is the typical row delimiter.
RecordColumnDelimiter (string) – [REQUIRED]
Column delimiter. For example, in a CSV format, a comma (“,”) is the typical column delimiter.
RecordEncoding (string) –
Specifies the encoding of the records in the streaming source. For example, UTF-8.
RecordColumns (list) – [REQUIRED]
A list of
RecordColumn
objects.(dict) –
Describes the mapping of each data element in the streaming source to the corresponding column in the in-application stream.
Also used to describe the format of the reference data source.
Name (string) – [REQUIRED]
Name of the column created in the in-application input stream or reference table.
Mapping (string) –
Reference to the data element in the streaming input or the reference data source. This element is required if the RecordFormatType is
JSON
.SqlType (string) – [REQUIRED]
Type of column created in the in-application input stream or reference table.
CloudWatchLoggingOptionUpdates (list) –
Describes application CloudWatch logging option updates.
(dict) –
Describes CloudWatch logging option updates.
CloudWatchLoggingOptionId (string) – [REQUIRED]
ID of the CloudWatch logging option to update
LogStreamARNUpdate (string) –
ARN of the CloudWatch log to receive application messages.
RoleARNUpdate (string) –
IAM ARN of the role to use to send application messages. Note: To write application messages to CloudWatch, the IAM role used must have the
PutLogEvents
policy action enabled.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions