Class: Google::Apis::CloudresourcemanagerV3::TagKey

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudresourcemanager_v3/classes.rb,
lib/google/apis/cloudresourcemanager_v3/representations.rb,
lib/google/apis/cloudresourcemanager_v3/representations.rb

Overview

A TagKey, used to group a set of TagValues.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TagKey

Returns a new instance of TagKey.



2001
2002
2003
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 2001

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#allowed_values_regexString

Optional. Regular expression constraint for freeform tag values. If present, it implicitly allows freeform values (constrained by the regex). Corresponds to the JSON property allowedValuesRegex

Returns:

  • (String)


1932
1933
1934
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1932

def allowed_values_regex
  @allowed_values_regex
end

#create_timeString

Output only. Creation time. Corresponds to the JSON property createTime

Returns:

  • (String)


1937
1938
1939
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1937

def create_time
  @create_time
end

#descriptionString

Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write. Corresponds to the JSON property description

Returns:

  • (String)


1943
1944
1945
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1943

def description
  @description
end

#etagString

Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details. Corresponds to the JSON property etag

Returns:

  • (String)


1949
1950
1951
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1949

def etag
  @etag
end

#nameString

Immutable. The resource name for a TagKey. Must be in the format tagKeys/ tag_key_id`, wheretag_key_idis the generated numeric id for the TagKey. Corresponds to the JSON propertyname`

Returns:

  • (String)


1955
1956
1957
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1955

def name
  @name
end

#namespaced_nameString

Output only. Immutable. Namespaced name of the TagKey. Corresponds to the JSON property namespacedName

Returns:

  • (String)


1960
1961
1962
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1960

def namespaced_name
  @namespaced_name
end

#parentString

Immutable. The resource name of the TagKey's parent. A TagKey can be parented by an Organization or a Project. For a TagKey parented by an Organization, its parent must be in the form organizations/org_id. For a TagKey parented by a Project, its parent can be in the form `projects/`project_id or projects/ project_number`. Corresponds to the JSON propertyparent`

Returns:

  • (String)


1969
1970
1971
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1969

def parent
  @parent
end

#purposeString

Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines. A purpose cannot be changed once set. Corresponds to the JSON property purpose

Returns:

  • (String)


1978
1979
1980
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1978

def purpose
  @purpose
end

#purpose_dataHash<String,String>

Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for Purpose for formatting of this field. Purpose data cannot be changed once set. Corresponds to the JSON property purposeData

Returns:

  • (Hash<String,String>)


1985
1986
1987
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1985

def purpose_data
  @purpose_data
end

#short_nameString

Required. Immutable. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name must be 1-256 characters, beginning and ending with an alphanumeric character ( [a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Corresponds to the JSON property shortName

Returns:

  • (String)


1994
1995
1996
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1994

def short_name
  @short_name
end

#update_timeString

Output only. Update time. Corresponds to the JSON property updateTime

Returns:

  • (String)


1999
2000
2001
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 1999

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 2006

def update!(**args)
  @allowed_values_regex = args[:allowed_values_regex] if args.key?(:allowed_values_regex)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @etag = args[:etag] if args.key?(:etag)
  @name = args[:name] if args.key?(:name)
  @namespaced_name = args[:namespaced_name] if args.key?(:namespaced_name)
  @parent = args[:parent] if args.key?(:parent)
  @purpose = args[:purpose] if args.key?(:purpose)
  @purpose_data = args[:purpose_data] if args.key?(:purpose_data)
  @short_name = args[:short_name] if args.key?(:short_name)
  @update_time = args[:update_time] if args.key?(:update_time)
end