DescribeTrustedAdvisorCheckSummaries与 a 一起使用 CLI - AWS SDK代码示例

AWS 文档 AWS SDK示例 GitHub 存储库中还有更多SDK示例

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

DescribeTrustedAdvisorCheckSummaries与 a 一起使用 CLI

以下代码示例演示如何使用 DescribeTrustedAdvisorCheckSummaries

CLI
AWS CLI

列出 Tru AWS sted Advisor 支票摘要

以下describe-trusted-advisor-check-summaries示例列出了两项 Trusted Advisor 检查的结果:Amazon S3 存储桶权限和IAM使用。

aws support describe-trusted-advisor-check-summaries \ --check-ids "Pfx0RwqBli" "zXCkfM1nI3"

输出:

{ "summaries": [ { "checkId": "Pfx0RwqBli", "timestamp": "2020-05-13T21:38:12Z", "status": "ok", "hasFlaggedResources": true, "resourcesSummary": { "resourcesProcessed": 44, "resourcesFlagged": 0, "resourcesIgnored": 0, "resourcesSuppressed": 0 }, "categorySpecificSummary": { "costOptimizing": { "estimatedMonthlySavings": 0.0, "estimatedPercentMonthlySavings": 0.0 } } }, { "checkId": "zXCkfM1nI3", "timestamp": "2020-05-13T21:38:05Z", "status": "ok", "hasFlaggedResources": true, "resourcesSummary": { "resourcesProcessed": 1, "resourcesFlagged": 0, "resourcesIgnored": 0, "resourcesSuppressed": 0 }, "categorySpecificSummary": { "costOptimizing": { "estimatedMonthlySavings": 0.0, "estimatedPercentMonthlySavings": 0.0 } } } ] }

有关更多信息,请参阅《AWS 支持用户指南》中的 T AWS rusted Advisor

PowerShell
用于 PowerShell

示例 1:返回指定 Trusted Advisor 检查的最新摘要。

Get-ASATrustedAdvisorCheckSummary -CheckId "checkid1"

示例 2:返回指定 Trusted Advisor 支票的最新摘要。

Get-ASATrustedAdvisorCheckSummary -CheckId @("checkid1", "checkid2")