1. Packages
  2. Google Cloud Native
  3. API Docs
  4. cloudbilling
  5. cloudbilling/v1
  6. BillingAccount

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.cloudbilling/v1.BillingAccount

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

This method creates billing subaccounts. Google Cloud resellers should use the Channel Services APIs, accounts.customers.create and accounts.customers.entitlements.create. When creating a subaccount, the current authenticated user must have the billing.accounts.update IAM permission on the parent account, which is typically given to billing account administrators. This method will return an error if the parent account has not been provisioned for subaccounts. Auto-naming is currently not supported for this resource. Note - this resource’s API doesn’t support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Create BillingAccount Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new BillingAccount(name: string, args?: BillingAccountArgs, opts?: CustomResourceOptions);
@overload
def BillingAccount(resource_name: str,
                   args: Optional[BillingAccountArgs] = None,
                   opts: Optional[ResourceOptions] = None)

@overload
def BillingAccount(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   display_name: Optional[str] = None,
                   master_billing_account: Optional[str] = None,
                   parent: Optional[str] = None)
func NewBillingAccount(ctx *Context, name string, args *BillingAccountArgs, opts ...ResourceOption) (*BillingAccount, error)
public BillingAccount(string name, BillingAccountArgs? args = null, CustomResourceOptions? opts = null)
public BillingAccount(String name, BillingAccountArgs args)
public BillingAccount(String name, BillingAccountArgs args, CustomResourceOptions options)
type: google-native:cloudbilling/v1:BillingAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args BillingAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args BillingAccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args BillingAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args BillingAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BillingAccountArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var billingAccountResource = new GoogleNative.CloudBilling.V1.BillingAccount("billingAccountResource", new()
{
    DisplayName = "string",
    MasterBillingAccount = "string",
    Parent = "string",
});
Copy
example, err := cloudbilling.NewBillingAccount(ctx, "billingAccountResource", &cloudbilling.BillingAccountArgs{
	DisplayName:          pulumi.String("string"),
	MasterBillingAccount: pulumi.String("string"),
	Parent:               pulumi.String("string"),
})
Copy
var billingAccountResource = new BillingAccount("billingAccountResource", BillingAccountArgs.builder()
    .displayName("string")
    .masterBillingAccount("string")
    .parent("string")
    .build());
Copy
billing_account_resource = google_native.cloudbilling.v1.BillingAccount("billingAccountResource",
    display_name="string",
    master_billing_account="string",
    parent="string")
Copy
const billingAccountResource = new google_native.cloudbilling.v1.BillingAccount("billingAccountResource", {
    displayName: "string",
    masterBillingAccount: "string",
    parent: "string",
});
Copy
type: google-native:cloudbilling/v1:BillingAccount
properties:
    displayName: string
    masterBillingAccount: string
    parent: string
Copy

BillingAccount Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The BillingAccount resource accepts the following input properties:

DisplayName string
The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.
MasterBillingAccount string
If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
Parent string
Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg billingAccounts/012345-567890-ABCDEF
DisplayName string
The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.
MasterBillingAccount string
If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
Parent string
Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg billingAccounts/012345-567890-ABCDEF
displayName String
The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.
masterBillingAccount String
If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
parent String
Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg billingAccounts/012345-567890-ABCDEF
displayName string
The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.
masterBillingAccount string
If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
parent string
Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg billingAccounts/012345-567890-ABCDEF
display_name str
The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.
master_billing_account str
If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
parent str
Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg billingAccounts/012345-567890-ABCDEF
displayName String
The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.
masterBillingAccount String
If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
parent String
Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg billingAccounts/012345-567890-ABCDEF

Outputs

All input properties are implicitly available as output properties. Additionally, the BillingAccount resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.
Open bool
True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.
Open bool
True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.
open Boolean
True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.
id string
The provider-assigned unique ID for this managed resource.
name string
The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.
open boolean
True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.
id str
The provider-assigned unique ID for this managed resource.
name str
The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.
open bool
True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.
open Boolean
True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi