Edit multiple tag key definitions on resources

POST {{baseUrl}}/tags/actions/bulkEdit

Edits the specified list of tag key definitions for the selected resources. This operation triggers a process that edits the tags on all selected resources. The possible actions are:

  • Add a defined tag when the tag does not already exist on the resource.
  • Update the value for a defined tag when the tag is present on the resource.
  • Add a defined tag when it does not already exist on the resource or update the value for a defined tag when the tag is present on the resource.
  • Remove a defined tag from a resource. The tag is removed from the resource regardless of the tag value.

See BulkEditOperationDetails for more information.

The edits can include a combination of operations and tag sets. However, multiple operations cannot apply to one key definition in the same request. For example, if one request adds tag set-1 to a resource and sets a tag value to tag set-2, tag set-1 and tag set-2 cannot have any common tag definitions.

Request Body

{"compartmentId"=>"{{tenancy_ocid}}", "resources"=>[{"id"=>"aute minim", "resourceType"=>"id occaecat qui commodo nisi"}, {"id"=>"consequat laborum do", "resourceType"=>"nostrud labore"}], "bulkEditOperations"=>[{"operationType"=>"ADD_OR_SET"}, {"operationType"=>"ADD_OR_SET"}]}

HEADERS

KeyDatatypeRequiredDescription
opc-request-idstringUnique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or
server error without risk of executing that same action again. Retry tokens expire after 24
hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
has been deleted and purged from the system, then a retry of the original creation request
may be rejected).
Content-Typestring
Datestring(Required) Current Date
Authorizationstring(Required) Signature Authentication on Authorization header
x-content-sha256string(Required) Content sha256 for POST, PUT and PATCH operations