Create and edit attributes

This page applies to Apigee and Apigee hybrid.

Overview

The entities you create in API hub, such as API resources, versions, and deployments, can have system and user-defined attributes associated with them. It's a good practice to start off your API hub journey by setting up and editing key attributes that align with your organizational needs and standards. When you register APIs, create versions, and perform other actions, you can apply attributes and values to build metadata-rich, searchable entities.

Before you begin

  1. API hub must be provisioned in a Google Cloud project to which you have access. See Provision API hub.
  2. In the Google Cloud console, on the project selector page, select the project in which API hub is provisioned.

    Go to project selector

Edit system attributes

System attributes are predefined by API hub for each resource type. While the attributes themselves are predefined, you can edit their default values. To learn more, see System attributes.

  1. In the Google Cloud console, go to the Settings page in API hub.

    Go to API hub
  2. In the System attributes section, click the Edit icon in the Lifecycle row.
  3. In the Allowed values section, click Add item.
  4. In the Value field, enter a value for the attribute, such as "Production", and add a description in the Description field.
  5. Click Save.

Create user-defined attributes

User-defined attributes are name/value pairs defined by you based on your requirements. To learn more, see User attributes.

  1. In the User Defined Attributes section of the Settings page, click Create attribute.
  2. In the Add a new attribute form, edit the Allowed values as follows:
    Field Value
    Name Enter a name for the attribute. For example: Latency
    Description Enter a brief description of the attribute.
    Maximum allowed values Specify the number of elements the attribute can hold. An element can have a minimum of one attribute, and a maximum of 20.
    Resource type Select the type of API hub resource to which the attribute can be associated. Valid choices are: Version, Spec, Operation, Deployment, and Dependency.
    Data type Specify the data type of the attribute values. Valid choices are Enum, Json, or String.
  3. Click Create.

Add more user-defined attributes before continuing to the next quickstart, if you wish.

Next step

Create an Eventarc trigger