Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Gunakan DeleteNotificationConfiguration dengan CLI
Contoh kode berikut menunjukkan cara menggunakanDeleteNotificationConfiguration.
- CLI
-
- AWS CLI
-
Untuk menghapus notifikasi Auto Scaling
Contoh ini menghapus notifikasi yang ditentukan dari grup Auto Scaling yang ditentukan.
aws autoscaling delete-notification-configuration \ --auto-scaling-group-namemy-asg\ --topic-arnarn:aws:sns:us-west-2:123456789012:my-sns-topicPerintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Menghapus konfigurasi notifikasi di Panduan Pengguna Amazon EC2 Auto Scaling.
-
Untuk detail API, lihat DeleteNotificationConfiguration
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Contoh ini menghapus tindakan pemberitahuan yang ditentukan. Anda diminta untuk konfirmasi sebelum operasi berlangsung.
Remove-ASNotificationConfiguration -AutoScalingGroupName my-asg -TopicARN "arn:aws:sns:us-west-2:123456789012:my-topic"Output:
Confirm Are you sure you want to perform this action? Performing operation "Remove-ASNotificationConfiguration (DeleteNotificationConfiguration)" on Target "arn:aws:sns:us-west-2:123456789012:my-topic". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):Contoh 2: Jika Anda menentukan parameter Force, Anda tidak diminta untuk konfirmasi sebelum operasi berlangsung.
Remove-ASNotificationConfiguration -AutoScalingGroupName my-asg -TopicARN "arn:aws:sns:us-west-2:123456789012:my-topic" -Force-
Untuk detail API, lihat DeleteNotificationConfigurationdi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Contoh ini menghapus tindakan pemberitahuan yang ditentukan. Anda diminta untuk konfirmasi sebelum operasi berlangsung.
Remove-ASNotificationConfiguration -AutoScalingGroupName my-asg -TopicARN "arn:aws:sns:us-west-2:123456789012:my-topic"Output:
Confirm Are you sure you want to perform this action? Performing operation "Remove-ASNotificationConfiguration (DeleteNotificationConfiguration)" on Target "arn:aws:sns:us-west-2:123456789012:my-topic". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):Contoh 2: Jika Anda menentukan parameter Force, Anda tidak diminta untuk konfirmasi sebelum operasi berlangsung.
Remove-ASNotificationConfiguration -AutoScalingGroupName my-asg -TopicARN "arn:aws:sns:us-west-2:123456789012:my-topic" -Force-
Untuk detail API, lihat DeleteNotificationConfigurationdi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-
Untuk daftar lengkap panduan pengembang AWS SDK dan contoh kode, lihatMenggunakan layanan ini dengan AWS SDK. Topik ini juga mencakup informasi tentang memulai dan detail tentang versi SDK sebelumnya.