#[non_exhaustive]pub struct EffectiveTag {
pub tag_value: String,
pub namespaced_tag_value: String,
pub tag_key: String,
pub namespaced_tag_key: String,
pub tag_key_parent_name: String,
pub inherited: bool,
/* private fields */
}Expand description
An EffectiveTag represents a tag that applies to a resource during policy
evaluation. Tags can be either directly bound to a resource or inherited from
its ancestor. EffectiveTag contains the name and
namespaced_name of the tag value and tag key, with additional fields of
inherited to indicate the inheritance status of the effective tag.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tag_value: StringResource name for TagValue in the format tagValues/456.
namespaced_tag_value: StringThe namespaced name of the TagValue. Can be in the form
{organization_id}/{tag_key_short_name}/{tag_value_short_name} or
{project_id}/{tag_key_short_name}/{tag_value_short_name} or
{project_number}/{tag_key_short_name}/{tag_value_short_name}.
tag_key: StringThe name of the TagKey, in the format tagKeys/{id}, such as
tagKeys/123.
namespaced_tag_key: StringThe namespaced name of the TagKey. Can be in the form
{organization_id}/{tag_key_short_name} or
{project_id}/{tag_key_short_name} or
{project_number}/{tag_key_short_name}.
tag_key_parent_name: StringThe parent name of the tag key.
Must be in the format organizations/{organization_id} or
projects/{project_number}
inherited: boolIndicates the inheritance status of a tag value attached to the given resource. If the tag value is inherited from one of the resource’s ancestors, inherited will be true. If false, then the tag value is directly attached to the resource, inherited will be false.
Implementations§
Source§impl EffectiveTag
impl EffectiveTag
pub fn new() -> Self
Sourcepub fn set_tag_value<T: Into<String>>(self, v: T) -> Self
pub fn set_tag_value<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_namespaced_tag_value<T: Into<String>>(self, v: T) -> Self
pub fn set_namespaced_tag_value<T: Into<String>>(self, v: T) -> Self
Sets the value of namespaced_tag_value.
§Example
let x = EffectiveTag::new().set_namespaced_tag_value("example");Sourcepub fn set_tag_key<T: Into<String>>(self, v: T) -> Self
pub fn set_tag_key<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_namespaced_tag_key<T: Into<String>>(self, v: T) -> Self
pub fn set_namespaced_tag_key<T: Into<String>>(self, v: T) -> Self
Sets the value of namespaced_tag_key.
§Example
let x = EffectiveTag::new().set_namespaced_tag_key("example");Sourcepub fn set_tag_key_parent_name<T: Into<String>>(self, v: T) -> Self
pub fn set_tag_key_parent_name<T: Into<String>>(self, v: T) -> Self
Sets the value of tag_key_parent_name.
§Example
let x = EffectiveTag::new().set_tag_key_parent_name("example");Trait Implementations§
Source§impl Clone for EffectiveTag
impl Clone for EffectiveTag
Source§fn clone(&self) -> EffectiveTag
fn clone(&self) -> EffectiveTag
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more