

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

# Menghapus penerapan model kustom
<a name="delete-custom-model-deployment"></a>

Setelah Anda selesai menggunakan model Anda untuk inferensi sesuai permintaan, Anda dapat menghapus penerapan. Setelah menghapus penerapan, Anda tidak dapat menggunakannya untuk inferensi sesuai permintaan tetapi tidak menghapus model kustom yang mendasarinya.

Anda dapat menghapus penerapan model kustom dengan konsol Amazon Bedrock, AWS Command Line Interface, atau. AWS SDKs

**penting**  
Menghapus penerapan model kustom tidak dapat diubah. Pastikan Anda tidak lagi memerlukan penerapan sebelum melanjutkan penghapusan. Jika Anda perlu menggunakan model kustom untuk inferensi sesuai permintaan lagi, Anda harus membuat penerapan baru.

**Topics**
+ [

## Menghapus penerapan model kustom (konsol)
](#delete-deployment-console)
+ [

## Menghapus penerapan model kustom ()AWS Command Line Interface
](#delete-deployment-cli)
+ [

## Menghapus penerapan model kustom ()AWS SDKs
](#delete-deployment-sdk)

## Menghapus penerapan model kustom (konsol)
<a name="delete-deployment-console"></a>

**Untuk menghapus penerapan model kustom**

1. Di panel navigasi, di bawah **Inferensi dan Penilaian**, pilih **Model khusus sesuai permintaan**.

1. Pilih penerapan model kustom yang ingin Anda hapus.

1. Pilih **Hapus**.

1. Dalam dialog konfirmasi, masukkan nama penerapan untuk mengonfirmasi penghapusan.

1. Pilih **Hapus** untuk mengonfirmasi.

Status penerapan akan berubah menjadi `Deleting` saat penghapusan sedang berlangsung. Setelah selesai, penyebaran akan dihapus dari daftar.

## Menghapus penerapan model kustom ()AWS Command Line Interface
<a name="delete-deployment-cli"></a>

Untuk menghapus penerapan model kustom menggunakan AWS Command Line Interface, gunakan `delete-custom-model-deployment` perintah dengan pengenal penerapan Anda.

```
aws bedrock delete-custom-model-deployment \
--custom-model-deployment-identifier "deployment-arn-or-name" \
--region region
```

## Menghapus penerapan model kustom ()AWS SDKs
<a name="delete-deployment-sdk"></a>

Untuk menghapus penerapan model kustom secara terprogram, gunakan operasi [DeleteCustomModelDeployment](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_DeleteCustomModelDeployment.html)API dengan Nama Sumber Daya Amazon (ARN) atau nama penerapan. Kode berikut menunjukkan cara menggunakan SDK for Python (Boto3) untuk menghapus penerapan model kustom. 

```
def delete_custom_model_deployment(bedrock_client):
    """Delete a custom model deployment
 
    Args:
        bedrock_client: A boto3 Bedrock client for making API calls
 
    Returns:
        dict: The response from the delete operation
 
    Raises:
        Exception: If there is an error deleting the deployment
    """
 
    try:
        response = bedrock_client.delete_custom_model_deployment(
            customModelDeploymentIdentifier="Deployment identifier"
        )
 
        print(f"Deployment deletion initiated")
        return response
 
    except Exception as e:
        print(f"Error deleting deployment: {str(e)}")
        raise
```