1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. accesscontextmanager
  5. getAccessPolicyIamPolicy
Google Cloud Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi

gcp.accesscontextmanager.getAccessPolicyIamPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi

    Retrieves the current IAM policy data for accesspolicy

    example

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = gcp.accesscontextmanager.getAccessPolicyIamPolicy({
        name: google_access_context_manager_access_policy["access-policy"].name,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.accesscontextmanager.get_access_policy_iam_policy(name=google_access_context_manager_access_policy["access-policy"]["name"])
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var policy = Gcp.AccessContextManager.GetAccessPolicyIamPolicy.Invoke(new()
        {
            Name = google_access_context_manager_access_policy.Access_policy.Name,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/accesscontextmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := accesscontextmanager.LookupAccessPolicyIamPolicy(ctx, &accesscontextmanager.LookupAccessPolicyIamPolicyArgs{
    			Name: google_access_context_manager_access_policy.AccessPolicy.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.accesscontextmanager.AccesscontextmanagerFunctions;
    import com.pulumi.gcp.accesscontextmanager.inputs.GetAccessPolicyIamPolicyArgs;
    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 = AccesscontextmanagerFunctions.getAccessPolicyIamPolicy(GetAccessPolicyIamPolicyArgs.builder()
                .name(google_access_context_manager_access_policy.access-policy().name())
                .build());
    
        }
    }
    
    variables:
      policy:
        fn::invoke:
          Function: gcp:accesscontextmanager:getAccessPolicyIamPolicy
          Arguments:
            name: ${google_access_context_manager_access_policy"access-policy"[%!s(MISSING)].name}
    

    Using getAccessPolicyIamPolicy

    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 getAccessPolicyIamPolicy(args: GetAccessPolicyIamPolicyArgs, opts?: InvokeOptions): Promise<GetAccessPolicyIamPolicyResult>
    function getAccessPolicyIamPolicyOutput(args: GetAccessPolicyIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetAccessPolicyIamPolicyResult>
    def get_access_policy_iam_policy(name: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetAccessPolicyIamPolicyResult
    def get_access_policy_iam_policy_output(name: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetAccessPolicyIamPolicyResult]
    func LookupAccessPolicyIamPolicy(ctx *Context, args *LookupAccessPolicyIamPolicyArgs, opts ...InvokeOption) (*LookupAccessPolicyIamPolicyResult, error)
    func LookupAccessPolicyIamPolicyOutput(ctx *Context, args *LookupAccessPolicyIamPolicyOutputArgs, opts ...InvokeOption) LookupAccessPolicyIamPolicyResultOutput

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

    public static class GetAccessPolicyIamPolicy 
    {
        public static Task<GetAccessPolicyIamPolicyResult> InvokeAsync(GetAccessPolicyIamPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetAccessPolicyIamPolicyResult> Invoke(GetAccessPolicyIamPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccessPolicyIamPolicyResult> getAccessPolicyIamPolicy(GetAccessPolicyIamPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:accesscontextmanager/getAccessPolicyIamPolicy:getAccessPolicyIamPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string

    Used to find the parent resource to bind the IAM policy to

    Name string

    Used to find the parent resource to bind the IAM policy to

    name String

    Used to find the parent resource to bind the IAM policy to

    name string

    Used to find the parent resource to bind the IAM policy to

    name str

    Used to find the parent resource to bind the IAM policy to

    name String

    Used to find the parent resource to bind the IAM policy to

    getAccessPolicyIamPolicy 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.

    Name string
    PolicyData string

    (Required only by gcp.accesscontextmanager.AccessPolicyIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.

    Etag string

    (Computed) The etag of the IAM policy.

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string
    PolicyData string

    (Required only by gcp.accesscontextmanager.AccessPolicyIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.

    etag String

    (Computed) The etag of the IAM policy.

    id String

    The provider-assigned unique ID for this managed resource.

    name String
    policyData String

    (Required only by gcp.accesscontextmanager.AccessPolicyIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.

    etag string

    (Computed) The etag of the IAM policy.

    id string

    The provider-assigned unique ID for this managed resource.

    name string
    policyData string

    (Required only by gcp.accesscontextmanager.AccessPolicyIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.

    etag str

    (Computed) The etag of the IAM policy.

    id str

    The provider-assigned unique ID for this managed resource.

    name str
    policy_data str

    (Required only by gcp.accesscontextmanager.AccessPolicyIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.

    etag String

    (Computed) The etag of the IAM policy.

    id String

    The provider-assigned unique ID for this managed resource.

    name String
    policyData String

    (Required only by gcp.accesscontextmanager.AccessPolicyIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.

    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 v6.66.0 published on Monday, Sep 18, 2023 by Pulumi