UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

86 lines 3.52 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.BudgetResourceAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Service Catalog Budget Resource Association. * * > **Tip:** A "resource" is either a Service Catalog portfolio or product. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.servicecatalog.BudgetResourceAssociation("example", { * budgetName: "budget-pjtvyakdlyo3m", * resourceId: "prod-dnigbtea24ste", * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_servicecatalog_budget_resource_association` using the budget name and resource ID. For example: * * ```sh * $ pulumi import aws:servicecatalog/budgetResourceAssociation:BudgetResourceAssociation example budget-pjtvyakdlyo3m:prod-dnigbtea24ste * ``` */ class BudgetResourceAssociation extends pulumi.CustomResource { /** * Get an existing BudgetResourceAssociation 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 BudgetResourceAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of BudgetResourceAssociation. 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'] === BudgetResourceAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["budgetName"] = state?.budgetName; resourceInputs["region"] = state?.region; resourceInputs["resourceId"] = state?.resourceId; } else { const args = argsOrState; if (args?.budgetName === undefined && !opts.urn) { throw new Error("Missing required property 'budgetName'"); } if (args?.resourceId === undefined && !opts.urn) { throw new Error("Missing required property 'resourceId'"); } resourceInputs["budgetName"] = args?.budgetName; resourceInputs["region"] = args?.region; resourceInputs["resourceId"] = args?.resourceId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BudgetResourceAssociation.__pulumiType, name, resourceInputs, opts); } } exports.BudgetResourceAssociation = BudgetResourceAssociation; /** @internal */ BudgetResourceAssociation.__pulumiType = 'aws:servicecatalog/budgetResourceAssociation:BudgetResourceAssociation'; //# sourceMappingURL=budgetResourceAssociation.js.map