# Component Labels

Component labels are metadata assigned to components for use when targeting specific attributes with policies. Rather than manually adding component coordinates when targeting specific components, generic component labels are used and applied to the components that meet the criteria.

For example, when the Application Architect wants to discontinue the use of a specific component, they apply a `Discontinue-Use` label to the component while making a policy to trigger for any components with that label.

## Viewing a Component Label

1. Select an organization or application. A page of customizable settings is displayed.
2. Click _Component Labels_ to scroll to the _Component Labels_ section.

The Component Labels section displays two types of labels:

- _Local_ \- Component labels with a scope that’s specific to the selected organization or application.
- _Inherited_ \- Component labels derived from an organization that’s higher in the system hierarchy than the currently selected organization or application.

## Creating a Component Label

1. Select the organization or application in which the component label will be used.
2. Click _Component Labels_.
3. Click the _Add a Label_ button. The _New Component Label_ editor is displayed.
4. Set the following attributes:
   1. _Component Label Name_ \- Enter a name for the component label that is easily identified.
   2. _Short Description_ \- Enter a description that provides additional information about the component label.
   3. _Color_ \- Select a desired color for the component label.
5. Click the _Create_ button to add the component label to the selected organization.

A few things to remember:
- An organization’s component labels can be seen by any of its applications; the reverse is not true.
- Component labels can only be edited (or deleted) at the level they were created.

## Editing a Component Label

To edit a component label:

1. Select the organization or application in which the component label was created.
2. Click the component label you want to edit. The _Edit Component Label_ dialog is displayed.
3. In the _Edit Component Label_ dialog, you can change the following attributes:
   1. _Component Label Name_ \- Enter a different name for the component label.
   2. _Short Description_ \- Enter a description that provides additional information about the component label.
   3. _Color_ \- Select a desired color for the component label.
4. Click the _Update_ button to save the component label.

## Deleting a Component Label

To delete a component label:

1. Select the organization or application in which the component label was created.
2. Click the component label you want to delete. The _Edit Component Label_ dialog is displayed.
3. In the _Edit Component Label_ dialog, click the _Delete Component Label_ button. A _Delete Label_ alert dialog is displayed.
4. In the _Delete Label_ dialog, click _Continue_ to delete the component label or _Cancel_ to keep it.

## Using a Component Label in a Policy

1. Select the organization or application in which to add the new policy.
2. Click _Policies_ to scroll to the _Policies_ section.
3. Create a new policy.
4. In the Constraints section, add a Constraint Condition where your newly created Component Label is selected. For example, if you created a new Component Label named "Do Not Use".

## Adding a Component Label from a Policy Evaluation Report

To add a component label to a _Component_ in a _Policy Evaluation Report_:

1. In a _Policy Evaluation Report_, click on a _Component_.
2. Click on _Labels._
3. Click on the _Available Labels_ to apply to the _Component_.
4. Select the scope of the label from the dropdown; the scope of the label can be limited to an application, an organization at any level, or the root organization.

## Adding a Component Label from a Repository

To add a component label to a Component from a Repository:

1. Click _Repositories_ under the _Root Organization_.
2. Click the desired repository.
3. Browse or search for the desired component.
4. Select the desired component.
5. Click on _Labels_.
6. Add _Component Labels_ to the _Component_.
