All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.billing.kotlin.SubAccountArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.billing.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.billing.SubAccountArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * 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",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * subaccount = gcp.billing.SubAccount("subaccount",
 *     display_name="My Billing Account",
 *     master_billing_account="012345-567890-ABCDEF")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var subaccount = new Gcp.Billing.SubAccount("subaccount", new()
 *     {
 *         DisplayName = "My Billing Account",
 *         MasterBillingAccount = "012345-567890-ABCDEF",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/billing"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := billing.NewSubAccount(ctx, "subaccount", &billing.SubAccountArgs{
 * 			DisplayName:          pulumi.String("My Billing Account"),
 * 			MasterBillingAccount: pulumi.String("012345-567890-ABCDEF"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.billing.SubAccount;
 * import com.pulumi.gcp.billing.SubAccountArgs;
 * 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) {
 *         var subaccount = new SubAccount("subaccount", SubAccountArgs.builder()
 *             .displayName("My Billing Account")
 *             .masterBillingAccount("012345-567890-ABCDEF")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   subaccount:
 *     type: gcp:billing:SubAccount
 *     properties:
 *       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}
 * ```
 * @property deletionPolicy If set to "RENAME_ON_DESTROY" the billing account display_name
 * will be changed to "Destroyed" along with a timestamp.  If set to "" this will not occur.
 * Default is "".
 * @property displayName The display name of the billing account.
 * @property masterBillingAccount 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}`.
 */
public data class SubAccountArgs(
    public val deletionPolicy: Output? = null,
    public val displayName: Output? = null,
    public val masterBillingAccount: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.billing.SubAccountArgs =
        com.pulumi.gcp.billing.SubAccountArgs.builder()
            .deletionPolicy(deletionPolicy?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .masterBillingAccount(masterBillingAccount?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SubAccountArgs].
 */
@PulumiTagMarker
public class SubAccountArgsBuilder internal constructor() {
    private var deletionPolicy: Output? = null

    private var displayName: Output? = null

    private var masterBillingAccount: Output? = null

    /**
     * @param value If set to "RENAME_ON_DESTROY" the billing account display_name
     * will be changed to "Destroyed" along with a timestamp.  If set to "" this will not occur.
     * Default is "".
     */
    @JvmName("dtdpvquwjwnxlhwn")
    public suspend fun deletionPolicy(`value`: Output) {
        this.deletionPolicy = value
    }

    /**
     * @param value The display name of the billing account.
     */
    @JvmName("pckkswyqcytfhbns")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value 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}`.
     */
    @JvmName("xocdqadovlfbrupn")
    public suspend fun masterBillingAccount(`value`: Output) {
        this.masterBillingAccount = value
    }

    /**
     * @param value If set to "RENAME_ON_DESTROY" the billing account display_name
     * will be changed to "Destroyed" along with a timestamp.  If set to "" this will not occur.
     * Default is "".
     */
    @JvmName("qqauvycroaviipxs")
    public suspend fun deletionPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deletionPolicy = mapped
    }

    /**
     * @param value The display name of the billing account.
     */
    @JvmName("xlqaxcofmfewtoxj")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value 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}`.
     */
    @JvmName("bnuoisdsewnferho")
    public suspend fun masterBillingAccount(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.masterBillingAccount = mapped
    }

    internal fun build(): SubAccountArgs = SubAccountArgs(
        deletionPolicy = deletionPolicy,
        displayName = displayName,
        masterBillingAccount = masterBillingAccount,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy