Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.cloudresourcemanager/v3.TagKey
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
Create TagKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TagKey(name: string, args: TagKeyArgs, opts?: CustomResourceOptions);
@overload
def TagKey(resource_name: str,
args: TagKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TagKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
short_name: Optional[str] = None,
description: Optional[str] = None,
etag: Optional[str] = None,
name: Optional[str] = None,
parent: Optional[str] = None,
purpose: Optional[TagKeyPurpose] = None,
purpose_data: Optional[Mapping[str, str]] = None)
func NewTagKey(ctx *Context, name string, args TagKeyArgs, opts ...ResourceOption) (*TagKey, error)
public TagKey(string name, TagKeyArgs args, CustomResourceOptions? opts = null)
public TagKey(String name, TagKeyArgs args)
public TagKey(String name, TagKeyArgs args, CustomResourceOptions options)
type: google-native:cloudresourcemanager/v3:TagKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TagKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TagKeyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TagKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var tagKeyResource = new GoogleNative.CloudResourceManager.V3.TagKey("tagKeyResource", new()
{
ShortName = "string",
Description = "string",
Etag = "string",
Name = "string",
Parent = "string",
Purpose = GoogleNative.CloudResourceManager.V3.TagKeyPurpose.PurposeUnspecified,
PurposeData =
{
{ "string", "string" },
},
});
example, err := cloudresourcemanagerv3.NewTagKey(ctx, "tagKeyResource", &cloudresourcemanagerv3.TagKeyArgs{
ShortName: pulumi.String("string"),
Description: pulumi.String("string"),
Etag: pulumi.String("string"),
Name: pulumi.String("string"),
Parent: pulumi.String("string"),
Purpose: cloudresourcemanagerv3.TagKeyPurposePurposeUnspecified,
PurposeData: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var tagKeyResource = new TagKey("tagKeyResource", TagKeyArgs.builder()
.shortName("string")
.description("string")
.etag("string")
.name("string")
.parent("string")
.purpose("PURPOSE_UNSPECIFIED")
.purposeData(Map.of("string", "string"))
.build());
tag_key_resource = google_native.cloudresourcemanager.v3.TagKey("tagKeyResource",
short_name="string",
description="string",
etag="string",
name="string",
parent="string",
purpose=google_native.cloudresourcemanager.v3.TagKeyPurpose.PURPOSE_UNSPECIFIED,
purpose_data={
"string": "string",
})
const tagKeyResource = new google_native.cloudresourcemanager.v3.TagKey("tagKeyResource", {
shortName: "string",
description: "string",
etag: "string",
name: "string",
parent: "string",
purpose: google_native.cloudresourcemanager.v3.TagKeyPurpose.PurposeUnspecified,
purposeData: {
string: "string",
},
});
type: google-native:cloudresourcemanager/v3:TagKey
properties:
description: string
etag: string
name: string
parent: string
purpose: PURPOSE_UNSPECIFIED
purposeData:
string: string
shortName: string
TagKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TagKey resource accepts the following input properties:
- Short
Name string - 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-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
- Description string
- Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write.
- Etag string
- Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.
- Name string
- Immutable. The resource name for a TagKey. Must be in the format
tagKeys/{tag_key_id}
, wheretag_key_id
is the generated numeric id for the TagKey. - Parent string
- 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 formprojects/{project_id}
orprojects/{project_number}
. - Purpose
Pulumi.
Google Native. Cloud Resource Manager. V3. Tag Key Purpose - 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.
- Purpose
Data Dictionary<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.
- Short
Name string - 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-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
- Description string
- Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write.
- Etag string
- Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.
- Name string
- Immutable. The resource name for a TagKey. Must be in the format
tagKeys/{tag_key_id}
, wheretag_key_id
is the generated numeric id for the TagKey. - Parent string
- 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 formprojects/{project_id}
orprojects/{project_number}
. - Purpose
Tag
Key Purpose - 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.
- Purpose
Data map[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.
- short
Name String - 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-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
- description String
- Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write.
- etag String
- Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.
- name String
- Immutable. The resource name for a TagKey. Must be in the format
tagKeys/{tag_key_id}
, wheretag_key_id
is the generated numeric id for the TagKey. - parent String
- 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 formprojects/{project_id}
orprojects/{project_number}
. - purpose
Tag
Key Purpose - 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.
- purpose
Data Map<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.
- short
Name string - 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-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
- description string
- Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write.
- etag string
- Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.
- name string
- Immutable. The resource name for a TagKey. Must be in the format
tagKeys/{tag_key_id}
, wheretag_key_id
is the generated numeric id for the TagKey. - parent string
- 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 formprojects/{project_id}
orprojects/{project_number}
. - purpose
Tag
Key Purpose - 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.
- purpose
Data {[key: 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.
- short_
name str - 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-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
- description str
- Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write.
- etag str
- Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.
- name str
- Immutable. The resource name for a TagKey. Must be in the format
tagKeys/{tag_key_id}
, wheretag_key_id
is the generated numeric id for the TagKey. - parent str
- 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 formprojects/{project_id}
orprojects/{project_number}
. - purpose
Tag
Key Purpose - 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.
- purpose_
data Mapping[str, str] - 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.
- short
Name String - 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-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
- description String
- Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write.
- etag String
- Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.
- name String
- Immutable. The resource name for a TagKey. Must be in the format
tagKeys/{tag_key_id}
, wheretag_key_id
is the generated numeric id for the TagKey. - parent String
- 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 formprojects/{project_id}
orprojects/{project_number}
. - purpose "PURPOSE_UNSPECIFIED" | "GCE_FIREWALL" | "DATA_GOVERNANCE"
- 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.
- purpose
Data Map<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.
Outputs
All input properties are implicitly available as output properties. Additionally, the TagKey resource produces the following output properties:
- Create
Time string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespaced
Name string - Immutable. Namespaced name of the TagKey.
- Update
Time string - Update time.
- Create
Time string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespaced
Name string - Immutable. Namespaced name of the TagKey.
- Update
Time string - Update time.
- create
Time String - Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- namespaced
Name String - Immutable. Namespaced name of the TagKey.
- update
Time String - Update time.
- create
Time string - Creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- namespaced
Name string - Immutable. Namespaced name of the TagKey.
- update
Time string - Update time.
- create_
time str - Creation time.
- id str
- The provider-assigned unique ID for this managed resource.
- namespaced_
name str - Immutable. Namespaced name of the TagKey.
- update_
time str - Update time.
- create
Time String - Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- namespaced
Name String - Immutable. Namespaced name of the TagKey.
- update
Time String - Update time.
Supporting Types
TagKeyPurpose, TagKeyPurposeArgs
- Purpose
Unspecified - PURPOSE_UNSPECIFIEDUnspecified purpose.
- Gce
Firewall - GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding
purpose_data
should be set for the network the tag is intended for. The key should benetwork
and the value should be in ## either of these two formats:https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
-{project_id}/{network_name}
## Examples:https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
-fail-closed-load-testing/load-testing-network
- Data
Governance - DATA_GOVERNANCEPurpose for data governance. Tag Values created under a key with this purpose may have Tag Value children. No
purpose_data
should be set.
- Tag
Key Purpose Purpose Unspecified - PURPOSE_UNSPECIFIEDUnspecified purpose.
- Tag
Key Purpose Gce Firewall - GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding
purpose_data
should be set for the network the tag is intended for. The key should benetwork
and the value should be in ## either of these two formats:https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
-{project_id}/{network_name}
## Examples:https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
-fail-closed-load-testing/load-testing-network
- Tag
Key Purpose Data Governance - DATA_GOVERNANCEPurpose for data governance. Tag Values created under a key with this purpose may have Tag Value children. No
purpose_data
should be set.
- Purpose
Unspecified - PURPOSE_UNSPECIFIEDUnspecified purpose.
- Gce
Firewall - GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding
purpose_data
should be set for the network the tag is intended for. The key should benetwork
and the value should be in ## either of these two formats:https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
-{project_id}/{network_name}
## Examples:https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
-fail-closed-load-testing/load-testing-network
- Data
Governance - DATA_GOVERNANCEPurpose for data governance. Tag Values created under a key with this purpose may have Tag Value children. No
purpose_data
should be set.
- Purpose
Unspecified - PURPOSE_UNSPECIFIEDUnspecified purpose.
- Gce
Firewall - GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding
purpose_data
should be set for the network the tag is intended for. The key should benetwork
and the value should be in ## either of these two formats:https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
-{project_id}/{network_name}
## Examples:https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
-fail-closed-load-testing/load-testing-network
- Data
Governance - DATA_GOVERNANCEPurpose for data governance. Tag Values created under a key with this purpose may have Tag Value children. No
purpose_data
should be set.
- PURPOSE_UNSPECIFIED
- PURPOSE_UNSPECIFIEDUnspecified purpose.
- GCE_FIREWALL
- GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding
purpose_data
should be set for the network the tag is intended for. The key should benetwork
and the value should be in ## either of these two formats:https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
-{project_id}/{network_name}
## Examples:https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
-fail-closed-load-testing/load-testing-network
- DATA_GOVERNANCE
- DATA_GOVERNANCEPurpose for data governance. Tag Values created under a key with this purpose may have Tag Value children. No
purpose_data
should be set.
- "PURPOSE_UNSPECIFIED"
- PURPOSE_UNSPECIFIEDUnspecified purpose.
- "GCE_FIREWALL"
- GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding
purpose_data
should be set for the network the tag is intended for. The key should benetwork
and the value should be in ## either of these two formats:https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
-{project_id}/{network_name}
## Examples:https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
-fail-closed-load-testing/load-testing-network
- "DATA_GOVERNANCE"
- DATA_GOVERNANCEPurpose for data governance. Tag Values created under a key with this purpose may have Tag Value children. No
purpose_data
should be set.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.