Gunakan DescribeConfigurationRecorders dengan AWS SDK atau CLI - AWS SDKContoh Kode

Ada lebih banyak AWS SDK contoh yang tersedia di GitHub repo SDKContoh AWS Dokumen.

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Gunakan DescribeConfigurationRecorders dengan AWS SDK atau 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" } ] }
PowerShell
Alat untuk PowerShell

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