

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

# 将 `DescribeConfigurationRecorders` 与 CLI 配合使用
`DescribeConfigurationRecorders`

以下代码示例演示如何使用 `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](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/describe-configuration-recorders.html)*中的。

------
#### [ PowerShell ]

**适用于 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 参考 (V* 4) [DescribeConfigurationRecorders](https://docs.amazonaws.cn/powershell/v4/reference)中的。

**适用于 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 参考 (V* 5) [DescribeConfigurationRecorders](https://docs.amazonaws.cn/powershell/v5/reference)中的。

------

有关 S Amazon DK 开发者指南和代码示例的完整列表，请参阅[Amazon Config与Amazon SDK 一起使用](sdk-general-information-section.md)。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。