UNPKG

@pulumi/gcp

Version:

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

115 lines 5.45 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.Application = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Allows creation and management of an App Engine application. * * > App Engine applications cannot be deleted once they're created; you have to delete the * entire project to delete the application. This provider will report the application has been * successfully deleted; this is a limitation of the provider, and will go away in the future. * This provider is not able to delete App Engine applications. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myProject = new gcp.organizations.Project("my_project", { * name: "My Project", * projectId: "your-project-id", * orgId: "1234567", * }); * const app = new gcp.appengine.Application("app", { * project: myProject.projectId, * locationId: "us-central", * }); * ``` * * ## Import * * Applications can be imported using the ID of the project the application belongs to, e.g. * * * `{{project-id}}` * * When using the `pulumi import` command, Applications can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:appengine/application:Application default {{project-id}} * ``` */ class Application extends pulumi.CustomResource { /** * Get an existing Application 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 Application(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Application. 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'] === Application.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["appId"] = state ? state.appId : undefined; resourceInputs["authDomain"] = state ? state.authDomain : undefined; resourceInputs["codeBucket"] = state ? state.codeBucket : undefined; resourceInputs["databaseType"] = state ? state.databaseType : undefined; resourceInputs["defaultBucket"] = state ? state.defaultBucket : undefined; resourceInputs["defaultHostname"] = state ? state.defaultHostname : undefined; resourceInputs["featureSettings"] = state ? state.featureSettings : undefined; resourceInputs["gcrDomain"] = state ? state.gcrDomain : undefined; resourceInputs["iap"] = state ? state.iap : undefined; resourceInputs["locationId"] = state ? state.locationId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["servingStatus"] = state ? state.servingStatus : undefined; resourceInputs["urlDispatchRules"] = state ? state.urlDispatchRules : undefined; } else { const args = argsOrState; if ((!args || args.locationId === undefined) && !opts.urn) { throw new Error("Missing required property 'locationId'"); } resourceInputs["authDomain"] = args ? args.authDomain : undefined; resourceInputs["databaseType"] = args ? args.databaseType : undefined; resourceInputs["featureSettings"] = args ? args.featureSettings : undefined; resourceInputs["iap"] = args ? args.iap : undefined; resourceInputs["locationId"] = args ? args.locationId : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["servingStatus"] = args ? args.servingStatus : undefined; resourceInputs["appId"] = undefined /*out*/; resourceInputs["codeBucket"] = undefined /*out*/; resourceInputs["defaultBucket"] = undefined /*out*/; resourceInputs["defaultHostname"] = undefined /*out*/; resourceInputs["gcrDomain"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["urlDispatchRules"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Application.__pulumiType, name, resourceInputs, opts); } } exports.Application = Application; /** @internal */ Application.__pulumiType = 'gcp:appengine/application:Application'; //# sourceMappingURL=application.js.map