2424`service` tags cannot be attached to IMS resources. `service` tags must be in the form
2525`service_prefix:tag_label` where `service_prefix` identifies the Service owning the tag.
2626`access` tags cannot be attached to IMS and Cloud Foundry resources. They must be in the
27- form `key:value`.
27+ form `key:value`. You can replace all resource's tags using the `replace` query parameter
28+ in the attach operation. You can update the `value` of a resource's tag in the format
29+ `key:value`, using the `update` query parameter in the attach operation.
2830
2931API Version: 1.2.0
3032"""
@@ -460,6 +462,7 @@ def attach_tag(
460462 account_id : Optional [str ] = None ,
461463 tag_type : Optional [str ] = None ,
462464 replace : Optional [bool ] = None ,
465+ update : Optional [bool ] = None ,
463466 ** kwargs ,
464467 ) -> DetailedResponse :
465468 """
@@ -497,8 +500,17 @@ def attach_tag(
497500 `user`, `service` and `access`. `service` and `access` are not supported
498501 for IMS resources.
499502 :param bool replace: (optional) Flag to request replacement of all attached
500- tags. Set 'true' if you want to replace all the list of tags attached to
501- the resource. Default value is false.
503+ tags. Set `true` if you want to replace all tags attached to the resource
504+ with the current ones. Default value is false.
505+ :param bool update: (optional) Flag to request update of attached tags in
506+ the format `key:value`. Here's how it works for each tag in the request
507+ body: If the tag to attach is in the format `key:value`, the System will
508+ atomically detach all existing tags starting with `key:` and attach the new
509+ `key:value` tag. If no such tags exist, a new `key:value` tag will be
510+ attached. If the tag is not in the `key:value` format (e.g., a simple
511+ label), the System will attach the label as usual. The update query
512+ parameter is available for user and access management tags, but not for
513+ service tags.
502514 :param dict headers: A `dict` containing the request headers
503515 :return: A `DetailedResponse` containing the result, headers and HTTP status code.
504516 :rtype: DetailedResponse with `dict` result representing a `TagResults` object
@@ -522,6 +534,7 @@ def attach_tag(
522534 'account_id' : account_id ,
523535 'tag_type' : tag_type ,
524536 'replace' : replace ,
537+ 'update' : update ,
525538 }
526539
527540 data = {
0 commit comments