文件 AWS SDK AWS 範例 SDK 儲存庫中有更多可用的
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
DescribeCampaign
搭配 a AWS SDK 使用
下列程式碼範例示範如何使用 DescribeCampaign
。
- Java
-
- Java 2.x 的 SDK
-
注意
還有更多 on GitHub。尋找完整範例,並了解如何在 AWS 程式碼範例儲存庫
中設定和執行。 public static void describeSpecificCampaign(PersonalizeClient personalizeClient, String campaignArn) { try { DescribeCampaignRequest campaignRequest = DescribeCampaignRequest.builder() .campaignArn(campaignArn) .build(); DescribeCampaignResponse campaignResponse = personalizeClient.describeCampaign(campaignRequest); Campaign myCampaign = campaignResponse.campaign(); System.out.println("The Campaign name is " + myCampaign.name()); System.out.println("The Campaign status is " + myCampaign.status()); } catch (PersonalizeException e) { System.err.println(e.awsErrorDetails().errorMessage()); System.exit(1); } }
-
如需 API 詳細資訊,請參閱 DescribeCampaign AWS SDK for Java 2.x 參考中的 API。
-
DeleteSolution
DescribeRecipe