Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini
berlaku untuk Apigee dan Apigee hybrid.
Ringkasan
Entitas yang Anda buat di API Hub, seperti resource, versi, dan deployment API, dapat memiliki
atribut sistem dan atribut yang ditentukan pengguna yang terkait dengannya. Sebaiknya mulai perjalanan API hub Anda dengan menyiapkan
dan mengedit atribut utama
yang sesuai dengan
kebutuhan dan standar organisasi Anda. Saat mendaftarkan API, membuat versi, dan melakukan tindakan
lainnya, Anda dapat menerapkan atribut dan nilai untuk membuat entitas kaya metadata yang dapat ditelusuri.
Sebelum memulai
API Hub harus disediakan di project Google Cloud yang aksesnya Anda miliki.
Lihat Menyediakan hub API.
Di konsol Google Cloud, pada halaman pemilih project, pilih project tempat API hub disediakan.
Atribut sistem ditetapkan sebelumnya oleh API hub untuk setiap jenis resource. Meskipun atribut itu sendiri telah ditentukan sebelumnya, Anda dapat mengedit nilai defaultnya. Untuk mempelajari lebih lanjut, lihat Atribut sistem.
Di konsol Google Cloud, buka halaman Settings di API hub.
Di bagian System attributes, klik ikon Edit di baris Lifecycle.
Di bagian Nilai yang diizinkan, klik Tambahkan item.
Di kolom Nilai, masukkan nilai untuk atribut, seperti "Produksi", dan tambahkan deskripsi di kolom Deskripsi.
Klik Simpan.
Membuat atribut yang ditentukan pengguna
Atribut yang ditentukan pengguna adalah pasangan nama/nilai yang ditentukan oleh Anda berdasarkan persyaratan Anda. Untuk
mempelajari lebih lanjut, lihat Atribut pengguna.
Di bagian Atribut yang Ditetapkan Pengguna di halaman Setelan, klik Buat atribut.
Di formulir Tambahkan atribut baru, edit Nilai yang diizinkan sebagai berikut:
Kolom
Nilai
Nama
Masukkan nama untuk atribut. Misalnya: Latensi
Deskripsi
Masukkan deskripsi singkat atribut.
Nilai maksimum yang diizinkan
Tentukan jumlah elemen yang dapat disimpan oleh atribut. Elemen dapat memiliki minimum satu atribut, dan maksimum 20.
Jenis resource
Pilih jenis resource API hub yang dapat dikaitkan dengan atribut. Pilihan yang valid adalah: Versi, Spesifikasi, Operasi, Deployment, dan Dependensi.
Jenis data
Pilih jenis data untuk atribut. Jenis data mencakup String, Enum, dan JSON. Jika jenis data Enum dipilih, klik + Tambahkan item, lalu masukkan nilai yang diizinkan untuk atribut.
Klik Buat.
Tambahkan lebih banyak atribut yang ditentukan pengguna sebelum melanjutkan ke langkah awal berikutnya, jika Anda mau.
[[["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-08-28 UTC."],[[["\u003cp\u003eThis guide covers managing system and user-defined attributes within API hub for Apigee and Apigee hybrid.\u003c/p\u003e\n"],["\u003cp\u003eSystem attributes are predefined by API hub, but their default values can be edited to align with organizational standards.\u003c/p\u003e\n"],["\u003cp\u003eUser-defined attributes are custom name/value pairs that you create to add metadata to API hub resources, allowing for enhanced searchability.\u003c/p\u003e\n"],["\u003cp\u003eCreating user-defined attributes involves specifying a name, description, maximum allowed values, associated resource type, and data type, with options like String, Enum, and JSON.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, ensure API hub is provisioned in a Google Cloud project and you have selected the correct project in the Google Cloud console.\u003c/p\u003e\n"]]],[],null,["# Create and edit attributes\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\nOverview\n--------\n\nThe entities you create in API hub, such as API resources, versions, and deployments, can have\nsystem and user-defined attributes associated with them. It's a good practice to start off your API hub journey by setting up\nand editing key attributes\nthat align with your\norganizational needs and standards. When you register APIs, create versions, and perform other\nactions, you can apply attributes and values to build metadata-rich, searchable entities.\n\nBefore you begin\n----------------\n\n1. API hub must be provisioned in a Google Cloud project to which you have access. See [Provision API hub](/apigee/docs/apihub/provision).\n2. In the Google Cloud console, on the project selector page, select the project in which API\n hub is provisioned.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\nEdit system attributes\n----------------------\n\nSystem attributes are predefined by API hub for each resource type. While the attributes\nthemselves are predefined, you can edit their default values. To learn more, see [System attributes](./manage-attributes#system-attributes).\n\n1. In the Google Cloud console, go to the **Settings** page in **API hub**.\n\n [Go to API hub](https://console.cloud.google.com/apigee/api-hub/settings)\n2. In the **System attributes** section, click the Edit icon in the **Lifecycle** row.\n3. In the **Allowed values** section, click **Add item**.\n4. In the **Value** field, enter a value for the attribute, such as \"Production\", and add a description in the **Description** field.\n5. Click **Save**.\n\nCreate user defined attributes\n------------------------------\n\nUser defined attributes are name/value pairs defined by you based on your requirements. To\nlearn more, see [User attributes](./manage-attributes#user-attributes).\n\n1. In the **User Defined Attributes** section of the **Settings** page, click **Create attribute**.\n2. In the **Add a new attribute** form, edit the Allowed values as follows:\n\n3. Click **Create**.\n\nAdd more user-defined attributes before continuing to the next quickstart, if you wish.\n\nNext step\n---------\n\n[Create an Eventarc trigger](./quickstart-create-event-triggers)"]]