@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
193 lines • 7.1 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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddonsConfig = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* Configures the add-ons for the Apigee organization. The existing add-on configuration will be fully replaced.
*
* To get more information about AddonsConfig, see:
*
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations#setaddons)
* * How-to Guides
* * [Creating an API organization](https://cloud.google.com/apigee/docs/api-platform/get-started/create-org)
*
* ## Example Usage
*
* ### Apigee Addons Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const testOrganization = new gcp.apigee.AddonsConfig("test_organization", {
* org: "test_organization",
* addonsConfig: {
* apiSecurityConfig: {
* enabled: true,
* },
* monetizationConfig: {
* enabled: true,
* },
* },
* });
* ```
* ### Apigee Addons Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const current = gcp.organizations.getClientConfig({});
* const apigee = new gcp.projects.Service("apigee", {
* project: current.then(current => current.project),
* service: "apigee.googleapis.com",
* });
* const compute = new gcp.projects.Service("compute", {
* project: current.then(current => current.project),
* service: "compute.googleapis.com",
* });
* const servicenetworking = new gcp.projects.Service("servicenetworking", {
* project: current.then(current => current.project),
* service: "servicenetworking.googleapis.com",
* });
* const apigeeNetwork = new gcp.compute.Network("apigee_network", {
* name: "apigee-network",
* project: current.then(current => current.project),
* }, {
* dependsOn: [compute],
* });
* const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", {
* name: "apigee-range",
* purpose: "VPC_PEERING",
* addressType: "INTERNAL",
* prefixLength: 16,
* network: apigeeNetwork.id,
* project: current.then(current => current.project),
* });
* const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", {
* network: apigeeNetwork.id,
* service: "servicenetworking.googleapis.com",
* reservedPeeringRanges: [apigeeRange.name],
* });
* const org = new gcp.apigee.Organization("org", {
* analyticsRegion: "us-central1",
* projectId: current.then(current => current.project),
* authorizedNetwork: apigeeNetwork.id,
* billingType: "EVALUATION",
* }, {
* dependsOn: [
* apigeeVpcConnection,
* apigee,
* ],
* });
* const testOrganization = new gcp.apigee.AddonsConfig("test_organization", {
* org: org.name,
* addonsConfig: {
* integrationConfig: {
* enabled: true,
* },
* apiSecurityConfig: {
* enabled: true,
* },
* connectorsPlatformConfig: {
* enabled: true,
* },
* monetizationConfig: {
* enabled: true,
* },
* advancedApiOpsConfig: {
* enabled: true,
* },
* },
* });
* ```
*
* ## Import
*
* AddonsConfig can be imported using any of these accepted formats:
*
* * `organizations/{{name}}`
* * `{{name}}`
*
* When using the `pulumi import` command, AddonsConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:apigee/addonsConfig:AddonsConfig default organizations/{{name}}
* $ pulumi import gcp:apigee/addonsConfig:AddonsConfig default {{name}}
* ```
*/
class AddonsConfig extends pulumi.CustomResource {
/**
* Get an existing AddonsConfig 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 AddonsConfig(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:apigee/addonsConfig:AddonsConfig';
/**
* Returns true if the given object is an instance of AddonsConfig. 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'] === AddonsConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addonsConfig"] = state?.addonsConfig;
resourceInputs["deletionPolicy"] = state?.deletionPolicy;
resourceInputs["org"] = state?.org;
}
else {
const args = argsOrState;
if (args?.org === undefined && !opts.urn) {
throw new Error("Missing required property 'org'");
}
resourceInputs["addonsConfig"] = args?.addonsConfig;
resourceInputs["deletionPolicy"] = args?.deletionPolicy;
resourceInputs["org"] = args?.org;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AddonsConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.AddonsConfig = AddonsConfig;
//# sourceMappingURL=addonsConfig.js.map