本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
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
。你得到應用程序的當前ConditionalToken
使用DescribeApplication. 為了獲得更好的CurrentApplicationVersionId
並發支持,請使用ConditionalToken
參數而不是。類型:字串
長度限制:長度下限為 1。長度上限為 512。
模式:
[a-zA-Z0-9-_+/=]+
必要:否
- CurrentApplicationVersionId
-
目前的應用程式版本 ID。您必須提供
CurrentApplicationVersionId
或。您可ConditionalToken
以使用擷取應用程式版本 ID DescribeApplication。為了獲得更好的CurrentApplicationVersionId
並發支持,請使用ConditionalToken
參數而不是。類型:Long
有效範圍:最小值為 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
-
描述服務執行角色的更新。
類型:字串
長度限制:長度下限為 1。長度上限為 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
-
使用者提供的應用程式程式碼 (query) 無效。這可能是一個簡單的語法錯誤。
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 的詳細資訊,請參閱下列內容: