UNPKG

@pulumi/gcp

Version:

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

145 lines 6.25 kB
"use strict"; // *** 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.Brand = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * > **Warning:** This resource is deprecated on Jan 22, 2025. After Jan 19, 2026 the `gcp.iap.Brand` Terraform resource will no longer function as intended due to the deprecation of the IAP OAuth Admin APIs. New projects will not be able to use these APIs. March 19, 2026 The IAP OAuth Admin APIs will be permanently shut down. Access to this feature will no longer be available. * * OAuth brand data. Only "Organization Internal" brands can be created * programmatically via API. To convert it into an external brands * please use the GCP Console. * * > **Note:** Brands can only be created once for a Google Cloud * project and the underlying Google API doesn't not support DELETE or PATCH methods. * Destroying a Terraform-managed Brand will remove it from state * but *will not delete it from Google Cloud.* * * To get more information about Brand, see: * * * [API documentation](https://cloud.google.com/iap/docs/reference/rest/v1/projects.brands) * * How-to Guides * * [Setting up IAP Brand](https://cloud.google.com/iap/docs/tutorial-gce#set_up_iap) * * ## Example Usage * * ### Iap Brand * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = new gcp.organizations.Project("project", { * projectId: "my-project", * name: "my-project", * orgId: "123456789", * deletionPolicy: "DELETE", * }); * const projectService = new gcp.projects.Service("project_service", { * project: project.projectId, * service: "iap.googleapis.com", * }); * const projectBrand = new gcp.iap.Brand("project_brand", { * supportEmail: "support@example.com", * applicationTitle: "Cloud IAP protected Application", * project: projectService.project, * }); * ``` * * ## Import * * Brand can be imported using any of these accepted formats: * * * `projects/{{project_id}}/brands/{{brand_id}}` * * `projects/{{project_number}}/brands/{{brand_id}}` * * `{{project_number}}/{{brand_id}}` * * When using the `pulumi import` command, Brand can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:iap/brand:Brand default projects/{{project_id}}/brands/{{brand_id}} * $ pulumi import gcp:iap/brand:Brand default projects/{{project_number}}/brands/{{brand_id}} * $ pulumi import gcp:iap/brand:Brand default {{project_number}}/{{brand_id}} * ``` */ class Brand extends pulumi.CustomResource { /** * Get an existing Brand 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 Brand(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:iap/brand:Brand'; /** * Returns true if the given object is an instance of Brand. 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'] === Brand.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationTitle"] = state?.applicationTitle; resourceInputs["name"] = state?.name; resourceInputs["orgInternalOnly"] = state?.orgInternalOnly; resourceInputs["project"] = state?.project; resourceInputs["supportEmail"] = state?.supportEmail; } else { const args = argsOrState; if (args?.applicationTitle === undefined && !opts.urn) { throw new Error("Missing required property 'applicationTitle'"); } if (args?.supportEmail === undefined && !opts.urn) { throw new Error("Missing required property 'supportEmail'"); } resourceInputs["applicationTitle"] = args?.applicationTitle; resourceInputs["project"] = args?.project; resourceInputs["supportEmail"] = args?.supportEmail; resourceInputs["name"] = undefined /*out*/; resourceInputs["orgInternalOnly"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Brand.__pulumiType, name, resourceInputs, opts); } } exports.Brand = Brand; //# sourceMappingURL=brand.js.map