Menghapus koneksi API Gateway dari hub API
Halaman ini menjelaskan cara menghapus koneksi API Gateway dari hub API.
Ringkasan
Untuk menghapus koneksi API Gateway dari hub API, lakukan salah satu hal berikut:
- Menghapus aset API Gateway dari hub API tanpa melepaskan project runtime
- Lepaskan project runtime dari hub API
Menghapus aset API Gateway dari hub API tanpa melepaskan project runtime
Hapus aset API Gateway dari hub API tanpa melepaskan project runtime seperti yang dijelaskan di bawah.
KonsolGoogle Cloud
Untuk menghapus aset API Gateway dari setelan asosiasi project runtime, lakukan hal berikut:
- Di konsol Google Cloud , pilih project host Anda.
- Buka halaman Hub API.
- Klik Setelan dari menu navigasi kiri untuk membuka halaman Setelan.
- Buka tab Pengaitan project.
- Klik Edit settings yang terkait dengan project API Gateway.
- Di panel Project association settings, batalkan pilihan API Gateway Plugin dan aset API lainnya yang ingin Anda impor secara otomatis.
- Klik Simpan.
REST
Untuk menghapus aset API Gateway dari project runtime, gunakan API delete plugin instance.
Contoh:
curl "https://apihub.googleapis.com/v1/projects/HUB_PROJECT_ID/locations/HUB_LOCATION/plugins/PLUGIN_TYPE/instances/PLUGIN_INSTANCE_ID" \ -X DELETE \ -H "Authorization: Bearer $(gcloud auth print-access-token)"
Ganti kode berikut:
- HUB_PROJECT_ID: Nama project host hub API Anda. Project host dipilih saat hub API disediakan.
- HUB_LOCATION: Lokasi project host. Lokasi dipilih saat hub API disediakan.
- PLUGIN_TYPE: Jenis plugin. Tetapkan ke system-api-gateway.
- PLUGIN_INSTANCE_ID: ID instance plugin API Gateway. Gunakan API list plugin instances untuk mendapatkan ID instance plugin.
Jika berhasil, objek JSON Operation akan ditampilkan.
Lepaskan project API Gateway dari hub API
Lepaskan project runtime dari hub API seperti yang dijelaskan di bawah.
KonsolGoogle Cloud
Untuk melepaskan project API Gateway dari hub API, lakukan hal berikut:
- Di konsol Google Cloud , pilih project host Anda.
- Buka halaman Hub API.
- Klik Setelan dari menu navigasi kiri untuk membuka halaman Setelan.
- Buka tab Pengaitan project.
- Klik Detach runtime project yang terkait dengan project API Gateway.
- Klik Konfirmasi.
REST
Untuk melepaskan project runtime dari hub API, gunakan API delete runtime project attachments.
Contoh:
curl 'https://apihub.googleapis.com/v1/projects/HUB_PROJECT_ID/locations/HUB_LOCATION/runtimeProjectAttachments/RUNTIME_PROJECT_ID' \ -X DELETE \ -H "Authorization: Bearer $(gcloud auth print-access-token)"
Ganti kode berikut:
- HUB_PROJECT: Nama project host hub API Anda. Project host dipilih saat hub API disediakan.
- HUB_LOCATION: Lokasi project host. Lokasi dipilih saat hub API disediakan.
- RUNTIME_PROJECT_ID: ID project runtime. Gunakan API list runtime project attachments untuk mendapatkan ID project runtime.
Jika berhasil, objek JSON kosong akan ditampilkan.