Stay organized with collections
Save and categorize content based on your preferences.
This page describes tags and how to use them with
Datastream. To use gcloud to attach, detach, and list tags on your Datastream resources, see Manage tags.
Tags are a way to organize your Datastream resources. These resources include private connectivity configurations, connection profiles, and streams.
Tags are applied at higher levels of the resource hierarchy
across Google Cloud. Datastream and other resources inherit the tags.
They are managed using Resource Manager.
You can add a reference to tags in IAM policy bindings
to grant conditional access to resources.
Tags are different from labels,
which are another way to organize and filter your resources in Datastream. Tags and labels
work independently of each other, and you can use both on the same resource. You can learn about using labels with Datastream resources, including connection profiles and streams.
What are tags?
Tags are key-value pairs you can apply to your Datastream resources for fine-grained access
control.
A tag key could be a property, such as environment, and the tag value could be
an attribute, such as development or production. A tag can have only one
value for a given key on a particular resource.
Tags are created at the Organization level. Tags are attached to resources, such
as a project or a Datastream private connectivity configuration, connection profile, or stream, through the
Resource Manager, which is used
across Google Cloud.
Grant permissions based on conditional tag bindings
After a tag is attached to or inherited by a Datastream resource,
you can use the tag
with IAM Conditions to grant access to Datastream
resources conditionally. IAM Conditions let you impose
fine-grain access control to Datastream resources. To use
IAM Conditions, you reference the tag in IAM
policy bindings.
Restrictions
Tags have the following restrictions:
Organization policies
can conditionally reference tags inherited from the project level and higher,
but don't support tags that are directly attached to Datastream resources.
Cloud Audit logs show the creation and deletion
of tags, but entries are not generated for attaching tags and viewing tag
bindings on Datastream resources.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eTags are key-value pairs used to organize and control access to Datastream resources like private connectivity configurations, connection profiles, and streams.\u003c/p\u003e\n"],["\u003cp\u003eUnlike labels, which are used for organization and filtering, tags enable fine-grained access control through IAM policy bindings and are managed via Resource Manager at the Organization level.\u003c/p\u003e\n"],["\u003cp\u003eDatastream resources can inherit tags from higher levels of the resource hierarchy, allowing for consistent access control across Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eAfter a tag is attached to a Datastream resource, IAM Conditions can reference it to conditionally grant permissions to the resource, giving the user fine-grain control.\u003c/p\u003e\n"],["\u003cp\u003eOrganization policies can use tags inherited from the Project level and above, but not those directly attached to Datastream resources, and while Cloud Audit Logs track tag creation and deletion, they don't record tag attachment or viewing.\u003c/p\u003e\n"]]],[],null,["# Access control with tags\n\nThis page describes tags and how to use them with\nDatastream. To use `gcloud` to attach, detach, and list tags on your Datastream resources, see [Manage tags](/datastream/docs/manage-tags).\n\nTags are a way to organize your Datastream resources. These resources include private connectivity configurations, connection profiles, and streams.\n\nTags are applied at higher levels of the [resource hierarchy](/resource-manager/docs/cloud-platform-resource-hierarchy)\nacross Google Cloud. Datastream and other resources inherit the tags.\nThey are managed using [Resource Manager](/resource-manager/docs/tags/tags-overview).\nYou can add a reference to tags in [IAM policy bindings](/iam/docs/tags-access-control)\nto grant conditional access to resources.\n\nTags are different from [labels](/resource-manager/docs/creating-managing-labels#what-are-labels),\nwhich are another way to organize and filter your resources in Datastream. Tags and labels\nwork independently of each other, and you can use both on the same resource. You can learn about using labels with Datastream resources, including [connection profiles](/datastream/docs/create-connection-profiles) and [streams](/datastream/docs/create-a-stream).\n\nWhat are tags?\n--------------\n\nTags are key-value pairs you can apply to your Datastream resources for fine-grained access\ncontrol.\n\nA tag key could be a property, such as `environment`, and the tag value could be\nan attribute, such as `development` or `production`. A tag can have only one\nvalue for a given key on a particular resource.\n\nTags are created at the Organization level. Tags are attached to resources, such\nas a project or a Datastream private connectivity configuration, connection profile, or stream, through the\n[Resource Manager](/resource-manager/docs/tags/tags-overview), which is used\nacross Google Cloud.\n\nGrant permissions based on conditional tag bindings\n---------------------------------------------------\n\nAfter a tag is attached to or inherited by a Datastream resource,\nyou can [use the tag](/iam/docs/conditions-attribute-reference#resource-tags)\nwith IAM Conditions to grant access to Datastream\nresources conditionally. IAM Conditions let you impose\nfine-grain access control to Datastream resources. To use\nIAM Conditions, you reference the tag in IAM\npolicy bindings.\n\nRestrictions\n------------\n\nTags have the following restrictions:\n\n- [Organization policies](/resource-manager/docs/organization-policy/tags-organization-policy) can conditionally reference tags inherited from the project level and higher, but don't support tags that are directly attached to Datastream resources.\n- [Cloud Audit logs](/storage/docs/audit-logging) show the creation and deletion of tags, but entries are not generated for attaching tags and viewing tag bindings on Datastream resources.\n\nWhat's next\n-----------\n\n- Learn how to use Resource Manager to [create and manage tags for your Datastream resources](/resource-manager/docs/tags/tags-creating-and-managing).\n- See specific `gcloud` commands to attach, detach, and list tags on your Datastream resources in [Manage tags](/datastream/docs/manage-tags)."]]