Updates 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.
Parameters:
Raises:
Source code in docs_src/capo_kinesis_analytics_v2/_services/kinesis_analytics_v2.py
| def update_application_maintenance_configuration(
self,
application_name: "capo_kinesis_analytics_v2.types.application_name.ApplicationName",
application_maintenance_configuration_update: "capo_kinesis_analytics_v2.types.application_maintenance_configuration_update.ApplicationMaintenanceConfigurationUpdate",
*,
config_overrides: Optional[KinesisAnalyticsV2ClientConfig] = None,
) -> "capo_kinesis_analytics_v2.types.update_application_maintenance_configuration_response.UpdateApplicationMaintenanceConfigurationResponse":
"""<p>Updates the maintenance configuration of the Managed Service for Apache Flink application. </p> <p>You can invoke this operation on an application that is in one of the two following states: <code>READY</code> or <code>RUNNING</code>. If you invoke it when the application is in a state other than these two states, it throws a <code>ResourceInUseException</code>. 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.</p> <p>To see the current maintenance configuration of your application, invoke the <a>DescribeApplication</a> operation.</p> <p>For information about application maintenance, see <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/java/maintenance.html">Managed Service for Apache Flink for Apache Flink Maintenance</a>.</p> <note> <p>This operation is supported only for Managed Service for Apache Flink.</p> </note>
Args:
application_name: <p>The name of the application for which you want to update the maintenance configuration.</p>
application_maintenance_configuration_update: <p>Describes the application maintenance configuration update.</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.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.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_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kinesis_analytics_v2.types.update_application_maintenance_configuration_request.UpdateApplicationMaintenanceConfigurationRequest]",
) -> OperationResponse[
"capo_kinesis_analytics_v2.types.update_application_maintenance_configuration_response.UpdateApplicationMaintenanceConfigurationResponse"
]:
import capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.update_application_maintenance_configuration
output, http_response = (
capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.update_application_maintenance_configuration.update_application_maintenance_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("UpdateApplicationMaintenanceConfiguration"),
)
input_: capo_kinesis_analytics_v2.types.update_application_maintenance_configuration_request.UpdateApplicationMaintenanceConfigurationRequest = {
"application_name": application_name,
"application_maintenance_configuration_update": application_maintenance_configuration_update,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|