将 DescribeConfigurationRecorders 与 CLI 配合使用
以下代码示例演示如何使用。DescribeConfigurationRecorders
- CLI
-
- Amazon 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 详细信息,请参阅《Amazon CLI 命令参考》中的 DescribeConfigurationRecorders
。
-
- PowerShell
-
- Tools for PowerShell V4
-
示例 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 详细信息,请参阅《Amazon Tools for PowerShell Cmdlet Reference(V4)》中的 DescribeConfigurationRecorders。
-
- Tools for PowerShell V5
-
示例 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 详细信息,请参阅《Amazon Tools for PowerShell Cmdlet Reference(V5)》中的 DescribeConfigurationRecorders。
-
有关 Amazon SDK 开发人员指南和代码示例的完整列表,请参阅 将 Amazon Config 与 Amazon 开发工具包配合使用 本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。
DescribeConfigurationRecorderStatus
DescribeDeliveryChannels