"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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkforcePoolProviderScimTenant = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a SCIM tenant configuration for a Workforce Pool Provider.
 * The SCIM tenant configuration allows for the synchronization of user/group identities from external identity provider into Google Cloud using the System for Cross-domain Identity Management (SCIM) protocol.
 *
 * To get more information about WorkforcePoolProviderScimTenant, see:
 *
 * * [API documentation](https://docs.cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers.scimTenants)
 * * How-to Guides
 *     * [Configure a SCIM Tenant](https://cloud.google.com/iam/docs/workforce-sign-in-microsoft-entra-id-scalable-groups?group_type=extended#extended-attributes)
 *
 * ## Example Usage
 *
 * ### Iam Workforce Pool Provider Scim Tenant Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const pool = new gcp.iam.WorkforcePool("pool", {
 *     workforcePoolId: "example-pool",
 *     parent: "organizations/123456789",
 *     location: "global",
 * });
 * const provider = new gcp.iam.WorkforcePoolProvider("provider", {
 *     location: "global",
 *     workforcePoolId: pool.workforcePoolId,
 *     providerId: "example-prvdr",
 *     attributeMapping: {
 *         "google.subject": "assertion.sub",
 *     },
 *     oidc: {
 *         issuerUri: "https://accounts.thirdparty.com",
 *         clientId: "client-id",
 *         clientSecret: {
 *             value: {
 *                 plainText: "client-secret",
 *             },
 *         },
 *         webSsoConfig: {
 *             responseType: "CODE",
 *             assertionClaimsBehavior: "MERGE_USER_INFO_OVER_ID_TOKEN_CLAIMS",
 *             additionalScopes: [
 *                 "groups",
 *                 "roles",
 *             ],
 *         },
 *     },
 *     displayName: "Display name",
 *     description: "A sample OIDC workforce pool provider.",
 *     disabled: false,
 *     attributeCondition: "true",
 * });
 * const example = new gcp.iam.WorkforcePoolProviderScimTenant("example", {
 *     location: "global",
 *     workforcePoolId: pool.workforcePoolId,
 *     providerId: provider.providerId,
 *     scimTenantId: "example-scim-tenant",
 *     displayName: "Example SCIM Tenant",
 *     description: "A basic SCIM tenant for IAM Workforce Pool Provider",
 *     claimMapping: {
 *         "google.subject": "user.externalId",
 *         "google.group": "group.externalId",
 *     },
 *     hardDelete: true,
 * });
 * ```
 *
 * ## Import
 *
 * WorkforcePoolProviderScimTenant can be imported using any of these accepted formats:
 *
 * * `locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/scimTenants/{{scim_tenant_id}}`
 *
 * * `{{location}}/{{workforce_pool_id}}/{{provider_id}}/{{scim_tenant_id}}`
 *
 * When using the `pulumi import` command, WorkforcePoolProviderScimTenant can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:iam/workforcePoolProviderScimTenant:WorkforcePoolProviderScimTenant default locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/scimTenants/{{scim_tenant_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:iam/workforcePoolProviderScimTenant:WorkforcePoolProviderScimTenant default {{location}}/{{workforce_pool_id}}/{{provider_id}}/{{scim_tenant_id}}
 * ```
 */
class WorkforcePoolProviderScimTenant extends pulumi.CustomResource {
    /**
     * Get an existing WorkforcePoolProviderScimTenant 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 WorkforcePoolProviderScimTenant(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of WorkforcePoolProviderScimTenant.  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'] === WorkforcePoolProviderScimTenant.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["baseUri"] = state?.baseUri;
            resourceInputs["claimMapping"] = state?.claimMapping;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["hardDelete"] = state?.hardDelete;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["providerId"] = state?.providerId;
            resourceInputs["purgeTime"] = state?.purgeTime;
            resourceInputs["scimTenantId"] = state?.scimTenantId;
            resourceInputs["serviceAgent"] = state?.serviceAgent;
            resourceInputs["state"] = state?.state;
            resourceInputs["workforcePoolId"] = state?.workforcePoolId;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.providerId === undefined && !opts.urn) {
                throw new Error("Missing required property 'providerId'");
            }
            if (args?.scimTenantId === undefined && !opts.urn) {
                throw new Error("Missing required property 'scimTenantId'");
            }
            if (args?.workforcePoolId === undefined && !opts.urn) {
                throw new Error("Missing required property 'workforcePoolId'");
            }
            resourceInputs["claimMapping"] = args?.claimMapping;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["hardDelete"] = args?.hardDelete;
            resourceInputs["location"] = args?.location;
            resourceInputs["providerId"] = args?.providerId;
            resourceInputs["scimTenantId"] = args?.scimTenantId;
            resourceInputs["workforcePoolId"] = args?.workforcePoolId;
            resourceInputs["baseUri"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["purgeTime"] = undefined /*out*/;
            resourceInputs["serviceAgent"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(WorkforcePoolProviderScimTenant.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WorkforcePoolProviderScimTenant = WorkforcePoolProviderScimTenant;
/** @internal */
WorkforcePoolProviderScimTenant.__pulumiType = 'gcp:iam/workforcePoolProviderScimTenant:WorkforcePoolProviderScimTenant';
//# sourceMappingURL=workforcePoolProviderScimTenant.js.map