UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

100 lines 4.11 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.AwsAccount = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as grafana from "@pulumi/grafana"; * import * as grafana from "@pulumiverse/grafana"; * * const test = grafana.cloud.getStack({ * slug: "gcloudstacktest", * }); * const testGetRole = aws.iam.getRole({ * name: "my-role", * }); * const testAwsAccount = new grafana.cloudprovider.AwsAccount("test", { * stackId: test.then(test => test.id), * roleArn: testGetRole.then(testGetRole => testGetRole.arn), * regions: [ * "us-east-1", * "us-east-2", * "us-west-1", * ], * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:cloudProvider/awsAccount:AwsAccount name "{{ stack_id }}:{{ resource_id }}" * ``` */ class AwsAccount extends pulumi.CustomResource { /** * Get an existing AwsAccount 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 AwsAccount(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AwsAccount. 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'] === AwsAccount.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["regions"] = state ? state.regions : undefined; resourceInputs["resourceId"] = state ? state.resourceId : undefined; resourceInputs["roleArn"] = state ? state.roleArn : undefined; resourceInputs["stackId"] = state ? state.stackId : undefined; } else { const args = argsOrState; if ((!args || args.regions === undefined) && !opts.urn) { throw new Error("Missing required property 'regions'"); } if ((!args || args.roleArn === undefined) && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } if ((!args || args.stackId === undefined) && !opts.urn) { throw new Error("Missing required property 'stackId'"); } resourceInputs["name"] = args ? args.name : undefined; resourceInputs["regions"] = args ? args.regions : undefined; resourceInputs["roleArn"] = args ? args.roleArn : undefined; resourceInputs["stackId"] = args ? args.stackId : undefined; resourceInputs["resourceId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "grafana:cloud/providerAwsAccount:ProviderAwsAccount" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(AwsAccount.__pulumiType, name, resourceInputs, opts); } } exports.AwsAccount = AwsAccount; /** @internal */ AwsAccount.__pulumiType = 'grafana:cloudProvider/awsAccount:AwsAccount'; //# sourceMappingURL=awsAccount.js.map