Google Cloud v8.22.0 published on Thursday, Mar 13, 2025 by Pulumi
gcp.billing.getAccountIamPolicy
Explore with Pulumi AI
Retrieves the current IAM policy data for a Billing Account.
example
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = gcp.billing.getAccountIamPolicy({
    billingAccountId: "MEEP-MEEP-MEEP-MEEP-MEEP",
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.billing.get_account_iam_policy(billing_account_id="MEEP-MEEP-MEEP-MEEP-MEEP")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/billing"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := billing.LookupAccountIamPolicy(ctx, &billing.LookupAccountIamPolicyArgs{
			BillingAccountId: "MEEP-MEEP-MEEP-MEEP-MEEP",
		}, 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.Billing.GetAccountIamPolicy.Invoke(new()
    {
        BillingAccountId = "MEEP-MEEP-MEEP-MEEP-MEEP",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.billing.BillingFunctions;
import com.pulumi.gcp.billing.inputs.GetAccountIamPolicyArgs;
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 = BillingFunctions.getAccountIamPolicy(GetAccountIamPolicyArgs.builder()
            .billingAccountId("MEEP-MEEP-MEEP-MEEP-MEEP")
            .build());
    }
}
variables:
  policy:
    fn::invoke:
      function: gcp:billing:getAccountIamPolicy
      arguments:
        billingAccountId: MEEP-MEEP-MEEP-MEEP-MEEP
Using getAccountIamPolicy
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 getAccountIamPolicy(args: GetAccountIamPolicyArgs, opts?: InvokeOptions): Promise<GetAccountIamPolicyResult>
function getAccountIamPolicyOutput(args: GetAccountIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetAccountIamPolicyResult>def get_account_iam_policy(billing_account_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAccountIamPolicyResult
def get_account_iam_policy_output(billing_account_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAccountIamPolicyResult]func LookupAccountIamPolicy(ctx *Context, args *LookupAccountIamPolicyArgs, opts ...InvokeOption) (*LookupAccountIamPolicyResult, error)
func LookupAccountIamPolicyOutput(ctx *Context, args *LookupAccountIamPolicyOutputArgs, opts ...InvokeOption) LookupAccountIamPolicyResultOutput> Note: This function is named LookupAccountIamPolicy in the Go SDK.
public static class GetAccountIamPolicy 
{
    public static Task<GetAccountIamPolicyResult> InvokeAsync(GetAccountIamPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountIamPolicyResult> Invoke(GetAccountIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAccountIamPolicyResult> getAccountIamPolicy(GetAccountIamPolicyArgs args, InvokeOptions options)
public static Output<GetAccountIamPolicyResult> getAccountIamPolicy(GetAccountIamPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:billing/getAccountIamPolicy:getAccountIamPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BillingAccount stringId 
- The billing account id.
- BillingAccount stringId 
- The billing account id.
- billingAccount StringId 
- The billing account id.
- billingAccount stringId 
- The billing account id.
- billing_account_ strid 
- The billing account id.
- billingAccount StringId 
- The billing account id.
getAccountIamPolicy Result
The following output properties are available:
- BillingAccount stringId 
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- PolicyData string
- (Computed) The policy data
- BillingAccount stringId 
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- PolicyData string
- (Computed) The policy data
- billingAccount StringId 
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- policyData String
- (Computed) The policy data
- billingAccount stringId 
- etag string
- (Computed) The etag of the IAM policy.
- id string
- The provider-assigned unique ID for this managed resource.
- policyData string
- (Computed) The policy data
- billing_account_ strid 
- etag str
- (Computed) The etag of the IAM policy.
- id str
- The provider-assigned unique ID for this managed resource.
- policy_data str
- (Computed) The policy data
- billingAccount StringId 
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- policyData String
- (Computed) The policy data
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.