@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
77 lines • 3.38 kB
JavaScript
;
// *** 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.EnvironmentAddonsConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Enable/Disable add-ons for an Apigee environment.
*
* To get more information about EnvironmentAddonsConfig, see:
*
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.addonsConfig/setAddonEnablement)
* * How-to Guides
* * [Enable Analytics Add-On](https://cloud.google.com/apigee/docs/api-platform/reference/manage-analytics-add-on)
*
* ## Example Usage
*
* ## Import
*
* EnvironmentAddonsConfig can be imported using any of these accepted formats:
*
* * `{{env_id}}`
*
* When using the `pulumi import` command, EnvironmentAddonsConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:apigee/environmentAddonsConfig:EnvironmentAddonsConfig default {{env_id}}
* ```
*/
class EnvironmentAddonsConfig extends pulumi.CustomResource {
/**
* Get an existing EnvironmentAddonsConfig 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 EnvironmentAddonsConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of EnvironmentAddonsConfig. 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'] === EnvironmentAddonsConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["analyticsEnabled"] = state ? state.analyticsEnabled : undefined;
resourceInputs["envId"] = state ? state.envId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.envId === undefined) && !opts.urn) {
throw new Error("Missing required property 'envId'");
}
resourceInputs["analyticsEnabled"] = args ? args.analyticsEnabled : undefined;
resourceInputs["envId"] = args ? args.envId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(EnvironmentAddonsConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.EnvironmentAddonsConfig = EnvironmentAddonsConfig;
/** @internal */
EnvironmentAddonsConfig.__pulumiType = 'gcp:apigee/environmentAddonsConfig:EnvironmentAddonsConfig';
//# sourceMappingURL=environmentAddonsConfig.js.map