Creating a Tag Key Definition

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

    1. Open the navigation menu and click Governance & Administration. Under Tenancy Management, click Tag Namespaces.
      A list of the tag namespaces in your current compartment is displayed.
    2. On the Tag Namespaces page, click the tag namespace you want to add the tag key definition to.
    3. On the Tag Namespace Details page, in the Tag Key Definitions section, click Create Tag Key Definition.
    4. In the Create Tag Key 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 the check box to enable this tag for cost tracking. You can use up to 10 Cost-Tracking Tags in your tenancy.
    5. In the Tag Value Type section, select one of the following options:
      • Static Value: Indicates that you can specify any value for this key.
      • A List of Values: Indicates that 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.
    6. Click Create Tag Key Definition.
  • 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.