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

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

AWS SDK で updateModelManifest を使用する

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

Java
SDK for Java 2.x
注記

GitHub には、その他のリソースもあります。AWS コード例リポジトリで完全な例を見つけて、設定と実行の方法を確認してください。

/** * Updates the model manifest. * * @param name the name of the model manifest to update */ public void updateModelManifestAsync(String name) { UpdateModelManifestRequest request = UpdateModelManifestRequest.builder() .name(name) .status(ManifestStatus.ACTIVE) .build(); getAsyncClient().updateModelManifest(request) .whenComplete((response, exception) -> { if (exception != null) { throw new CompletionException("Failed to update model manifest: " + exception.getMessage(), exception); } }) .thenApply(response -> null); }
  • API の詳細については、「AWS SDK for Java 2.x API リファレンス」の「updateModelManifest」を参照してください。

Kotlin
SDK for Kotlin
注記

GitHub には、その他のリソースもあります。AWS コード例リポジトリで完全な例を見つけて、設定と実行の方法を確認してください。

/** * Updates the model manifest. * * @param nameVal the name of the model manifest to update */ suspend fun updateModelManifest(nameVal: String) { val request = UpdateModelManifestRequest { name = nameVal status = ManifestStatus.Active } IotFleetWiseClient.fromEnvironment { region = "us-east-1" }.use { fleetwiseClient -> fleetwiseClient.updateModelManifest(request) println("$nameVal was successfully updated") } }
  • API の詳細については、「AWS SDK for Kotlin API リファレンス」の「updateModelManifest」を参照してください。