Managing Tags

Update or remove values for defined tags from resources. Assign new defined tag namespaces or tag keys to resources. Or, remove defined tags from resources in bulk.

  • These steps assume that you already have resource results. You got resource results by doing one of the following:
    1. (Optional) To further refine the list of resources for which you want to perform bulk actions, select the checkbox next to the resource name in the list of resource results.
    2. Click Actions.
    3. Click Manage tags.
    4. If any resources that you selected can't have their tags managed as part of this bulk action, the Console displays them and the reasons why. Review the list, and then click Next.
    5. Review the tags that already exist and then do one or more of the following:
      • To update the value of a tag key, click Tag value, and then enter a new value.
      • To apply a defined tag, remove a defined tag, or leave a defined tag unchanged, click Action, and then click Apply tag to all selected resources, Remove tag from all selected resources, or Do nothing, as appropriate.
      • To add another defined tag to the selected resources, click + Another tag, and then select the Tag namespace, Tag key, Tag value, and Action.
    6. Click Review.
    7. Review the list of resources and their proposed tag changes, and then click Apply changes.
    8. Click Close.
  • Use the bulk-edit command and required parameters to bulk edit tags on resources:

    oci iam tag bulk-edit --compartment-id <compartment_OCID> --bulk-edit-operations <operations_to_bulk_edit_tags_in_JSON_format> --resources <resources_to_tag_in_JSON_format>
    For example:
    oci iam tag bulk-edit --compartment-id ocid1.compartment.oc1..<unique_id> --bulk-edit-operations file://path/to/bulktaggingoperations.json --resources file://path/to/resourcestodelete.json

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

  • Run the BulkEditTags operation to edit tags on resources in bulk.