Skip to main content

applications

Creates, updates, deletes, gets or lists an applications resource.

Overview

Nameapplications
TypeResource
Idaws.kinesisanalyticsv2.applications

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_arnstringThe ARN of the application. (pattern: <code>arn:.*</code>)
application_configuration_descriptionobjectDescribes details about the application code and starting parameters for a Managed Service for Apache Flink application.
application_descriptionstringThe description of the application.
application_maintenance_configuration_descriptionobjectThe details of the maintenance configuration for the application.
application_modestringTo create a Managed Service for Apache Flink Studio notebook, you must set the mode to INTERACTIVE. However, for a Managed Service for Apache Flink application, the mode is optional. (STREAMING, INTERACTIVE)
application_namestringThe name of the application. (pattern: <code>[a-zA-Z0-9_.-]+</code>)
application_statusstringThe status of the application. (DELETING, STARTING, STOPPING, READY, RUNNING, UPDATING, AUTOSCALING, FORCE_STOPPING, ROLLING_BACK, MAINTENANCE, ROLLED_BACK)
application_version_create_timestampstring (date-time)The timestamp that indicates when the application version was created.
application_version_idinteger (int64)Provides the current application version. Managed Service for Apache Flink updates the ApplicationVersionId each time you update the application.
application_version_rolled_back_frominteger (int64)If you reverted the application using RollbackApplication, the application version when RollbackApplication was called.
application_version_rolled_back_tointeger (int64)The version to which you want to roll back the application.
application_version_updated_frominteger (int64)The previous application version before the latest application update. RollbackApplication reverts the application to this version.
cloud_watch_logging_option_descriptionsarrayDescribes the application Amazon CloudWatch logging options.
conditional_tokenstringA value you use to implement strong concurrency for application updates. (pattern: <code>[a-zA-Z0-9-_+/=]+</code>)
create_timestampstring (date-time)The current timestamp when the application was created.
last_update_timestampstring (date-time)The current timestamp when the application was last updated.
runtime_environmentstringThe runtime environment for the application. (SQL-1_0, FLINK-1_6, FLINK-1_8, ZEPPELIN-FLINK-1_0, FLINK-1_11, FLINK-1_13, ZEPPELIN-FLINK-2_0, FLINK-1_15, ZEPPELIN-FLINK-3_0, FLINK-1_18, FLINK-1_19, FLINK-1_20, FLINK-2_2, FLINK-2_3)
service_execution_rolestringSpecifies the IAM role that the application uses to access external resources. (pattern: <code>arn:.*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_applicationselectregionReturns information about a specific Managed Service for Apache Flink application. If you want to retrieve a list of all applications in your account, use the ListApplications operation.
list_applicationsselectregionReturns a list of Managed Service for Apache Flink applications in your account. For each application, the response includes the application name, Amazon Resource Name (ARN), and status. If you want detailed information about a specific application, use DescribeApplication.
create_applicationinsertregion, ApplicationName, RuntimeEnvironment, ServiceExecutionRoleCreates a Managed Service for Apache Flink application. For information about creating a Managed Service for Apache Flink application, see Creating an Application.
create_application_presigned_urlinsertregion, ApplicationName, UrlTypeCreates and returns a URL that you can use to connect to an application's extension. The IAM role or user used to call this API defines the permissions to access the extension. After the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request that attempts to connect to the extension. You control the amount of time that the URL will be valid using the SessionExpirationDurationInSeconds parameter. If you do not provide this parameter, the returned URL is valid for twelve hours. The URL that you get from a call to CreateApplicationPresignedUrl must be used within 3 minutes to be valid. If you first try to use the URL after the 3-minute limit expires, the service returns an HTTP 403 Forbidden error.
add_application_input_processing_configurationupdateregion, ApplicationName, CurrentApplicationVersionId, InputId, InputProcessingConfigurationAdds an InputProcessingConfiguration to a SQL-based Kinesis Data Analytics application. An input processor pre-processes records on the input stream before the application's SQL code executes. Currently, the only input processor available is Amazon Lambda.
add_application_inputupdateregion, ApplicationName, CurrentApplicationVersionId, InputAdds a streaming source to your SQL-based Kinesis Data Analytics application. You can add a streaming source 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.
add_application_outputupdateregion, ApplicationName, CurrentApplicationVersionId, OutputAdds an external destination to your SQL-based Kinesis Data Analytics application. If you want Kinesis Data Analytics to deliver data from an in-application stream within your application to an external destination (such as an Kinesis data stream, a Kinesis Data Firehose delivery stream, or an Amazon 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. 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.
add_application_reference_data_sourceupdateregion, ApplicationName, CurrentApplicationVersionId, ReferenceDataSourceAdds a reference data source to an existing SQL-based Kinesis Data Analytics application. Kinesis Data 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 an Amazon S3 object maps to columns in the resulting in-application table.
add_application_cloud_watch_logging_optionupdateregion, ApplicationName, CloudWatchLoggingOptionAdds an Amazon CloudWatch log stream to monitor application configuration errors.
add_application_vpc_configurationupdateregion, ApplicationName, VpcConfigurationAdds a Virtual Private Cloud (VPC) configuration to the application. Applications can use VPCs to store and access resources securely. Note the following about VPC configurations for Managed Service for Apache Flink applications: VPC configurations are not supported for SQL applications. When a VPC is added to a Managed Service for Apache Flink application, the application can no longer be accessed from the Internet directly. To enable Internet access to the application, add an Internet gateway to your VPC.
update_application_maintenance_configurationupdateregion, ApplicationName, ApplicationMaintenanceConfigurationUpdateUpdates the maintenance configuration of the Managed Service for Apache Flink application. You can invoke this operation on an application that is in one of the two following states: READY or RUNNING. If you invoke it when the application is in a state other than these two states, it throws a ResourceInUseException. The service makes use of the updated configuration the next time it schedules maintenance for the application. If you invoke this operation after the service schedules maintenance, the service will apply the configuration update the next time it schedules maintenance for the application. This means that you might not see the maintenance configuration update applied to the maintenance process that follows a successful invocation of this operation, but to the following maintenance process instead. To see the current maintenance configuration of your application, invoke the DescribeApplication operation. For information about application maintenance, see Managed Service for Apache Flink for Apache Flink Maintenance. This operation is supported only for Managed Service for Apache Flink.
update_applicationupdateregion, ApplicationNameUpdates an existing Managed Service for Apache Flink application. Using this operation, you can update application code, input configuration, and output configuration. Managed Service for Apache Flink updates the ApplicationVersionId each time you update your application.
delete_application_input_processing_configurationdeleteregionDeletes an InputProcessingConfiguration from an input.
delete_application_outputdeleteregionDeletes the output destination configuration from your SQL-based Kinesis Data Analytics application's configuration. Kinesis Data Analytics will no longer write data from the corresponding in-application stream to the external output destination.
delete_application_reference_data_sourcedeleteregionDeletes a reference data source configuration from the specified SQL-based Kinesis Data Analytics application's configuration. If the application is running, Kinesis Data Analytics immediately removes the in-application table that you created using the AddApplicationReferenceDataSource operation.
delete_applicationdeleteregionDeletes the specified application. Managed Service for Apache Flink halts application execution and deletes the application.
delete_application_cloud_watch_logging_optiondeleteregionDeletes an Amazon CloudWatch log stream from an SQL-based Kinesis Data Analytics application.
delete_application_vpc_configurationdeleteregionRemoves a VPC configuration from a Managed Service for Apache Flink application.
rollback_applicationexecregion, ApplicationName, CurrentApplicationVersionIdReverts the application to the previous running version. You can roll back an application if you suspect it is stuck in a transient status or in the running status. You can roll back an application only if it is in the UPDATING, AUTOSCALING, or RUNNING statuses. When you rollback an application, it loads state data from the last successful snapshot. If the application has no snapshots, Managed Service for Apache Flink rejects the rollback request.
start_applicationexecregion, ApplicationNameStarts the specified Managed Service for Apache Flink application. After creating an application, you must exclusively call this operation to start your application.
stop_applicationexecregion, ApplicationNameStops the application from processing data. You can stop an application only if it is in the running status, unless you set the Force parameter to true. You can use the DescribeApplication operation to find the application status. Managed Service for Apache Flink takes a snapshot when the application is stopped, unless Force is set to true.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about a specific Managed Service for Apache Flink application. If you want to retrieve a list of all applications in your account, use the ListApplications operation.

SELECT
application_arn,
application_configuration_description,
application_description,
application_maintenance_configuration_description,
application_mode,
application_name,
application_status,
application_version_create_timestamp,
application_version_id,
application_version_rolled_back_from,
application_version_rolled_back_to,
application_version_updated_from,
cloud_watch_logging_option_descriptions,
conditional_token,
create_timestamp,
last_update_timestamp,
runtime_environment,
service_execution_role
FROM aws.kinesisanalyticsv2.applications
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a Managed Service for Apache Flink application. For information about creating a Managed Service for Apache Flink application, see Creating an Application.

INSERT INTO aws.kinesisanalyticsv2.applications (
ApplicationName,
ApplicationDescription,
RuntimeEnvironment,
ServiceExecutionRole,
ApplicationConfiguration,
CloudWatchLoggingOptions,
Tags,
ApplicationMode,
region
)
SELECT
'{{ ApplicationName }}' /* required */,
'{{ ApplicationDescription }}',
'{{ RuntimeEnvironment }}' /* required */,
'{{ ServiceExecutionRole }}' /* required */,
'{{ ApplicationConfiguration }}',
'{{ CloudWatchLoggingOptions }}',
'{{ Tags }}',
'{{ ApplicationMode }}',
'{{ region }}'
RETURNING
application_detail
;

UPDATE examples

Adds an InputProcessingConfiguration to a SQL-based Kinesis Data Analytics application. An input processor pre-processes records on the input stream before the application's SQL code executes. Currently, the only input processor available is Amazon Lambda.

UPDATE aws.kinesisanalyticsv2.applications
SET
ApplicationName = '{{ ApplicationName }}',
CurrentApplicationVersionId = {{ CurrentApplicationVersionId }},
InputId = '{{ InputId }}',
InputProcessingConfiguration = '{{ InputProcessingConfiguration }}'
WHERE
region = '{{ region }}' --required
AND ApplicationName = '{{ ApplicationName }}' --required
AND CurrentApplicationVersionId = '{{ CurrentApplicationVersionId }}' --required
AND InputId = '{{ InputId }}' --required
AND InputProcessingConfiguration = '{{ InputProcessingConfiguration }}' --required
RETURNING
application_arn,
application_version_id,
input_id,
input_processing_configuration_description;

DELETE examples

Deletes an InputProcessingConfiguration from an input.

DELETE FROM aws.kinesisanalyticsv2.applications
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Reverts the application to the previous running version. You can roll back an application if you suspect it is stuck in a transient status or in the running status. You can roll back an application only if it is in the UPDATING, AUTOSCALING, or RUNNING statuses. When you rollback an application, it loads state data from the last successful snapshot. If the application has no snapshots, Managed Service for Apache Flink rejects the rollback request.

EXEC aws.kinesisanalyticsv2.applications.rollback_application
@region='{{ region }}' --required
@@json=
'{
"ApplicationName": "{{ ApplicationName }}",
"CurrentApplicationVersionId": {{ CurrentApplicationVersionId }}
}'
;