Use updateDecoderManifest with an AWS SDK - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use updateDecoderManifest with an AWS SDK

The following code examples show how to use updateDecoderManifest.

Java
SDK for Java 2.x
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

/** * 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); }
Kotlin
SDK for Kotlin
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

suspend fun updateDecoderManifest(nameVal: String) { val request = UpdateDecoderManifestRequest { name = nameVal status = ManifestStatus.Active } IotFleetWiseClient { region = "us-east-1" }.use { fleetwiseClient -> fleetwiseClient.updateDecoderManifest(request) println("$nameVal was successfully updated") } }