create(parent, body=None, tagTemplateFieldId=None, x__xgafv=None)
Creates a field in a tag template. The user should enable the Data Catalog
delete(name, force=None, x__xgafv=None)
Deletes a field in a tag template and all uses of that field.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a field in a tag template. This method cannot be used to update the
rename(name, body=None, x__xgafv=None)
Renames a field in a tag template. The user should enable the Data Catalog
create(parent, body=None, tagTemplateFieldId=None, x__xgafv=None)
Creates a field in a tag template. The user should enable the Data Catalog
API in the project identified by the `parent` parameter (see
[Data Catalog Resource
Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project)
for more information).
Args:
parent: string, Required. The name of the project and the template location
[region](https://cloud.google.com/data-catalog/docs/concepts/regions).
Example:
* projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} (required)
body: object, The request body.
The object takes the form of:
{ # The template for an individual field within a tag template.
"type": { # Required. The type of value this tag field can contain.
"enumType": { # Represents an enum type.
"allowedValues": [ # Required on create; optional on update. The set of allowed values for
# this enum. This set must not be empty, the display names of the values in
# this set must not be empty and the display names of the values must be
# case-insensitively unique within this set. Currently, enum values can
# only be added to the list of allowed values. Deletion and renaming of
# enum values are not supported. Can have up to 500 allowed values.
{
"displayName": "A String", # Required. The display name of the enum value. Must not be an empty string.
},
],
},
"primitiveType": "A String", # Represents primitive types - string, bool etc.
},
"order": 42, # The order of this field with respect to other fields in this tag
# template. A higher value indicates a more important field. The value can
# be negative. Multiple fields can have the same order, and field orders
# within a tag do not have to be sequential.
"isRequired": True or False, # Whether this is a required field. Defaults to false.
"name": "A String", # Output only. The resource name of the tag template field in URL format. Example:
#
# * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
#
# Note that this TagTemplateField may not actually be stored in the location
# in this name.
"displayName": "A String", # The display name for this field. Defaults to an empty string.
}
tagTemplateFieldId: string, Required. The ID of the tag template field to create.
Field ids can contain letters (both uppercase and lowercase), numbers
(0-9), underscores (_) and dashes (-). Field IDs must be at least 1
character long and at most 128 characters long. Field IDs must also be
unique within their template.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The template for an individual field within a tag template.
"type": { # Required. The type of value this tag field can contain.
"enumType": { # Represents an enum type.
"allowedValues": [ # Required on create; optional on update. The set of allowed values for
# this enum. This set must not be empty, the display names of the values in
# this set must not be empty and the display names of the values must be
# case-insensitively unique within this set. Currently, enum values can
# only be added to the list of allowed values. Deletion and renaming of
# enum values are not supported. Can have up to 500 allowed values.
{
"displayName": "A String", # Required. The display name of the enum value. Must not be an empty string.
},
],
},
"primitiveType": "A String", # Represents primitive types - string, bool etc.
},
"order": 42, # The order of this field with respect to other fields in this tag
# template. A higher value indicates a more important field. The value can
# be negative. Multiple fields can have the same order, and field orders
# within a tag do not have to be sequential.
"isRequired": True or False, # Whether this is a required field. Defaults to false.
"name": "A String", # Output only. The resource name of the tag template field in URL format. Example:
#
# * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
#
# Note that this TagTemplateField may not actually be stored in the location
# in this name.
"displayName": "A String", # The display name for this field. Defaults to an empty string.
}
delete(name, force=None, x__xgafv=None)
Deletes a field in a tag template and all uses of that field.
Users should enable the Data Catalog API in the project identified by
the `name` parameter (see [Data Catalog Resource Project]
(https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
more information).
Args:
name: string, Required. The name of the tag template field to delete. Example:
* projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} (required)
force: boolean, Required. Currently, this field must always be set to `true`.
This confirms the deletion of this field from any tags using this field.
`force = false` will be supported in the future.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
#
# service Foo {
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# }
#
# The JSON representation for `Empty` is empty JSON object `{}`.
}
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a field in a tag template. This method cannot be used to update the
field type. Users should enable the Data Catalog API in the project
identified by the `name` parameter (see [Data Catalog Resource Project]
(https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
more information).
Args:
name: string, Required. The name of the tag template field. Example:
* projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} (required)
body: object, The request body.
The object takes the form of:
{ # The template for an individual field within a tag template.
"type": { # Required. The type of value this tag field can contain.
"enumType": { # Represents an enum type.
"allowedValues": [ # Required on create; optional on update. The set of allowed values for
# this enum. This set must not be empty, the display names of the values in
# this set must not be empty and the display names of the values must be
# case-insensitively unique within this set. Currently, enum values can
# only be added to the list of allowed values. Deletion and renaming of
# enum values are not supported. Can have up to 500 allowed values.
{
"displayName": "A String", # Required. The display name of the enum value. Must not be an empty string.
},
],
},
"primitiveType": "A String", # Represents primitive types - string, bool etc.
},
"order": 42, # The order of this field with respect to other fields in this tag
# template. A higher value indicates a more important field. The value can
# be negative. Multiple fields can have the same order, and field orders
# within a tag do not have to be sequential.
"isRequired": True or False, # Whether this is a required field. Defaults to false.
"name": "A String", # Output only. The resource name of the tag template field in URL format. Example:
#
# * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
#
# Note that this TagTemplateField may not actually be stored in the location
# in this name.
"displayName": "A String", # The display name for this field. Defaults to an empty string.
}
updateMask: string, Optional. The field mask specifies the parts of the template to be updated.
Allowed fields:
* `display_name`
* `type.enum_type`
* `is_required`
If `update_mask` is not set or empty, all of the allowed fields above will
be updated.
When updating an enum type, the provided values will be merged with the
existing values. Therefore, enum values can only be added, existing enum
values cannot be deleted nor renamed. Updating a template field from
optional to required is NOT allowed.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The template for an individual field within a tag template.
"type": { # Required. The type of value this tag field can contain.
"enumType": { # Represents an enum type.
"allowedValues": [ # Required on create; optional on update. The set of allowed values for
# this enum. This set must not be empty, the display names of the values in
# this set must not be empty and the display names of the values must be
# case-insensitively unique within this set. Currently, enum values can
# only be added to the list of allowed values. Deletion and renaming of
# enum values are not supported. Can have up to 500 allowed values.
{
"displayName": "A String", # Required. The display name of the enum value. Must not be an empty string.
},
],
},
"primitiveType": "A String", # Represents primitive types - string, bool etc.
},
"order": 42, # The order of this field with respect to other fields in this tag
# template. A higher value indicates a more important field. The value can
# be negative. Multiple fields can have the same order, and field orders
# within a tag do not have to be sequential.
"isRequired": True or False, # Whether this is a required field. Defaults to false.
"name": "A String", # Output only. The resource name of the tag template field in URL format. Example:
#
# * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
#
# Note that this TagTemplateField may not actually be stored in the location
# in this name.
"displayName": "A String", # The display name for this field. Defaults to an empty string.
}
rename(name, body=None, x__xgafv=None)
Renames a field in a tag template. The user should enable the Data Catalog
API in the project identified by the `name` parameter (see [Data Catalog
Resource
Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project)
for more information).
Args:
name: string, Required. The name of the tag template. Example:
* projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} (required)
body: object, The request body.
The object takes the form of:
{ # Request message for
# RenameTagTemplateField.
"newTagTemplateFieldId": "A String", # Required. The new ID of this tag template field. For example, `my_new_field`.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The template for an individual field within a tag template.
"type": { # Required. The type of value this tag field can contain.
"enumType": { # Represents an enum type.
"allowedValues": [ # Required on create; optional on update. The set of allowed values for
# this enum. This set must not be empty, the display names of the values in
# this set must not be empty and the display names of the values must be
# case-insensitively unique within this set. Currently, enum values can
# only be added to the list of allowed values. Deletion and renaming of
# enum values are not supported. Can have up to 500 allowed values.
{
"displayName": "A String", # Required. The display name of the enum value. Must not be an empty string.
},
],
},
"primitiveType": "A String", # Represents primitive types - string, bool etc.
},
"order": 42, # The order of this field with respect to other fields in this tag
# template. A higher value indicates a more important field. The value can
# be negative. Multiple fields can have the same order, and field orders
# within a tag do not have to be sequential.
"isRequired": True or False, # Whether this is a required field. Defaults to false.
"name": "A String", # Output only. The resource name of the tag template field in URL format. Example:
#
# * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
#
# Note that this TagTemplateField may not actually be stored in the location
# in this name.
"displayName": "A String", # The display name for this field. Defaults to an empty string.
}