Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi
gcp.accesscontextmanager.getAccessPolicyIamPolicy
Explore with Pulumi AI
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: access_policy.name,
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.accesscontextmanager.get_access_policy_iam_policy(name=access_policy["name"])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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: access_policy.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.AccessContextManager.GetAccessPolicyIamPolicy.Invoke(new()
{
Name = access_policy.Name,
});
});
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(access_policy.name())
.build());
}
}
variables:
policy:
fn::invoke:
Function: gcp:accesscontextmanager:getAccessPolicyIamPolicy
Arguments:
name: ${["access-policy"].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
- Policy
Data string - (Required only by
gcp.accesscontextmanager.AccessPolicyIamPolicy
) The policy data generated by agcp.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
- Policy
Data string - (Required only by
gcp.accesscontextmanager.AccessPolicyIamPolicy
) The policy data generated by agcp.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
- policy
Data String - (Required only by
gcp.accesscontextmanager.AccessPolicyIamPolicy
) The policy data generated by agcp.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
- policy
Data string - (Required only by
gcp.accesscontextmanager.AccessPolicyIamPolicy
) The policy data generated by agcp.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 agcp.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
- policy
Data String - (Required only by
gcp.accesscontextmanager.AccessPolicyIamPolicy
) The policy data generated by agcp.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.