"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.Settings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * IAP settings - manage IAP settings
 *
 * To get more information about Settings, see:
 *
 * * [API documentation](https://cloud.google.com/iap/docs/reference/rest/v1/IapSettings)
 * * How-to Guides
 *     * [Customizing IAP](https://cloud.google.com/iap/docs/customizing)
 *
 * ## Example Usage
 *
 * ### Iap Settings Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const defaultHealthCheck = new gcp.compute.HealthCheck("default", {
 *     name: "iap-bs-health-check",
 *     checkIntervalSec: 1,
 *     timeoutSec: 1,
 *     tcpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     name: "iap-settings-tf",
 *     region: "us-central1",
 *     healthChecks: defaultHealthCheck.id,
 *     connectionDrainingTimeoutSec: 10,
 *     sessionAffinity: "CLIENT_IP",
 * });
 * const iapSettings = new gcp.iap.Settings("iap_settings", {
 *     name: pulumi.all([project, _default.name]).apply(([project, name]) => `projects/${project.number}/iap_web/compute-us-central1/services/${name}`),
 *     accessSettings: {
 *         identitySources: ["WORKFORCE_IDENTITY_FEDERATION"],
 *         allowedDomainsSettings: {
 *             domains: ["test.abc.com"],
 *             enable: true,
 *         },
 *         corsSettings: {
 *             allowHttpOptions: true,
 *         },
 *         reauthSettings: {
 *             method: "SECURE_KEY",
 *             maxAge: "305s",
 *             policyType: "MINIMUM",
 *         },
 *         gcipSettings: {
 *             loginPageUri: "https://test.com/?apiKey=abc",
 *         },
 *         oauthSettings: {
 *             loginHint: "test",
 *         },
 *         workforceIdentitySettings: {
 *             workforcePools: "wif-pool",
 *             oauth2: {
 *                 clientId: "test-client-id",
 *                 clientSecret: "test-client-secret",
 *             },
 *         },
 *     },
 *     applicationSettings: {
 *         cookieDomain: "test.abc.com",
 *         csmSettings: {
 *             rctokenAud: "test-aud-set",
 *         },
 *         accessDeniedPageSettings: {
 *             accessDeniedPageUri: "test-uri",
 *             generateTroubleshootingUri: true,
 *             remediationTokenGenerationEnabled: false,
 *         },
 *         attributePropagationSettings: {
 *             outputCredentials: ["HEADER"],
 *             expression: "attributes.saml_attributes.filter(attribute, attribute.name in [\"test1\", \"test2\"])",
 *             enable: false,
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Settings can be imported using any of these accepted formats:
 *
 * * `{{name}}/iapSettings`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Settings can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:iap/settings:Settings default {{name}}/iapSettings
 * ```
 *
 * ```sh
 * $ pulumi import gcp:iap/settings:Settings default {{name}}
 * ```
 */
class Settings extends pulumi.CustomResource {
    /**
     * Get an existing Settings 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 Settings(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Settings.  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'] === Settings.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accessSettings"] = state?.accessSettings;
            resourceInputs["applicationSettings"] = state?.applicationSettings;
            resourceInputs["name"] = state?.name;
        }
        else {
            const args = argsOrState;
            resourceInputs["accessSettings"] = args?.accessSettings;
            resourceInputs["applicationSettings"] = args?.applicationSettings;
            resourceInputs["name"] = args?.name;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Settings.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Settings = Settings;
/** @internal */
Settings.__pulumiType = 'gcp:iap/settings:Settings';
//# sourceMappingURL=settings.js.map