1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. iap
  6. getAgentRegistryIamPolicy
Viewing docs for Google Cloud v9.21.0
published on Friday, Apr 24, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.21.0
published on Friday, Apr 24, 2026 by Pulumi

    Retrieves the current IAM policy data for agentregistry

    Warning: This datasource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = gcp.iap.getAgentRegistryIamPolicy({
        project: projectService.project,
        location: "us-central1",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.iap.get_agent_registry_iam_policy(project=project_service["project"],
        location="us-central1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/iap"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iap.LookupAgentRegistryIamPolicy(ctx, &iap.LookupAgentRegistryIamPolicyArgs{
    			Project:  pulumi.StringRef(projectService.Project),
    			Location: "us-central1",
    		}, 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.Iap.GetAgentRegistryIamPolicy.Invoke(new()
        {
            Project = projectService.Project,
            Location = "us-central1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.iap.IapFunctions;
    import com.pulumi.gcp.iap.inputs.GetAgentRegistryIamPolicyArgs;
    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 = IapFunctions.getAgentRegistryIamPolicy(GetAgentRegistryIamPolicyArgs.builder()
                .project(projectService.project())
                .location("us-central1")
                .build());
    
        }
    }
    
    variables:
      policy:
        fn::invoke:
          function: gcp:iap:getAgentRegistryIamPolicy
          arguments:
            project: ${projectService.project}
            location: us-central1
    

    Using getAgentRegistryIamPolicy

    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 getAgentRegistryIamPolicy(args: GetAgentRegistryIamPolicyArgs, opts?: InvokeOptions): Promise<GetAgentRegistryIamPolicyResult>
    function getAgentRegistryIamPolicyOutput(args: GetAgentRegistryIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetAgentRegistryIamPolicyResult>
    def get_agent_registry_iam_policy(location: Optional[str] = None,
                                      project: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetAgentRegistryIamPolicyResult
    def get_agent_registry_iam_policy_output(location: Optional[pulumi.Input[str]] = None,
                                      project: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetAgentRegistryIamPolicyResult]
    func LookupAgentRegistryIamPolicy(ctx *Context, args *LookupAgentRegistryIamPolicyArgs, opts ...InvokeOption) (*LookupAgentRegistryIamPolicyResult, error)
    func LookupAgentRegistryIamPolicyOutput(ctx *Context, args *LookupAgentRegistryIamPolicyOutputArgs, opts ...InvokeOption) LookupAgentRegistryIamPolicyResultOutput

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

    public static class GetAgentRegistryIamPolicy 
    {
        public static Task<GetAgentRegistryIamPolicyResult> InvokeAsync(GetAgentRegistryIamPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetAgentRegistryIamPolicyResult> Invoke(GetAgentRegistryIamPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAgentRegistryIamPolicyResult> getAgentRegistryIamPolicy(GetAgentRegistryIamPolicyArgs args, InvokeOptions options)
    public static Output<GetAgentRegistryIamPolicyResult> getAgentRegistryIamPolicy(GetAgentRegistryIamPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:iap/getAgentRegistryIamPolicy:getAgentRegistryIamPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    Used to find the parent resource to bind the IAM policy to
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
    Location string
    Used to find the parent resource to bind the IAM policy to
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
    location String
    Used to find the parent resource to bind the IAM policy to
    project String
    The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
    location string
    Used to find the parent resource to bind the IAM policy to
    project string
    The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
    location str
    Used to find the parent resource to bind the IAM policy to
    project str
    The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
    location String
    Used to find the parent resource to bind the IAM policy to
    project String
    The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

    getAgentRegistryIamPolicy 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.
    Location string
    PolicyData string
    (Required only by gcp.iap.AgentRegistryIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    Project string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    PolicyData string
    (Required only by gcp.iap.AgentRegistryIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    Project string
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    policyData String
    (Required only by gcp.iap.AgentRegistryIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project String
    etag string
    (Computed) The etag of the IAM policy.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    policyData string
    (Required only by gcp.iap.AgentRegistryIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project string
    etag str
    (Computed) The etag of the IAM policy.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    policy_data str
    (Required only by gcp.iap.AgentRegistryIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project str
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    policyData String
    (Required only by gcp.iap.AgentRegistryIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project 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
    Viewing docs for Google Cloud v9.21.0
    published on Friday, Apr 24, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.