AWS SDK で updateDecoderManifest を使用する - AWS SDK コードサンプル

AWS Doc SDK Examples GitHub リポジトリには、他にも用意されている AWS SDK サンプルがあります。

AWS SDK で updateDecoderManifest を使用する

次のサンプルコードは、updateDecoderManifest を使用する方法を説明しています。

Java
SDK for Java 2.x
注記

GitHub には、その他のリソースもあります。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); }
  • API の詳細については、「AWS SDK for Java 2.x API リファレンス」の「updateDecoderManifest」を参照してください。

Kotlin
SDK for Kotlin
注記

GitHub には、その他のリソースもあります。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") } }
  • API の詳細については、「AWS SDK for Kotlin API リファレンス」の「updateDecoderManifest」を参照してください。