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.
Parameters:
-
application_name
(ApplicationName)
–
Name of the application to which you want to add the output configuration.
-
current_application_version_id
(ApplicationVersionId)
–
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
(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.
Raises:
Source code in docs_src/capo_kinesis_analytics/_services/kinesis_analytics.py
| def add_application_output(
self,
application_name: "capo_kinesis_analytics.types.application_name.ApplicationName",
current_application_version_id: "capo_kinesis_analytics.types.application_version_id.ApplicationVersionId",
output: "capo_kinesis_analytics.types.output.Output",
*,
config_overrides: Optional[KinesisAnalyticsClientConfig] = None,
) -> "capo_kinesis_analytics.types.add_application_output_response.AddApplicationOutputResponse":
"""<note> <p>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 <a href="/kinesisanalytics/latest/apiv2/Welcome.html">Amazon Kinesis Data Analytics API V2 Documentation</a>.</p> </note> <p>Adds an external destination to your Amazon Kinesis Analytics application.</p> <p>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.</p> <p> 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 <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html">Understanding Application Output (Destination)</a>. </p> <p> Any configuration update, including adding a streaming source using this operation, results in a new version of the application. You can use the <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_DescribeApplication.html">DescribeApplication</a> operation to find the current application version.</p> <p>For the limits on the number of application inputs and outputs you can configure, see <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html">Limits</a>.</p> <p>This operation requires permissions to perform the <code>kinesisanalytics:AddApplicationOutput</code> action.</p>
Args:
application_name: <p>Name of the application to which you want to add the output configuration.</p>
current_application_version_id: <p>Version of the application to which you want to add the output configuration. You can use the <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_DescribeApplication.html">DescribeApplication</a> operation to get the current application version. If the version specified is not the current version, the <code>ConcurrentModificationException</code> is returned. </p>
output: <p>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.</p>
Raises:
capo_kinesis_analytics.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Exception thrown as a result of concurrent modification to an application. For example, two individuals attempting to edit the same application at the same time.</p>
capo_kinesis_analytics.errors.invalid_argument_exception.InvalidArgumentException: <p>Specified input parameter value is invalid.</p>
capo_kinesis_analytics.errors.resource_in_use_exception.ResourceInUseException: <p>Application is not available for this operation.</p>
capo_kinesis_analytics.errors.resource_not_found_exception.ResourceNotFoundException: <p>Specified application can't be found.</p>
capo_kinesis_analytics.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation. </p>
capo_kinesis_analytics.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kinesis_analytics.types.add_application_output_request.AddApplicationOutputRequest]",
) -> OperationResponse[
"capo_kinesis_analytics.types.add_application_output_response.AddApplicationOutputResponse"
]:
import capo_kinesis_analytics._operations.kinesis_analytics_20150814.add_application_output
output, http_response = (
capo_kinesis_analytics._operations.kinesis_analytics_20150814.add_application_output.add_application_output(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AddApplicationOutput")
)
input_: capo_kinesis_analytics.types.add_application_output_request.AddApplicationOutputRequest = {
"application_name": application_name,
"current_application_version_id": current_application_version_id,
"output": output,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|