@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
133 lines (132 loc) • 5.01 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Allows creation and management of a Google Cloud Billing Subaccount.
*
* !> **WARNING:** Deleting this resource will not delete or close the billing subaccount.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const subaccount = new gcp.billing.SubAccount("subaccount", {
* displayName: "My Billing Account",
* masterBillingAccount: "012345-567890-ABCDEF",
* });
* ```
*
* ## Import
*
* Billing Subaccounts can be imported using any of these accepted formats:
*
* * `billingAccounts/{billing_account_id}`
*
* When using the `pulumi import` command, Billing Subaccounts can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:billing/subAccount:SubAccount default billingAccounts/{billing_account_id}
* ```
*/
export declare class SubAccount extends pulumi.CustomResource {
/**
* Get an existing SubAccount resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubAccountState, opts?: pulumi.CustomResourceOptions): SubAccount;
/**
* Returns true if the given object is an instance of SubAccount. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is SubAccount;
/**
* The billing account id.
*/
readonly billingAccountId: pulumi.Output<string>;
/**
* If set to "RENAME_ON_DESTROY" the billing account displayName
* will be changed to "Destroyed" along with a timestamp. If set to "" this will not occur.
* Default is "".
*/
readonly deletionPolicy: pulumi.Output<string | undefined>;
/**
* The display name of the billing account.
*/
readonly displayName: pulumi.Output<string>;
/**
* The name of the master billing account that the subaccount
* will be created under in the form `{billing_account_id}` or `billingAccounts/{billing_account_id}`.
*/
readonly masterBillingAccount: pulumi.Output<string>;
/**
* The resource name of the billing account in the form `billingAccounts/{billing_account_id}`.
*/
readonly name: pulumi.Output<string>;
/**
* `true` if the billing account is open, `false` if the billing account is closed.
*/
readonly open: pulumi.Output<boolean>;
/**
* Create a SubAccount resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SubAccountArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SubAccount resources.
*/
export interface SubAccountState {
/**
* The billing account id.
*/
billingAccountId?: pulumi.Input<string>;
/**
* If set to "RENAME_ON_DESTROY" the billing account displayName
* will be changed to "Destroyed" along with a timestamp. If set to "" this will not occur.
* Default is "".
*/
deletionPolicy?: pulumi.Input<string>;
/**
* The display name of the billing account.
*/
displayName?: pulumi.Input<string>;
/**
* The name of the master billing account that the subaccount
* will be created under in the form `{billing_account_id}` or `billingAccounts/{billing_account_id}`.
*/
masterBillingAccount?: pulumi.Input<string>;
/**
* The resource name of the billing account in the form `billingAccounts/{billing_account_id}`.
*/
name?: pulumi.Input<string>;
/**
* `true` if the billing account is open, `false` if the billing account is closed.
*/
open?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a SubAccount resource.
*/
export interface SubAccountArgs {
/**
* If set to "RENAME_ON_DESTROY" the billing account displayName
* will be changed to "Destroyed" along with a timestamp. If set to "" this will not occur.
* Default is "".
*/
deletionPolicy?: pulumi.Input<string>;
/**
* The display name of the billing account.
*/
displayName: pulumi.Input<string>;
/**
* The name of the master billing account that the subaccount
* will be created under in the form `{billing_account_id}` or `billingAccounts/{billing_account_id}`.
*/
masterBillingAccount: pulumi.Input<string>;
}