Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh SDK AWS Doc
Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Gunakan DescribeConfigurationRecorders
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanDescribeConfigurationRecorders
.
- CLI
-
- AWS CLI
-
Untuk mendapatkan detail tentang perekam konfigurasi
Perintah berikut mengembalikan rincian tentang perekam konfigurasi default:
aws configservice describe-configuration-recorders
Output:
{ "ConfigurationRecorders": [ { "recordingGroup": { "allSupported": true, "resourceTypes": [], "includeGlobalResourceTypes": true }, "roleARN": "arn:aws:iam::123456789012:role/config-ConfigRole-A1B2C3D4E5F6", "name": "default" } ] }
-
Untuk detail API, lihat DescribeConfigurationRecorders
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Contoh ini mengembalikan rincian perekam konfigurasi.
Get-CFGConfigurationRecorder | Format-List
Output:
Name : default RecordingGroup : Amazon.ConfigService.Model.RecordingGroup RoleARN : arn:aws:iam::123456789012:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig
-
Untuk detail API, lihat DescribeConfigurationRecordersdi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Contoh ini mengembalikan rincian perekam konfigurasi.
Get-CFGConfigurationRecorder | Format-List
Output:
Name : default RecordingGroup : Amazon.ConfigService.Model.RecordingGroup RoleARN : arn:aws:iam::123456789012:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig
-
Untuk detail API, lihat DescribeConfigurationRecordersdi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-