@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
123 lines • 4.83 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.Client = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Contains the data that describes an Identity Aware Proxy owned client.
*
* > **Note:** Only internal org clients can be created via declarative tools. External clients must be
* manually created via the GCP console. This restriction is due to the existing APIs and not lack of support
* in this tool.
*
* To get more information about Client, see:
*
* * [API documentation](https://cloud.google.com/iap/docs/reference/rest/v1/projects.brands.identityAwareProxyClients)
* * How-to Guides
* * [Setting up IAP Client](https://cloud.google.com/iap/docs/authentication-howto)
*
* ## Example Usage
*
* ### Iap Client
*
* ```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,
* });
* const projectClient = new gcp.iap.Client("project_client", {
* displayName: "Test Client",
* brand: projectBrand.name,
* });
* ```
*
* ## Import
*
* Client can be imported using any of these accepted formats:
*
* * `{{brand}}/identityAwareProxyClients/{{client_id}}`
*
* * `{{brand}}/{{client_id}}`
*
* When using the `pulumi import` command, Client can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:iap/client:Client default {{brand}}/identityAwareProxyClients/{{client_id}}
* ```
*
* ```sh
* $ pulumi import gcp:iap/client:Client default {{brand}}/{{client_id}}
* ```
*/
class Client extends pulumi.CustomResource {
/**
* Get an existing Client 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 Client(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Client. 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'] === Client.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["brand"] = state ? state.brand : undefined;
resourceInputs["clientId"] = state ? state.clientId : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["secret"] = state ? state.secret : undefined;
}
else {
const args = argsOrState;
if ((!args || args.brand === undefined) && !opts.urn) {
throw new Error("Missing required property 'brand'");
}
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["brand"] = args ? args.brand : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["clientId"] = undefined /*out*/;
resourceInputs["secret"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["secret"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Client.__pulumiType, name, resourceInputs, opts);
}
}
exports.Client = Client;
/** @internal */
Client.__pulumiType = 'gcp:iap/client:Client';
//# sourceMappingURL=client.js.map