Skip to content
Get started

Update Tags

assets.update_tags(strasset_id, AssetUpdateTagsParams**kwargs) -> AssetUpdateTagsResponse
PUT/assets/{assetId}/tags

Add/delete tags on a specific asset

ParametersExpand Collapse
asset_id: str
project_id: Optional[str]

The projectId used for ownership resource management. Either to assert ownership or to set the owner of the resource(s)

add: Optional[Sequence[str]]

The list of tags to add

delete: Optional[Sequence[str]]

The list of tags to delete

strict: Optional[bool]

If true, the function will throw an error if:

  • one of the tags to add already exists
  • one of the tags to delete is not found If false, the endpoint will behave as if it was idempotent
ReturnsExpand Collapse
class AssetUpdateTagsResponse: …
added: List[str]

The list of added tags

deleted: List[str]

The list of deleted tags

Update Tags

import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
response = client.assets.update_tags(
    asset_id="assetId",
)
print(response.added)
{
  "added": [
    "string"
  ],
  "deleted": [
    "string"
  ]
}
Returns Examples
{
  "added": [
    "string"
  ],
  "deleted": [
    "string"
  ]
}