Creating a Tag Key Definition

Create a tag key definition using the Console, CLI, or API.

    1. On the Tag namespaces list page, select the namespace that you want to work with. If you need help finding the list page, see Listing Tag Namespaces.
    2. On the Tag namespace details page, in the Tag key definitions section, select Create tag key definition.
    3. In the Create tag definition panel, provide the following information:
      • Tag key: Enter the key. The key can be up to 100 characters in length. Tag keys are case insensitive and must be unique within the tag namespace. Avoid entering confidential information.
      • Description: Enter a friendly description.
      • Cost-tracking: Select to enable this tag for cost tracking. You can use up to 10 Cost-Tracking Tags in your tenancy.
    4. In the Tag value type section, select one of the following options:
      • Static value: Indicates that users can specify any value for this key.
      • A list of values: Indicates that users must apply a value from a list you create. When you select this option, the Values box appears. Type the values. Separate multiple values with new lines. You must have at least one value. You can't have blank lines or duplicate values.
    5. Select Create.
  • Use the create command to create a new tag in specified tag namespace:

    oci iam tag create [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • To create a tag key definition, use CreateTag operation.