UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

90 lines 4.1 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.BillingAccountExclusion = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const my_exclusion = new gcp.logging.BillingAccountExclusion("my-exclusion", { * name: "my-instance-debug-exclusion", * billingAccount: "ABCDEF-012345-GHIJKL", * description: "Exclude GCE instance debug logs", * filter: "resource.type = gce_instance AND severity <= DEBUG", * }); * ``` * * ## Import * * Billing account logging exclusions can be imported using their URI, e.g. * * * `billingAccounts/{{billing_account}}/exclusions/{{name}}` * * When using the `pulumi import` command, billing account logging exclusions can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:logging/billingAccountExclusion:BillingAccountExclusion default billingAccounts/{{billing_account}}/exclusions/{{name}} * ``` */ class BillingAccountExclusion extends pulumi.CustomResource { /** * Get an existing BillingAccountExclusion 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, id, state, opts) { return new BillingAccountExclusion(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BillingAccountExclusion. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === BillingAccountExclusion.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["billingAccount"] = state ? state.billingAccount : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["disabled"] = state ? state.disabled : undefined; resourceInputs["filter"] = state ? state.filter : undefined; resourceInputs["name"] = state ? state.name : undefined; } else { const args = argsOrState; if ((!args || args.billingAccount === undefined) && !opts.urn) { throw new Error("Missing required property 'billingAccount'"); } if ((!args || args.filter === undefined) && !opts.urn) { throw new Error("Missing required property 'filter'"); } resourceInputs["billingAccount"] = args ? args.billingAccount : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["disabled"] = args ? args.disabled : undefined; resourceInputs["filter"] = args ? args.filter : undefined; resourceInputs["name"] = args ? args.name : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BillingAccountExclusion.__pulumiType, name, resourceInputs, opts); } } exports.BillingAccountExclusion = BillingAccountExclusion; /** @internal */ BillingAccountExclusion.__pulumiType = 'gcp:logging/billingAccountExclusion:BillingAccountExclusion'; //# sourceMappingURL=billingAccountExclusion.js.map