本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
UpdateApplication
更新现有的 Apache Flink 托管服务。使用此操作,您可以更新应用程序代码、输入配置和输出配置。
每次更新应用程序时,Apache Flink 托管服务都会更新 ApplicationVersionId
。
请求语法
{
"ApplicationConfigurationUpdate": {
"ApplicationCodeConfigurationUpdate": {
"CodeContentTypeUpdate": "string
",
"CodeContentUpdate": {
"S3ContentLocationUpdate": {
"BucketARNUpdate": "string
",
"FileKeyUpdate": "string
",
"ObjectVersionUpdate": "string
"
},
"TextContentUpdate": "string
",
"ZipFileContentUpdate": blob
}
},
"ApplicationSnapshotConfigurationUpdate": {
"SnapshotsEnabledUpdate": boolean
},
"ApplicationSystemRollbackConfigurationUpdate": {
"RollbackEnabledUpdate": boolean
},
"EnvironmentPropertyUpdates": {
"PropertyGroups": [
{
"PropertyGroupId": "string
",
"PropertyMap": {
"string
" : "string
"
}
}
]
},
"FlinkApplicationConfigurationUpdate": {
"CheckpointConfigurationUpdate": {
"CheckpointingEnabledUpdate": boolean
,
"CheckpointIntervalUpdate": number
,
"ConfigurationTypeUpdate": "string
",
"MinPauseBetweenCheckpointsUpdate": number
},
"MonitoringConfigurationUpdate": {
"ConfigurationTypeUpdate": "string
",
"LogLevelUpdate": "string
",
"MetricsLevelUpdate": "string
"
},
"ParallelismConfigurationUpdate": {
"AutoScalingEnabledUpdate": boolean
,
"ConfigurationTypeUpdate": "string
",
"ParallelismPerKPUUpdate": number
,
"ParallelismUpdate": number
}
},
"SqlApplicationConfigurationUpdate": {
"InputUpdates": [
{
"InputId": "string
",
"InputParallelismUpdate": {
"CountUpdate": number
},
"InputProcessingConfigurationUpdate": {
"InputLambdaProcessorUpdate": {
"ResourceARNUpdate": "string
"
}
},
"InputSchemaUpdate": {
"RecordColumnUpdates": [
{
"Mapping": "string
",
"Name": "string
",
"SqlType": "string
"
}
],
"RecordEncodingUpdate": "string
",
"RecordFormatUpdate": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string
",
"RecordRowDelimiter": "string
"
},
"JSONMappingParameters": {
"RecordRowPath": "string
"
}
},
"RecordFormatType": "string
"
}
},
"KinesisFirehoseInputUpdate": {
"ResourceARNUpdate": "string
"
},
"KinesisStreamsInputUpdate": {
"ResourceARNUpdate": "string
"
},
"NamePrefixUpdate": "string
"
}
],
"OutputUpdates": [
{
"DestinationSchemaUpdate": {
"RecordFormatType": "string
"
},
"KinesisFirehoseOutputUpdate": {
"ResourceARNUpdate": "string
"
},
"KinesisStreamsOutputUpdate": {
"ResourceARNUpdate": "string
"
},
"LambdaOutputUpdate": {
"ResourceARNUpdate": "string
"
},
"NameUpdate": "string
",
"OutputId": "string
"
}
],
"ReferenceDataSourceUpdates": [
{
"ReferenceId": "string
",
"ReferenceSchemaUpdate": {
"RecordColumns": [
{
"Mapping": "string
",
"Name": "string
",
"SqlType": "string
"
}
],
"RecordEncoding": "string
",
"RecordFormat": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string
",
"RecordRowDelimiter": "string
"
},
"JSONMappingParameters": {
"RecordRowPath": "string
"
}
},
"RecordFormatType": "string
"
}
},
"S3ReferenceDataSourceUpdate": {
"BucketARNUpdate": "string
",
"FileKeyUpdate": "string
"
},
"TableNameUpdate": "string
"
}
]
},
"VpcConfigurationUpdates": [
{
"SecurityGroupIdUpdates": [ "string
" ],
"SubnetIdUpdates": [ "string
" ],
"VpcConfigurationId": "string
"
}
],
"ZeppelinApplicationConfigurationUpdate": {
"CatalogConfigurationUpdate": {
"GlueDataCatalogConfigurationUpdate": {
"DatabaseARNUpdate": "string
"
}
},
"CustomArtifactsConfigurationUpdate": [
{
"ArtifactType": "string
",
"MavenReference": {
"ArtifactId": "string
",
"GroupId": "string
",
"Version": "string
"
},
"S3ContentLocation": {
"BucketARN": "string
",
"FileKey": "string
",
"ObjectVersion": "string
"
}
}
],
"DeployAsApplicationConfigurationUpdate": {
"S3ContentLocationUpdate": {
"BasePathUpdate": "string
",
"BucketARNUpdate": "string
"
}
},
"MonitoringConfigurationUpdate": {
"LogLevelUpdate": "string
"
}
}
},
"ApplicationName": "string
",
"CloudWatchLoggingOptionUpdates": [
{
"CloudWatchLoggingOptionId": "string
",
"LogStreamARNUpdate": "string
"
}
],
"ConditionalToken": "string
",
"CurrentApplicationVersionId": number
,
"RunConfigurationUpdate": {
"ApplicationRestoreConfiguration": {
"ApplicationRestoreType": "string
",
"SnapshotName": "string
"
},
"FlinkRunConfiguration": {
"AllowNonRestoredState": boolean
}
},
"RuntimeEnvironmentUpdate": "string
",
"ServiceExecutionRoleUpdate": "string
"
}
请求参数
请求接受采用 JSON 格式的以下数据。
- ApplicationConfigurationUpdate
-
描述应用程序配置更新。
类型:ApplicationConfigurationUpdate 对象
必需:否
- ApplicationName
-
待更新的应用程序名称。
类型:字符串
长度限制:长度下限为 1。长度上限为 128。
模式:
[a-zA-Z0-9_.-]+
必需:是
- CloudWatchLoggingOptionUpdates
-
描述应用程序 Amazon CloudWatch 日志记录选项的更新。您只能通过此操作更新现有的 CloudWatch 日志记录选项。要添加新的 CloudWatch 日志记录选项,请使用AddApplicationCloudWatchLoggingOption。
类型:CloudWatchLoggingOptionUpdate 对象数组
必需:否
- ConditionalToken
-
用于实现应用程序更新强并发性的值。您必须提供
CurrentApplicationVersionId
或ConditionalToken
。使用 DescribeApplication 获得应用程序的当前ConditionalToken
。要获得更理想的并发支持,请使用ConditionalToken
参数代替CurrentApplicationVersionId
。类型:字符串
长度限制:长度下限为 1。最大长度为 512。
模式:
[a-zA-Z0-9-_+/=]+
必需:否
- CurrentApplicationVersionId
-
当前应用程序版本 ID。您必须提供
CurrentApplicationVersionId
或ConditionalToken
。您可以使用 DescribeApplication 检索应用程序版本 ID。要获得更理想的并发支持,请使用ConditionalToken
参数代替CurrentApplicationVersionId
。类型:长整型
有效范围:最小值为 1。最大值为 999999999。
必需:否
- RunConfigurationUpdate
-
描述对应用程序启动参数的更新。
类型:RunConfigurationUpdate 对象
必需:否
- RuntimeEnvironmentUpdate
-
更新用于运行代码的 Apache Flink 托管服务运行时环境。为避免出现问题,您必须:
-
确保您的新 jar 和依赖项与所选的新运行时兼容。
-
确保新代码的状态与应用程序将从中启动的快照兼容
类型:字符串
有效值:
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
必需:否
-
- ServiceExecutionRoleUpdate
-
描述服务执行角色的更新。
类型:字符串
长度限制:最小长度为 0。最大长度为 2048。
模式:
arn:.*
必需:否
响应语法
{
"ApplicationDetail": {
"ApplicationARN": "string",
"ApplicationConfigurationDescription": {
"ApplicationCodeConfigurationDescription": {
"CodeContentDescription": {
"CodeMD5": "string",
"CodeSize": number,
"S3ApplicationCodeLocationDescription": {
"BucketARN": "string",
"FileKey": "string",
"ObjectVersion": "string"
},
"TextContent": "string"
},
"CodeContentType": "string"
},
"ApplicationSnapshotConfigurationDescription": {
"SnapshotsEnabled": boolean
},
"ApplicationSystemRollbackConfigurationDescription": {
"RollbackEnabled": boolean
},
"EnvironmentPropertyDescriptions": {
"PropertyGroupDescriptions": [
{
"PropertyGroupId": "string",
"PropertyMap": {
"string" : "string"
}
}
]
},
"FlinkApplicationConfigurationDescription": {
"CheckpointConfigurationDescription": {
"CheckpointingEnabled": boolean,
"CheckpointInterval": number,
"ConfigurationType": "string",
"MinPauseBetweenCheckpoints": number
},
"JobPlanDescription": "string",
"MonitoringConfigurationDescription": {
"ConfigurationType": "string",
"LogLevel": "string",
"MetricsLevel": "string"
},
"ParallelismConfigurationDescription": {
"AutoScalingEnabled": boolean,
"ConfigurationType": "string",
"CurrentParallelism": number,
"Parallelism": number,
"ParallelismPerKPU": number
}
},
"RunConfigurationDescription": {
"ApplicationRestoreConfigurationDescription": {
"ApplicationRestoreType": "string",
"SnapshotName": "string"
},
"FlinkRunConfigurationDescription": {
"AllowNonRestoredState": boolean
}
},
"SqlApplicationConfigurationDescription": {
"InputDescriptions": [
{
"InAppStreamNames": [ "string" ],
"InputId": "string",
"InputParallelism": {
"Count": number
},
"InputProcessingConfigurationDescription": {
"InputLambdaProcessorDescription": {
"ResourceARN": "string",
"RoleARN": "string"
}
},
"InputSchema": {
"RecordColumns": [
{
"Mapping": "string",
"Name": "string",
"SqlType": "string"
}
],
"RecordEncoding": "string",
"RecordFormat": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string",
"RecordRowDelimiter": "string"
},
"JSONMappingParameters": {
"RecordRowPath": "string"
}
},
"RecordFormatType": "string"
}
},
"InputStartingPositionConfiguration": {
"InputStartingPosition": "string"
},
"KinesisFirehoseInputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"KinesisStreamsInputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"NamePrefix": "string"
}
],
"OutputDescriptions": [
{
"DestinationSchema": {
"RecordFormatType": "string"
},
"KinesisFirehoseOutputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"KinesisStreamsOutputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"LambdaOutputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"Name": "string",
"OutputId": "string"
}
],
"ReferenceDataSourceDescriptions": [
{
"ReferenceId": "string",
"ReferenceSchema": {
"RecordColumns": [
{
"Mapping": "string",
"Name": "string",
"SqlType": "string"
}
],
"RecordEncoding": "string",
"RecordFormat": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string",
"RecordRowDelimiter": "string"
},
"JSONMappingParameters": {
"RecordRowPath": "string"
}
},
"RecordFormatType": "string"
}
},
"S3ReferenceDataSourceDescription": {
"BucketARN": "string",
"FileKey": "string",
"ReferenceRoleARN": "string"
},
"TableName": "string"
}
]
},
"VpcConfigurationDescriptions": [
{
"SecurityGroupIds": [ "string" ],
"SubnetIds": [ "string" ],
"VpcConfigurationId": "string",
"VpcId": "string"
}
],
"ZeppelinApplicationConfigurationDescription": {
"CatalogConfigurationDescription": {
"GlueDataCatalogConfigurationDescription": {
"DatabaseARN": "string"
}
},
"CustomArtifactsConfigurationDescription": [
{
"ArtifactType": "string",
"MavenReferenceDescription": {
"ArtifactId": "string",
"GroupId": "string",
"Version": "string"
},
"S3ContentLocationDescription": {
"BucketARN": "string",
"FileKey": "string",
"ObjectVersion": "string"
}
}
],
"DeployAsApplicationConfigurationDescription": {
"S3ContentLocationDescription": {
"BasePath": "string",
"BucketARN": "string"
}
},
"MonitoringConfigurationDescription": {
"LogLevel": "string"
}
}
},
"ApplicationDescription": "string",
"ApplicationMaintenanceConfigurationDescription": {
"ApplicationMaintenanceWindowEndTime": "string",
"ApplicationMaintenanceWindowStartTime": "string"
},
"ApplicationMode": "string",
"ApplicationName": "string",
"ApplicationStatus": "string",
"ApplicationVersionCreateTimestamp": number,
"ApplicationVersionId": number,
"ApplicationVersionRolledBackFrom": number,
"ApplicationVersionRolledBackTo": number,
"ApplicationVersionUpdatedFrom": number,
"CloudWatchLoggingOptionDescriptions": [
{
"CloudWatchLoggingOptionId": "string",
"LogStreamARN": "string",
"RoleARN": "string"
}
],
"ConditionalToken": "string",
"CreateTimestamp": number,
"LastUpdateTimestamp": number,
"RuntimeEnvironment": "string",
"ServiceExecutionRole": "string"
},
"OperationId": "string"
}
响应元素
如果此操作成功,则该服务将会发送回 HTTP 200 响应。
服务以 JSON 格式返回以下数据。
- ApplicationDetail
-
描述应用程序更新。
类型:ApplicationDetail 对象
- OperationId
-
可用于跟踪请求的操作 ID。
类型:字符串
长度限制:长度下限为 1。长度上限为 64。
错误
- CodeValidationException
-
用户提供的应用程序代码(查询)无效。这可能是简单的语法错误。
HTTP 状态代码:400
- ConcurrentModificationException
-
由于对应用程序进行并发修改而引发的异常。此错误可能是由于在未使用当前应用程序 ID 的情况下尝试修改应用程序所致。
HTTP 状态代码:400
- InvalidApplicationConfigurationException
-
用户提供的应用程序配置无效。
HTTP 状态代码:400
- InvalidArgumentException
-
指定的输入参数值无效。
HTTP 状态代码:400
- InvalidRequestException
-
操作的请求 JSON 无效。
HTTP 状态代码:400
- LimitExceededException
-
超出允许的资源数量。
HTTP 状态代码:400
- ResourceInUseException
-
该应用程序不可用于此操作。
HTTP 状态代码:400
- ResourceNotFoundException
-
无法找到指定的应用程序。
HTTP 状态代码:400
另请参阅
有关在特定语言的 AWS SDK 中使用此 API 的更多信息,请参阅以下内容: