RollbackApplication - Amazon Managed Servics for Apache Flink(前身为 Amazon Kinesis Data Analytics for Apache Flink)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

RollbackApplication

将应用程序还原到先前运行的版本。如果您怀疑应用程序处于临时状态或运行状态,则可以将其还原。

只有当应用程序处于、或RUNNING状态时 UPDATINGAUTOSCALING,您才能回滚该应用程序。

回滚应用程序时,它会从上次成功的快照中加载状态数据。如果应用程序没有快照,则 Apache Flink 托管服务会拒绝回滚请求。

请求语法

{ "ApplicationName": "string", "CurrentApplicationVersionId": number }

请求参数

请求接受采用 JSON 格式的以下数据。

ApplicationName

应用程序的名称。

类型:字符串

长度限制:长度下限为 1。长度上限为 128。

模式:[a-zA-Z0-9_.-]+

必需:是

CurrentApplicationVersionId

当前应用程序版本 ID。您可以使用 DescribeApplication 检索应用程序版本 ID。

类型:长整型

有效范围:最小值为 1。最大值为 999999999。

必需:是

响应语法

{ "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

描述应用程序,包括应用程序 Amazon 资源名称(ARN)、状态、最新版本以及输入和输出配置。

类型:ApplicationDetail 对象

OperationId

可用于跟踪请求的操作 ID。

类型:字符串

长度限制:长度下限为 1。长度上限为 64。

错误

ConcurrentModificationException

由于对应用程序进行并发修改而引发的异常。此错误可能是由于在未使用当前应用程序 ID 的情况下尝试修改应用程序所致。

HTTP 状态代码:400

InvalidArgumentException

指定的输入参数值无效。

HTTP 状态代码:400

InvalidRequestException

操作的请求 JSON 无效。

HTTP 状态代码:400

ResourceInUseException

该应用程序不可用于此操作。

HTTP 状态代码:400

ResourceNotFoundException

无法找到指定的应用程序。

HTTP 状态代码:400

UnsupportedOperationException

由于不支持指定的参数或指定的资源对此操作无效,请求被拒绝。

HTTP 状态代码:400

另请参阅

有关在特定语言的 AWS SDK 中使用此 API 的更多信息,请参阅以下内容: