1. Packages
  2. Google Cloud Native
  3. API Docs
  4. cloudresourcemanager
  5. cloudresourcemanager/v3
  6. TagKey

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.cloudresourcemanager/v3.TagKey

Explore with Pulumi AI

google-native logo

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

    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.

    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:

    ShortName 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}, where tag_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 form projects/{project_id} or projects/{project_number}.
    Purpose Pulumi.GoogleNative.CloudResourceManager.V3.TagKeyPurpose
    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.
    PurposeData 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.
    ShortName 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}, where tag_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 form projects/{project_id} or projects/{project_number}.
    Purpose TagKeyPurpose
    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.
    PurposeData 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.
    shortName 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}, where tag_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 form projects/{project_id} or projects/{project_number}.
    purpose TagKeyPurpose
    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.
    purposeData 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.
    shortName 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}, where tag_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 form projects/{project_id} or projects/{project_number}.
    purpose TagKeyPurpose
    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.
    purposeData {[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}, where tag_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 form projects/{project_id} or projects/{project_number}.
    purpose TagKeyPurpose
    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.
    shortName 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}, where tag_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 form projects/{project_id} or projects/{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.
    purposeData 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:

    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    NamespacedName string
    Immutable. Namespaced name of the TagKey.
    UpdateTime string
    Update time.
    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    NamespacedName string
    Immutable. Namespaced name of the TagKey.
    UpdateTime string
    Update time.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    namespacedName String
    Immutable. Namespaced name of the TagKey.
    updateTime String
    Update time.
    createTime string
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    namespacedName string
    Immutable. Namespaced name of the TagKey.
    updateTime 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.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    namespacedName String
    Immutable. Namespaced name of the TagKey.
    updateTime String
    Update time.

    Supporting Types

    TagKeyPurpose, TagKeyPurposeArgs

    PurposeUnspecified
    PURPOSE_UNSPECIFIEDUnspecified purpose.
    GceFirewall
    GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding purpose_data should be set for the network the tag is intended for. The key should be network 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
    DataGovernance
    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.
    TagKeyPurposePurposeUnspecified
    PURPOSE_UNSPECIFIEDUnspecified purpose.
    TagKeyPurposeGceFirewall
    GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding purpose_data should be set for the network the tag is intended for. The key should be network 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
    TagKeyPurposeDataGovernance
    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.
    PurposeUnspecified
    PURPOSE_UNSPECIFIEDUnspecified purpose.
    GceFirewall
    GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding purpose_data should be set for the network the tag is intended for. The key should be network 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
    DataGovernance
    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.
    PurposeUnspecified
    PURPOSE_UNSPECIFIEDUnspecified purpose.
    GceFirewall
    GCE_FIREWALLPurpose for Compute Engine firewalls. A corresponding purpose_data should be set for the network the tag is intended for. The key should be network 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
    DataGovernance
    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 be network 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 be network 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-native logo

    Google Cloud Native is in preview. Google Cloud Classic is fully supported.

    Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi