UNPKG

@pulumi/gcp

Version:

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

172 lines 6.06 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.AddonsConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = 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}} * ``` * * ```sh * $ 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, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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 ? state.addonsConfig : undefined; resourceInputs["org"] = state ? state.org : undefined; } else { const args = argsOrState; if ((!args || args.org === undefined) && !opts.urn) { throw new Error("Missing required property 'org'"); } resourceInputs["addonsConfig"] = args ? args.addonsConfig : undefined; resourceInputs["org"] = args ? args.org : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AddonsConfig.__pulumiType, name, resourceInputs, opts); } } exports.AddonsConfig = AddonsConfig; /** @internal */ AddonsConfig.__pulumiType = 'gcp:apigee/addonsConfig:AddonsConfig'; //# sourceMappingURL=addonsConfig.js.map