Using Predefined Values

You can create a list of values and associate that list with a tag key definition. When users then apply the tag to a resource, they must select a value from the list of predefined values. Use lists of predefined values to impose limits on the values that users can apply to tags.

You can use predefined values with defined tags and default tags. You cannot create lists of predefined values for free-form tags.

Required IAM Policy

Predefined values are a feature of defined tags. To allow users to work with predefined values, use the same IAM policy for working with tag namespaces and tags. For more information, see Required Permissions for Working with Defined Tags.

If you're new to policies, see Getting Started with Policies and Common Policies. If you want to dig deeper into writing policies for groups or other IAM components, see Details for IAM.

Working with Predefined Values

You can update existing tags to use predefined values.

Every list of predefined values that you create must contain at least one value. Lists can't contain duplicate values or blank entries. With predefined values, users applying tags can't set the value of a tag to null. For more information, see Using the Console.

Predefined Values and Default Tags

You can use predefined values and default tags to impose limits on the values that users can apply to tags.

Here's how it works:

  1. You define a list of predefined values for a tag key.
  2. You create a default tag that uses the key with the list of predefined values and requires that users who create resources in the compartment add the value to the tag.
  3. Oracle prompts all users creating resources in the compartment to enter a tag value. Because the tag key contains a predefined list that you created, the value the user applies is a value that you trust.

These features help to ensure that new resources contain the values you expect. For more information, see Managing Tag Defaults.

Using the Console


Avoid entering confidential information when assigning descriptions, tags, or friendly names to your cloud resources through the Oracle Cloud Infrastructure Console, API, or CLI.

To create a key definition
To update a tag key definition

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

  • CreateTag - creates a tag key definition
  • UpdateTag - updates the tag key definition (use this operation to retire or reactivate a tag key)