Class AccountIamBinding
Allows creation and management of a single binding within IAM policy for an existing Google Cloud Platform Billing Account.
Note: This resource must not be used in conjunction with
gcp.billing.AccountIamMemberfor the same role or they will fight over what your policy should be.
Note: On create, this resource will overwrite members of any existing roles. Use
pulumi importand inspect the output to ensure your existing members are preserved.
Example Usage
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var binding = new Gcp.Billing.AccountIamBinding("binding", new Gcp.Billing.AccountIamBindingArgs
{
BillingAccountId = "00AA00-000AAA-00AA0A",
Members =
{
"user:alice@gmail.com",
},
Role = "roles/billing.viewer",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Billing
Assembly: Pulumi.Gcp.dll
Syntax
public class AccountIamBinding : CustomResource
Constructors
View SourceAccountIamBinding(String, AccountIamBindingArgs, CustomResourceOptions)
Create a AccountIamBinding resource with the given unique name, arguments, and options.
Declaration
public AccountIamBinding(string name, AccountIamBindingArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AccountIamBindingArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBillingAccountId
The billing account id.
Declaration
public Output<string> BillingAccountId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Condition
Declaration
public Output<AccountIamBindingCondition> Condition { get; }
Property Value
| Type | Description |
|---|---|
| Output<AccountIamBindingCondition> |
Etag
(Computed) The etag of the billing account's IAM policy.
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Members
A list of users that the role should apply to. For more details on format and restrictions see https://cloud.google.com/billing/reference/rest/v1/Policy#Binding
Declaration
public Output<ImmutableArray<string>> Members { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Role
The role that should be applied.
Declaration
public Output<string> Role { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AccountIamBindingState, CustomResourceOptions)
Get an existing AccountIamBinding resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AccountIamBinding Get(string name, Input<string> id, AccountIamBindingState 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. |
| AccountIamBindingState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AccountIamBinding |