文档 AWS SDK 示例 GitHub 存储库中还有更多 S AWS DK 示例
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
将 DescribeConfigurationRecorders
与 CLI 配合使用
以下代码示例演示如何使用 DescribeConfigurationRecorders
。
- CLI
-
- AWS CLI
-
获取有关配置记录器的详细信息
以下命令返回有关默认配置记录器的详细信息:
aws configservice describe-configuration-recorders
输出:
{ "ConfigurationRecorders": [ { "recordingGroup": { "allSupported": true, "resourceTypes": [], "includeGlobalResourceTypes": true }, "roleARN": "arn:aws:iam::123456789012:role/config-ConfigRole-A1B2C3D4E5F6", "name": "default" } ] }
-
有关 API 的详细信息,请参阅AWS CLI 命令参考DescribeConfigurationRecorders
中的。
-
- PowerShell
-
- 用于 PowerShell
-
示例 1:此示例返回配置记录器的详细信息。
Get-CFGConfigurationRecorder | Format-List
输出:
Name : default RecordingGroup : Amazon.ConfigService.Model.RecordingGroup RoleARN : arn:aws:iam::123456789012:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig
-
有关 API 的详细信息,请参阅 AWS Tools for PowerShell Cmdlet 参考DescribeConfigurationRecorders中的。
-
DescribeConfigurationRecorderStatus
DescribeDeliveryChannels