

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

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

# Gunakan `DeleteVaultNotifications` dengan AWS SDK atau CLI
<a name="glacier_example_glacier_DeleteVaultNotifications_section"></a>

Contoh kode berikut menunjukkan cara menggunakan`DeleteVaultNotifications`.

------
#### [ CLI ]

**AWS CLI**  
**Untuk menghapus notifikasi SNS untuk vault**  
`delete-vault-notifications`Contoh berikut menghapus notifikasi yang dikirim oleh Amazon Simple Notification Service (Amazon SNS) untuk vault yang ditentukan.  

```
aws glacier delete-vault-notifications \
    --account-id {{111122223333}} \
    --vault-name {{example_vault}}
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [DeleteVaultNotifications](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/glacier/delete-vault-notifications.html)di *Referensi AWS CLI Perintah*. 

------
#### [ Python ]

**SDK untuk Python (Boto3)**  
 Ada lebih banyak tentang GitHub. Temukan contoh lengkapnya dan pelajari cara mengatur dan menjalankannya di [Repositori Contoh Kode AWS](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/glacier#code-examples). 

```
class GlacierWrapper:
    """Encapsulates Amazon S3 Glacier API operations."""

    def __init__(self, glacier_resource):
        """
        :param glacier_resource: A Boto3 Amazon S3 Glacier resource.
        """
        self.glacier_resource = glacier_resource


    @staticmethod
    def stop_notifications(notification):
        """
        Stops notifications to the configured Amazon SNS topic.

        :param notification: The notification configuration to remove.
        """
        try:
            notification.delete()
            logger.info("Notifications stopped.")
        except ClientError:
            logger.exception("Couldn't stop notifications.")
            raise
```
+  Untuk detail API, lihat [DeleteVaultNotifications](https://docs.aws.amazon.com/goto/boto3/glacier-2012-06-01/DeleteVaultNotifications)di *AWS SDK for Python (Boto3) Referensi* API. 

------