Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina si applica ad Apigee e Apigee hybrid.
Panoramica
Le entità create nell'hub API, come risorse, versioni ed implementazioni dell'API, possono avere associati attributi di sistema e definiti dall'utente. È buona prassi iniziare il tuo percorso con l'hub API configurando e modificando gli attributi chiave in linea con le esigenze e gli standard della tua organizzazione. Quando registri API, crei versioni ed esegui altre azioni, puoi applicare attributi e valori per creare entità disponibili per la ricerca e ricche di metadati.
Gli attributi di sistema sono predefiniti dall'hub API per ogni tipo di risorsa. Anche se gli attributi
stessi sono predefiniti, puoi modificare i relativi valori predefiniti. Per saperne di più, consulta Attributi di sistema.
Nella console Google Cloud, vai alla pagina Impostazioni in API Hub.
Nella sezione Attributi di sistema, fai clic sull'icona di modifica nella riga Ciclo di vita.
Nella sezione Valori consentiti, fai clic su Aggiungi elemento.
Nel campo Valore, inserisci un valore per l'attributo, ad esempio "Produzione", e aggiungi una descrizione nel campo Descrizione.
Fai clic su Salva.
Creare attributi definiti dall'utente
Gli attributi definiti dall'utente sono coppie di nome/valore definite da te in base ai tuoi requisiti. Per approfondire, consulta Attributi utente.
Nella sezione Attributi definiti dall'utente della pagina Impostazioni, fai clic su Crea attributo.
Nel modulo Aggiungi un nuovo attributo, modifica i valori consentiti come segue:
Campo
Valore
Nome
Inserisci un nome per l'attributo. Ad esempio: latenza
Descrizione
Inserisci una breve descrizione dell'attributo.
Numero massimo di valori consentiti
Specifica il numero di elementi che l'attributo può contenere. Un elemento può avere un minimo di un attributo e un massimo di 20.
Tipo di risorsa
Seleziona il tipo di risorsa dell'hub API a cui è possibile
associare l'attributo. Le opzioni valide sono: Version, Spec, Operation, Deployment e Dependency.
Tipo di dati
Scegli il tipo di dati per l'attributo. I tipi di dati includono String, Enum e JSON. Se è selezionato il tipo di dati Enum, fai clic su + Aggiungi elemento e inserisci i valori consentiti per l'attributo.
Fai clic su Crea.
Se vuoi, aggiungi altri attributi definiti dall'utente prima di passare alla guida introduttiva successiva.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 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)"]]