1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. datacatalog
  5. getPolicyTagIamPolicy
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

gcp.datacatalog.getPolicyTagIamPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

    Retrieves the current IAM policy data for policytag

    example

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = gcp.datacatalog.getPolicyTagIamPolicy({
        policyTag: basicPolicyTag.name,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.datacatalog.get_policy_tag_iam_policy(policy_tag=basic_policy_tag["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datacatalog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datacatalog.LookupPolicyTagIamPolicy(ctx, &datacatalog.LookupPolicyTagIamPolicyArgs{
    			PolicyTag: basicPolicyTag.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var policy = Gcp.DataCatalog.GetPolicyTagIamPolicy.Invoke(new()
        {
            PolicyTag = basicPolicyTag.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.datacatalog.DatacatalogFunctions;
    import com.pulumi.gcp.datacatalog.inputs.GetPolicyTagIamPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var policy = DatacatalogFunctions.getPolicyTagIamPolicy(GetPolicyTagIamPolicyArgs.builder()
                .policyTag(basicPolicyTag.name())
                .build());
    
        }
    }
    
    variables:
      policy:
        fn::invoke:
          Function: gcp:datacatalog:getPolicyTagIamPolicy
          Arguments:
            policyTag: ${basicPolicyTag.name}
    

    Using getPolicyTagIamPolicy

    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 getPolicyTagIamPolicy(args: GetPolicyTagIamPolicyArgs, opts?: InvokeOptions): Promise<GetPolicyTagIamPolicyResult>
    function getPolicyTagIamPolicyOutput(args: GetPolicyTagIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetPolicyTagIamPolicyResult>
    def get_policy_tag_iam_policy(policy_tag: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetPolicyTagIamPolicyResult
    def get_policy_tag_iam_policy_output(policy_tag: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetPolicyTagIamPolicyResult]
    func LookupPolicyTagIamPolicy(ctx *Context, args *LookupPolicyTagIamPolicyArgs, opts ...InvokeOption) (*LookupPolicyTagIamPolicyResult, error)
    func LookupPolicyTagIamPolicyOutput(ctx *Context, args *LookupPolicyTagIamPolicyOutputArgs, opts ...InvokeOption) LookupPolicyTagIamPolicyResultOutput

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

    public static class GetPolicyTagIamPolicy 
    {
        public static Task<GetPolicyTagIamPolicyResult> InvokeAsync(GetPolicyTagIamPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyTagIamPolicyResult> Invoke(GetPolicyTagIamPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyTagIamPolicyResult> getPolicyTagIamPolicy(GetPolicyTagIamPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:datacatalog/getPolicyTagIamPolicy:getPolicyTagIamPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PolicyTag string
    Used to find the parent resource to bind the IAM policy to
    PolicyTag string
    Used to find the parent resource to bind the IAM policy to
    policyTag String
    Used to find the parent resource to bind the IAM policy to
    policyTag string
    Used to find the parent resource to bind the IAM policy to
    policy_tag str
    Used to find the parent resource to bind the IAM policy to
    policyTag String
    Used to find the parent resource to bind the IAM policy to

    getPolicyTagIamPolicy Result

    The following output properties are available:

    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyData string
    (Required only by gcp.datacatalog.PolicyTagIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    PolicyTag string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyData string
    (Required only by gcp.datacatalog.PolicyTagIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    PolicyTag string
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    policyData String
    (Required only by gcp.datacatalog.PolicyTagIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    policyTag String
    etag string
    (Computed) The etag of the IAM policy.
    id string
    The provider-assigned unique ID for this managed resource.
    policyData string
    (Required only by gcp.datacatalog.PolicyTagIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    policyTag string
    etag str
    (Computed) The etag of the IAM policy.
    id str
    The provider-assigned unique ID for this managed resource.
    policy_data str
    (Required only by gcp.datacatalog.PolicyTagIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    policy_tag str
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    policyData String
    (Required only by gcp.datacatalog.PolicyTagIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    policyTag String

    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 v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi