Show / Hide Table of Contents

Class AccountIamPolicy

Allows management of the entire IAM policy for an existing Google Cloud Platform Billing Account.

Warning: Billing accounts have a default user that can be overwritten by use of this resource. The safest alternative is to use multiple gcp.billing.AccountIamBinding resources. If you do use this resource, the best way to be sure that you are not making dangerous changes is to start by importing your existing policy, and examining the diff very closely.

Note: This resource must not be used in conjunction with gcp.billing.AccountIamMember or gcp.billing.AccountIamBinding or they will fight over what your policy should be.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/billing.viewer" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.Billing.AccountIamPolicy("policy", new Gcp.Billing.AccountIamPolicyArgs
    {
        BillingAccountId = "00AA00-000AAA-00AA0A",
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}
Inheritance
System.Object
Resource
CustomResource
AccountIamPolicy
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Billing
Assembly: Pulumi.Gcp.dll
Syntax
public class AccountIamPolicy : CustomResource

Constructors

View Source

AccountIamPolicy(String, AccountIamPolicyArgs, CustomResourceOptions)

Create a AccountIamPolicy resource with the given unique name, arguments, and options.

Declaration
public AccountIamPolicy(string name, AccountIamPolicyArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

AccountIamPolicyArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

BillingAccountId

The billing account id.

Declaration
public Output<string> BillingAccountId { get; }
Property Value
Type Description
Output<System.String>
View Source

Etag

Declaration
public Output<string> Etag { get; }
Property Value
Type Description
Output<System.String>
View Source

PolicyData

The gcp.organizations.getIAMPolicy data source that represents the IAM policy that will be applied to the billing account. This policy overrides any existing policy applied to the billing account.

Declaration
public Output<string> PolicyData { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, AccountIamPolicyState, CustomResourceOptions)

Get an existing AccountIamPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static AccountIamPolicy Get(string name, Input<string> id, AccountIamPolicyState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

AccountIamPolicyState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
AccountIamPolicy
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.