将 DescribeTrustedAdvisorChecks 与 CLI 配合使用 - AWS 支持

DescribeTrustedAdvisorChecks 与 CLI 配合使用

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

CLI
AWS CLI

列出可用的 AWS Trusted Advisor 检查

以下 describe-trusted-advisor-checks 示例列出您的 AWS 账户中可用的 Trusted Advisor 检查。这些信息包括检查名称、ID、描述、类别和元数据。请注意,为便于阅读,输出已缩短。

aws support describe-trusted-advisor-checks \ --language "en"

输出:

{ "checks": [ { "id": "zXCkfM1nI3", "name": "IAM Use", "description": "Checks for your use of AWS Identity and Access Management (IAM). You can use IAM to create users, groups, and roles in AWS, and you can use permissions to control access to AWS resources. \n<br>\n<br>\n<b>Alert Criteria</b><br>\nYellow: No IAM users have been created for this account.\n<br>\n<br>\n<b>Recommended Action</b><br>\nCreate one or more IAM users and groups in your account. You can then create additional users whose permissions are limited to perform specific tasks in your AWS environment. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/IAMGettingStarted.html\" target=\"_blank\">Getting Started</a>. \n<br><br>\n<b>Additional Resources</b><br>\n<a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_Introduction.html\" target=\"_blank\">What Is IAM?</a>", "category": "security", "metadata": [] } ] }

有关更多信息,请参阅《AWS Support 用户指南》中的 AWS Trusted Advisor

PowerShell
Tools for PowerShell V4

示例 1:返回 Trusted Advisor 检查的集合。必须指定 Language 参数,该参数可以接受“en”(表示英语输出),也可以接受“ja”(表示日语输出)。

Get-ASATrustedAdvisorCheck -Language "en"
Tools for PowerShell V5

示例 1:返回 Trusted Advisor 检查的集合。必须指定 Language 参数,该参数可以接受“en”(表示英语输出),也可以接受“ja”(表示日语输出)。

Get-ASATrustedAdvisorCheck -Language "en"

有关 AWS SDK 开发人员指南和代码示例的完整列表,请参阅 将 AWS 支持 与 AWS 开发工具包配合使用。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。