@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
115 lines • 5 kB
JavaScript
// *** 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.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, { ...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?.appId;
resourceInputs["authDomain"] = state?.authDomain;
resourceInputs["codeBucket"] = state?.codeBucket;
resourceInputs["databaseType"] = state?.databaseType;
resourceInputs["defaultBucket"] = state?.defaultBucket;
resourceInputs["defaultHostname"] = state?.defaultHostname;
resourceInputs["featureSettings"] = state?.featureSettings;
resourceInputs["gcrDomain"] = state?.gcrDomain;
resourceInputs["iap"] = state?.iap;
resourceInputs["locationId"] = state?.locationId;
resourceInputs["name"] = state?.name;
resourceInputs["project"] = state?.project;
resourceInputs["servingStatus"] = state?.servingStatus;
resourceInputs["urlDispatchRules"] = state?.urlDispatchRules;
}
else {
const args = argsOrState;
if (args?.locationId === undefined && !opts.urn) {
throw new Error("Missing required property 'locationId'");
}
resourceInputs["authDomain"] = args?.authDomain;
resourceInputs["databaseType"] = args?.databaseType;
resourceInputs["featureSettings"] = args?.featureSettings;
resourceInputs["iap"] = args?.iap;
resourceInputs["locationId"] = args?.locationId;
resourceInputs["project"] = args?.project;
resourceInputs["servingStatus"] = args?.servingStatus;
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
;