Sono disponibili altri esempi AWS SDK nel repository AWS Doc SDK
Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Utilizzare updateDecoderManifest
con un SDK AWS
Gli esempi di codice seguenti mostrano come utilizzare updateDecoderManifest
.
- Java
-
- SDK per Java 2.x
-
Nota
C'è altro da fare. GitHub Trova l'esempio completo e scopri di più sulla configurazione e l'esecuzione nel Repository di esempi di codice AWS
. /** * Updates the decoder manifest with the given name. * * @param name the name of the decoder manifest to update * @return a {@link CompletableFuture} that completes when the update operation is finished */ public CompletableFuture<Void> updateDecoderManifestAsync(String name) { UpdateDecoderManifestRequest request = UpdateDecoderManifestRequest.builder() .name(name) .status(ManifestStatus.ACTIVE) .build(); return getAsyncClient().updateDecoderManifest(request) .whenComplete((response, exception) -> { if (exception != null) { throw new CompletionException("Failed to update decoder manifest: " + exception.getMessage(), exception); } }) .thenApply(response -> null); }
-
Per i dettagli sull'API, consulta la updateDecoderManifestsezione AWS SDK for Java 2.x API Reference.
-
- Kotlin
-
- SDK per Kotlin
-
Nota
C'è di più su GitHub. Trova l'esempio completo e scopri di più sulla configurazione e l'esecuzione nel Repository di esempi di codice AWS
. suspend fun updateDecoderManifest(nameVal: String) { val request = UpdateDecoderManifestRequest { name = nameVal status = ManifestStatus.Active } IotFleetWiseClient.fromEnvironment { region = "us-east-1" }.use { fleetwiseClient -> fleetwiseClient.updateDecoderManifest(request) println("$nameVal was successfully updated") } }
-
Per i dettagli sull'API, updateDecoderManifest
consulta AWS SDK for Kotlin API reference.
-