Adds 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.
Parameters:
-
application_name
(ApplicationName)
–
The name of the application to which you want to add the output configuration.
-
current_application_version_id
(ApplicationVersionId)
–
The 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, a Kinesis data stream, a Kinesis Data Firehose delivery stream, or an Amazon Lambda function), and record the formation to use when writing to the destination.
Raises:
Source code in docs_src/capo_kinesis_analytics_v2/_services/kinesis_analytics_v2.py
| def add_application_output(
self,
application_name: "capo_kinesis_analytics_v2.types.application_name.ApplicationName",
current_application_version_id: "capo_kinesis_analytics_v2.types.application_version_id.ApplicationVersionId",
output: "capo_kinesis_analytics_v2.types.output.Output",
*,
config_overrides: Optional[KinesisAnalyticsV2ClientConfig] = None,
) -> "capo_kinesis_analytics_v2.types.add_application_output_response.AddApplicationOutputResponse":
"""<p>Adds an external destination to your SQL-based Kinesis Data Analytics application.</p> <p>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.</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. </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>DescribeApplication</a> operation to find the current application version.</p>
Args:
application_name: <p>The name of the application to which you want to add the output configuration.</p>
current_application_version_id: <p>The version of the application to which you want to add the output configuration. You can use the <a>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, a Kinesis data stream, a Kinesis Data Firehose delivery stream, or an Amazon Lambda function), and record the formation to use when writing to the destination.</p>
Raises:
capo_kinesis_analytics_v2.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Exception thrown as a result of concurrent modifications to an application. This error can be the result of attempting to modify an application without using the current application ID.</p>
capo_kinesis_analytics_v2.errors.invalid_argument_exception.InvalidArgumentException: <p>The specified input parameter value is not valid.</p>
capo_kinesis_analytics_v2.errors.invalid_request_exception.InvalidRequestException: <p>The request JSON is not valid for the operation.</p>
capo_kinesis_analytics_v2.errors.resource_in_use_exception.ResourceInUseException: <p>The application is not available for this operation.</p>
capo_kinesis_analytics_v2.errors.resource_not_found_exception.ResourceNotFoundException: <p>Specified application can't be found.</p>
capo_kinesis_analytics_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kinesis_analytics_v2.types.add_application_output_request.AddApplicationOutputRequest]",
) -> OperationResponse[
"capo_kinesis_analytics_v2.types.add_application_output_response.AddApplicationOutputResponse"
]:
import capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.add_application_output
output, http_response = (
capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.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_v2.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
|