"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.WorkforcePoolProviderScimToken = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a SCIM Token for a Workforce Pool Provider Scim Tenant.
 * The SCIM Token is used for authenticating SCIM provisioning requests during the synchronization of user/group identities from external identity provider into Google Cloud using the System for Cross-domain Identity Management (SCIM) protocol. This needs to be provided in the Secret (Long Lived) Token field when configuring SCIM on an IdP.
 *
 * To get more information about WorkforcePoolProviderScimToken, see:
 *
 * * [API documentation](https://docs.cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers.scimTenants.tokens)
 * * How-to Guides
 *     * [Create a SCIM Token for the 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 Token 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 tenant = new gcp.iam.WorkforcePoolProviderScimTenant("tenant", {
 *     location: "global",
 *     workforcePoolId: pool.workforcePoolId,
 *     providerId: provider.providerId,
 *     scimTenantId: "example-tenant",
 *     displayName: "SCIM Tenant display Name",
 *     description: "A SCIM Tenant for IAM Workforce Pool Provider",
 *     claimMapping: {
 *         "google.subject": "user.externalId",
 *         "google.group": "group.externalId",
 *     },
 *     hardDelete: true,
 * });
 * const example = new gcp.iam.WorkforcePoolProviderScimToken("example", {
 *     location: "global",
 *     workforcePoolId: pool.workforcePoolId,
 *     providerId: provider.providerId,
 *     scimTenantId: tenant.scimTenantId,
 *     scimTokenId: "example-scim-token",
 *     displayName: "SCIM Token display Name",
 * });
 * ```
 *
 * ## Import
 *
 * WorkforcePoolProviderScimToken can be imported using any of these accepted formats:
 *
 * * `locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/scimTenants/{{scim_tenant_id}}/tokens/{{scim_token_id}}`
 *
 * * `{{location}}/{{workforce_pool_id}}/{{provider_id}}/{{scim_tenant_id}}/{{scim_token_id}}`
 *
 * When using the `pulumi import` command, WorkforcePoolProviderScimToken can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:iam/workforcePoolProviderScimToken:WorkforcePoolProviderScimToken default locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/scimTenants/{{scim_tenant_id}}/tokens/{{scim_token_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:iam/workforcePoolProviderScimToken:WorkforcePoolProviderScimToken default {{location}}/{{workforce_pool_id}}/{{provider_id}}/{{scim_tenant_id}}/{{scim_token_id}}
 * ```
 */
class WorkforcePoolProviderScimToken extends pulumi.CustomResource {
    /**
     * Get an existing WorkforcePoolProviderScimToken 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 WorkforcePoolProviderScimToken(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of WorkforcePoolProviderScimToken.  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'] === WorkforcePoolProviderScimToken.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["providerId"] = state?.providerId;
            resourceInputs["scimTenantId"] = state?.scimTenantId;
            resourceInputs["scimTokenId"] = state?.scimTokenId;
            resourceInputs["securityToken"] = state?.securityToken;
            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?.scimTokenId === undefined && !opts.urn) {
                throw new Error("Missing required property 'scimTokenId'");
            }
            if (args?.workforcePoolId === undefined && !opts.urn) {
                throw new Error("Missing required property 'workforcePoolId'");
            }
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["location"] = args?.location;
            resourceInputs["providerId"] = args?.providerId;
            resourceInputs["scimTenantId"] = args?.scimTenantId;
            resourceInputs["scimTokenId"] = args?.scimTokenId;
            resourceInputs["workforcePoolId"] = args?.workforcePoolId;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["securityToken"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(WorkforcePoolProviderScimToken.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WorkforcePoolProviderScimToken = WorkforcePoolProviderScimToken;
/** @internal */
WorkforcePoolProviderScimToken.__pulumiType = 'gcp:iam/workforcePoolProviderScimToken:WorkforcePoolProviderScimToken';
//# sourceMappingURL=workforcePoolProviderScimToken.js.map