1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. tags
  5. getTagKey
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.tags.getTagKey

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Get a tag key by org or project parent and short_name.

    Example Usage

    data "google_tags_tag_key" "environment_tag_key"{
      parent = "organizations/12345"
      short_name = "environment"
    }
    
    data "google_tags_tag_key" "environment_tag_key"{
      parent = "projects/abc"
      short_name = "environment"
    }
    

    Using getTagKey

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTagKey(args: GetTagKeyArgs, opts?: InvokeOptions): Promise<GetTagKeyResult>
    function getTagKeyOutput(args: GetTagKeyOutputArgs, opts?: InvokeOptions): Output<GetTagKeyResult>
    def get_tag_key(parent: Optional[str] = None,
                    short_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetTagKeyResult
    def get_tag_key_output(parent: Optional[pulumi.Input[str]] = None,
                    short_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetTagKeyResult]
    func LookupTagKey(ctx *Context, args *LookupTagKeyArgs, opts ...InvokeOption) (*LookupTagKeyResult, error)
    func LookupTagKeyOutput(ctx *Context, args *LookupTagKeyOutputArgs, opts ...InvokeOption) LookupTagKeyResultOutput

    > Note: This function is named LookupTagKey in the Go SDK.

    public static class GetTagKey 
    {
        public static Task<GetTagKeyResult> InvokeAsync(GetTagKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetTagKeyResult> Invoke(GetTagKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTagKeyResult> getTagKey(GetTagKeyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:tags/getTagKey:getTagKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Parent string
    The resource name of the parent organization or project. It can be in format organizations/{org_id} or projects/{project_id_or_number}.
    ShortName string
    The tag key's short_name.
    Parent string
    The resource name of the parent organization or project. It can be in format organizations/{org_id} or projects/{project_id_or_number}.
    ShortName string
    The tag key's short_name.
    parent String
    The resource name of the parent organization or project. It can be in format organizations/{org_id} or projects/{project_id_or_number}.
    shortName String
    The tag key's short_name.
    parent string
    The resource name of the parent organization or project. It can be in format organizations/{org_id} or projects/{project_id_or_number}.
    shortName string
    The tag key's short_name.
    parent str
    The resource name of the parent organization or project. It can be in format organizations/{org_id} or projects/{project_id_or_number}.
    short_name str
    The tag key's short_name.
    parent String
    The resource name of the parent organization or project. It can be in format organizations/{org_id} or projects/{project_id_or_number}.
    shortName String
    The tag key's short_name.

    getTagKey Result

    The following output properties are available:

    CreateTime string
    Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    Description string
    Id string
    an identifier for the resource with format tagKeys/{{name}}
    Name string
    The generated numeric id for the TagKey.
    NamespacedName string
    Namespaced name of the TagKey which is in the format {parentNamespace}/{shortName}.
    Parent string
    ShortName string
    UpdateTime string
    Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    CreateTime string
    Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    Description string
    Id string
    an identifier for the resource with format tagKeys/{{name}}
    Name string
    The generated numeric id for the TagKey.
    NamespacedName string
    Namespaced name of the TagKey which is in the format {parentNamespace}/{shortName}.
    Parent string
    ShortName string
    UpdateTime string
    Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    createTime String
    Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    description String
    id String
    an identifier for the resource with format tagKeys/{{name}}
    name String
    The generated numeric id for the TagKey.
    namespacedName String
    Namespaced name of the TagKey which is in the format {parentNamespace}/{shortName}.
    parent String
    shortName String
    updateTime String
    Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    createTime string
    Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    description string
    id string
    an identifier for the resource with format tagKeys/{{name}}
    name string
    The generated numeric id for the TagKey.
    namespacedName string
    Namespaced name of the TagKey which is in the format {parentNamespace}/{shortName}.
    parent string
    shortName string
    updateTime string
    Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    create_time str
    Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    description str
    id str
    an identifier for the resource with format tagKeys/{{name}}
    name str
    The generated numeric id for the TagKey.
    namespaced_name str
    Namespaced name of the TagKey which is in the format {parentNamespace}/{shortName}.
    parent str
    short_name str
    update_time str
    Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    createTime String
    Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
    description String
    id String
    an identifier for the resource with format tagKeys/{{name}}
    name String
    The generated numeric id for the TagKey.
    namespacedName String
    Namespaced name of the TagKey which is in the format {parentNamespace}/{shortName}.
    parent String
    shortName String
    updateTime String
    Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi