Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.
API-Beispielcode für Managed Service für Apache Flink
Dieses Thema enthält Beispielanforderungsblöcke für Managed Service für Apache Flink-Aktionen.
Um JSON als Eingabe für eine Aktion zu verwenden, verwenden Sie AWS Command Line Interface (AWS CLI), speichern Sie die Anfrage in einer JSON-Datei. Übergeben Sie dann den Dateinamen mithilfe des Parameters --cli-input-json an die Aktion.
Das folgende Beispiel zeigt, wie Sie eine JSON-Datei mit einer Aktion verwenden.
$ aws kinesisanalyticsv2 start-application --cli-input-json file://start.json
Weitere Informationen zur Verwendung von JSON mit der AWS CLI, siehe Generieren Sie CLI-Skelett- und CLI-Eingabe-JSON-Parameter in der AWS Command Line Interface Benutzerleitfaden.
Themen
AddApplicationCloudWatchLoggingOption
Das folgende Beispiel für einen Anforderungscode für AddApplicationCloudWatchLoggingOption Aktion fügt ein Amazon hinzu CloudWatch Logging-Option für eine Managed Service for Apache Flink-Anwendung:
{ "ApplicationName": "MyApplication", "CloudWatchLoggingOption": { "LogStreamARN": "arn:aws:logs:us-east-1:123456789123:log-group:my-log-group:log-stream:My-LogStream" }, "CurrentApplicationVersionId": 2 }
AddApplicationInput
Das folgende Beispiel für einen Anforderungscode für AddApplicationInput action fügt einer Managed Service for Apache Flink-Anwendung eine Anwendungseingabe hinzu:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 2, "Input": { "InputParallelism": { "Count": 2 }, "InputSchema": { "RecordColumns": [ { "Mapping": "$.TICKER", "Name": "TICKER_SYMBOL", "SqlType": "VARCHAR(50)" }, { "SqlType": "REAL", "Name": "PRICE", "Mapping": "$.PRICE" } ], "RecordEncoding": "UTF-8", "RecordFormat": { "MappingParameters": { "JSONMappingParameters": { "RecordRowPath": "$" } }, "RecordFormatType": "JSON" } }, "KinesisStreamsInput": { "ResourceARN": "arn:aws:kinesis:us-east-1:012345678901:stream/ExampleInputStream" } } }
AddApplicationInputProcessingConfiguration
Das folgende Beispiel für einen Anforderungscode für AddApplicationInputProcessingConfiguration action fügt einer Managed Service for Apache Flink-Anwendung eine Konfiguration für die Verarbeitung von Anwendungseingaben hinzu:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 2, "InputId": "2.1", "InputProcessingConfiguration": { "InputLambdaProcessor": { "ResourceARN": "arn:aws:lambda:us-east-1:012345678901:function:MyLambdaFunction" } } }
AddApplicationOutput
Das folgende Beispiel für einen Anforderungscode für AddApplicationOutput action fügt einer Managed Service for Apache Flink-Anwendung einen Kinesis-Datenstream als Anwendungsausgabe hinzu:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 2, "Output": { "DestinationSchema": { "RecordFormatType": "JSON" }, "KinesisStreamsOutput": { "ResourceARN": "arn:aws:kinesis:us-east-1:012345678901:stream/ExampleOutputStream" }, "Name": "DESTINATION_SQL_STREAM" } }
AddApplicationReferenceDataSource
Das folgende Beispiel für einen Anforderungscode für AddApplicationReferenceDataSource Die Aktion fügt einer Managed Service for Apache Flink-Anwendung eine Referenzdatenquelle für CSV-Anwendungen hinzu:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 5, "ReferenceDataSource": { "ReferenceSchema": { "RecordColumns": [ { "Mapping": "$.TICKER", "Name": "TICKER", "SqlType": "VARCHAR(4)" }, { "Mapping": "$.COMPANYNAME", "Name": "COMPANY_NAME", "SqlType": "VARCHAR(40)" }, ], "RecordEncoding": "UTF-8", "RecordFormat": { "MappingParameters": { "CSVMappingParameters": { "RecordColumnDelimiter": " ", "RecordRowDelimiter": "\r\n" } }, "RecordFormatType": "CSV" } }, "S3ReferenceDataSource": { "BucketARN": "arn:aws:s3:::amzn-s3-demo-bucket", "FileKey": "TickerReference.csv" }, "TableName": "string" } }
AddApplicationVpcConfiguration
Der folgende Beispiel-Anforderungscode für die AddApplicationVpcConfiguration-Aktion fügt einer bestehenden Anwendung eine VPC-Konfiguration hinzu:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 9, "VpcConfiguration": { "SecurityGroupIds": [ "sg-0123456789abcdef0" ], "SubnetIds": [ "subnet-0123456789abcdef0" ] } }
CreateApplication
Das folgende Beispiel für einen Anforderungscode für CreateApplication Aktion erstellt einen Managed Service für die Apache Flink-Anwendung:
{ "ApplicationName":"MyApplication", "ApplicationDescription":"My-Application-Description", "RuntimeEnvironment":"FLINK-1_15", "ServiceExecutionRole":"arn:aws:iam::123456789123:role/myrole", "CloudWatchLoggingOptions":[ { "LogStreamARN":"arn:aws:logs:us-east-1:123456789123:log-group:my-log-group:log-stream:My-LogStream" } ], "ApplicationConfiguration": { "EnvironmentProperties": {"PropertyGroups": [ {"PropertyGroupId": "ConsumerConfigProperties", "PropertyMap": {"aws.region": "us-east-1", "flink.stream.initpos": "LATEST"} }, {"PropertyGroupId": "ProducerConfigProperties", "PropertyMap": {"aws.region": "us-east-1"} }, ] }, "ApplicationCodeConfiguration":{ "CodeContent":{ "S3ContentLocation":{ "BucketARN":"arn:aws:s3:::amzn-s3-demo-bucket", "FileKey":"myflink.jar", "ObjectVersion":"AbCdEfGhIjKlMnOpQrStUvWxYz12345" } }, "CodeContentType":"ZIPFILE" }, "FlinkApplicationConfiguration":{ "ParallelismConfiguration":{ "ConfigurationType":"CUSTOM", "Parallelism":2, "ParallelismPerKPU":1, "AutoScalingEnabled":true } } } }
Die folgende JSON-Beispielanforderung für CreateApplication Aktion erstellt eine Anwendung im erweiterten Snapshot-Modus. Legen Sie in ApplicationSnapshotConfiguration SnapshotMode auf ENHANCED_SNAPSHOTS fest. Wenn Sie weglassen SnapshotMode, verwendet die Anwendung APPLICATION_SNAPSHOTS_LEGACY. Für den erweiterten Snapshot-Modus ist Apache Flink Version 1.20 oder höher erforderlich.
Ersetzen Sie im folgenden Beispiel MyApplication, das ServiceExecutionRole ARN, der Bucket-ARN und der Dateischlüssel mit Ihren eigenen Werten.
{ "ApplicationName": "MyApplication", "RuntimeEnvironment": "FLINK-1_20", "ServiceExecutionRole": "arn:aws:iam::111122223333:role/MyApplicationServiceRole", "ApplicationConfiguration": { "ApplicationCodeConfiguration": { "CodeContent": { "S3ContentLocation": { "BucketARN": "arn:aws:s3:::amzn-s3-demo-bucket", "FileKey": "my-flink-app.jar" } }, "CodeContentType": "ZIPFILE" }, "ApplicationSnapshotConfiguration": { "SnapshotsEnabled": true, "SnapshotMode": "ENHANCED_SNAPSHOTS" } } }
CreateApplicationSnapshot
Die folgende JSON-Beispielanforderung für CreateApplicationSnapshot Die Aktion erstellt einen Anwendungs-Snapshot (Legacy). Für eine Anwendung im erweiterten Snapshot-Modus kehrt diese Aktion zurück InvalidApplicationConfigurationException. Die Antwortsyntax finden Sie unter CreateApplicationSnapshot in der API-Referenz für den verwalteten Dienst für Apache Flink.
{ "ApplicationName": "MyApplication", "SnapshotName": "MySnapshot" }
DeleteApplication
Das folgende Beispiel für einen Anforderungscode für DeleteApplication Aktion löscht eine Managed Service für Apache Flink-Anwendung:
{"ApplicationName": "MyApplication", "CreateTimestamp": 12345678912}
Im erweiterten Snapshot-Modus DeleteApplication löscht die erweiterten Snapshots der Anwendung nicht. Weitere Informationen finden Sie unter Löschen Sie einen erweiterten Snapshot.
DeleteApplicationCloudWatchLoggingOption
Das folgende Beispiel für einen Anforderungscode für DeleteApplicationCloudWatchLoggingOption Aktion löscht ein Amazon CloudWatch Protokollierungsoption aus einer Managed Service for Apache Flink-Anwendung:
{ "ApplicationName": "MyApplication", "CloudWatchLoggingOptionId": "3.1" "CurrentApplicationVersionId": 3 }
DeleteApplicationInputProcessingConfiguration
Das folgende Beispiel für einen Anforderungscode für DeleteApplicationInputProcessingConfiguration Mit dieser Aktion wird eine Eingabeverarbeitungskonfiguration aus einer Managed Service for Apache Flink-Anwendung entfernt:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 4, "InputId": "2.1" }
DeleteApplicationOutput
Das folgende Beispiel für einen Anforderungscode für DeleteApplicationOutput Die Aktion entfernt eine Anwendungsausgabe aus einer Managed Service for Apache Flink-Anwendung:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 4, "OutputId": "4.1" }
DeleteApplicationReferenceDataSource
Das folgende Beispiel für einen Anforderungscode für DeleteApplicationReferenceDataSource Mit dieser Aktion wird eine Anwendungsreferenzdatenquelle aus einer Managed Service for Apache Flink-Anwendung entfernt:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 5, "ReferenceId": "5.1" }
CreateSnapshot
Die folgende JSON-Beispielanforderung für CreateSnapshot Aktion erstellt einen erweiterten Snapshot einer laufenden Anwendung. Die Anwendung muss den erweiterten Snapshot-Modus verwenden.
{ "ApplicationName": "MyApplication", "SnapshotName": "MyApplication-snapshot-1", "SnapshotDescription": "Before code update" }
Das folgende Beispiel zeigt die Antwort:
{ "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-1", "SnapshotStatus": "CREATING", "SnapshotOperationId": "a1B2c3D4e5F6", "SnapshotOperationStatus": "IN_PROGRESS" }
DeleteApplicationSnapshot
Die folgende JSON-Beispielanforderung für DeleteApplicationSnapshot Aktion löscht einen Anwendungs-Snapshot (Legacy). Für einen erweiterten Snapshot verwenden Sie DeleteSnapshot. Die Antwortsyntax finden Sie unter DeleteApplicationSnapshot in der API-Referenz für den verwalteten Dienst für Apache Flink.
{ "ApplicationName": "MyApplication", "SnapshotCreationTimestamp": 12345678912, "SnapshotName": "MySnapshot" }
DeleteApplicationVpcConfiguration
Der folgende Beispiel-Anforderungscode für die DeleteApplicationVpcConfiguration-Aktion entfernt eine bestehende VPC-Konfiguration aus einer Anwendung:
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 9, "VpcConfigurationId": "1.1" }
DeleteSnapshot
Die folgende JSON-Beispielanforderung für DeleteSnapshot Aktion löscht einen erweiterten Snapshot. Kopieren Sie den SnapshotCreationTimestamp Wert aus dem DescribeSnapshot Antwort.
{ "SnapshotName": "MyApplication-snapshot-1", "SnapshotCreationTimestamp": 1767225600 }
Das folgende Beispiel zeigt die Antwort:
{ "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-1", "SnapshotStatus": "DELETING", "SnapshotOperationId": "g7H8i9J0k1L2", "SnapshotOperationStatus": "IN_PROGRESS" }
DescribeApplication
Das folgende Beispiel für einen Anforderungscode für DescribeApplication action gibt Details zu einer Managed Service für Apache Flink-Anwendung zurück:
{"ApplicationName": "MyApplication"}
DescribeApplicationSnapshot
Die folgende JSON-Beispielanforderung für DescribeApplicationSnapshot action gibt Details zu einem Anwendungs-Snapshot (Legacy) zurück. Für einen erweiterten Snapshot verwenden Sie DescribeSnapshot. Die Antwortsyntax finden Sie unter DescribeApplicationSnapshot in der API-Referenz für den verwalteten Dienst für Apache Flink.
{ "ApplicationName": "MyApplication", "SnapshotName": "MySnapshot" }
DescribeSnapshot
Die folgende JSON-Beispielanforderung für DescribeSnapshot action gibt die Details eines erweiterten Snapshots zurück.
{ "SnapshotName": "MyApplication-snapshot-1" }
Das folgende Beispiel zeigt einen Teil der Antwort:
{ "SnapshotInfoDetails": { "SnapshotName": "MyApplication-snapshot-1", "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-1", "SnapshotStatus": "READY", "SnapshotCreationTimestamp": 1767225600, "RuntimeEnvironment": "FLINK-1_20", "SnapshotInitiator": "USER", "SnapshotInitiatorOperation": "CreateSnapshot", "SnapshotFormat": "CANONICAL" } }
DescribeSnapshotOperation
Die folgende JSON-Beispielanforderung für DescribeSnapshotOperation action gibt die Details eines Vorgangs für einen erweiterten Snapshot zurück.
{ "SnapshotName": "MyApplication-snapshot-1", "SnapshotOperationId": "s9T0u1V2w3X4" }
Das folgende Beispiel zeigt die Antwort auf einen erfolgreichen Export:
{ "SnapshotOperationInfoDetails": { "SnapshotOperationId": "s9T0u1V2w3X4", "SnapshotOperation": "ExportSnapshot", "SnapshotOperationStatus": "SUCCESSFUL", "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-1", "StartTime": 1767229200, "EndTime": 1767229800 } }
DiscoverInputSchema
Das folgende Beispiel für einen Anforderungscode für DiscoverInputSchema action generiert ein Schema aus einer Streaming-Quelle:
{ "InputProcessingConfiguration": { "InputLambdaProcessor": { "ResourceARN": "arn:aws:lambda:us-east-1:012345678901:function:MyLambdaFunction" } }, "InputStartingPositionConfiguration": { "InputStartingPosition": "NOW" }, "ResourceARN": "arn:aws:kinesis:us-east-1:012345678901:stream/ExampleInputStream", "S3Configuration": { "BucketARN": "string", "FileKey": "string" }, "ServiceExecutionRole": "string" }
Das folgende Beispiel für einen Anforderungscode für DiscoverInputSchema Aktion generiert ein Schema aus einer Referenzquelle:
{ "S3Configuration": { "BucketARN": "arn:aws:s3:::amzn-s3-demo-bucket", "FileKey": "TickerReference.csv" }, "ServiceExecutionRole": "arn:aws:iam::123456789123:role/myrole" }
ExportSnapshot
Die folgende JSON-Beispielanforderung für ExportSnapshot action exportiert einen erweiterten Snapshot in einen Amazon S3-Bucket. Die Rollen- und Bucket-Anforderungen finden Sie unter Importiere und exportiere erweiterte Schnappschüsse.
Ersetzen Sie im folgenden Beispiel den Snapshot-Namen, den Rollen-ARN, den Bucket-ARN und das Schlüsselpräfix durch Ihre eigenen Werte.
{ "SnapshotName": "MyApplication-snapshot-1", "ExportDestinationConfiguration": { "DestinationType": "S3", "ExportRoleArn": "arn:aws:iam::111122223333:role/MSFSnapshotExportRole", "DestinationEncryptionConfiguration": { "KeyType": "AWS_OWNED_KEY" }, "DestinationS3PrefixLocation": { "BucketARN": "arn:aws:s3:::amzn-s3-demo-bucket", "KeyPrefix": "exports/my-app/" } } }
Das folgende Beispiel zeigt die Antwort:
{ "SnapshotOperationId": "s9T0u1V2w3X4", "SnapshotOperationStatus": "IN_PROGRESS" }
ImportSnapshot
Die folgende JSON-Beispielanforderung für ImportSnapshot action erstellt einen neuen erweiterten Snapshot aus den Statusdateien in einem Amazon S3-Präfix. Die Anforderungen an Datei, Rolle und Bucket finden Sie unter Importiere und exportiere erweiterte Schnappschüsse.
Ersetzen Sie im folgenden Beispiel den Snapshot-Namen, den Rollen-ARN, den Bucket-ARN und das Schlüsselpräfix durch Ihre eigenen Werte.
{ "SnapshotName": "MyApplication-snapshot-imported", "ImportSourceConfiguration": { "SourceType": "S3", "ImportRoleArn": "arn:aws:iam::111122223333:role/MSFSnapshotImportRole", "SourceS3PrefixLocation": { "BucketARN": "arn:aws:s3:::amzn-s3-demo-bucket", "KeyPrefix": "imports/my-app/" } }, "SnapshotDescription": "Imported from self-managed Apache Flink" }
Das folgende Beispiel zeigt die Antwort:
{ "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-imported", "SnapshotStatus": "CREATING", "SnapshotOperationId": "m3N4o5P6q7R8", "SnapshotOperationStatus": "IN_PROGRESS" }
ListApplications
Das folgende Beispiel für einen Anforderungscode für ListApplications action gibt eine Liste der Managed Service für Apache Flink-Anwendungen in Ihrem Konto zurück:
{ "ExclusiveStartApplicationName": "MyApplication", "Limit": 50 }
ListApplicationSnapshots
Die folgende JSON-Beispielanforderung für ListApplicationSnapshots action gibt eine Liste der Anwendungs-Snapshots (Legacy) einer Anwendung zurück. Für erweiterte Snapshots verwenden Sie ListSnapshots. Die Antwortsyntax finden Sie unter ListApplicationSnapshots in der API-Referenz für den verwalteten Dienst für Apache Flink.
{"ApplicationName": "MyApplication", "Limit": 50, "NextToken": "aBcDeFgHiJkLmNoPqRsTuVwXyZ0123" }
ListSnapshotOperations
Die folgende JSON-Beispielanforderung für ListSnapshotOperations action listet die fehlgeschlagenen Operationen eines erweiterten Snapshots auf.
{ "SnapshotName": "MyApplication-snapshot-1", "SnapshotOperationStatus": "FAILED", "Limit": 50 }
Das folgende Beispiel zeigt die Antwort:
{ "SnapshotOperationInfoList": [ { "SnapshotOperationId": "y5Z6a7B8c9D0", "SnapshotOperation": "ExportSnapshot", "SnapshotOperationStatus": "FAILED", "StartTime": 1767232800, "EndTime": 1767233100 } ] }
ListSnapshots
Die folgende JSON-Beispielanforderung für ListSnapshots Aktion listet die ersten 50 erweiterten Snapshots im Konto und in der Region auf.
{ "Limit": 50 }
Das folgende Beispiel zeigt einen Teil der Antwort:
{ "SnapshotInfoList": [ { "SnapshotName": "MyApplication-snapshot-1", "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-1", "SnapshotStatus": "READY", "SnapshotCreationTimestamp": 1767225600, "SnapshotInitiator": "USER", "SnapshotInitiatorOperation": "CreateSnapshot", "SourceApplicationName": "MyApplication", "SnapshotFormat": "CANONICAL" } ] }
StartApplication
Das folgende Beispiel für einen Anforderungscode für StartApplication Aktion startet eine Managed Service for Apache Flink-Anwendung und lädt den Anwendungsstatus aus dem letzten Snapshot (falls vorhanden):
{ "ApplicationName": "MyApplication", "RunConfiguration": { "ApplicationRestoreConfiguration": { "ApplicationRestoreType": "RESTORE_FROM_LATEST_SNAPSHOT" } } }
Im erweiterten Snapshot-Modus wird diese Anforderung anhand des neuesten erweiterten Snapshots im READY Status, den die Anwendung erstellt hat. Die Anfrage verwendet keinen Anwendungs-Snapshot (Legacy). Der Anrufer benötigt kinesisanalytics:RestoreFromSnapshot IAM-Berechtigung für diesen erweiterten Snapshot. Weitere Informationen erhalten Sie unter Aus dem letzten Snapshot wiederherstellen und IAM-Berechtigungen.
Die folgende JSON-Beispielanforderung für StartApplication Mit dieser Aktion wird eine Anwendung im erweiterten Snapshot-Modus von einem bestimmten erweiterten Snapshot aus gestartet. Einstellen ApplicationRestoreType zu RESTORE_FROM_CUSTOM_SNAPSHOT und identifiziere den erweiterten Snapshot mit SnapshotArn. Benutzen SnapshotName für einen Anwendungs-Snapshot (Legacy) und verwenden SnapshotArn für einen erweiterten Snapshot. Der Anrufer benötigt den kinesisanalytics:RestoreFromSnapshot IAM-Berechtigung für den erweiterten Snapshot. Weitere Informationen finden Sie unter IAM-Berechtigungen.
Ersetzen Sie im folgenden Beispiel MyApplication und die SnapshotArn Wert mit Ihrem Anwendungsnamen und dem ARN Ihres erweiterten Snapshots.
{ "ApplicationName": "MyApplication", "RunConfiguration": { "ApplicationRestoreConfiguration": { "ApplicationRestoreType": "RESTORE_FROM_CUSTOM_SNAPSHOT", "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-1" } } }
StopApplication
Das folgende Beispiel für einen Anforderungscode für API_StopApplication Aktion stoppt eine Managed Service für Apache Flink-Anwendung:
{"ApplicationName": "MyApplication"}
UpdateApplication
Das folgende Beispiel für einen Anforderungscode für UpdateApplication action aktualisiert eine Managed Service for Apache Flink-Anwendung, um den Speicherort des Anwendungscodes zu ändern:
{"ApplicationName": "MyApplication", "CurrentApplicationVersionId": 1, "ApplicationConfigurationUpdate": { "ApplicationCodeConfigurationUpdate": { "CodeContentTypeUpdate": "ZIPFILE", "CodeContentUpdate": { "S3ContentLocationUpdate": { "BucketARNUpdate": "arn:aws:s3:::amzn-s3-demo-bucket", "FileKeyUpdate": "my_new_code.zip", "ObjectVersionUpdate": "2" } } } }
Die folgende JSON-Beispielanforderung für UpdateApplication Mit dieser Aktion wird eine vorhandene Anwendung in den erweiterten Snapshot-Modus aktualisiert. Die Anfrage muss Folgendes beinhalten SnapshotsEnabledUpdate zusammen mit SnapshotModeUpdate.
Du kannst nicht einstellen SnapshotModeUpdate zurück zu APPLICATION_SNAPSHOTS_LEGACY. Weitere Informationen finden Sie unter Aktualisieren Sie eine vorhandene Anwendung auf erweiterte Snapshots.
Die Anwendung muss bereits Apache Flink 1.20 oder höher verwenden. Wenn Sie eine Anwendung auf den erweiterten Snapshot-Modus aktualisieren, finden Sie im READY Status, der nächste beginnt mit RESTORE_FROM_LATEST_SNAPSHOT startet die Anwendung ohne Status. Um den Status beizubehalten, aktualisieren Sie die Anwendung in den erweiterten Snapshot-Modus, solange dies der Fall ist RUNNING.
Ersetzen Sie im folgenden Beispiel MyApplication mit Ihrem Anwendungsnamen. Stellen Sie ein CurrentApplicationVersionId auf die aktuelle Versions-ID aus dem DescribeApplication Antwort.
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 3, "ApplicationConfigurationUpdate": { "ApplicationSnapshotConfigurationUpdate": { "SnapshotsEnabledUpdate": true, "SnapshotModeUpdate": "ENHANCED_SNAPSHOTS" } } }
Die folgende JSON-Beispielanfrage für UpdateApplication Die Aktion stellt eine laufende Anwendung im erweiterten Snapshot-Modus aus einem bestimmten erweiterten Snapshot wieder her. Die Anwendung muss sich in der RUNNING Status. Der Anrufer braucht kinesisanalytics:RestoreFromSnapshot auf dem erweiterten Snapshot.
Ersetzen Sie im folgenden Beispiel MyApplication, das CurrentApplicationVersionId Wert, und der SnapshotArn Wert mit deinen eigenen Werten.
{ "ApplicationName": "MyApplication", "CurrentApplicationVersionId": 4, "RunConfigurationUpdate": { "ApplicationRestoreConfiguration": { "ApplicationRestoreType": "RESTORE_FROM_CUSTOM_SNAPSHOT", "SnapshotArn": "arn:aws:kinesisanalytics:aa-example-1:111122223333:snapshot/MyApplication-snapshot-1" } } }
Verbesserte Snapshot-APIs
Verbesserte Snapshots verwenden andere API-Aktionen als Anwendungs-Snapshots (veraltet). Beispiele für Anfragen und Antworten für diese Aktionen finden Sie unter Beispiele für erweiterte Snapshot-APIs.