Anda dapat mengambil semua informasi khusus untuk peering domain, termasuk status, nama, resource domain, dan jaringan resmi saat ini. Informasi ini berguna dalam beberapa skenario seperti memverifikasi apakah peering domain dikonfigurasi dengan resource yang diinginkan dan memeriksa status peering domain.
Untuk mengambil informasi tentang peering domain, ikuti langkah-langkah berikut:
[PEERING_NAME]: Nama peering domain Anda. Contoh, mypeering.
[KEY] dan [VALUE]: Pasangan nilai kunci yang ingin Anda tambahkan, ubah, atau hapus. Misalnya, count=8.
--update-labels: Anda dapat menggunakan flag ini untuk menentukan key-value pair yang ingin ditambahkan atau diubah. Jika kunci sudah ada, Managed Microsoft AD akan mengubah nilai yang ada. Jika tidak, label baru akan ditambahkan.
--remove-labels: Anda dapat menggunakan tanda ini untuk menentukan label yang ingin dihapus.
Menghapus peering domain
Untuk menghapus peering domain, ikuti langkah-langkah berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# Manage domain peerings\n\nThis article shows you how to do the following tasks in Managed Service for Microsoft Active Directory (Managed Microsoft AD):\n\n- List the domain peerings available in your project.\n- Get information about a specific domain peering.\n- Update labels for your domain peering.\n- Delete domain peerings which you no longer need.\n\nBefore you begin\n----------------\n\n- Familiarize yourself with [domain peering](/managed-microsoft-ad/docs/domain-peering).\n- Make sure that you read [Configure domain peering](/managed-microsoft-ad/docs/quickstart-domain-peering).\n\nList domain peerings\n--------------------\n\nTo list the domain peerings available in a project, follow these steps: \n\n### Console\n\n1. In the Google Cloud console, go to the **Managed Microsoft AD** page. \n [Go to Managed Microsoft AD](https://console.cloud.google.com/security/cloud-ad)\n2. Click the **Peerings** tab to view the list of domain peerings.\n\n### gcloud\n\nRun the following gcloud CLI command: \n\n```\ngcloud active-directory peerings list\n```\n\n\u003cbr /\u003e\n\nYou receive a response with the list of domain peerings. \n\n```\nPEERING_NAME DOMAIN_NAME AUTHORIZED_NETWORK PEERING_STATE CREATE_TIME\nmypeering projects/my-project/locations/global/domains/mydomain.com project/my-project/global/networks/my-network CONNECTED 2021-01-01T22:00:00\n```\n\nGet domain peering information\n------------------------------\n\nYou can retrieve all the information specific to a domain peering including its current state, name, domain resource, authorized network. This information is useful in multiple scenarios such as verifying if a domain peering is configured with the intended resources and checking the status of domain peering.\n\nTo retrieve the information about a domain peering, follow these steps: \n\n### Console\n\n1. In the Google Cloud console, go to the **Managed Microsoft AD** page. \n [Go to Managed Microsoft AD](https://console.cloud.google.com/security/cloud-ad)\n2. Click the **Peerings** tab to view the information about domain peerings.\n\n### gcloud\n\nRun the following gcloud CLI command: \n\n```\ngcloud active-directory peerings describe [PEERING_NAME]\n```\n\nReplace \u003cvar translate=\"no\"\u003e[PEERING_NAME]\u003c/var\u003e with the name of your domain peering. For example, `mypeering`.\n\nYou receive a YAML as a response describing the peering. \n\n```\nauthorizedNetwork: projects/my-project/global/networks/my-vpc\ncreateTime: '2019-03-27T22:35:58.135726571Z'\ndomainResource: projects/my-project/locations/global/domains/ad.mycompany.com\nname: projects/my-project/locations/global/peerings/mypeering\nstate: CONNECTED\nupdateTime: '2019-03-29T23:58:12.249298693Z'\n```\n\nPossible domain peering states include:\n\nUpdate labels for a domain peering\n----------------------------------\n\nYou can update the labels for an existing domain peering. To update the labels for a domain peering, follow these steps: \n\n### Console\n\n1. In the Google Cloud console, go to the **Managed Microsoft AD** page. \n [Go to Managed Microsoft AD](https://console.cloud.google.com/security/cloud-ad)\n2. Click the **Peerings** tab.\n3. Select the checkbox next to the domain peering that you want to update.\n4. Click **Labels**.\n5. In the **Labels for resource** pane, do the following:\n 1. To add a new label, click **Add label**, and then enter the key-value pairs.\n 2. To modify an existing label, enter a new value for the required key-value pair.\n 3. To delete a label, click **delete Delete item** next to the key-value pair that you want to delete.\n6. Click **Save**.\n\n### gcloud\n\nRun the following gcloud CLI command: \n\n```\ngcloud active-directory peerings update [PEERING_NAME] \\\n --update-labels=[KEY]=[VALUE],[KEY]=[VALUE] \\\n --remove-labels=[KEY],[KEY]\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003e[PEERING_NAME]\u003c/var\u003e: The name of your domain peering. For example, `mypeering`.\n- \u003cvar translate=\"no\"\u003e[KEY]\u003c/var\u003e and \u003cvar translate=\"no\"\u003e[VALUE]\u003c/var\u003e: The key-value pair that you want to add, modify, or delete. For example, `count=8`.\n- `--update-labels`: You can use this flag to specify the key-value pairs that you want to add or modify. If a key already exists, Managed Microsoft AD modifies the existing value. Otherwise, it adds a new label.\n- `--remove-labels`: You can use this flag to specify the labels that you want to delete.\n\nDelete a domain peering\n-----------------------\n\n| **Warning:** Deleting a domain peering is permanent and cannot be undone. After you delete a domain peering, it cannot be recovered or restored.\n\nTo delete a domain peering, follow these steps: \n\n### Console\n\n1. In the Google Cloud console, go to the **Managed Microsoft AD** page. \n [Go to Managed Microsoft AD](https://console.cloud.google.com/security/cloud-ad)\n2. Click the **Peerings** tab.\n3. Click **more_vert Menu** next to the domain peering that you want to remove.\n4. Select **Delete**.\n5. In the **Delete peering** dialog, enter the name of your peering resource.\n6. Click **Delete**.\n\n### gcloud\n\nRun the following gcloud CLI command: \n\n```\ngcloud active-directory peerings delete [PEERING_NAME]\n```\n\n\u003cbr /\u003e\n\nReplace \u003cvar translate=\"no\"\u003e[PEERING_NAME]\u003c/var\u003e with the name of your domain peering. For example, `mypeering`.\n\nWhat's next\n-----------\n\n- [Join a Windows VM to a domain](/managed-microsoft-ad/docs/quickstart-domain-join-windows)\n- [Join a Linux VM to a domain](/managed-microsoft-ad/docs/quickstart-domain-join-linux)\n- [Connect to a Managed Microsoft AD domain](/managed-microsoft-ad/docs/connect-to-active-directory-domain)"]]